vmware-tanzu-labs / educates-training-platform

A platform for hosting interactive workshop environments in Kubernetes, or on top of a local container runtime.
https://docs.educates.dev
Apache License 2.0
63 stars 15 forks source link

Provide a URL endpoint that triggers close of window. #372

Open GrahamDumpleton opened 1 month ago

GrahamDumpleton commented 1 month ago

Is your feature request related to a problem? Please describe.

When using the REST API via the CLI command educates cluster workshop request finishing the workshop will redirect you back to the training portal, but because the session was initiated using a one off token you can't login to the training portal UI to do anything as you don't know the password. This is a bit confusing.

Describe the solution you'd like

To make this a bit better, provide a URL endpoint on the training portal which can be used as a target for index-url option, which closes the current window. That way after session has been deleted by the training portal the window can be closed automatically. This could be the default value for index-url option when using this CLI command.

Describe alternatives you've considered

No response

Additional information

No response

GrahamDumpleton commented 1 month ago

This is non trivial due to browser restrictions resulting in error:

scripts may close only the windows that were opened by them