diff --git a/dashboard/src/components/Sidebar.vue b/dashboard/src/components/Sidebar.vue index 4a6ac1f3e..af69f1fd2 100644 --- a/dashboard/src/components/Sidebar.vue +++ b/dashboard/src/components/Sidebar.vue @@ -29,7 +29,7 @@ const menuItems = [ show: authStore.checkAttributes(["package:list"]), }, { - route: router.resolve("/packages/"), + route: router.resolve("/ingest/sips/"), icon: IconSIPs, text: "SIPs", show: authStore.checkAttributes(["package:list"]), @@ -41,13 +41,13 @@ const menuItems = [ authStore.checkAttributes(["storage:aip:list"]), }, { - route: router.resolve("/locations/"), + route: router.resolve("/storage/locations/"), icon: IconLocations, text: "Locations", show: authStore.checkAttributes(["storage:location:list"]), }, { - route: router.resolve("/aips/"), + route: router.resolve("/storage/aips/"), icon: IconAIPs, text: "AIPs", show: authStore.checkAttributes(["storage:aip:list"]), diff --git a/dashboard/src/pages/locations.vue b/dashboard/src/pages/ingest.vue similarity index 100% rename from dashboard/src/pages/locations.vue rename to dashboard/src/pages/ingest.vue diff --git a/dashboard/src/pages/packages.vue b/dashboard/src/pages/ingest/sips.vue similarity index 100% rename from dashboard/src/pages/packages.vue rename to dashboard/src/pages/ingest/sips.vue diff --git a/dashboard/src/pages/packages/[id].vue b/dashboard/src/pages/ingest/sips/[id].vue similarity index 94% rename from dashboard/src/pages/packages/[id].vue rename to dashboard/src/pages/ingest/sips/[id].vue index 50a10e119..1fc7e8935 100644 --- a/dashboard/src/pages/packages/[id].vue +++ b/dashboard/src/pages/ingest/sips/[id].vue @@ -9,7 +9,7 @@ import { useRoute, useRouter } from "vue-router/auto"; import IconSIPs from "~icons/octicon/package-dependencies-24"; import IconDetails from "~icons/clarity/details-line?raw&font-size=20px"; -const route = useRoute("/packages/[id]"); +const route = useRoute("/ingest/sips/[id]"); const router = useRouter(); const authStore = useAuthStore(); const packageStore = usePackageStore(); @@ -24,7 +24,7 @@ const tabs = [ icon: IconDetails, text: "Summary", route: router.resolve({ - name: "/packages/[id]/", + name: "/ingest/sips/[id]/", params: { id: route.params.id }, }), show: authStore.checkAttributes(["package:read"]), diff --git a/dashboard/src/pages/packages/[id]/index.vue b/dashboard/src/pages/ingest/sips/[id]/index.vue similarity index 100% rename from dashboard/src/pages/packages/[id]/index.vue rename to dashboard/src/pages/ingest/sips/[id]/index.vue diff --git a/dashboard/src/pages/packages/index.vue b/dashboard/src/pages/ingest/sips/index.vue similarity index 97% rename from dashboard/src/pages/packages/index.vue rename to dashboard/src/pages/ingest/sips/index.vue index 65bbcf876..3b9723da6 100644 --- a/dashboard/src/pages/packages/index.vue +++ b/dashboard/src/pages/ingest/sips/index.vue @@ -54,7 +54,7 @@ const toggleLegend = () => { const doSearch = () => { router.push({ - name: "/packages/", + name: "/ingest/sips/", query: { ...route.query, name: packageStore.filters.name }, }); }; @@ -68,7 +68,7 @@ const tabs = computed(() => [ icon: IconAll, text: "All", route: router.resolve({ - name: "/packages/", + name: "/ingest/sips/", query: { ...route.query, status: undefined }, }), show: true, @@ -77,7 +77,7 @@ const tabs = computed(() => [ icon: IconDone, text: "Done", route: router.resolve({ - name: "/packages/", + name: "/ingest/sips/", query: { ...route.query, status: "done" }, }), show: true, @@ -86,7 +86,7 @@ const tabs = computed(() => [ icon: IconError, text: "Error", route: router.resolve({ - name: "/packages/", + name: "/ingest/sips/", query: { ...route.query, status: "error" }, }), show: true, @@ -95,7 +95,7 @@ const tabs = computed(() => [ icon: IconInProgress, text: "In progress", route: router.resolve({ - name: "/packages/", + name: "/ingest/sips/", query: { ...route.query, status: "in progress" }, }), show: true, @@ -104,7 +104,7 @@ const tabs = computed(() => [ icon: IconQueued, text: "Queued", route: router.resolve({ - name: "/packages/", + name: "/ingest/sips/", query: { ...route.query, status: "queued" }, }), show: true, @@ -215,7 +215,7 @@ watch( {{ pkg.name }} {{ pkg.name }} diff --git a/dashboard/src/pages/storage.vue b/dashboard/src/pages/storage.vue new file mode 100644 index 000000000..a44ab87b7 --- /dev/null +++ b/dashboard/src/pages/storage.vue @@ -0,0 +1,3 @@ + diff --git a/dashboard/src/pages/storage/locations.vue b/dashboard/src/pages/storage/locations.vue new file mode 100644 index 000000000..a44ab87b7 --- /dev/null +++ b/dashboard/src/pages/storage/locations.vue @@ -0,0 +1,3 @@ + diff --git a/dashboard/src/pages/locations/[id].vue b/dashboard/src/pages/storage/locations/[id].vue similarity index 91% rename from dashboard/src/pages/locations/[id].vue rename to dashboard/src/pages/storage/locations/[id].vue index 5baaf98d0..18f503842 100644 --- a/dashboard/src/pages/locations/[id].vue +++ b/dashboard/src/pages/storage/locations/[id].vue @@ -9,7 +9,7 @@ import IconAIPs from "~icons/clarity/bundle-line?raw&font-size=20px"; import IconDetails from "~icons/clarity/details-line?raw&font-size=20px"; import IconLocations from "~icons/octicon/server-24"; -const route = useRoute("/locations/[id]"); +const route = useRoute("/storage/locations/[id]"); const router = useRouter(); const authStore = useAuthStore(); const storageStore = useStorageStore(); @@ -24,7 +24,7 @@ const tabs = [ icon: IconDetails, text: "Summary", route: router.resolve({ - name: "/locations/[id]/", + name: "/storage/locations/[id]/", params: { id: route.params.id }, }), show: authStore.checkAttributes(["storage:location:read"]), @@ -33,7 +33,7 @@ const tabs = [ icon: IconAIPs, text: "AIPs", route: router.resolve({ - name: "/locations/[id]/packages", + name: "/storage/locations/[id]/aips", params: { id: route.params.id }, }), show: authStore.checkAttributes(["storage:location:listPackages"]), diff --git a/dashboard/src/pages/locations/[id]/packages.vue b/dashboard/src/pages/storage/locations/[id]/aips.vue similarity index 100% rename from dashboard/src/pages/locations/[id]/packages.vue rename to dashboard/src/pages/storage/locations/[id]/aips.vue diff --git a/dashboard/src/pages/locations/[id]/index.vue b/dashboard/src/pages/storage/locations/[id]/index.vue similarity index 100% rename from dashboard/src/pages/locations/[id]/index.vue rename to dashboard/src/pages/storage/locations/[id]/index.vue diff --git a/dashboard/src/pages/locations/index.vue b/dashboard/src/pages/storage/locations/index.vue similarity index 93% rename from dashboard/src/pages/locations/index.vue rename to dashboard/src/pages/storage/locations/index.vue index b4bf1d3d5..4d713fee1 100644 --- a/dashboard/src/pages/locations/index.vue +++ b/dashboard/src/pages/storage/locations/index.vue @@ -44,7 +44,10 @@ const { execute, error } = useAsyncState(() => { {{ item.name }} {{ item.name }} diff --git a/dashboard/src/router.ts b/dashboard/src/router.ts index 7d67d32a0..02388da63 100644 --- a/dashboard/src/router.ts +++ b/dashboard/src/router.ts @@ -10,11 +10,11 @@ const router = createRouter({ const signinRoutes: string[] = ["/user/signin", "/user/signin-callback"]; const protectedRoutes: Record = { - "/packages/": ["package:list"], - "/packages/[id]/": ["package:read"], - "/locations/": ["storage:location:list"], - "/locations/[id]/": ["storage:location:read"], - "/locations/[id]/packages": ["storage:location:listPackages"], + "/ingest/sips/": ["package:list"], + "/ingest/sips/[id]/": ["package:read"], + "/storage/locations/": ["storage:location:list"], + "/storage/locations/[id]/": ["storage:location:read"], + "/storage/locations/[id]/aips": ["storage:location:listPackages"], }; router.beforeEach(async (to, _, next) => { diff --git a/dashboard/src/stores/package.ts b/dashboard/src/stores/package.ts index 9ea352ad7..67cf4ee15 100644 --- a/dashboard/src/stores/package.ts +++ b/dashboard/src/stores/package.ts @@ -152,7 +152,7 @@ export const usePackageStore = defineStore("package", { layoutStore.updateBreadcrumb([ { text: "Ingest" }, - { route: router.resolve("/packages/"), text: "SIPs" }, + { route: router.resolve("/ingest/sips/"), text: "SIPs" }, { text: this.current.name }, ]); diff --git a/dashboard/src/stores/storage.ts b/dashboard/src/stores/storage.ts index e6e524bd9..425507ba7 100644 --- a/dashboard/src/stores/storage.ts +++ b/dashboard/src/stores/storage.ts @@ -24,7 +24,10 @@ export const useStorageStore = defineStore("storage", { const layoutStore = useLayoutStore(); layoutStore.updateBreadcrumb([ { text: "Storage" }, - { route: router.resolve({ name: "/locations/" }), text: "Locations" }, + { + route: router.resolve({ name: "/storage/locations/" }), + text: "Locations", + }, { text: this.current.name }, ]); diff --git a/dashboard/typed-router.d.ts b/dashboard/typed-router.d.ts index e681f5f8f..5c442d4e3 100644 --- a/dashboard/typed-router.d.ts +++ b/dashboard/typed-router.d.ts @@ -20,15 +20,17 @@ declare module 'vue-router/auto-routes' { export interface RouteNamedMap { '/': RouteRecordInfo<'/', '/', Record, Record>, '/[...path]': RouteRecordInfo<'/[...path]', '/:path(.*)', { path: ParamValue }, { path: ParamValue }>, - '/locations': RouteRecordInfo<'/locations', '/locations', Record, Record>, - '/locations/': RouteRecordInfo<'/locations/', '/locations', Record, Record>, - '/locations/[id]': RouteRecordInfo<'/locations/[id]', '/locations/:id', { id: ParamValue }, { id: ParamValue }>, - '/locations/[id]/': RouteRecordInfo<'/locations/[id]/', '/locations/:id', { id: ParamValue }, { id: ParamValue }>, - '/locations/[id]/packages': RouteRecordInfo<'/locations/[id]/packages', '/locations/:id/packages', { id: ParamValue }, { id: ParamValue }>, - '/packages': RouteRecordInfo<'/packages', '/packages', Record, Record>, - '/packages/': RouteRecordInfo<'/packages/', '/packages', Record, Record>, - '/packages/[id]': RouteRecordInfo<'/packages/[id]', '/packages/:id', { id: ParamValue }, { id: ParamValue }>, - '/packages/[id]/': RouteRecordInfo<'/packages/[id]/', '/packages/:id', { id: ParamValue }, { id: ParamValue }>, + '/ingest': RouteRecordInfo<'/ingest', '/ingest', Record, Record>, + '/ingest/sips': RouteRecordInfo<'/ingest/sips', '/ingest/sips', Record, Record>, + '/ingest/sips/': RouteRecordInfo<'/ingest/sips/', '/ingest/sips', Record, Record>, + '/ingest/sips/[id]': RouteRecordInfo<'/ingest/sips/[id]', '/ingest/sips/:id', { id: ParamValue }, { id: ParamValue }>, + '/ingest/sips/[id]/': RouteRecordInfo<'/ingest/sips/[id]/', '/ingest/sips/:id', { id: ParamValue }, { id: ParamValue }>, + '/storage': RouteRecordInfo<'/storage', '/storage', Record, Record>, + '/storage/locations': RouteRecordInfo<'/storage/locations', '/storage/locations', Record, Record>, + '/storage/locations/': RouteRecordInfo<'/storage/locations/', '/storage/locations', Record, Record>, + '/storage/locations/[id]': RouteRecordInfo<'/storage/locations/[id]', '/storage/locations/:id', { id: ParamValue }, { id: ParamValue }>, + '/storage/locations/[id]/': RouteRecordInfo<'/storage/locations/[id]/', '/storage/locations/:id', { id: ParamValue }, { id: ParamValue }>, + '/storage/locations/[id]/aips': RouteRecordInfo<'/storage/locations/[id]/aips', '/storage/locations/:id/aips', { id: ParamValue }, { id: ParamValue }>, '/user': RouteRecordInfo<'/user', '/user', Record, Record>, '/user/signin': RouteRecordInfo<'/user/signin', '/user/signin', Record, Record>, '/user/signin-callback': RouteRecordInfo<'/user/signin-callback', '/user/signin-callback', Record, Record>,