diff --git a/changelog/21578.txt b/changelog/21578.txt new file mode 100644 index 0000000000..30d4fac8cc --- /dev/null +++ b/changelog/21578.txt @@ -0,0 +1,3 @@ +```release-note:improvement +ui: Add API Explorer link to Sidebar, under Tools. +``` diff --git a/ui/app/components/sidebar/nav/tools.hbs b/ui/app/components/sidebar/nav/tools.hbs index 798125e1e3..e517f66046 100644 --- a/ui/app/components/sidebar/nav/tools.hbs +++ b/ui/app/components/sidebar/nav/tools.hbs @@ -19,4 +19,5 @@ /> {{/if}} {{/each}} + \ No newline at end of file diff --git a/ui/app/router.js b/ui/app/router.js index 1ac7175691..e1d46406e6 100644 --- a/ui/app/router.js +++ b/ui/app/router.js @@ -21,7 +21,6 @@ Router.map(function () { this.route('redirect'); this.route('init'); this.route('logout'); - this.mount('open-api-explorer', { path: '/api-explorer' }); this.route('license'); this.route('mfa-setup'); this.route('clients', function () { @@ -51,6 +50,7 @@ Router.map(function () { this.route('unseal'); this.route('tools', function () { this.route('tool', { path: '/:selected_action' }); + this.mount('open-api-explorer', { path: '/api-explorer' }); }); this.route('access', function () { this.route('methods', { path: '/' }); diff --git a/ui/app/templates/vault/cluster/tools.hbs b/ui/app/templates/vault/cluster/tools.hbs new file mode 100644 index 0000000000..db650ea102 --- /dev/null +++ b/ui/app/templates/vault/cluster/tools.hbs @@ -0,0 +1,2 @@ + +{{outlet}} \ No newline at end of file diff --git a/ui/app/templates/vault/cluster/tools/tool.hbs b/ui/app/templates/vault/cluster/tools/tool.hbs index bbad12bb2c..cf5fb02397 100644 --- a/ui/app/templates/vault/cluster/tools/tool.hbs +++ b/ui/app/templates/vault/cluster/tools/tool.hbs @@ -1,2 +1 @@ - \ No newline at end of file diff --git a/ui/tests/acceptance/api-explorer/index-test.js b/ui/tests/acceptance/api-explorer/index-test.js index 1307110b9b..c9945e598f 100644 --- a/ui/tests/acceptance/api-explorer/index-test.js +++ b/ui/tests/acceptance/api-explorer/index-test.js @@ -17,7 +17,7 @@ module('Acceptance | API Explorer', function (hooks) { }); test('it filters paths after swagger-ui is loaded', async function (assert) { - await visit('/vault/api-explorer'); + await visit('/vault/tools/api-explorer'); await waitUntil(() => { return find('[data-test-filter-input]').disabled === false; }); diff --git a/ui/tests/integration/components/sidebar/nav/tools-test.js b/ui/tests/integration/components/sidebar/nav/tools-test.js index 46db83eb48..3518fdcf2e 100644 --- a/ui/tests/integration/components/sidebar/nav/tools-test.js +++ b/ui/tests/integration/components/sidebar/nav/tools-test.js @@ -22,11 +22,11 @@ module('Integration | Component | sidebar-nav-tools', function (hooks) { await renderComponent(); assert .dom('[data-test-sidebar-nav-link]') - .exists({ count: 1 }, 'Nav links are hidden other than back link'); + .exists({ count: 2 }, 'Nav links are hidden other than back link and api explorer.'); }); test('it should render nav headings and links', async function (assert) { - const links = ['Back to main navigation', ...toolsActions()]; + const links = ['Back to main navigation', ...toolsActions(), 'API Explorer']; stubFeaturesAndPermissions(this.owner); await renderComponent();