From fef09774c592aafa19b916be1cda2665299706a3 Mon Sep 17 00:00:00 2001 From: austinqli <1344583166@qq.com> Date: Wed, 1 Nov 2023 16:54:03 +0800 Subject: [PATCH] =?UTF-8?q?fix(frontend):=20=E7=9B=91=E6=8E=A7=E5=91=8A?= =?UTF-8?q?=E8=AD=A6=E8=87=AA=E6=B5=8Bbug=E4=BF=AE=E5=A4=8D=20#1531?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbm-ui/frontend/src/locales/zh-cn.json | 1 + .../services/model/monitor/monitor-policy.ts | 8 ++ dbm-ui/frontend/src/services/monitor.ts | 7 ++ .../src/views/main-views/pages/Database.vue | 6 +- .../src/views/main-views/pages/Platform.vue | 6 +- .../components/content/Index.vue | 4 +- .../components/edit-strategy/Index.vue | 13 +-- .../edit-strategy/monitor-target/Index.vue | 103 +++++++++++++----- .../src/views/redis/apply/ApplyRedis.vue | 8 +- .../pages/page1/Index.vue | 2 - 10 files changed, 109 insertions(+), 49 deletions(-) diff --git a/dbm-ui/frontend/src/locales/zh-cn.json b/dbm-ui/frontend/src/locales/zh-cn.json index 1cbdeadb25..73c7853a1e 100644 --- a/dbm-ui/frontend/src/locales/zh-cn.json +++ b/dbm-ui/frontend/src/locales/zh-cn.json @@ -2266,5 +2266,6 @@ "元数据检查": "元数据检查", "日期": "日期", "未知": "未知", + "请输入 IP": "请输入 IP", "这行勿动!新增翻译请在上一行添加!": "" } \ No newline at end of file diff --git a/dbm-ui/frontend/src/services/model/monitor/monitor-policy.ts b/dbm-ui/frontend/src/services/model/monitor/monitor-policy.ts index 0fd47cc713..244ccb8448 100644 --- a/dbm-ui/frontend/src/services/model/monitor/monitor-policy.ts +++ b/dbm-ui/frontend/src/services/model/monitor/monitor-policy.ts @@ -15,6 +15,13 @@ export default class MonitorPolicy { bk_biz_id: number; // 所属业务,等于0则属于平台策略 creator: string; create_at: string; + custom_conditions: { + condition: string, + dimension_name: string, + key: string, + method: string, + value: string[], + }[]; dispatch_group_id: number; db_type: string; // 所属db组件 event_count: number; // 事件数量,-1代表未知,实际数量应为>=0 @@ -60,6 +67,7 @@ export default class MonitorPolicy { this.bk_biz_id = payload.bk_biz_id; this.creator = payload.creator; this.create_at = payload.create_at; + this.custom_conditions = payload.custom_conditions; this.dispatch_group_id = payload.dispatch_group_id; this.db_type = payload.db_type; this.event_count = payload.event_count; diff --git a/dbm-ui/frontend/src/services/monitor.ts b/dbm-ui/frontend/src/services/monitor.ts index 90dfa3e914..c7ddb2c95a 100644 --- a/dbm-ui/frontend/src/services/monitor.ts +++ b/dbm-ui/frontend/src/services/monitor.ts @@ -17,6 +17,13 @@ import MonitorPolicyModel from '@services/model/monitor/monitor-policy'; import type { ListBase } from './types/common'; interface UpdatePolicyParams { + custom_conditions: { + condition: string, + dimension_name: string, + key: string, + method: string, + value: string[], + }[]; targets: { level: string, rule: { diff --git a/dbm-ui/frontend/src/views/main-views/pages/Database.vue b/dbm-ui/frontend/src/views/main-views/pages/Database.vue index 317d87f1d5..98367bf2a0 100644 --- a/dbm-ui/frontend/src/views/main-views/pages/Database.vue +++ b/dbm-ui/frontend/src/views/main-views/pages/Database.vue @@ -347,7 +347,7 @@ controller-id="influxdb" module-id="bigdata"> - + @@ -419,7 +419,7 @@
- +