Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webadmin: remove the validation for a new template #621

Merged
merged 1 commit into from
Aug 30, 2022

Conversation

ljelinkova
Copy link
Contributor

When we create a new template, it is not possible to change almost any value defined in the original VM.
Therefore, it does not make sense to validate on the UI, because the user cannot do anything if the validation fails.
Moreover, if the validation fails, there is no way to display the results to the user - the dialog just stays open with no message displayed.

When we remove the validation on the UI, we will depend on the backend validations and if something fails, the backend error messages would be displayed to the user.

Note that the exception from this is the check for the duplicate name, that is performed separately and will be preserved as frontend check. In this case, the name field is marked as not valid with proper error message.

When we create a new template, it is not possible
to change almost any value defined in the original VM.
Therefore, it does not make sense to validate on the UI,
because the user cannot do anything if the validation fails.
Moreover, if the validation fails, there is no way to display
the results to the user - the dialog just stays open
with no message displayed.

When we remove the validation on the UI, we will depend on the
backend validations and if something fails, the backend error
messages would be displayed to the user.

Note that the exception from this is the check for the duplicate name,
that is performed separately and will be preserved as frontend
check. In this case, the name field is marked as not valid with
proper error message.
@ljelinkova
Copy link
Contributor Author

/ost

@michalskrivanek
Copy link
Member

lgtm

@ljelinkova ljelinkova merged commit 4697324 into oVirt:master Aug 30, 2022
@ljelinkova ljelinkova deleted the make-template branch September 21, 2022 11:17
ljelinkova added a commit to ljelinkova/ovirt-engine that referenced this pull request Sep 23, 2022
In PR [1], the validation of a new template was
removed from the UI in assumption that the backend
can validate the template properly. However,
the backend does not contain validation for the name
and if the name is not provided, it fails on inserting
null to a not null database column.

This patch adds the name validation back to the fronted.

1: oVirt#621
michalskrivanek pushed a commit that referenced this pull request Sep 23, 2022
In PR [1], the validation of a new template was
removed from the UI in assumption that the backend
can validate the template properly. However,
the backend does not contain validation for the name
and if the name is not provided, it fails on inserting
null to a not null database column.

This patch adds the name validation back to the fronted.

1: #621
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants