feat(platform): promote alert events surface
This commit is contained in:
@@ -16,7 +16,7 @@ import { useState } from 'react';
|
||||
import type { VehicleSourceConsistency, VehicleServiceStatus } from '../api/types';
|
||||
import { isAMapConfigured } from '../config/appConfig';
|
||||
|
||||
export type PageKey = 'dashboard' | 'vehicles' | 'map' | 'realtime' | 'detail' | 'history' | 'history-query' | 'mileage' | 'quality' | 'notification-rules' | 'ops-quality';
|
||||
export type PageKey = 'dashboard' | 'vehicles' | 'map' | 'realtime' | 'detail' | 'history' | 'history-query' | 'mileage' | 'alert-events' | 'quality' | 'notification-rules' | 'ops-quality';
|
||||
|
||||
const navItems = [
|
||||
{ itemKey: 'dashboard', text: '运营驾驶舱', icon: <IconHome /> },
|
||||
@@ -27,7 +27,7 @@ const navItems = [
|
||||
{ itemKey: 'history', text: '轨迹回放', icon: <IconMapPin /> },
|
||||
{ itemKey: 'history-query', text: '历史查询', icon: <IconHistogram /> },
|
||||
{ itemKey: 'mileage', text: '统计分析', icon: <IconBarChartHStroked /> },
|
||||
{ itemKey: 'quality', text: '告警事件', icon: <IconHistogram /> },
|
||||
{ itemKey: 'alert-events', text: '告警事件', icon: <IconHistogram /> },
|
||||
{ itemKey: 'notification-rules', text: '通知规则', icon: <IconBell /> },
|
||||
{ itemKey: 'ops-quality', text: '运维质量', icon: <IconPulse /> }
|
||||
];
|
||||
@@ -93,6 +93,7 @@ export function AppShell({
|
||||
const amapConfigured = isAMapConfigured();
|
||||
const alertLabel = alertButtonLabel(linkIssueCount, activeAlertRuleCount, p0AlertRuleCount);
|
||||
const alertClassName = alertButtonClassName(linkIssueCount, activeAlertRuleCount, p0AlertRuleCount);
|
||||
const selectedPage = activePage === 'quality' ? 'alert-events' : activePage;
|
||||
|
||||
const search = () => {
|
||||
const value = keyword.trim();
|
||||
@@ -113,7 +114,7 @@ export function AppShell({
|
||||
<span>车辆服务中台</span>
|
||||
</div>
|
||||
<Nav
|
||||
selectedKeys={[activePage]}
|
||||
selectedKeys={[selectedPage]}
|
||||
items={navItems}
|
||||
onSelect={({ itemKey }) => onChange(itemKey as PageKey)}
|
||||
style={{ maxWidth: '100%' }}
|
||||
@@ -159,7 +160,7 @@ export function AppShell({
|
||||
size="small"
|
||||
aria-label={`顶部${alertLabel}`}
|
||||
className={alertClassName}
|
||||
onClick={() => onChange('quality')}
|
||||
onClick={() => onChange('alert-events')}
|
||||
>
|
||||
{alertLabel}
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user