Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Keep dashboard guidance checks formatted and correctly typed

pulse-triage[bot]9f55716edffa
diff --git a/frontend-modern/src/features/docs/__tests__/dashboardReadinessGuide.test.ts b/frontend-modern/src/features/docs/__tests__/dashboardReadinessGuide.test.ts
index d86f22e5e8..bd9d79914c 100644
--- a/frontend-modern/src/features/docs/__tests__/dashboardReadinessGuide.test.ts
+++ b/frontend-modern/src/features/docs/__tests__/dashboardReadinessGuide.test.ts
@@ -17,7 +17,7 @@ const section = (name: string, heading: string) => {
expect(markdown, heading).toBeDefined();
return article(`### ${heading}\n${markdown}`, name);
};
-const text = (node: HTMLElement) => node.textContent!.replace(/\s+/g, ' ').trim();
+const text = (node: Element) => node.textContent!.replace(/\s+/g, ' ').trim();
const stalled = () => section('TROUBLESHOOTING', 'Health is green but the dashboard is stalled');
describe('dashboard readiness guidance', () => {
@@ -40,7 +40,9 @@ describe('dashboard readiness guidance', () => {
expect(copy).toMatch(/GET \/api\/health.*HEAD/);
expect(copy).toMatch(/Public.*200.*503/);
expect(copy).toMatch(/Liveness is not end-to-end readiness/);
- expect(copy).toMatch(/do not establish.*authentication.*polling.*dashboard state.*notification/);
+ expect(copy).toMatch(
+ /do not establish.*authentication.*polling.*dashboard state.*notification/,
+ );
expect(copy).toMatch(/websocket: true is not proof.*initial state/);
expect(copy).toMatch(/upgrade or welcome message is not that proof/);
expect(copy).toMatch(/container health badge.*inherits these limits/);
@@ -54,12 +56,18 @@ describe('dashboard readiness guidance', () => {
const rows = [...rendered.querySelectorAll('tbody tr')];
expect(rows).toHaveLength(3);
expect(text(rows[0])).toMatch(/page does not open.*another address, proxy or earlier time/);
- expect(text(rows[1])).toMatch(/Sign-in succeeds.*Authentication worked.*does not establish receipt of initial state/);
- expect(text(rows[1])).toMatch(/does not identify a lock owner.*proxy, browser-cache or credential fault/);
+ expect(text(rows[1])).toMatch(
+ /Sign-in succeeds.*Authentication worked.*does not establish receipt of initial state/,
+ );
+ expect(text(rows[1])).toMatch(
+ /does not identify a lock owner.*proxy, browser-cache or credential fault/,
+ );
expect(text(rows[2])).toMatch(/readings stop advancing.*collection or delivery continues/);
expect(text(rows[2])).toMatch(/current value.*retained value.*stored History/);
expect(rendered.querySelector('a[href="/docs/FAQ#no-data-showing"]')).not.toBeNull();
- expect(rendered.querySelector('a[href="/docs/INSTALL#installation-did-not-reach-a-usable-server"]')).not.toBeNull();
+ expect(
+ rendered.querySelector('a[href="/docs/INSTALL#installation-did-not-reach-a-usable-server"]'),
+ ).not.toBeNull();
expect(rendered.querySelector('a[href="#connection-refused"]')).not.toBeNull();
});
@@ -69,11 +77,17 @@ describe('dashboard readiness guidance', () => {
expect(rendered.querySelector('pre')).toBeNull();
expect(copy).toMatch(/original failure, not a new diagnostic run/);
expect(copy).toMatch(/when already available/);
- expect(copy).toMatch(/cookies, headers, query values, WebSocket frames, full responses.*exports private/);
+ expect(copy).toMatch(
+ /cookies, headers, query values, WebSocket frames, full responses.*exports private/,
+ );
expect(copy).toMatch(/do not use Copy as cURL/);
expect(copy).toMatch(/unavailable observation is unknown, not success/);
- expect(copy).toMatch(/Do not restart, reinstall, clear browser storage, sign out, bypass the proxy, disable TLS or run Diagnostics/);
- expect(copy).toMatch(/Do not send repeated state requests, induce a freeze or take a process-terminating dump/);
+ expect(copy).toMatch(
+ /Do not restart, reinstall, clear browser storage, sign out, bypass the proxy, disable TLS or run Diagnostics/,
+ );
+ expect(copy).toMatch(
+ /Do not send repeated state requests, induce a freeze or take a process-terminating dump/,
+ );
expect(copy).toMatch(/Preserve existing configuration, credentials and logs/);
expect(copy).toMatch(/guidance is not a runtime fix/);
expect(rendered.querySelector('a[href="#-getting-help"]')).not.toBeNull();