feat: unify alert operations queue

This commit is contained in:
lingniu
2026-07-19 09:05:32 +08:00
parent 26ccd2434a
commit 8372ca5349
6 changed files with 273 additions and 50 deletions

View File

@@ -188,7 +188,9 @@ describe('V2 production entry', () => {
expect(corePageSources.AlertsPage).toContain('<TextArea');
expect(corePageSources.AlertsPage).toContain('<Radio');
expect(corePageSources.AlertsPage).toContain('<Card key={event.id} className={`v2-alert-mobile-card');
expect(corePageSources.AlertsPage).toContain('<Card className="v2-alert-kpis-card v2-alert-context-card"');
expect(corePageSources.AlertsPage).toContain('<WorkspaceMetricRail');
expect(corePageSources.AlertsPage).toContain('className="v2-alert-metric-rail"');
expect(corePageSources.AlertsPage).not.toContain('v2-alert-kpis-card v2-alert-context-card');
expect(corePageSources.AlertsPage).toContain('<Card className="v2-alert-table-card"');
expect(corePageSources.AlertsPage).toContain('<Card className={`v2-alert-inspector');
expect(corePageSources.AlertsPage).toContain('<WorkspaceCommandBar');
@@ -459,11 +461,12 @@ describe('V2 production entry', () => {
expect(corePageSources.StatisticsPage).toContain('<PanelEmpty className="v2-mileage-empty"');
expect(corePageSources.StatisticsPage).not.toContain('<table className="v2-mileage-table"');
expect(corePageSources.StatisticsPage).not.toContain('<input');
expect(workspaceMetricRailSource).toContain("import { Card, CardGroup } from '@douyinfe/semi-ui'");
expect(workspaceMetricRailSource).toContain("import { Button, Card, CardGroup } from '@douyinfe/semi-ui'");
expect(workspaceMetricRailSource).toContain('<Card className={className}');
expect(workspaceMetricRailSource).toContain('<CardGroup className={secondaryClassName}');
expect(workspaceMetricRailSource).toContain("variant: 'queue'");
expect(workspaceMetricRailSource).toContain('className={`v2-workspace-metric-rail is-queue');
expect(workspaceMetricRailSource).toContain('className="v2-workspace-metric-action"');
expect(reconciliationSource).toContain('<WorkspaceMetricRail');
expect(reconciliationSource).toContain('variant="queue"');
expect(reconciliationSource).not.toContain('v2-reconcile-kpi-card');
@@ -570,10 +573,10 @@ describe('V2 production entry', () => {
expect(source).toContain('<MapRetryAction');
expect(source).not.toContain('><IconRefresh />重新加载地图</button>');
}
for (const name of ['AlertsPage', 'AccessPage']) {
expect(corePageSources[name]).toContain("from '../shared/MetricActionButton'");
expect(corePageSources[name]).toContain('<MetricActionButton');
}
expect(corePageSources.AccessPage).toContain("from '../shared/MetricActionButton'");
expect(corePageSources.AccessPage).toContain('<MetricActionButton');
expect(corePageSources.AlertsPage).toContain("from '../shared/WorkspaceMetricRail'");
expect(corePageSources.AlertsPage).toContain('<WorkspaceMetricRail');
expect(corePageSources.HistoryPage).toContain('className="v2-history-result-meta"');
expect(corePageSources.AlertsPage).toContain('<Tag className={`v2-alert-severity');
expect(corePageSources.AlertsPage).toContain('<Tag className={`v2-alert-status');