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.

Align help checks with composed RAID and History guidance

pulse-triage[bot]b787f3cfaf3f
diff --git a/frontend-modern/src/features/docs/__tests__/troubleshootingEntryGuide.test.ts b/frontend-modern/src/features/docs/__tests__/troubleshootingEntryGuide.test.ts
index c82a427c80..7d5d321694 100644
--- a/frontend-modern/src/features/docs/__tests__/troubleshootingEntryGuide.test.ts
+++ b/frontend-modern/src/features/docs/__tests__/troubleshootingEntryGuide.test.ts
@@ -44,7 +44,7 @@ describe('troubleshooting workflow entry', () => {
const section = entry();
const link = section.querySelector('a');
expect(link?.getAttribute('href')).toBe('/docs/VM_DISK_MONITORING#backup-safety');
- expect(section.querySelectorAll('li')).toHaveLength(11);
+ expect(section.querySelectorAll('li')).toHaveLength(12);
expect(section.querySelector('pre')).toBeNull();
const beforeList = [...section.children]
.slice(
@@ -74,6 +74,12 @@ describe('troubleshooting workflow entry', () => {
const command = row('Copied agent install or removal command failed');
const reporting = row('Guest readings are missing or disagree');
const memory = row('Pulse itself uses more memory, CPU or disk writes');
+ const raid = row('RAID is reported degraded despite a spare');
+ expect(raid.querySelector('a')?.getAttribute('href')).toBe(
+ '/docs/TROUBLESHOOTING#raid-array-is-degraded-with-a-spare',
+ );
+ expect(prose(raid)).toContain('A spare-inclusive total is not the required member count');
+ expect(prose(raid)).toContain('do not change the array just to clear a Pulse alert');
expect(prose(update)).toContain('An update of a monitored container is a different job');
const updateLinks = [...update.querySelectorAll('a')].map((link) => link.getAttribute('href'));
expect(updateLinks).toEqual([
@@ -93,7 +99,7 @@ describe('troubleshooting workflow entry', () => {
it('routes every entry to an existing shipped heading in the production viewer', () => {
const links = [...entry().querySelectorAll('a[href]')];
- expect(links).toHaveLength(18);
+ expect(links).toHaveLength(19);
for (const link of links) {
const href = link.getAttribute('href')!;
const match = /^\/docs\/([^#]+)#(.+)$/.exec(href);
diff --git a/frontend-modern/src/utils/__tests__/metricsHistoryHelp.test.ts b/frontend-modern/src/utils/__tests__/metricsHistoryHelp.test.ts
index 733905e125..20c8aeb1df 100644
--- a/frontend-modern/src/utils/__tests__/metricsHistoryHelp.test.ts
+++ b/frontend-modern/src/utils/__tests__/metricsHistoryHelp.test.ts
@@ -3,6 +3,7 @@ import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { describe, expect, it } from 'vitest';
import { renderDocMarkdown } from '@/features/docs/docMarkdown';
+import { getHistoryReadoutLabel } from '@/components/shared/historyChartModel';
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../../../..');
const read = (file: string) => readFileSync(path.join(root, file), 'utf8');
@@ -48,12 +49,15 @@ describe('History interpretation help', () => {
"Not necessarily the highest value in the whole selected range or the value at an alert's exact time",
);
const renderer = read('frontend-modern/src/components/Workloads/GuestDrawerHistory.tsx');
- for (const label of [
- 'Latest stored',
- 'Stored',
- 'Inspect history',
- 'Single observation. No trend yet.',
- ]) {
+ expect(renderer).toContain(
+ 'getHistoryReadoutLabel(props.source, activeTimestamp() !== null)',
+ );
+ expect(getHistoryReadoutLabel('store', false)).toBe('Latest stored');
+ expect(getHistoryReadoutLabel('store', true)).toBe('Stored');
+ for (const label of ['Latest stored', 'Stored']) {
+ expect(text(interpretation())).toContain(label);
+ }
+ for (const label of ['Inspect history', 'Single observation. No trend yet.']) {
expect(renderer).toContain(label);
expect(text(interpretation())).toContain(label);
}