netgroup-polito / CrownLabs

Kubernetes-based Remote Laboratories
https://crownlabs.polito.it
Apache License 2.0
103 stars 41 forks source link

Better title of VM noVNC tab #316

Open GabriFila opened 3 years ago

GabriFila commented 3 years ago

Is your feature request related to a problem? Please describe. When a user has multiple VMs open in the same browser it is hard knowing the tab corresponding to a particular VM.

Describe the solution you'd like It could be useful to provide in the title of the noVNC tab the id of the VM and after its description.

Additional context I have no idea if this is possible or where to configure it, but I think it could be useful

giorio94 commented 3 years ago

IMO, there may be two alternatives to solve this issue:

  1. Adopt an approach similar to the one used here to add the base tag. Essentially, an additional configuration is added to every ingress resource (through the operator) to modify the content of the title tag and set a custom name. In this case, we could configure whatever title we like.
  2. Directly assign a custom hostname to every VM (or use the default, equal to the VM name), which is then reflected in the title of the noVNC tab and in the terminal prompt. This solution had been disabled quite a long time ago since IIRC the name of the VM was different from the one of the labinstance. This feature could be reintroduced changing the content of this line. Beware it would require to regenerate the VM images.

This image shows what would be outcome of solution 2, with the current VM names (tested using a VM image with the old configuration): screen

GabriFila commented 3 years ago

Regarding the name I just would like to specify a note on UX. I believe the labCode should be first, at least in the HTML title tag of the tab. for these reasons:

Regarding instead the actual hostname of the VM, it would be great to have it different. Also considering that from now on is possible to ssh into another machine, having all of them with netlab is a bit of a nightmare