mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-05 23:02:10 +03:00
fix(i18n,sidebar): add missing logsTimelineSubtitle + update sidebar tests
Address maintainer feedback on #8354: - Add logsTimelineSubtitle key to en.json + 11 locales (ar, az, bg, bn, cs, da, de, es, fa, fi, fr) that were missing it - Add logs-timeline to sidebar-visibility.test.ts expected arrays - Add logs-timeline to sidebar-monitoring-reorg.test.ts logs group - Add compression-exclusions to sidebar-visibility.test.ts (pre-existing)
This commit is contained in:
@@ -1114,6 +1114,7 @@
|
||||
"runtime": "وقت التشغيل",
|
||||
"consoleLogs": "سجلات وحدة التحكم",
|
||||
"logsTimeline": "Timeline",
|
||||
"logsTimelineSubtitle": "Visual request timeline",
|
||||
"globalRouting": "التوجيه العام",
|
||||
"mitmProxy": "بروكسي MITM",
|
||||
"oneProxy": "1Proxy",
|
||||
|
||||
@@ -1114,6 +1114,7 @@
|
||||
"runtime": "İcra müddəti",
|
||||
"consoleLogs": "Konsol qeydləri",
|
||||
"logsTimeline": "Timeline",
|
||||
"logsTimelineSubtitle": "Visual request timeline",
|
||||
"globalRouting": "Qlobal marşrutlaşdırma",
|
||||
"mitmProxy": "MITM Proksi",
|
||||
"oneProxy": "1 Proksi",
|
||||
|
||||
@@ -1114,6 +1114,7 @@
|
||||
"runtime": "Runtime",
|
||||
"consoleLogs": "Console Logs",
|
||||
"logsTimeline": "Timeline",
|
||||
"logsTimelineSubtitle": "Visual request timeline",
|
||||
"globalRouting": "Global Routing",
|
||||
"mitmProxy": "MITM Proxy",
|
||||
"oneProxy": "1Proxy",
|
||||
|
||||
@@ -1114,6 +1114,7 @@
|
||||
"runtime": "Runtime",
|
||||
"consoleLogs": "Console Logs",
|
||||
"logsTimeline": "Timeline",
|
||||
"logsTimelineSubtitle": "Visual request timeline",
|
||||
"globalRouting": "Global Routing",
|
||||
"mitmProxy": "MITM Proxy",
|
||||
"oneProxy": "1Proxy",
|
||||
|
||||
@@ -1114,6 +1114,7 @@
|
||||
"runtime": "Runtime",
|
||||
"consoleLogs": "Console Logs",
|
||||
"logsTimeline": "Timeline",
|
||||
"logsTimelineSubtitle": "Visual request timeline",
|
||||
"globalRouting": "Global Routing",
|
||||
"mitmProxy": "MITM Proxy",
|
||||
"oneProxy": "1Proxy",
|
||||
|
||||
@@ -1114,6 +1114,7 @@
|
||||
"runtime": "Runtime",
|
||||
"consoleLogs": "Console Logs",
|
||||
"logsTimeline": "Timeline",
|
||||
"logsTimelineSubtitle": "Visual request timeline",
|
||||
"globalRouting": "Global Routing",
|
||||
"mitmProxy": "MITM Proxy",
|
||||
"oneProxy": "1Proxy",
|
||||
|
||||
@@ -1114,6 +1114,7 @@
|
||||
"runtime": "Runtime",
|
||||
"consoleLogs": "Console Logs",
|
||||
"logsTimeline": "Timeline",
|
||||
"logsTimelineSubtitle": "Visual request timeline",
|
||||
"globalRouting": "Global Routing",
|
||||
"mitmProxy": "MITM Proxy",
|
||||
"oneProxy": "1Proxy",
|
||||
|
||||
@@ -1114,6 +1114,7 @@
|
||||
"runtime": "Runtime",
|
||||
"consoleLogs": "Console Logs",
|
||||
"logsTimeline": "Timeline",
|
||||
"logsTimelineSubtitle": "Visual request timeline",
|
||||
"globalRouting": "Global Routing",
|
||||
"mitmProxy": "MITM Proxy",
|
||||
"oneProxy": "1Proxy",
|
||||
|
||||
@@ -1114,6 +1114,7 @@
|
||||
"runtime": "Runtime",
|
||||
"consoleLogs": "Console Logs",
|
||||
"logsTimeline": "Timeline",
|
||||
"logsTimelineSubtitle": "Visual request timeline",
|
||||
"globalRouting": "Global Routing",
|
||||
"mitmProxy": "MITM Proxy",
|
||||
"oneProxy": "1Proxy",
|
||||
|
||||
@@ -1114,6 +1114,7 @@
|
||||
"runtime": "Runtime",
|
||||
"consoleLogs": "Console Logs",
|
||||
"logsTimeline": "Timeline",
|
||||
"logsTimelineSubtitle": "Visual request timeline",
|
||||
"globalRouting": "Global Routing",
|
||||
"mitmProxy": "MITM Proxy",
|
||||
"oneProxy": "1Proxy",
|
||||
|
||||
@@ -1114,6 +1114,7 @@
|
||||
"runtime": "Runtime",
|
||||
"consoleLogs": "Console Logs",
|
||||
"logsTimeline": "Timeline",
|
||||
"logsTimelineSubtitle": "Visual request timeline",
|
||||
"globalRouting": "Global Routing",
|
||||
"mitmProxy": "MITM Proxy",
|
||||
"oneProxy": "1Proxy",
|
||||
|
||||
@@ -1114,6 +1114,7 @@
|
||||
"runtime": "Runtime",
|
||||
"consoleLogs": "Console Logs",
|
||||
"logsTimeline": "Timeline",
|
||||
"logsTimelineSubtitle": "Visual request timeline",
|
||||
"globalRouting": "Global Routing",
|
||||
"mitmProxy": "MITM Proxy",
|
||||
"oneProxy": "1Proxy",
|
||||
|
||||
@@ -22,7 +22,11 @@ test("monitoring section has exactly 4 children: 1 item (activity) + 3 groups (l
|
||||
// First child is the activity item (not a group)
|
||||
const first = children[0] as sidebarVisibility.SidebarItemDefinition;
|
||||
assert.ok(!("type" in first) || first.type !== "group", "first child must not be a group");
|
||||
assert.equal((first as sidebarVisibility.SidebarItemDefinition).id, "activity", "first child must be activity item");
|
||||
assert.equal(
|
||||
(first as sidebarVisibility.SidebarItemDefinition).id,
|
||||
"activity",
|
||||
"first child must be activity item"
|
||||
);
|
||||
|
||||
// Remaining 3 children are groups
|
||||
const groups = children.slice(1);
|
||||
@@ -31,7 +35,11 @@ test("monitoring section has exactly 4 children: 1 item (activity) + 3 groups (l
|
||||
}
|
||||
|
||||
const groupIds = groups.map((g) => (g as sidebarVisibility.SidebarItemGroup).id);
|
||||
assert.deepEqual(groupIds, ["logs", "audit", "system"], "group ids must be logs, audit, system in order");
|
||||
assert.deepEqual(
|
||||
groupIds,
|
||||
["logs", "audit", "system"],
|
||||
"group ids must be logs, audit, system in order"
|
||||
);
|
||||
});
|
||||
|
||||
test("getSectionItems of monitoring does NOT contain logs-activity", () => {
|
||||
@@ -44,7 +52,7 @@ test("getSectionItems of monitoring does NOT contain logs-activity", () => {
|
||||
assert.equal(
|
||||
itemIds.includes("logs-activity" as sidebarVisibility.HideableSidebarItemId),
|
||||
false,
|
||||
"logs-activity must not be in monitoring section items",
|
||||
"logs-activity must not be in monitoring section items"
|
||||
);
|
||||
});
|
||||
|
||||
@@ -59,7 +67,7 @@ test("monitoring section does NOT have a group with id costs-parameters", () =>
|
||||
assert.equal(
|
||||
groupIds.includes("costs-parameters"),
|
||||
false,
|
||||
"costs-parameters group must not exist in monitoring",
|
||||
"costs-parameters group must not exist in monitoring"
|
||||
);
|
||||
});
|
||||
|
||||
@@ -67,9 +75,7 @@ test("monitoring section activity item has correct href and icon", () => {
|
||||
const section = findSection("monitoring");
|
||||
assert.ok(section, "monitoring section must exist");
|
||||
|
||||
const activityItem = sidebarVisibility
|
||||
.getSectionItems(section)
|
||||
.find((i) => i.id === "activity");
|
||||
const activityItem = sidebarVisibility.getSectionItems(section).find((i) => i.id === "activity");
|
||||
|
||||
assert.ok(activityItem, "activity item must be in monitoring section");
|
||||
assert.equal(activityItem.href, "/dashboard/activity");
|
||||
@@ -77,17 +83,18 @@ test("monitoring section activity item has correct href and icon", () => {
|
||||
assert.equal(activityItem.i18nKey, "activity");
|
||||
});
|
||||
|
||||
test("monitoring logs group contains logs, logs-proxy, logs-console", () => {
|
||||
test("monitoring logs group contains logs, logs-proxy, logs-console, logs-timeline", () => {
|
||||
const section = findSection("monitoring");
|
||||
assert.ok(section, "monitoring section must exist");
|
||||
|
||||
const logsGroup = section.children.find(
|
||||
(c): c is sidebarVisibility.SidebarItemGroup => "type" in c && c.type === "group" && c.id === "logs",
|
||||
(c): c is sidebarVisibility.SidebarItemGroup =>
|
||||
"type" in c && c.type === "group" && c.id === "logs"
|
||||
);
|
||||
assert.ok(logsGroup, "logs group must exist in monitoring");
|
||||
|
||||
const itemIds = logsGroup.items.map((i) => i.id);
|
||||
assert.deepEqual(itemIds, ["logs", "logs-proxy", "logs-console"]);
|
||||
assert.deepEqual(itemIds, ["logs", "logs-proxy", "logs-console", "logs-timeline"]);
|
||||
});
|
||||
|
||||
test("monitoring system group contains health and runtime", () => {
|
||||
@@ -95,7 +102,8 @@ test("monitoring system group contains health and runtime", () => {
|
||||
assert.ok(section, "monitoring section must exist");
|
||||
|
||||
const systemGroup = section.children.find(
|
||||
(c): c is sidebarVisibility.SidebarItemGroup => "type" in c && c.type === "group" && c.id === "system",
|
||||
(c): c is sidebarVisibility.SidebarItemGroup =>
|
||||
"type" in c && c.type === "group" && c.id === "system"
|
||||
);
|
||||
assert.ok(systemGroup, "system group must exist in monitoring");
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ test("system sidebar items: monitoring has activity at top then logs/audit/syste
|
||||
"logs",
|
||||
"logs-proxy",
|
||||
"logs-console",
|
||||
"logs-timeline",
|
||||
"audit",
|
||||
"audit-mcp",
|
||||
"audit-a2a",
|
||||
|
||||
Reference in New Issue
Block a user