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

Bug Fix: Show Error messages on Auth Configuration page #8500

Merged
merged 5 commits into from
Mar 9, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions ui/app/components/auth-config-form/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ export default AuthConfigComponent.extend({
if (err instanceof DS.AdapterError === false) {
throw err;
}
// because we're not calling model.save the model never updates with
// the error. Forcing the error message by manually setting the errorMessage
try {
this.model.set('errorMessage', err.errors.firstObject);
return;
} catch {
// do nothing
}
return;
}
if (this.wizard.currentMachine === 'authentication' && this.wizard.featureState === 'config') {
Expand Down
2 changes: 1 addition & 1 deletion ui/app/templates/components/auth-config-form/options.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<form {{action (perform saveModel) on="submit"}}>
<div class="box is-sideless is-fullwidth is-marginless">
<MessageError @model={{model}} @errorMessage={{model.errorMessage}}/>
<NamespaceReminder @mode="save" @noun="Auth Method" />
{{message-error model=model}}
{{#each model.tuneAttrs as |attr|}}
{{form-field data-test-field attr=attr model=model}}
{{/each}}
Expand Down