-
Notifications
You must be signed in to change notification settings - Fork 24
Description
if you mistype the cluster domain value like by leaving a trailing / this will break subsequent usage of this value eg when accessing the model registry. It would be nice if this value was cleansed a little better via the javascript input code, or potentially rejected if really bad. This snippet of code from index.html could be enhanced:
let cdomain = (document.getElementById('cdomain').value.toLowerCase().indexOf('https://') > -1) ? document.getElementById('cdomain').value.toLowerCase().substring(8) : document.getElementById('cdomain').value.toLowerCase();
Maybe add a Regex substitution on this line in to remove / & ? etc would be a simple but effective improvement to ease pain later in the lab.
I would offer you the regex code as a PR but it will take some experimenting to get it right, such is the awkward nature of that function. :-)
Alternatively, just some if/else validation steps before storing the value would help.