关联告警趋势和关联告警列表
This commit is contained in:
@@ -11,7 +11,7 @@ import {
|
||||
ExclamationOutlined
|
||||
} from '@ant-design/icons';
|
||||
import dayjs from 'dayjs';
|
||||
import { errorLevelOptions, exportTable } from "../../lib/utils.js"
|
||||
import { errorLevelOptions, exportTable, levelColorMap } from "../../lib/utils.js"
|
||||
|
||||
// 接口引入
|
||||
import {
|
||||
@@ -31,22 +31,9 @@ import { RootState } from '@/src/store/index.js';
|
||||
const { RangePicker } = DatePicker;
|
||||
const { Text } = Typography;
|
||||
const { Option } = Select;
|
||||
const levelColor = Object.keys(alarmLevelConfig).reduce((map, key) => {
|
||||
map[key] = alarmLevelConfig[key].color;
|
||||
return map;
|
||||
}, {});
|
||||
|
||||
const levelText = Object.keys(alarmLevelConfig).reduce((map, key) => {
|
||||
map[key] = alarmLevelConfig[key].description;
|
||||
return map;
|
||||
}, {});
|
||||
|
||||
// 级别颜色配置
|
||||
const levelColorMap = {
|
||||
ERROR: '#FF4D4F', // 错误 红
|
||||
WARNING: '#FA8C16', // 警告 橙
|
||||
INFO: '#1890FF', // 信息 蓝
|
||||
};
|
||||
|
||||
|
||||
// 快速根据 value 获取 label
|
||||
const getLevelLabel = (val) => {
|
||||
@@ -148,6 +135,8 @@ export default function AlarmCenterPage() {
|
||||
closed: 0,
|
||||
});
|
||||
|
||||
|
||||
|
||||
// ====================== 获取列表 ======================
|
||||
const fetchList = async () => {
|
||||
setLoading(true);
|
||||
|
||||
Reference in New Issue
Block a user