From 58a5f172882520e01cfcf8d721729031b294c20f Mon Sep 17 00:00:00 2001 From: claire bontempo <68122737+hellobontempo@users.noreply.github.com> Date: Mon, 14 Jun 2021 13:03:49 -0700 Subject: [PATCH] Displays Auth Method description on Vault UI login page (#11795) * Displays Auth Method description on login page * working on auth login form * Keeps path name as LinkTo label adds description to paths * removes commented and unused code * removes trailing white space * removes prettier package * adds test for description * removes extra white spaces * adds changelog file --- changelog/11795.txt | 3 +++ ui/app/components/auth-form.js | 11 ++++++++++- ui/app/templates/components/auth-form.hbs | 4 ++++ .../integration/components/auth-form-test.js | 19 +++++++++++++++++++ ui/tests/pages/components/auth-form.js | 1 + 5 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 changelog/11795.txt diff --git a/changelog/11795.txt b/changelog/11795.txt new file mode 100644 index 000000000..ead4434b2 --- /dev/null +++ b/changelog/11795.txt @@ -0,0 +1,3 @@ +```release-note:improvement +ui: Added auth method descriptions to UI login page +``` \ No newline at end of file diff --git a/ui/app/components/auth-form.js b/ui/app/components/auth-form.js index 7c345524e..9e24fc3c9 100644 --- a/ui/app/components/auth-form.js +++ b/ui/app/components/auth-form.js @@ -178,7 +178,16 @@ export default Component.extend(DEFAULTS, { unauthenticated: true, }, }); - this.set('methods', methods.map(m => m.serialize({ includeId: true }))); + this.set( + 'methods', + methods.map(m => { + const method = m.serialize({ includeId: true }); + return { + ...method, + mountDescription: method.description, + }; + }) + ); next(() => { store.unloadAll('auth-method'); }); diff --git a/ui/app/templates/components/auth-form.hbs b/ui/app/templates/components/auth-form.hbs index 4a718c178..725d4d88d 100644 --- a/ui/app/templates/components/auth-form.hbs +++ b/ui/app/templates/components/auth-form.hbs @@ -26,6 +26,10 @@ @errorMessage={{if (and cluster.standby hasCSPError) cspErrorText error}} data-test-auth-error /> +
{{this.selectedAuthBackend.path}}
+ {{this.selectedAuthBackend.mountDescription}} +