appuio / cloud-portal

APPUiO Cloud Portal (Web Frontend)
Apache License 2.0
5 stars 0 forks source link

Accept Invitations #514

Closed ccremer closed 1 year ago

ccremer commented 1 year ago

Summary

Part of #460 This feature adds the logic to accept Invitations (as created by #512 ). Due to the asynchronous nature of the backend/API, after redeeming the invitation the Portal is polling the invitation object up to 1 minute. If the redeem was successful, a toast message is displayed. This allows the user to navigate away from the invitation view while the invitation process continues in the background.

Checklist

github-actions[bot] commented 1 year ago

🚀 Preview deployment active

App URL https://portal-pr-514-appuio-control-api-preview.apps.cloudscale-lpg-2.appuio.cloud
Revision 6d228eda226b8202114003de6a5889498d436a37
Helm release appuio-control-api-preview/portal-pr-514
Cluster https://api.cloudscale-lpg-2.appuio.cloud:6443

To uninstall this deployment, close or merge this PR.

github-actions[bot] commented 1 year ago

🚀 Preview deployment active

App URL https://portal-pr-514-appuio-control-api-preview.apps.cloudscale-lpg-2.appuio.cloud
Revision 5517e1a6763f8bd0a086d1bff5811fc86ab4e120
Helm release appuio-control-api-preview/portal-pr-514
Cluster https://api.cloudscale-lpg-2.appuio.cloud:6443

To uninstall this deployment, close or merge this PR.

github-actions[bot] commented 1 year ago

🚀 Preview deployment active

App URL https://portal-pr-514-appuio-control-api-preview.apps.cloudscale-lpg-2.appuio.cloud
Revision 9c262caa3c407ea5a1dde459cba8b506ad612cb8
Helm release appuio-control-api-preview/portal-pr-514
Cluster https://api.cloudscale-lpg-2.appuio.cloud:6443

To uninstall this deployment, close or merge this PR.

github-actions[bot] commented 1 year ago

🚀 Preview deployment active

App URL https://portal-pr-514-appuio-control-api-preview.apps.cloudscale-lpg-2.appuio.cloud
Revision b8dd356f28cb356113d4339a661ac93753c11fae
Helm release appuio-control-api-preview/portal-pr-514
Cluster https://api.cloudscale-lpg-2.appuio.cloud:6443

To uninstall this deployment, close or merge this PR.

ccremer commented 1 year ago

In case I try to redeem an invitation a second time, I do get a generic HTTP error. Please add a check here.

Implemented this. image

github-actions[bot] commented 1 year ago

🚀 Preview deployment active

App URL https://portal-pr-514-appuio-control-api-preview.apps.cloudscale-lpg-2.appuio.cloud
Revision f4c6800d77e26dda609981625a10630c9c9c2ead
Helm release appuio-control-api-preview/portal-pr-514
Cluster https://api.cloudscale-lpg-2.appuio.cloud:6443

To uninstall this deployment, close or merge this PR.

github-actions[bot] commented 1 year ago

🚀 Preview deployment active

App URL https://portal-pr-514-appuio-control-api-preview.apps.cloudscale-lpg-2.appuio.cloud
Revision 3b3b628c4c68cd3ad94de954dce0c110a4efd26c
Helm release appuio-control-api-preview/portal-pr-514
Cluster https://api.cloudscale-lpg-2.appuio.cloud:6443

To uninstall this deployment, close or merge this PR.

github-actions[bot] commented 1 year ago

🚀 Preview deployment active

App URL https://portal-pr-514-appuio-control-api-preview.apps.cloudscale-lpg-2.appuio.cloud
Revision 3274f286b35d36dad6c9427918639e98a5d1f005
Helm release appuio-control-api-preview/portal-pr-514
Cluster https://api.cloudscale-lpg-2.appuio.cloud:6443

To uninstall this deployment, close or merge this PR.

github-actions[bot] commented 1 year ago

🚀 Preview deployment active

App URL https://portal-pr-514-appuio-control-api-preview.apps.cloudscale-lpg-2.appuio.cloud
Revision 20b3ae6f9540c647b9c052a33b3dcdf49e39cef7
Helm release appuio-control-api-preview/portal-pr-514
Cluster https://api.cloudscale-lpg-2.appuio.cloud:6443

To uninstall this deployment, close or merge this PR.

bastjan commented 1 year ago

AS requested: https://github.com/appuio/control-api/pull/138

github-actions[bot] commented 1 year ago

🚀 Preview deployment active

App URL https://portal-pr-514-appuio-control-api-preview.apps.cloudscale-lpg-2.appuio.cloud
Revision 7900cf90a665db018eecdfebcd64f67d211bb6d2
Helm release appuio-control-api-preview/portal-pr-514
Cluster https://api.cloudscale-lpg-2.appuio.cloud:6443

To uninstall this deployment, close or merge this PR.

ccremer commented 1 year ago

I've now pushed the changes as discussed yesterday.

