mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-16 02:42:09 +00:00
Clarify trend empty-state copy on Infrastructure summary
Swap the Infrastructure summary's placeholder strings so users see that Pulse is actively accumulating data rather than a static empty/waiting state: - 'Waiting for first sample' -> 'Gathering first sample…' - 'No history yet' -> 'Building trend history…' Both strings are rendered in tight slots (56px sparkline card, 11px pill) — the new copy is the same length class but signals ongoing progress. No behavior change; Storage and Workloads summaries keep their own wording.
This commit is contained in:
parent
675c47d971
commit
6fced072d3
6 changed files with 12 additions and 12 deletions
|
|
@ -285,7 +285,7 @@ describe('InfrastructureSummary range behavior', () => {
|
|||
|
||||
await waitFor(() => {
|
||||
expect(container.querySelector('svg.cursor-crosshair')).toBeNull();
|
||||
expect(container.textContent).toContain('Waiting for first sample');
|
||||
expect(container.textContent).toContain('Gathering first sample…');
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -310,7 +310,7 @@ describe('InfrastructureSummary range behavior', () => {
|
|||
});
|
||||
|
||||
await waitFor(() => {
|
||||
expect(container.textContent).toContain('Waiting for first sample');
|
||||
expect(container.textContent).toContain('Gathering first sample…');
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -620,7 +620,7 @@ describe('InfrastructureSummary range behavior', () => {
|
|||
});
|
||||
|
||||
await waitFor(() => {
|
||||
expect(container.textContent).not.toContain('No history yet');
|
||||
expect(container.textContent).not.toContain('Building trend history…');
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -289,7 +289,7 @@ describe('UnifiedResourceTable performance contract', () => {
|
|||
"displaySeries().map((series) => ({",
|
||||
);
|
||||
expect(infrastructureSummaryStateSource).not.toContain(
|
||||
"isAwaitingFirstSample() ? 'Waiting for first sample' : 'No history yet'",
|
||||
"isAwaitingFirstSample() ? 'Gathering first sample…' : 'Building trend history…'",
|
||||
);
|
||||
expect(infrastructureSummaryStateSource).not.toContain("fetchFailed() ? 'Trend data unavailable' : emptyHistoryLabel()");
|
||||
expect(infrastructureSummaryModelSource).toContain(
|
||||
|
|
|
|||
|
|
@ -157,10 +157,10 @@ describe('infrastructureSummaryModel', () => {
|
|||
]);
|
||||
expect(hasInfrastructureSeriesData(series, 'network')).toBe(true);
|
||||
expect(hasInfrastructureSeriesData(series, 'diskio')).toBe(false);
|
||||
expect(buildInfrastructureEmptyHistoryLabel(true)).toBe('Waiting for first sample');
|
||||
expect(buildInfrastructureEmptyHistoryLabel(false)).toBe('No history yet');
|
||||
expect(buildInfrastructureEmptyMessage(true, 'No history yet')).toBe('Trend data unavailable');
|
||||
expect(buildInfrastructureEmptyMessage(false, 'No history yet')).toBe('No history yet');
|
||||
expect(buildInfrastructureEmptyHistoryLabel(true)).toBe('Gathering first sample…');
|
||||
expect(buildInfrastructureEmptyHistoryLabel(false)).toBe('Building trend history…');
|
||||
expect(buildInfrastructureEmptyMessage(true, 'Building trend history…')).toBe('Trend data unavailable');
|
||||
expect(buildInfrastructureEmptyMessage(false, 'Building trend history…')).toBe('Building trend history…');
|
||||
});
|
||||
|
||||
it('keeps network and diskio series on canonical ids when focused summary selection narrows the view', () => {
|
||||
|
|
|
|||
|
|
@ -281,7 +281,7 @@ export function isInfrastructureAwaitingFirstSample(options: {
|
|||
}
|
||||
|
||||
export function buildInfrastructureEmptyHistoryLabel(isAwaitingFirstSample: boolean): string {
|
||||
return isAwaitingFirstSample ? 'Waiting for first sample' : 'No history yet';
|
||||
return isAwaitingFirstSample ? 'Gathering first sample…' : 'Building trend history…';
|
||||
}
|
||||
|
||||
export function buildInfrastructureEmptyMessage(
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ describe('TrendCharts', () => {
|
|||
infrastructure: {
|
||||
cpu: new Map(),
|
||||
memory: new Map(),
|
||||
emptyMessage: 'Waiting for first sample',
|
||||
emptyMessage: 'Gathering first sample…',
|
||||
},
|
||||
})}
|
||||
overview={makeOverview()}
|
||||
|
|
@ -74,6 +74,6 @@ describe('TrendCharts', () => {
|
|||
/>
|
||||
));
|
||||
|
||||
expect(screen.getByText('Waiting for first sample')).toBeTruthy();
|
||||
expect(screen.getByText('Gathering first sample…')).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -978,7 +978,7 @@ describe('frontend resource type boundaries', () => {
|
|||
);
|
||||
expect(infrastructureSummaryStateSource).not.toContain("displaySeries().map((series) => ({");
|
||||
expect(infrastructureSummaryStateSource).not.toContain(
|
||||
"isAwaitingFirstSample() ? 'Waiting for first sample' : 'No history yet'",
|
||||
"isAwaitingFirstSample() ? 'Gathering first sample…' : 'Building trend history…'",
|
||||
);
|
||||
expect(infrastructureSummaryStateSource).not.toContain("getOrgID() || 'default'");
|
||||
expect(storageSummaryCacheSource).toContain('normalizeOrgScope(getOrgID())');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue