Skip to content

cluster domain input value could do with some extra input processing #117

@alexgroom

Description

@alexgroom

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions