kthcloud / console

kthcloud web console
https://cloud.cbh.kth.se
MIT License
3 stars 3 forks source link

Add generate random name button next to any name field #267

Closed Phillezi closed 1 month ago

Phillezi commented 1 month ago

Added randomize name button to the 'RFC1035Input.tsx' component, it can be enabled by adding the optional parameter 'enableRandomize' and setting it to true. Which I enabled for deployments in 'CreateDeployments.tsx' and for vms in 'CreateVm.tsx'.

It uses faker-js to generate a random name for k8s deployments or vms, with the regex used to generate random names when not running as release.

The icon is the one that was recommended in the issue, mdi:dice-3-outline.

233

image image Screencast from 2024-05-14 08-29-35 (gif quality === very many)

pierrelefevre commented 1 month ago

Thanks for the PR! Cool animation :) Is it ready for review?

Phillezi commented 1 month ago

Thanks! :) Yes, its ready for review now, lmk if there is something i can improve or should do differently.

pierrelefevre commented 1 month ago

🎉 Congrats on your first kthcloud PR!

Phillezi commented 1 month ago

Thanks! :)