功能:告警级别调整为四级(轻微/普通/重要/紧急)并更新颜色
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -21,9 +21,10 @@ export const ALERT_STATUS_OPTIONS = [
|
||||
|
||||
/** 告警级别选项 */
|
||||
export const ALERT_LEVEL_OPTIONS = [
|
||||
{ label: '低', value: 'low' },
|
||||
{ label: '中', value: 'medium' },
|
||||
{ label: '高', value: 'high' },
|
||||
{ label: '轻微', value: 'low' },
|
||||
{ label: '普通', value: 'medium' },
|
||||
{ label: '重要', value: 'high' },
|
||||
{ label: '紧急', value: 'critical' },
|
||||
];
|
||||
|
||||
/** 列表的搜索表单 */
|
||||
|
||||
@@ -93,8 +93,9 @@ function getLevelText(level?: string) {
|
||||
function getLevelColor(level?: string) {
|
||||
const colorMap: Record<string, string> = {
|
||||
low: 'green',
|
||||
medium: 'orange',
|
||||
high: 'red',
|
||||
medium: 'blue',
|
||||
high: 'orange',
|
||||
critical: 'red',
|
||||
};
|
||||
return level ? colorMap[level] || 'default' : 'default';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user