🔨 修改文本描述.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<div class="table-left-bar-handle">
|
||||
<!-- 标题 -->
|
||||
<div class="table-title">
|
||||
告警记录列表
|
||||
告警事件列表
|
||||
</div>
|
||||
</div>
|
||||
<!-- 右侧操作 -->
|
||||
|
||||
@@ -14,7 +14,7 @@ export const FalseAlarm = {
|
||||
// 告警条件 字典项
|
||||
export const TriggerConditionKey = 'alarmTriggerCondition';
|
||||
|
||||
// 告警记录处理状态 字典项
|
||||
// 告警事件处理状态 字典项
|
||||
export const HandleStatusKey = 'alarmEventHandleStatus';
|
||||
|
||||
// 是否为误报 字典项
|
||||
|
||||
@@ -35,21 +35,26 @@
|
||||
<a-form-item v-if="formModel.allEffect === 0"
|
||||
:field="'tag-' + (index + 1)"
|
||||
:label="'指标标签-' + (index + 1)">
|
||||
<a-space :size="12">
|
||||
<a-space :size="12" class="tag-wrapper">
|
||||
<!-- 标签名称 -->
|
||||
<a-input v-model="tag.key"
|
||||
style="width: 128px;"
|
||||
placeholder="指标标签名称" />
|
||||
style="width: 108px;"
|
||||
placeholder="标签名称" />
|
||||
<!-- 标签值 -->
|
||||
<a-select v-model="tag.value"
|
||||
class="tag-values"
|
||||
style="width: 260px"
|
||||
:max-tag-count="2"
|
||||
:options="measurementTags[measurement] || []"
|
||||
placeholder="标签值"
|
||||
tag-nowrap
|
||||
:options="[measurement] || []"
|
||||
placeholder="输入或选择标签值"
|
||||
multiple
|
||||
allow-create />
|
||||
allow-create>
|
||||
<template #empty>
|
||||
<a-empty>
|
||||
请输入标签值
|
||||
</a-empty>
|
||||
</template>
|
||||
</a-select>
|
||||
<!-- 移除 -->
|
||||
<a-button title="移除"
|
||||
style="width: 32px"
|
||||
@@ -200,7 +205,6 @@
|
||||
import { assignOmitRecord } from '@/utils';
|
||||
import { TriggerConditionKey, LevelKey, DefaultCondition, DefaultLevel, } from '../types/const';
|
||||
import { createAlarmRule, updateAlarmRule } from '@/api/monitor/alarm-rule';
|
||||
import { isBoolean } from '@/utils/is';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import { useDictStore, useCacheStore } from '@/store';
|
||||
import { getMonitorHostPolicyRuleTags } from '@/api/monitor/monitor-host';
|
||||
@@ -220,7 +224,7 @@
|
||||
const tags = ref<Array<RuleTag>>([]);
|
||||
const hasTags = ref(false);
|
||||
const measurement = ref('');
|
||||
const measurementTags = ref<Record<string, string[]>>({});
|
||||
const = ref<Record<string, string[]>>({});
|
||||
|
||||
const defaultForm = (): AlarmRuleUpdateRequest => {
|
||||
return {
|
||||
@@ -326,13 +330,13 @@
|
||||
|
||||
// 加载全部标签
|
||||
const loadTags = () => {
|
||||
const tags = measurementTags.value[measurement.value];
|
||||
const tags = .value[measurement.value];
|
||||
if (tags) {
|
||||
return;
|
||||
}
|
||||
// 加载标签
|
||||
getMonitorHostPolicyRuleTags(formModel.value.policyId as number, measurement.value).then(({ data }) => {
|
||||
measurementTags.value[measurement.value as any] = data;
|
||||
.value[measurement.value as any] = data;
|
||||
});
|
||||
};
|
||||
|
||||
@@ -420,6 +424,11 @@
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
.tag-wrapper {
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.alarm-level-select, .condition-select {
|
||||
|
||||
:deep(.arco-select-view-suffix) {
|
||||
@@ -430,4 +439,5 @@
|
||||
:deep(.tag-values .arco-select-view-inner) {
|
||||
flex-wrap: nowrap !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
:hide-content="true">
|
||||
<a-tab-pane :key="TabKeys.OVERVIEW" title="主机概览" />
|
||||
<a-tab-pane :key="TabKeys.CHART" title="监控图表" />
|
||||
<a-tab-pane :key="TabKeys.ALARM" title="告警记录" />
|
||||
<a-tab-pane :key="TabKeys.ALARM" title="告警事件" />
|
||||
</a-tabs>
|
||||
<a-divider direction="vertical"
|
||||
style="height: 22px; margin: 0 16px 0 8px;"
|
||||
@@ -42,7 +42,7 @@
|
||||
</div>
|
||||
<!-- 右侧 -->
|
||||
<div class="header-right">
|
||||
<!-- 告警记录标签 -->
|
||||
<!-- 告警事件标签 -->
|
||||
<div v-if="activeKey === TabKeys.OVERVIEW" class="handle-wrapper">
|
||||
<a-tag v-if="overrideTimestamp">更新时间: {{ dateFormat(new Date(overrideTimestamp)) }}</a-tag>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user