feat(fleet): show instance resource metrics
This commit is contained in:
@@ -38,6 +38,12 @@ const snapshot: FleetSnapshot = {
|
||||
capabilities: ['sms'],
|
||||
freshness: 'stale',
|
||||
anomalies: ['clock drift'],
|
||||
resources: {
|
||||
cpuPercent: 18.4,
|
||||
memoryPercent: 63.2,
|
||||
maxTemperatureCelsius: 46.7,
|
||||
phoneNumbers: ['13800138000'],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
@@ -125,6 +131,10 @@ describe('React AppShell and Fleet vertical slice', () => {
|
||||
const card = screen.getByRole('article', { name: 'Bravo 实例概览' });
|
||||
expect(within(card).getByText('40 ms')).toBeTruthy();
|
||||
expect(within(card).getByText('2.0')).toBeTruthy();
|
||||
expect(within(card).getByText('18.4%')).toBeTruthy();
|
||||
expect(within(card).getByText('63.2%')).toBeTruthy();
|
||||
expect(within(card).getByText('46.7 °C')).toBeTruthy();
|
||||
expect(within(card).getByText('13800138000')).toBeTruthy();
|
||||
expect(within(card).getByRole('link', { name: '管理 Bravo' }).getAttribute('href')).toBe(
|
||||
'/instances/bravo/overview',
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user