feat(platform): surface notification priority queue
This commit is contained in:
@@ -3294,7 +3294,27 @@ test('renders notification rules as a standalone operations page', async () => {
|
||||
{ name: 'P0 实时中断', target: '接入运维 + 业务责任人', channel: '邮件 / 企业微信', condition: '无来源、VIN 缺失、存储不可写', escalationMinutes: 30, acceptanceCriteria: '来源恢复并持续 10 分钟' },
|
||||
{ name: 'P1 数据质量', target: '协议解析 + 数据治理', channel: '每日汇总邮件', condition: '字段缺失、链路间断', escalationMinutes: 120, acceptanceCriteria: '核心字段恢复解析' }
|
||||
],
|
||||
priorityIssues: [],
|
||||
priorityIssues: [{
|
||||
vin: 'VIN-RULES-001',
|
||||
plate: '粤A规则1',
|
||||
phone: '',
|
||||
sourceEndpoint: 'vehicle_identity_binding',
|
||||
protocol: 'VEHICLE_SERVICE',
|
||||
issueType: 'NO_SOURCE',
|
||||
severity: 'error',
|
||||
lastSeen: '2026-07-03 20:12:10',
|
||||
detail: '通知规则页待通知告警',
|
||||
priority: 'P0',
|
||||
actionLabel: '确认平台转发',
|
||||
actionDetail: '核对平台转发配置',
|
||||
sla: '30 分钟确认',
|
||||
vehicleLabel: '粤A规则1 / VIN-RULES-001',
|
||||
realtimeHash: '#/realtime?keyword=VIN-RULES-001',
|
||||
historyHash: '#/history?keyword=VIN-RULES-001',
|
||||
rawHash: '#/history-query?keyword=VIN-RULES-001&tab=raw',
|
||||
vehicleHash: '#/detail?keyword=VIN-RULES-001',
|
||||
notificationText: '【P0 告警通知】通知规则页待通知'
|
||||
}],
|
||||
activeRuleCount: 2,
|
||||
p0RuleCount: 1
|
||||
},
|
||||
@@ -3320,12 +3340,23 @@ test('renders notification rules as a standalone operations page', async () => {
|
||||
expect(screen.getByText('车辆无任何来源证据')).toBeInTheDocument();
|
||||
expect(screen.getByText('P0 实时中断')).toBeInTheDocument();
|
||||
expect(screen.getByText('接入运维 + 业务责任人')).toBeInTheDocument();
|
||||
expect(screen.getByText('当前待通知告警')).toBeInTheDocument();
|
||||
expect(screen.getByText('粤A规则1 / VIN-RULES-001')).toBeInTheDocument();
|
||||
expect(screen.getByText('确认平台转发')).toBeInTheDocument();
|
||||
expect(screen.getByText('通知规则页待通知告警')).toBeInTheDocument();
|
||||
expect(screen.getByText('platform-rules-test')).toBeInTheDocument();
|
||||
expect(fetchMock).toHaveBeenCalledWith(expect.stringContaining('/api/alert-events/notification-plan?limit=50'), undefined);
|
||||
|
||||
fireEvent.click(screen.getByRole('button', { name: '复制通知规则Runbook' }));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【通知规则Runbook】'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('无来源规则 / P0 / 平台接入'));
|
||||
fireEvent.click(screen.getByRole('button', { name: '复制待通知汇总' }));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【当前待通知告警】'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('粤A规则1 / VIN-RULES-001'));
|
||||
fireEvent.click(screen.getByRole('button', { name: '复制单条告警通知' }));
|
||||
expect(writeText).toHaveBeenCalledWith('【P0 告警通知】通知规则页待通知');
|
||||
fireEvent.click(screen.getByRole('button', { name: '车辆服务' }));
|
||||
expect(window.location.hash).toBe('#/detail?keyword=VIN-RULES-001');
|
||||
});
|
||||
|
||||
test('renders ops quality as a standalone runtime health page', async () => {
|
||||
|
||||
Reference in New Issue
Block a user