From 8b39203d51af9cedbb8c325fc7a343261baab539 Mon Sep 17 00:00:00 2001 From: Kianna <30884335+kiannaquach@users.noreply.github.com> Date: Wed, 7 Jun 2023 13:26:36 -0700 Subject: [PATCH 01/21] UI: VAULT-16941 Initial dashboard route set up (#21051) --- ui/app/router.js | 1 + ui/app/routes/vault/cluster/dashboard.js | 3 ++ ui/app/templates/vault/cluster/dashboard.hbs | 36 +++++++++++++++++++ .../routes/vault/cluster/dashboard-test.js | 11 ++++++ 4 files changed, 51 insertions(+) create mode 100644 ui/app/routes/vault/cluster/dashboard.js create mode 100644 ui/app/templates/vault/cluster/dashboard.hbs create mode 100644 ui/tests/unit/routes/vault/cluster/dashboard-test.js diff --git a/ui/app/router.js b/ui/app/router.js index 1ac7175691cf..1908161dca47 100644 --- a/ui/app/router.js +++ b/ui/app/router.js @@ -14,6 +14,7 @@ export default class Router extends EmberRouter { Router.map(function () { this.route('vault', { path: '/' }, function () { this.route('cluster', { path: '/:cluster_name' }, function () { + this.route('dashboard'); this.route('oidc-provider-ns', { path: '/*namespace/identity/oidc/provider/:provider_name/authorize' }); this.route('oidc-provider', { path: '/identity/oidc/provider/:provider_name/authorize' }); this.route('oidc-callback', { path: '/auth/*auth_path/oidc/callback' }); diff --git a/ui/app/routes/vault/cluster/dashboard.js b/ui/app/routes/vault/cluster/dashboard.js new file mode 100644 index 000000000000..ebcd70fddf87 --- /dev/null +++ b/ui/app/routes/vault/cluster/dashboard.js @@ -0,0 +1,3 @@ +import Route from '@ember/routing/route'; + +export default class VaultClusterDashboardRoute extends Route {} diff --git a/ui/app/templates/vault/cluster/dashboard.hbs b/ui/app/templates/vault/cluster/dashboard.hbs new file mode 100644 index 000000000000..73e8b244b97b --- /dev/null +++ b/ui/app/templates/vault/cluster/dashboard.hbs @@ -0,0 +1,36 @@ +

Vault version

+
+
+ +
+

Secrets Engines

+
+ View more +
+
+ + <:body as |B|> + + Cell one A + Cell two A + + + +
+ + +

Quick Actions

+
+
+ +
+ +

Learn More

+
+ + +

Configuration Details

+
+
+ +
\ No newline at end of file diff --git a/ui/tests/unit/routes/vault/cluster/dashboard-test.js b/ui/tests/unit/routes/vault/cluster/dashboard-test.js new file mode 100644 index 000000000000..4fc36dad3e7c --- /dev/null +++ b/ui/tests/unit/routes/vault/cluster/dashboard-test.js @@ -0,0 +1,11 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'vault/tests/helpers'; + +module('Unit | Route | vault/cluster/dashboard', function (hooks) { + setupTest(hooks); + + test('it exists', function (assert) { + const route = this.owner.lookup('route:vault/cluster/dashboard'); + assert.ok(route); + }); +}); From 7f9f1ed13df7e747dd81cc38fe1f9b6132ee9f5e Mon Sep 17 00:00:00 2001 From: Kianna <30884335+kiannaquach@users.noreply.github.com> Date: Wed, 7 Jun 2023 15:33:25 -0700 Subject: [PATCH 02/21] UI: VAULT-17007 Add Dashboard to the sidenav (#21058) --- ui/app/components/sidebar/frame.hbs | 1 + ui/app/components/sidebar/nav/cluster.hbs | 2 ++ ui/tests/acceptance/sidebar-nav-test.js | 3 ++- ui/tests/integration/components/sidebar/nav/cluster-test.js | 4 +++- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ui/app/components/sidebar/frame.hbs b/ui/app/components/sidebar/frame.hbs index 63986925604b..50fe61de9857 100644 --- a/ui/app/components/sidebar/frame.hbs +++ b/ui/app/components/sidebar/frame.hbs @@ -4,6 +4,7 @@ <:header> <:logo> + {{! TODO: VAULT-17055 Update the logo to navigate to dashboard if user opted into new dashboard ui }} Vault + {{! TODO: VAULT-17055 hide dashboard nav link when user isn't opted into the new dashboard ui }} +