#51127 Issue 51118 - UI - improve modal validation when creating an instance
Closed by spichugi. Opened by mreynolds.
mreynolds/389-ds-base issue51118  into  master

Download 51127.patch

Description:

Do not enable the "create" button until all the fields are valid (DN's, port numbers, passwords, etc).

Due to systemd escaping issues with special characters we can not support "#" or "%s" in the instance name. We previously allowed these characters but they no longer work with recent versions of systemd.

Improve layout and handling of optional database settings.

Add a json argument to dscreate so the UI can report the failure text correctly. Also improved error reporting in dscreate.

relates: https://pagure.io/389-ds-base/issue/51118

They python looks okay to me, I'll let @spichugi review the js :)

I think, - if we move validation here, we should notify the user 'what is actually wrong with their input'. Like: 'Port should be in 1 to 65534 range'

And here, I think we should notify the user what the valid instance name should have. It was notifying before (but while creating the instance)

And here, I think we should notify the user what the valid instance name should have. It was notifying before (but while creating the instance)

I know it was, we did all the validation after you clicked "create instance" :-) Anyway yeah I'll clean up these messages, etc. I'll let you know once that is done...

1 new commit added

  • Improve validation error messages

@spichugi please review...

The error in the UI states Instance name can only contain letters, numbers, and these 3 characters: - : _ But it is possible to create an instance with @ in its name.

But it's really a minor issue.

The rest looks good to me. You have my ack! Thanks.

The error in the UI states Instance name can only contain letters, numbers, and these 3 characters: - : _ But it is possible to create an instance with @ in its name.

Nice catch! I also accidentally listed the percent sign as a supportable character when displaying the modal error message. All fixed, merging...

1 new commit added

  • Fix allowed characters

rebased onto a0113b19cbe6f37774b639cbf4a644ab4944465f

Pull-Request has been merged by mreynolds

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/4180

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

Metadata