diff --git a/ui/app/controllers/storage/plugins/plugin.js b/ui/app/controllers/storage/plugins/plugin.js index 0a347e5c012..53d191ccd5f 100644 --- a/ui/app/controllers/storage/plugins/plugin.js +++ b/ui/app/controllers/storage/plugins/plugin.js @@ -5,7 +5,7 @@ import Controller from '@ember/controller'; -export default class CsiPluginsPluginController extends Controller { +export default class StoragePluginsPluginController extends Controller { get plugin() { return this.model; } diff --git a/ui/app/routes/administration/policies/new.js b/ui/app/routes/administration/policies/new.js index c965bf3f8d2..5535a01a259 100644 --- a/ui/app/routes/administration/policies/new.js +++ b/ui/app/routes/administration/policies/new.js @@ -67,6 +67,11 @@ operator { # * alloc-lifecycle # * csi-write-volume # * csi-mount-volume +# * host-volume-create +# * host-volume-register +# * host-volume-read +# * host-volume-write +# * host-volume-delete # * list-scaling-policies # * read-scaling-policy # * read-job-scaling diff --git a/ui/app/routes/storage/plugins/index.js b/ui/app/routes/storage/plugins/index.js index 742ec0605c1..c9e829ba8fd 100644 --- a/ui/app/routes/storage/plugins/index.js +++ b/ui/app/routes/storage/plugins/index.js @@ -13,7 +13,7 @@ export default class IndexRoute extends Route.extend(WithWatchers) { @service store; startWatchers(controller) { - controller.set('modelWatch', this.watch.perform({ type: 'csi' })); + controller.set('modelWatch', this.watch.perform({ type: 'host' })); } @watchQuery('plugin') watch; diff --git a/ui/app/services/keyboard.js b/ui/app/services/keyboard.js index d45c14ba0ba..0fb6bda447c 100644 --- a/ui/app/services/keyboard.js +++ b/ui/app/services/keyboard.js @@ -294,7 +294,7 @@ export default class KeyboardService extends Service { // If no activeLink, means we're nested within a primary section. // Luckily, Ember's RouteInfo.find() gives us access to parents and connected leaves of a route. - // So, if we're on /csi/volumes but the nav link is to /csi, we'll .find() it. + // So, if we're on /storage/volumes but the nav link is to /storage, we'll .find() it. // Similarly, /job/:job/taskgroupid/index will find /job. if (!activeLink) { activeLink = links.find((link) => { diff --git a/ui/app/templates/storage/volumes/index.hbs b/ui/app/templates/storage/volumes/index.hbs index 31c31cba020..8cc6d105968 100644 --- a/ui/app/templates/storage/volumes/index.hbs +++ b/ui/app/templates/storage/volumes/index.hbs @@ -3,7 +3,7 @@ SPDX-License-Identifier: BUSL-1.1 ~}} -{{page-title "CSI Volumes"}} +{{page-title "Volumes"}}
@@ -166,6 +166,7 @@

This namespace currently has no CSI Volumes. + {{!-- TODO: make sure the empty-message is generalized to include DHV --}}

{{else if this.searchTerm}}

diff --git a/ui/app/templates/storage/volumes/volume.hbs b/ui/app/templates/storage/volumes/volume.hbs index 146d785565b..3fb68eae0ee 100644 --- a/ui/app/templates/storage/volumes/volume.hbs +++ b/ui/app/templates/storage/volumes/volume.hbs @@ -7,6 +7,7 @@ {{/each}} {{page-title "CSI Volume " this.model.name}} +{{!-- TODO: determine if /volumes/volume will just be CSI or if we ought to generalize it --}}

{{this.model.name}}

@@ -57,7 +58,7 @@ assignWriteAlloc(volume, alloc)); @@ -95,7 +98,7 @@ module('Acceptance | volume detail', function (hooks) { }); }); - test('/csi/volumes/:id should list all read allocations the volume is attached to', async function (assert) { + test('/storage/volumes/:id should list all read allocations the volume is attached to', async function (assert) { const writeAllocations = server.createList('allocation', 2); const readAllocations = server.createList('allocation', 3); writeAllocations.forEach((alloc) => assignWriteAlloc(volume, alloc)); @@ -250,7 +253,7 @@ module('Acceptance | volume detail (with namespaces)', function (hooks) { volume = server.create('csi-volume'); }); - test('/csi/volumes/:id detail ribbon includes the namespace of the volume', async function (assert) { + test('/storage/volumes/:id detail ribbon includes the namespace of the volume', async function (assert) { await VolumeDetail.visit({ id: `${volume.id}@${volume.namespaceId}` }); assert.ok(VolumeDetail.hasNamespace); diff --git a/ui/tests/acceptance/volumes-list-test.js b/ui/tests/acceptance/volumes-list-test.js index 033decdadac..b7bd88c8385 100644 --- a/ui/tests/acceptance/volumes-list-test.js +++ b/ui/tests/acceptance/volumes-list-test.js @@ -43,20 +43,26 @@ module('Acceptance | volumes list', function (hooks) { await a11yAudit(assert); }); - test('visiting /csi redirects to /csi/volumes', async function (assert) { + test('visiting /storage redirects to /storage/volumes', async function (assert) { + await visit('/storage'); + + assert.equal(currentURL(), '/storage/volumes'); + }); + + test('visiting the now-deprecated /csi redirects to /storage/volumes', async function (assert) { await visit('/csi'); - assert.equal(currentURL(), '/csi/volumes'); + assert.equal(currentURL(), '/storage/volumes'); }); - test('visiting /csi/volumes', async function (assert) { + test('visiting /storage/volumes', async function (assert) { await VolumesList.visit(); - assert.equal(currentURL(), '/csi/volumes'); - assert.equal(document.title, 'CSI Volumes - Nomad'); + assert.equal(currentURL(), '/storage/volumes'); + assert.equal(document.title, 'Volumes - Nomad'); }); - test('/csi/volumes should list the first page of volumes sorted by name', async function (assert) { + test('/storage/volumes should list the first page of volumes sorted by name', async function (assert) { const volumeCount = VolumesList.pageSize + 1; server.createList('csi-volume', volumeCount); @@ -120,16 +126,16 @@ module('Acceptance | volumes list', function (hooks) { await VolumesList.volumes.objectAt(0).clickName(); assert.equal( currentURL(), - `/csi/volumes/${volume.id}@${secondNamespace.id}` + `/storage/volumes/${volume.id}@${secondNamespace.id}` ); await VolumesList.visit({ namespace: '*' }); - assert.equal(currentURL(), '/csi/volumes?namespace=*'); + assert.equal(currentURL(), '/storage/volumes?namespace=*'); await VolumesList.volumes.objectAt(0).clickRow(); assert.equal( currentURL(), - `/csi/volumes/${volume.id}@${secondNamespace.id}` + `/storage/volumes/${volume.id}@${secondNamespace.id}` ); }); @@ -159,11 +165,11 @@ module('Acceptance | volumes list', function (hooks) { await VolumesList.visit(); await VolumesList.nextPage(); - assert.equal(currentURL(), '/csi/volumes?page=2'); + assert.equal(currentURL(), '/storage/volumes?page=2'); await VolumesList.search('foobar'); - assert.equal(currentURL(), '/csi/volumes?search=foobar'); + assert.equal(currentURL(), '/storage/volumes?search=foobar'); }); test('when the cluster has namespaces, each volume row includes the volume namespace', async function (assert) { diff --git a/ui/tests/pages/storage/plugins/detail.js b/ui/tests/pages/storage/plugins/detail.js index ffa2dab6530..6794327e6a6 100644 --- a/ui/tests/pages/storage/plugins/detail.js +++ b/ui/tests/pages/storage/plugins/detail.js @@ -14,7 +14,7 @@ import { import allocations from 'nomad-ui/tests/pages/components/allocations'; export default create({ - visit: visitable('/csi/plugins/:id'), + visit: visitable('/storage/plugins/:id'), title: text('[data-test-title]'), diff --git a/ui/tests/pages/storage/plugins/list.js b/ui/tests/pages/storage/plugins/list.js index 899d99e56b8..8117bec1d81 100644 --- a/ui/tests/pages/storage/plugins/list.js +++ b/ui/tests/pages/storage/plugins/list.js @@ -19,7 +19,7 @@ import pageSizeSelect from 'nomad-ui/tests/pages/components/page-size-select'; export default create({ pageSize: 25, - visit: visitable('/csi/plugins'), + visit: visitable('/storage/plugins'), search: fillable('[data-test-plugins-search] input'), diff --git a/ui/tests/pages/storage/plugins/plugin/allocations.js b/ui/tests/pages/storage/plugins/plugin/allocations.js index c05546c27d1..c56b9241a14 100644 --- a/ui/tests/pages/storage/plugins/plugin/allocations.js +++ b/ui/tests/pages/storage/plugins/plugin/allocations.js @@ -18,7 +18,7 @@ import pageSizeSelect from 'nomad-ui/tests/pages/components/page-size-select'; export default create({ pageSize: 25, - visit: visitable('/csi/plugins/:id/allocations'), + visit: visitable('/storage/plugins/:id/allocations'), nextPage: clickable('[data-test-pager="next"]'), prevPage: clickable('[data-test-pager="prev"]'), diff --git a/ui/tests/pages/storage/volumes/detail.js b/ui/tests/pages/storage/volumes/detail.js index 645a7ed644e..cff5c7fa554 100644 --- a/ui/tests/pages/storage/volumes/detail.js +++ b/ui/tests/pages/storage/volumes/detail.js @@ -8,7 +8,7 @@ import { create, isPresent, text, visitable } from 'ember-cli-page-object'; import allocations from 'nomad-ui/tests/pages/components/allocations'; export default create({ - visit: visitable('/csi/volumes/:id'), + visit: visitable('/storage/volumes/:id'), title: text('[data-test-title]'), diff --git a/ui/tests/pages/storage/volumes/list.js b/ui/tests/pages/storage/volumes/list.js index 2e8102ed911..73ebcc86aa4 100644 --- a/ui/tests/pages/storage/volumes/list.js +++ b/ui/tests/pages/storage/volumes/list.js @@ -20,7 +20,7 @@ import pageSizeSelect from 'nomad-ui/tests/pages/components/page-size-select'; export default create({ pageSize: 25, - visit: visitable('/csi/volumes'), + visit: visitable('/storage/volumes'), search: fillable('[data-test-volumes-search] input'),