From 9a2d700ccb606269f68d640870850bbe93b6d0cf Mon Sep 17 00:00:00 2001 From: 3octaves <873551943@qq.com> Date: Tue, 7 Jan 2025 11:40:31 +0800 Subject: [PATCH] =?UTF-8?q?feat(frontend):=20=E5=91=8A=E8=AD=A6=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E4=BC=98=E5=8C=96=20#8366?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbm-ui/frontend/src/locales/zh-cn.json | 2 + .../services/model/monitor/monitor-policy.ts | 4 + .../model/notice-group/notice-group.ts | 6 +- .../monitor-alarm-db/alarm-group/Index.vue | 111 ++++++++---------- .../alarm-group/components/DetailDialog.vue | 1 + .../components/NoticeMethodFormItem.vue | 37 ++++-- .../components/content/Index.vue | 75 ++++++------ .../components/edit-strategy/Index.vue | 15 ++- .../edit-strategy/monitor-target/Index.vue | 14 +-- 9 files changed, 152 insertions(+), 113 deletions(-) diff --git a/dbm-ui/frontend/src/locales/zh-cn.json b/dbm-ui/frontend/src/locales/zh-cn.json index 6c367c3df3..ed793fbab3 100644 --- a/dbm-ui/frontend/src/locales/zh-cn.json +++ b/dbm-ui/frontend/src/locales/zh-cn.json @@ -3926,5 +3926,7 @@ "当前协助人": "当前协助人", "c实例预览r_n": "【{0}】实例预览 {1}(共{2}组)", "排除业务": "排除业务", + "1. 群聊添加群机器人: 蓝鲸监控(上云)": "1. 群聊添加群机器人: 蓝鲸监控(上云)", + "2. 手动蓝鲸监控(上云) 并输入关键字n": "2. 手动 {'@'}蓝鲸监控(上云) 并输入关键字 {n}", "这行勿动!新增翻译请在上一行添加!": "" } 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 da855ad252..a19fab49ca 100644 --- a/dbm-ui/frontend/src/services/model/monitor/monitor-policy.ts +++ b/dbm-ui/frontend/src/services/model/monitor/monitor-policy.ts @@ -113,4 +113,8 @@ export default class MonitorPolicy { get updateAtDisplay() { return utcDisplayTime(this.update_at); } + + get isInner() { + return this.bk_biz_id === 0; + } } diff --git a/dbm-ui/frontend/src/services/model/notice-group/notice-group.ts b/dbm-ui/frontend/src/services/model/notice-group/notice-group.ts index 5a1c593200..96965f32c3 100644 --- a/dbm-ui/frontend/src/services/model/notice-group/notice-group.ts +++ b/dbm-ui/frontend/src/services/model/notice-group/notice-group.ts @@ -1,4 +1,4 @@ -import { utcDisplayTime } from '@utils'; +import { isRecentDays, utcDisplayTime } from '@utils'; export default class NoticGroup { bk_biz_id: number; @@ -61,4 +61,8 @@ export default class NoticGroup { get updateAtDisplay() { return utcDisplayTime(this.update_at); } + + get isNew() { + return isRecentDays(this.create_at, 24); + } } diff --git a/dbm-ui/frontend/src/views/monitor-alarm-db/alarm-group/Index.vue b/dbm-ui/frontend/src/views/monitor-alarm-db/alarm-group/Index.vue index 7f06ffef4f..ac2db966ed 100644 --- a/dbm-ui/frontend/src/views/monitor-alarm-db/alarm-group/Index.vue +++ b/dbm-ui/frontend/src/views/monitor-alarm-db/alarm-group/Index.vue @@ -50,7 +50,6 @@