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
22 changes: 21 additions & 1 deletion src/engineering_platform/assets/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,21 @@ function dashboardHealthPresentation(status = latestStatus, platformHealth = lat
checks.push(["queue", queueDepth ? "queue_waiting" : "queue_empty", queueDepth ? "warning" : "good", { count: queueDepth }, { section: t("dashboard.health.section.execution") }]);
return { state, checks };
}
function orderedPlatformComponentEntries(components, model = latestPlatformHealth?.component_model) {
const known = new Set(), entries = [];
if (Array.isArray(model)) {
model.forEach((definition) => {
const id = definition?.id;
if (typeof id !== "string" || !Object.hasOwn(components, id)) return;
known.add(id);
entries.push([id, components[id]]);
});
}
Object.entries(components).forEach(([id, component]) => {
if (!known.has(id)) entries.push([id, component]);
});
return entries;
}
function renderDashboardHealth(status = latestStatus, platformHealth = latestPlatformHealth) {
const indicator = $("dashboardHealthIndicator"), tooltipTitle = $("dashboardHealthTooltipTitle"), checks = $("dashboardHealthChecks"), accessibleLabel = $("dashboardHealthAccessibleLabel");
if (!indicator || !tooltipTitle || !checks || !accessibleLabel) return;
Expand Down Expand Up @@ -3730,7 +3745,12 @@ function renderPlatformHealth(payload) {
container.append(message);
return;
}
for (const [key, component] of Object.entries(components)) {
// The popout derives its grouped presentation from component_model. Keep
// the component section on that same canonical inventory order as well.
for (const [key, component] of orderedPlatformComponentEntries(
components,
latestPlatformHealth?.component_model,
)) {
const item = document.createElement("article"),
indicator = document.createElement("span"),
name = document.createElement("span"),
Expand Down
10 changes: 10 additions & 0 deletions tests/engineering/dashboard.spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10409,6 +10409,16 @@ test.describe("Engineering Status browser smoke", () => {
const card = page.locator("#platformHealth .platform-health__component").filter({ hasText: "EP-server" });
await expect(card).toHaveAttribute("data-health", "true");
await expect(card).not.toContainText("Inbox-watcher");
await expect(page.locator("#platformHealth .platform-health__component-name")).toHaveText([
"EP-server",
"Platformdatabase",
"Lifecycle Worker",
"Operations Console",
"Server Relay↗",
"HTTP/API-ingang",
"CLI-ingang",
"Bestandsinbox-ingang",
]);
});

test("opens canonical ingress details from the status popout", async ({ page }) => {
Expand Down
Loading