Thanks for https://github.com/appuio/control-api/pull/138 ! Btw, now that the invitee has access to their own invitations, technically the token doesn't need to be in the URL anymore in the email, since we fetch the invitation before sending the redemption request, so the Portal might get it from there. No need for localstorage/keycloak redirect mechanism. The link could just look like https://portal.appuio.cloud/invitations/0beb0648-7045-47de-83d5-a241dbefecd4 But, a query parameter is still recommended to distinguish from a view without redemption, it could also be just https://portal.appuio.cloud/invitations/0beb0648-7045-47de-83d5-a241dbefecd4?redeem=y or something.

I'm not going to change anything regarding this now, since it works with token query parameter as well, but lemme know if you want to change this.

github-actions[bot] commented 1 year ago

🚀 Preview deployment active

App URL https://portal-pr-514-appuio-control-api-preview.apps.cloudscale-lpg-2.appuio.cloud
Revision 3dbe863d49ca91124c7aea943e40d50d205936b3
Helm release appuio-control-api-preview/portal-pr-514
Cluster https://api.cloudscale-lpg-2.appuio.cloud:6443

To uninstall this deployment, close or merge this PR.

bastjan commented 1 year ago

now that the invitee has access to their own invitations

only after redeeming it. We don't know the user before someone redeems it.

ccremer commented 1 year ago

Ah, right, yes. I was only looking at the perspective of an existing user, not a new user :roll_eyes: Gonna amend it.

github-actions[bot] commented 1 year ago

🚀 Preview deployment active

App URL https://portal-pr-514-appuio-control-api-preview.apps.cloudscale-lpg-2.appuio.cloud
Revision 46031a0070374d589442b289adf65f59933f400a
Helm release appuio-control-api-preview/portal-pr-514
Cluster https://api.cloudscale-lpg-2.appuio.cloud:6443

To uninstall this deployment, close or merge this PR.

github-actions[bot] commented 1 year ago

🚀 Preview deployment active

App URL https://portal-pr-514-appuio-control-api-preview.apps.cloudscale-lpg-2.appuio.cloud
Revision df3e72e3266ff5e093cafb7412a99c018c78761b
Helm release appuio-control-api-preview/portal-pr-514
Cluster https://api.cloudscale-lpg-2.appuio.cloud:6443

To uninstall this deployment, close or merge this PR.

github-actions[bot] commented 1 year ago

🚀 Preview deployment active

App URL https://portal-pr-514-appuio-control-api-preview.apps.cloudscale-lpg-2.appuio.cloud
Revision 5fc843d5cc076041c317aefa916e180ad77e7c87
Helm release appuio-control-api-preview/portal-pr-514
Cluster https://api.cloudscale-lpg-2.appuio.cloud:6443

To uninstall this deployment, close or merge this PR.

bastjan commented 1 year ago

After the redeem request, it takes a while

When using the API through kubectl the first request of something sometimes takes a longer time, after that the speed is as expected. It feels like stuff loading from swap. But will be most likely some network reconnecting.

Maybe the 2 seconds we said where too optimistic. if the API has not been used for a while.

ccremer commented 1 year ago

ack, I've increased the delay to 3 seconds. Please try again.

github-actions[bot] commented 1 year ago

🚀 Preview deployment active

App URL https://portal-pr-514-appuio-control-api-preview.apps.cloudscale-lpg-2.appuio.cloud
Revision 55a8810a20cb00a1fd52995377c528fb0976e61d
Helm release appuio-control-api-preview/portal-pr-514
Cluster https://api.cloudscale-lpg-2.appuio.cloud:6443

To uninstall this deployment, close or merge this PR.

github-actions[bot] commented 1 year ago

🚀 Preview deployment active

App URL https://portal-pr-514-appuio-control-api-preview.apps.cloudscale-lpg-2.appuio.cloud
Revision a8cc24c4f0e2034272b59bfed981e06d603a7027
Helm release appuio-control-api-preview/portal-pr-514
Cluster https://api.cloudscale-lpg-2.appuio.cloud:6443

To uninstall this deployment, close or merge this PR.

github-actions[bot] commented 1 year ago

🚀 Preview deployment active

App URL https://portal-pr-514-appuio-control-api-preview.apps.cloudscale-lpg-2.appuio.cloud
Revision b1aa216fc29d6eeec2d635ccfab6ffcf16e32ed9
Helm release appuio-control-api-preview/portal-pr-514
Cluster https://api.cloudscale-lpg-2.appuio.cloud:6443

To uninstall this deployment, close or merge this PR.

github-actions[bot] commented 1 year ago

🚀 Preview deployment active

App URL https://portal-pr-514-appuio-control-api-preview.apps.cloudscale-lpg-2.appuio.cloud
Revision c83a9439c592b14d2b4baac7f1c8f7f4c419826d
Helm release appuio-control-api-preview/portal-pr-514
Cluster https://api.cloudscale-lpg-2.appuio.cloud:6443

To uninstall this deployment, close or merge this PR.

github-actions[bot] commented 1 year ago

✔️ Preview deployment uninstalled

Helm release appuio-control-api-preview/portal-pr-514
Cluster https://api.cloudscale-lpg-2.appuio.cloud:6443