Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions config/navs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,6 @@ export default [
to: "/browser",
icon: "ri:box-3-line",
},
{
label: "Tiered Storage",
to: "/tiers",
icon: "ri:stack-line",
},
{
label: "Event Destinations",
to: "/events-target",
icon: "ri:bookmark-3-line",
},
{
label: "S3 Tables",
to: "/table-catalog",
Expand Down Expand Up @@ -104,6 +94,16 @@ export default [
to: "/status",
icon: "ri:bar-chart-box-line",
},
{
label: "Event Destinations",
to: "/events-target",
Comment thread
cxymds marked this conversation as resolved.
Resolved
icon: "ri:bookmark-3-line",
},
{
label: "Tiered Storage",
to: "/tiers",
icon: "ri:stack-line",
},
{
label: "Administration",
type: "divider",
Expand Down
4 changes: 2 additions & 2 deletions lib/dashboard-route-meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ export const MENU_CONTROLLED_DASHBOARD_ROUTES: readonly string[] = [
"/replication",
"/events",
"/lifecycle",
"/tiers",
"/events-target",
"/table-catalog",
"/access-keys",
"/policies",
Expand All @@ -30,6 +28,8 @@ export const MENU_CONTROLLED_DASHBOARD_ROUTES: readonly string[] = [
"/sse",
"/audit-target",
"/status",
"/events-target",
"/tiers",
"/settings",
"/license",
]
Expand Down
18 changes: 15 additions & 3 deletions tests/lib/sidebar-navigation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ test("navigation groups follow the six approved product domains", () => {
)
})

test("data management keeps event destinations before S3 Tables", () => {
const group = groupNavigation(getVisibleNavigation(navs, all)).find((item) => item.label === "Data Management")
test("operations includes event destinations and tiered storage", () => {
const group = groupNavigation(getVisibleNavigation(navs, all)).find((item) => item.label === "Operations")

assert.deepEqual(
group?.items.map((item) => item.to),
["/browser", "/tiers", "/events-target", "/table-catalog"],
["/status", "/events-target", "/tiers"],
)
})

Expand Down Expand Up @@ -154,6 +154,18 @@ test("all menu destinations participate in permission-aware landing selection",
}
})

test("landing selection follows operations navigation order when multiple routes are permitted", () => {
const permittedRoutes = new Set(["/status", "/events-target", "/tiers"])

assert.equal(
getFirstAccessibleDashboardRoute({
isAdmin: false,
canAccessPath: (path) => permittedRoutes.has(path),
}),
"/status",
)
})

test("bucket-only rule permissions remain valid landing destinations", () => {
for (const path of ["/events", "/replication", "/lifecycle"]) {
assert.equal(getFirstAccessibleDashboardRoute({ isAdmin: false, canAccessPath: allow(path) }), path)
Expand Down