This is an automated email from the ASF dual-hosted git repository.

gongchao pushed a commit to branch alarm-1-3
in repository https://gitbox.apache.org/repos/asf/hertzbeat.git

commit 4302f41205ebc5165648c33350135b9c699b3b0d
Author: tomsun28 <[email protected]>
AuthorDate: Fri Jan 3 13:49:20 2025 +0800

    [webapp] update alert inhibit
    
    Signed-off-by: tomsun28 <[email protected]>
---
 web-app/src/app/pojo/AlertDefine.ts                            |  1 +
 .../routes/alert/alert-setting/alert-setting.component.html    | 10 +++++++++-
 web-app/src/assets/i18n/zh-CN.json                             |  4 ++++
 3 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/web-app/src/app/pojo/AlertDefine.ts 
b/web-app/src/app/pojo/AlertDefine.ts
index 3953b0429..07153662f 100644
--- a/web-app/src/app/pojo/AlertDefine.ts
+++ b/web-app/src/app/pojo/AlertDefine.ts
@@ -29,6 +29,7 @@ export class AlertDefine {
   period: number = 300;
   times: number = 3;
   labels!: Record<string, string>;
+  annotations!: Record<string, string>;
   enable: boolean = true;
   template!: string;
   creator!: string;
diff --git 
a/web-app/src/app/routes/alert/alert-setting/alert-setting.component.html 
b/web-app/src/app/routes/alert/alert-setting/alert-setting.component.html
index 1e060dd42..7d0229577 100644
--- a/web-app/src/app/routes/alert/alert-setting/alert-setting.component.html
+++ b/web-app/src/app/routes/alert/alert-setting/alert-setting.component.html
@@ -543,10 +543,18 @@
       </nz-form-item>
       <nz-form-item>
         <nz-form-label nzSpan="7" [nzFor]="'labels'" 
[nzTooltipTitle]="'label.bind.tip' | i18n">{{ 'label.bind' | i18n }} 
</nz-form-label>
-        <nz-form-control nzSpan="12" [nzErrorTip]="'validation.required' | 
i18n">
+        <nz-form-control nzSpan="12">
           <app-labels-input [(ngModel)]="define.labels" 
name="labels"></app-labels-input>
         </nz-form-control>
       </nz-form-item>
+      <nz-form-item>
+        <nz-form-label nzSpan="7" [nzFor]="'annotations'" 
[nzTooltipTitle]="'annotation.bind.tip' | i18n"
+          >{{ 'annotation.bind' | i18n }}
+        </nz-form-label>
+        <nz-form-control nzSpan="12">
+          <app-labels-input [(ngModel)]="define.annotations" 
name="annotations"></app-labels-input>
+        </nz-form-control>
+      </nz-form-item>
       <nz-form-item>
         <nz-form-label nzSpan="7" nzRequired="true" nzFor="enable" 
[nzTooltipTitle]="'alert.setting.enable.tip' | i18n">
           {{ 'alert.setting.enable' | i18n }}
diff --git a/web-app/src/assets/i18n/zh-CN.json 
b/web-app/src/assets/i18n/zh-CN.json
index 184db1eeb..75636a189 100644
--- a/web-app/src/assets/i18n/zh-CN.json
+++ b/web-app/src/assets/i18n/zh-CN.json
@@ -571,10 +571,14 @@
   "tag.description": "标签描述",
   "tag.update-time": "更新时间",
   "tag.display": "效果",
+  "label": "标签",
   "label.bind": "绑定标签",
   "label.bind.tip": "您可以使用标签进行监控资源的分类管理, 例如给资源分别绑定生产环境、测试环境的标签。",
   "tag.help": "标签在 HertzBeat 
中无处不在,我们可以应用标签在资源分组,规则下的标签匹配等场景。标签管理用于对标签的统一管理维护,包含新增,删除,编辑等操作。<br>例如:您可以使用标签对监控资源进行分类管理,给资源分别绑定生产环境、测试环境的标签,在告警通知时通过标签匹配不同的通知人。",
   "tag.help.link": "https://hertzbeat.apache.org/zh-cn/docs/";,
+  "annotation": "注解",
+  "annotation.bind": "绑定注解",
+  "annotation.bind.tip": "您可以使用注解对实体信息进行标记,例如给资源绑定重要事件的注解。",
   "plugin.help": 
"在HertzBeat中,我们可以通过插件机制在告警后执行一些除通知以外的其他操作。插件管理用于对插件的统一管理,包括上传和,启用禁用等操作。<br>例如:您可以通过插件机制实现在告警出现后,执行特定的脚本或SQL等操作。",
   "plugin.help.link": "https://hertzbeat.apache.org/zh-cn/docs/help/plugin";,
   "plugin.upload": "上传插件",


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to