diff --git a/packages/system/dashboard/images/console/apps/console/src/routes/ConsolePage.routing.test.tsx b/packages/system/dashboard/images/console/apps/console/src/routes/ConsolePage.routing.test.tsx
index cf6982823..8e71ff98a 100644
--- a/packages/system/dashboard/images/console/apps/console/src/routes/ConsolePage.routing.test.tsx
+++ b/packages/system/dashboard/images/console/apps/console/src/routes/ConsolePage.routing.test.tsx
@@ -71,12 +71,12 @@ describe("ConsolePage routing", () => {
expect(screen.queryByText(/Cluster-scoped capacity/i)).toBeNull()
})
- it("serves the tenant logs page under observability/", async () => {
+ it("serves the tenant logs page under the reserved -/ segment", async () => {
renderWithK8sProvider(
,
- { client: makeClient(), initialRoute: "/observability/logs" },
+ { client: makeClient(), initialRoute: "/-/observability/logs" },
)
expect(await screen.findByText(/^Every application in/)).toBeInTheDocument()
@@ -94,4 +94,18 @@ describe("ConsolePage routing", () => {
await waitFor(() => expect(client.list).toHaveBeenCalled())
expect(screen.queryByText(/^Every application in/)).toBeNull()
})
+
+ // No ApplicationDefinition plural or application name can be "-", so only
+ // routes under it are safe from shadowing an application's own pages.
+ it("leaves /observability/logs to an application named logs of kind observability", async () => {
+ renderWithK8sProvider(
+
+
+ ,
+ { client: makeClient(), initialRoute: "/observability/logs" },
+ )
+
+ expect(await screen.findByText("Loading…")).toBeInTheDocument()
+ expect(screen.queryByText(/^Every application in/)).toBeNull()
+ })
})
diff --git a/packages/system/dashboard/images/console/apps/console/src/routes/ConsolePage.tsx b/packages/system/dashboard/images/console/apps/console/src/routes/ConsolePage.tsx
index 2b2aed3e4..c78ae619e 100644
--- a/packages/system/dashboard/images/console/apps/console/src/routes/ConsolePage.tsx
+++ b/packages/system/dashboard/images/console/apps/console/src/routes/ConsolePage.tsx
@@ -97,7 +97,7 @@ export function ConsolePage() {
path="migration/vmimporttasks/:name"
element={}
/>
- } />
+ } />
} />
} />
} />
diff --git a/packages/system/dashboard/images/console/apps/console/src/routes/sidebar-sections.test.tsx b/packages/system/dashboard/images/console/apps/console/src/routes/sidebar-sections.test.tsx
index 1fcc3cde4..e678c7dd4 100644
--- a/packages/system/dashboard/images/console/apps/console/src/routes/sidebar-sections.test.tsx
+++ b/packages/system/dashboard/images/console/apps/console/src/routes/sidebar-sections.test.tsx
@@ -117,7 +117,7 @@ describe("useConsoleSidebarSections — admin areas moved out", () => {
wrapper: makeWrapper(client),
})
await waitFor(() => expect(result.current.length).toBeGreaterThan(0))
- expect(findItem(result.current, "Logs")?.to).toBe("/console/observability/logs")
+ expect(findItem(result.current, "Logs")?.to).toBe("/console/-/observability/logs")
expect(result.current.find((s) => s.title === "Observability")?.items).toHaveLength(1)
})
})
diff --git a/packages/system/dashboard/images/console/apps/console/src/routes/sidebar-sections.tsx b/packages/system/dashboard/images/console/apps/console/src/routes/sidebar-sections.tsx
index 0cf1ce089..51c9ea00a 100644
--- a/packages/system/dashboard/images/console/apps/console/src/routes/sidebar-sections.tsx
+++ b/packages/system/dashboard/images/console/apps/console/src/routes/sidebar-sections.tsx
@@ -121,7 +121,7 @@ export function useConsoleSidebarSections(): SidebarSection[] {
const observabilitySection: SidebarSection = {
title: "Observability",
- items: [{ label: "Logs", to: "/console/observability/logs", icon: ScrollText }],
+ items: [{ label: "Logs", to: "/console/-/observability/logs", icon: ScrollText }],
}
return [...categorySections, backupsSection, migrationSection, observabilitySection]