From 5a18a4fd7ebd979be429641b4081f54db366ea56 Mon Sep 17 00:00:00 2001 From: tomsun28 Date: Fri, 27 Oct 2023 00:18:09 +0800 Subject: [PATCH] feat alert converge, define, silence support search query (#1300) Signed-off-by: tomsun28 Co-authored-by: ruanliang Co-authored-by: ruanliang01 Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> Co-authored-by: Ceilzcx <48920254+Ceilzcx@users.noreply.github.com> Co-authored-by: Eden4701 --- .../controller/AlertConvergesController.java | 11 ++ .../controller/AlertDefinesController.java | 14 +- .../controller/AlertSilencesController.java | 11 ++ ...{0-mailAlarm.html => 1-emailTemplate.html} | 0 ...WeWorkApp.txt => 10-weWorkAppTemplate.txt} | 0 ...-alertNotifySmn.txt => 11-smnTemplate.txt} | 0 ...rverChan.txt => 12-serverChanTemplate.txt} | 0 ...orkRobot.txt => 4-weWorkRobotTemplate.txt} | 0 ...kRobot.txt => 5-dingTalkRobotTemplate.txt} | 0 ...FlyBook.txt => 6-flyBookRobotTemplate.txt} | 0 ...egramBot.txt => 7-telegramBotTemplate.txt} | 0 ...ertNotifySlack.txt => 8-slackTemplate.txt} | 0 ...iscordBot.txt => 9-discordBotTemplate.txt} | 0 .../src/app/core/startup/startup.service.ts | 2 +- .../layout/basic/widgets/user.component.ts | 2 +- web-app/src/app/pojo/NoticeRule.ts | 4 +- .../alert-converge.component.html | 12 ++ .../alert-converge.component.ts | 3 +- .../alert-notice/alert-notice.component.html | 140 +++++++----------- .../alert-notice/alert-notice.component.ts | 115 +++++++------- .../alert-setting.component.html | 3 +- .../alert-silence.component.html | 12 ++ .../alert-silence/alert-silence.component.ts | 3 +- .../monitor-detail.component.html | 10 +- .../monitor-list/monitor-list.component.html | 12 +- .../src/app/service/alert-converge.service.ts | 5 +- .../src/app/service/alert-silence.service.ts | 5 +- web-app/src/assets/app-data.json | 2 +- web-app/src/assets/i18n/en-US.json | 26 ++-- web-app/src/assets/i18n/zh-CN.json | 27 ++-- web-app/src/assets/i18n/zh-TW.json | 27 ++-- 31 files changed, 222 insertions(+), 224 deletions(-) rename manager/src/main/resources/templates/{0-mailAlarm.html => 1-emailTemplate.html} (100%) rename manager/src/main/resources/templates/{10-alertNotifyWeWorkApp.txt => 10-weWorkAppTemplate.txt} (100%) rename manager/src/main/resources/templates/{11-alertNotifySmn.txt => 11-smnTemplate.txt} (100%) rename manager/src/main/resources/templates/{12-alertNotifyServerChan.txt => 12-serverChanTemplate.txt} (100%) rename manager/src/main/resources/templates/{4-alertNotifyWeWorkRobot.txt => 4-weWorkRobotTemplate.txt} (100%) rename manager/src/main/resources/templates/{5-alertNotifyDingTalkRobot.txt => 5-dingTalkRobotTemplate.txt} (100%) rename manager/src/main/resources/templates/{6-alertNotifyFlyBook.txt => 6-flyBookRobotTemplate.txt} (100%) rename manager/src/main/resources/templates/{7-alertNotifyTelegramBot.txt => 7-telegramBotTemplate.txt} (100%) rename manager/src/main/resources/templates/{8-alertNotifySlack.txt => 8-slackTemplate.txt} (100%) rename manager/src/main/resources/templates/{9-alertNotifyDiscordBot.txt => 9-discordBotTemplate.txt} (100%) diff --git a/alerter/src/main/java/org/dromara/hertzbeat/alert/controller/AlertConvergesController.java b/alerter/src/main/java/org/dromara/hertzbeat/alert/controller/AlertConvergesController.java index bc3ae417ad4..64e30cf5a05 100644 --- a/alerter/src/main/java/org/dromara/hertzbeat/alert/controller/AlertConvergesController.java +++ b/alerter/src/main/java/org/dromara/hertzbeat/alert/controller/AlertConvergesController.java @@ -29,6 +29,7 @@ import org.springframework.data.domain.Sort; import org.springframework.data.jpa.domain.Specification; import org.springframework.http.ResponseEntity; +import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.*; import javax.persistence.criteria.CriteriaBuilder; @@ -58,6 +59,7 @@ public class AlertConvergesController { description = "You can obtain the list of alarm converge by querying filter items | 根据查询过滤项获取告警收敛信息列表") public ResponseEntity>> getAlertConverges( @Parameter(description = "Alarm Converge ID | 告警收敛ID", example = "6565463543") @RequestParam(required = false) List ids, + @Parameter(description = "Search Name | 模糊查询-名称", example = "x") @RequestParam(required = false) String search, @Parameter(description = "Sort field, default id | 排序字段,默认id", example = "id") @RequestParam(defaultValue = "id") String sort, @Parameter(description = "Sort mode: asc: ascending, desc: descending | 排序方式,asc:升序,desc:降序", example = "desc") @RequestParam(defaultValue = "desc") String order, @Parameter(description = "List current page | 列表当前分页", example = "0") @RequestParam(defaultValue = "0") int pageIndex, @@ -72,6 +74,15 @@ public ResponseEntity>> getAlertConverges( } andList.add(inPredicate); } + if (StringUtils.hasText(search)) { + Predicate predicate = criteriaBuilder.or( + criteriaBuilder.like( + criteriaBuilder.lower(root.get("name")), + "%" + search.toLowerCase() + "%" + ) + ); + andList.add(predicate); + } Predicate[] predicates = new Predicate[andList.size()]; return criteriaBuilder.and(andList.toArray(predicates)); }; diff --git a/alerter/src/main/java/org/dromara/hertzbeat/alert/controller/AlertDefinesController.java b/alerter/src/main/java/org/dromara/hertzbeat/alert/controller/AlertDefinesController.java index 2b4ed104a8f..2ac2bcb801f 100644 --- a/alerter/src/main/java/org/dromara/hertzbeat/alert/controller/AlertDefinesController.java +++ b/alerter/src/main/java/org/dromara/hertzbeat/alert/controller/AlertDefinesController.java @@ -63,7 +63,7 @@ public class AlertDefinesController { description = "You can obtain the list of alarm definitions by querying filter items | 根据查询过滤项获取告警定义信息列表") public ResponseEntity>> getAlertDefines( @Parameter(description = "Alarm Definition ID | 告警定义ID", example = "6565463543") @RequestParam(required = false) List ids, - @Parameter(description = "Alarm Definition app | 告警定义名称", example = "6565463543") @RequestParam(required = false) String search, + @Parameter(description = "Search-Target Expr Template | 模糊查询-指标对象 表达式 通知模版", example = "x") @RequestParam(required = false) String search, @Parameter(description = "Alarm Definition Severity | 告警定义级别", example = "6565463543") @RequestParam(required = false) Byte priority, @Parameter(description = "Sort field, default id | 排序字段,默认id", example = "id") @RequestParam(defaultValue = "id") String sort, @Parameter(description = "Sort mode: asc: ascending, desc: descending | 排序方式,asc:升序,desc:降序", example = "desc") @RequestParam(defaultValue = "desc") String order, @@ -87,11 +87,19 @@ public ResponseEntity>> getAlertDefines( ), criteriaBuilder.like( criteriaBuilder.lower(root.get("metric")), - "%" + search.toUpperCase() + "%" + "%" + search.toLowerCase() + "%" ), criteriaBuilder.like( criteriaBuilder.lower(root.get("field")), - "%" + search.toUpperCase() + "%" + "%" + search.toLowerCase() + "%" + ), + criteriaBuilder.like( + criteriaBuilder.lower(root.get("expr")), + "%" + search.toLowerCase() + "%" + ), + criteriaBuilder.like( + criteriaBuilder.lower(root.get("template")), + "%" + search.toLowerCase() + "%" ) ); andList.add(predicate); diff --git a/alerter/src/main/java/org/dromara/hertzbeat/alert/controller/AlertSilencesController.java b/alerter/src/main/java/org/dromara/hertzbeat/alert/controller/AlertSilencesController.java index c495b20f83a..d4dbeb7340f 100644 --- a/alerter/src/main/java/org/dromara/hertzbeat/alert/controller/AlertSilencesController.java +++ b/alerter/src/main/java/org/dromara/hertzbeat/alert/controller/AlertSilencesController.java @@ -29,6 +29,7 @@ import org.springframework.data.domain.Sort; import org.springframework.data.jpa.domain.Specification; import org.springframework.http.ResponseEntity; +import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.*; import javax.persistence.criteria.CriteriaBuilder; @@ -58,6 +59,7 @@ public class AlertSilencesController { description = "You can obtain the list of alarm silence by querying filter items | 根据查询过滤项获取告警静默信息列表") public ResponseEntity>> getAlertSilences( @Parameter(description = "Alarm Silence ID | 告警静默ID", example = "6565463543") @RequestParam(required = false) List ids, + @Parameter(description = "Search Name | 模糊查询-名称", example = "x") @RequestParam(required = false) String search, @Parameter(description = "Sort field, default id | 排序字段,默认id", example = "id") @RequestParam(defaultValue = "id") String sort, @Parameter(description = "Sort mode: asc: ascending, desc: descending | 排序方式,asc:升序,desc:降序", example = "desc") @RequestParam(defaultValue = "desc") String order, @Parameter(description = "List current page | 列表当前分页", example = "0") @RequestParam(defaultValue = "0") int pageIndex, @@ -72,6 +74,15 @@ public ResponseEntity>> getAlertSilences( } andList.add(inPredicate); } + if (StringUtils.hasText(search)) { + Predicate predicate = criteriaBuilder.or( + criteriaBuilder.like( + criteriaBuilder.lower(root.get("name")), + "%" + search.toLowerCase() + "%" + ) + ); + andList.add(predicate); + } Predicate[] predicates = new Predicate[andList.size()]; return criteriaBuilder.and(andList.toArray(predicates)); }; diff --git a/manager/src/main/resources/templates/0-mailAlarm.html b/manager/src/main/resources/templates/1-emailTemplate.html similarity index 100% rename from manager/src/main/resources/templates/0-mailAlarm.html rename to manager/src/main/resources/templates/1-emailTemplate.html diff --git a/manager/src/main/resources/templates/10-alertNotifyWeWorkApp.txt b/manager/src/main/resources/templates/10-weWorkAppTemplate.txt similarity index 100% rename from manager/src/main/resources/templates/10-alertNotifyWeWorkApp.txt rename to manager/src/main/resources/templates/10-weWorkAppTemplate.txt diff --git a/manager/src/main/resources/templates/11-alertNotifySmn.txt b/manager/src/main/resources/templates/11-smnTemplate.txt similarity index 100% rename from manager/src/main/resources/templates/11-alertNotifySmn.txt rename to manager/src/main/resources/templates/11-smnTemplate.txt diff --git a/manager/src/main/resources/templates/12-alertNotifyServerChan.txt b/manager/src/main/resources/templates/12-serverChanTemplate.txt similarity index 100% rename from manager/src/main/resources/templates/12-alertNotifyServerChan.txt rename to manager/src/main/resources/templates/12-serverChanTemplate.txt diff --git a/manager/src/main/resources/templates/4-alertNotifyWeWorkRobot.txt b/manager/src/main/resources/templates/4-weWorkRobotTemplate.txt similarity index 100% rename from manager/src/main/resources/templates/4-alertNotifyWeWorkRobot.txt rename to manager/src/main/resources/templates/4-weWorkRobotTemplate.txt diff --git a/manager/src/main/resources/templates/5-alertNotifyDingTalkRobot.txt b/manager/src/main/resources/templates/5-dingTalkRobotTemplate.txt similarity index 100% rename from manager/src/main/resources/templates/5-alertNotifyDingTalkRobot.txt rename to manager/src/main/resources/templates/5-dingTalkRobotTemplate.txt diff --git a/manager/src/main/resources/templates/6-alertNotifyFlyBook.txt b/manager/src/main/resources/templates/6-flyBookRobotTemplate.txt similarity index 100% rename from manager/src/main/resources/templates/6-alertNotifyFlyBook.txt rename to manager/src/main/resources/templates/6-flyBookRobotTemplate.txt diff --git a/manager/src/main/resources/templates/7-alertNotifyTelegramBot.txt b/manager/src/main/resources/templates/7-telegramBotTemplate.txt similarity index 100% rename from manager/src/main/resources/templates/7-alertNotifyTelegramBot.txt rename to manager/src/main/resources/templates/7-telegramBotTemplate.txt diff --git a/manager/src/main/resources/templates/8-alertNotifySlack.txt b/manager/src/main/resources/templates/8-slackTemplate.txt similarity index 100% rename from manager/src/main/resources/templates/8-alertNotifySlack.txt rename to manager/src/main/resources/templates/8-slackTemplate.txt diff --git a/manager/src/main/resources/templates/9-alertNotifyDiscordBot.txt b/manager/src/main/resources/templates/9-discordBotTemplate.txt similarity index 100% rename from manager/src/main/resources/templates/9-alertNotifyDiscordBot.txt rename to manager/src/main/resources/templates/9-discordBotTemplate.txt diff --git a/web-app/src/app/core/startup/startup.service.ts b/web-app/src/app/core/startup/startup.service.ts index e016f1d76a0..732a98abb27 100644 --- a/web-app/src/app/core/startup/startup.service.ts +++ b/web-app/src/app/core/startup/startup.service.ts @@ -60,7 +60,7 @@ export class StartupService { // Application information: including site name, description, year this.settingService.setApp(appData.app); // https://ng-alain.com/theme/settings/zh - this.settingService.setLayout('collapsed', true); + // this.settingService.setLayout('collapsed', true); // ACL: Set the permissions to full, https://ng-alain.com/acl/getting-started this.aclService.setFull(true); // Menu data, https://ng-alain.com/theme/menu diff --git a/web-app/src/app/layout/basic/widgets/user.component.ts b/web-app/src/app/layout/basic/widgets/user.component.ts index 28e1d3ccc45..9b2721e1477 100644 --- a/web-app/src/app/layout/basic/widgets/user.component.ts +++ b/web-app/src/app/layout/basic/widgets/user.component.ts @@ -34,7 +34,7 @@ import { CONSTANTS } from '../../../shared/constants'; [nzFooter]="null" (nzOnCancel)="disAboutModal()" nzClosable="false" - nzWidth="44%" + nzWidth="48%" >
diff --git a/web-app/src/app/pojo/NoticeRule.ts b/web-app/src/app/pojo/NoticeRule.ts index 3064e6a2faa..569403688fb 100644 --- a/web-app/src/app/pojo/NoticeRule.ts +++ b/web-app/src/app/pojo/NoticeRule.ts @@ -3,8 +3,8 @@ export class NoticeRule { name!: string; receiverId!: number; receiverName!: string; - templateId!: number; - templateName!: string; + templateId!: number | null; + templateName!: string | null; enable: boolean = true; // 是否转发所有 filterAll: boolean = true; diff --git a/web-app/src/app/routes/alert/alert-converge/alert-converge.component.html b/web-app/src/app/routes/alert/alert-converge/alert-converge.component.html index a0530f5be76..2ca1bda5eb9 100644 --- a/web-app/src/app/routes/alert/alert-converge/alert-converge.component.html +++ b/web-app/src/app/routes/alert/alert-converge/alert-converge.component.html @@ -17,6 +17,18 @@ {{ 'alert.converge.delete' | i18n }} + +
(); @@ -43,7 +44,7 @@ export class AlertConvergeComponent implements OnInit { loadAlertConvergeTable() { this.tableLoading = true; - let alertDefineInit$ = this.alertConvergeService.getAlertConverges(this.pageIndex - 1, this.pageSize).subscribe( + let alertDefineInit$ = this.alertConvergeService.getAlertConverges(this.search, this.pageIndex - 1, this.pageSize).subscribe( message => { this.tableLoading = false; this.checkedAll = false; diff --git a/web-app/src/app/routes/alert/alert-notice/alert-notice.component.html b/web-app/src/app/routes/alert/alert-notice/alert-notice.component.html index 0bcf420a418..9e567c9a659 100644 --- a/web-app/src/app/routes/alert/alert-notice/alert-notice.component.html +++ b/web-app/src/app/routes/alert/alert-notice/alert-notice.component.html @@ -157,12 +157,12 @@ {{ 'alert.notice.rule.name' | i18n }} - {{ 'alert.notice.receiver.people' | i18n }} - {{ 'alert.notice.template.name' | i18n }} - {{ 'alert.notice.rule.all' | i18n }} - {{ 'alert.notice.rule.enable' | i18n }} + {{ 'alert.notice.receiver.people' | i18n }} + {{ 'alert.notice.template.name' | i18n }} + {{ 'alert.notice.rule.all' | i18n }} + {{ 'alert.notice.rule.enable' | i18n }} {{ 'common.edit-time' | i18n }} - {{ 'common.edit' | i18n }} + {{ 'common.edit' | i18n }} @@ -174,7 +174,10 @@ {{ data.receiverName }} - {{ data.templateName }} + {{ data.templateName }} + + {{ 'alert.notice.template.preset.true' | i18n }} + @@ -230,8 +233,9 @@ {{ 'alert.notice.template.name' | i18n }} {{ 'alert.notice.template.type' | i18n }} - {{ 'common.edit-time' | i18n }} - {{ 'common.edit' | i18n }} + {{ 'alert.notice.template.preset' | i18n }} + {{ 'common.edit-time' | i18n }} + {{ 'common.edit' | i18n }} @@ -240,86 +244,55 @@ {{ data.name }} - + - {{ 'alert.applier.type.sms' | i18n }} + {{ 'alert.notice.type.sms' | i18n }} - {{ 'alert.applier.type.email' | i18n }} + {{ 'alert.notice.type.email' | i18n }} WebHook - {{ 'alert.applier.type.wechat' | i18n }} + {{ 'alert.notice.type.wechat' | i18n }} - {{ 'alert.applier.type.wework' | i18n }} + {{ 'alert.notice.type.wework' | i18n }} - {{ 'alert.applier.type.ding' | i18n }} + {{ 'alert.notice.type.ding' | i18n }} - {{ 'alert.applier.type.fei-shu' | i18n }} + {{ 'alert.notice.type.fei-shu' | i18n }} - {{ 'alert.applier.type.telegram' | i18n }} + {{ 'alert.notice.type.telegram' | i18n }} - {{ 'alert.applier.type.slack' | i18n }} + {{ 'alert.notice.type.slack' | i18n }} - {{ 'alert.applier.type.discord' | i18n }} + {{ 'alert.notice.type.discord' | i18n }} - {{ 'alert.applier.type.weChatApp' | i18n }} + {{ 'alert.notice.type.weChatApp' | i18n }} - {{ 'alert.applier.type.smn' | i18n }} + {{ 'alert.notice.type.smn' | i18n }} - {{ 'alert.applier.type.serverchan' | i18n }} + {{ 'alert.notice.type.serverchan' | i18n }} - - - {{ 'alert.applier.type.sms' | i18n }} - - - {{ 'alert.applier.type.email' | i18n }} - - - WebHook - - - {{ 'alert.applier.type.wechat' | i18n }} - - - {{ 'alert.applier.type.wework' | i18n }} - - - {{ 'alert.applier.type.ding' | i18n }} - - - {{ 'alert.applier.type.fei-shu' | i18n }} - - - {{ 'alert.applier.type.telegram' | i18n }} - - - {{ 'alert.applier.type.slack' | i18n }} - - - {{ 'alert.applier.type.discord' | i18n }} - - - {{ 'alert.applier.type.weChatApp' | i18n }} - - - {{ 'alert.applier.type.smn' | i18n }} + + + + + {{ 'alert.notice.template.preset.true' | i18n }} - - {{ 'alert.applier.type.serverchan' | i18n }} + + {{ 'alert.notice.template.preset.false' | i18n }} @@ -349,7 +322,7 @@ + +
(); @@ -43,7 +44,7 @@ export class AlertSilenceComponent implements OnInit { loadAlertSilenceTable() { this.tableLoading = true; - let alertDefineInit$ = this.alertSilenceService.getAlertSilences(this.pageIndex - 1, this.pageSize).subscribe( + let alertDefineInit$ = this.alertSilenceService.getAlertSilences(this.search, this.pageIndex - 1, this.pageSize).subscribe( message => { this.tableLoading = false; this.checkedAll = false; diff --git a/web-app/src/app/routes/monitor/monitor-detail/monitor-detail.component.html b/web-app/src/app/routes/monitor/monitor-detail/monitor-detail.component.html index b294b13392e..3e86c03ea90 100644 --- a/web-app/src/app/routes/monitor/monitor-detail/monitor-detail.component.html +++ b/web-app/src/app/routes/monitor/monitor-detail/monitor-detail.component.html @@ -80,20 +80,16 @@ >
- + {{ 'monitor.status.un-manage' | i18n }} {{ 'monitor.status.available' | i18n }} - - - {{ 'monitor.status.unavailable' | i18n }} - - + - {{ 'monitor.status.unreachable' | i18n }} + {{ 'monitor.status.unavailable' | i18n }}
diff --git a/web-app/src/app/routes/monitor/monitor-list/monitor-list.component.html b/web-app/src/app/routes/monitor/monitor-list/monitor-list.component.html index 651d8106f18..2389c5e4479 100644 --- a/web-app/src/app/routes/monitor/monitor-list/monitor-list.component.html +++ b/web-app/src/app/routes/monitor/monitor-list/monitor-list.component.html @@ -125,20 +125,16 @@ - + {{ 'monitor.status.un-manage' | i18n }} {{ 'monitor.status.available' | i18n }} - - - {{ 'monitor.status.unavailable' | i18n }} - - + - {{ 'monitor.status.unreachable' | i18n }} + {{ 'monitor.status.unavailable' | i18n }} @@ -156,7 +152,7 @@ - + {{ 'monitor.app.' + data.app | i18n }} diff --git a/web-app/src/app/service/alert-converge.service.ts b/web-app/src/app/service/alert-converge.service.ts index 75cb4ecf5f6..ac7ed0090d9 100644 --- a/web-app/src/app/service/alert-converge.service.ts +++ b/web-app/src/app/service/alert-converge.service.ts @@ -38,7 +38,7 @@ export class AlertConvergeService { return this.http.delete>(alert_converges_uri, options); } - public getAlertConverges(pageIndex: number, pageSize: number): Observable>> { + public getAlertConverges(search: string, pageIndex: number, pageSize: number): Observable>> { pageIndex = pageIndex ? pageIndex : 0; pageSize = pageSize ? pageSize : 8; // 注意HttpParams是不可变对象 需要保存set后返回的对象为最新对象 @@ -49,6 +49,9 @@ export class AlertConvergeService { pageIndex: pageIndex, pageSize: pageSize }); + if (search != undefined && search.trim() != '') { + httpParams = httpParams.append('search', search.trim()); + } const options = { params: httpParams }; return this.http.get>>(alert_converges_uri, options); } diff --git a/web-app/src/app/service/alert-silence.service.ts b/web-app/src/app/service/alert-silence.service.ts index a3db21f7cf8..22e07a2c6ab 100644 --- a/web-app/src/app/service/alert-silence.service.ts +++ b/web-app/src/app/service/alert-silence.service.ts @@ -38,7 +38,7 @@ export class AlertSilenceService { return this.http.delete>(alert_silences_uri, options); } - public getAlertSilences(pageIndex: number, pageSize: number): Observable>> { + public getAlertSilences(search: string, pageIndex: number, pageSize: number): Observable>> { pageIndex = pageIndex ? pageIndex : 0; pageSize = pageSize ? pageSize : 8; // 注意HttpParams是不可变对象 需要保存set后返回的对象为最新对象 @@ -49,6 +49,9 @@ export class AlertSilenceService { pageIndex: pageIndex, pageSize: pageSize }); + if (search != undefined && search.trim() != '') { + httpParams = httpParams.append('search', search.trim()); + } const options = { params: httpParams }; return this.http.get>>(alert_silences_uri, options); } diff --git a/web-app/src/assets/app-data.json b/web-app/src/assets/app-data.json index b12491a1158..b490b19f91e 100644 --- a/web-app/src/assets/app-data.json +++ b/web-app/src/assets/app-data.json @@ -79,7 +79,7 @@ "key": "custom", "text": "自定义", "i18n": "menu.monitor.custom", - "icon": "anticon-robot" + "icon": "anticon-project" } ] }, diff --git a/web-app/src/assets/i18n/en-US.json b/web-app/src/assets/i18n/en-US.json index 735b33200ed..fe3d8f0b243 100644 --- a/web-app/src/assets/i18n/en-US.json +++ b/web-app/src/assets/i18n/en-US.json @@ -164,6 +164,7 @@ "alert.setting.target.instance": "Instance of the row", "alert.setting.target.system_value_row_count": "System-Metrics value row count", "alert.setting.operator": "Supported operator functions", + "alert.setting.search": "Search Threshold", "alert.silence.new": "New Silence Strategy", "alert.silence.edit": "Edit Silence Strategy", "alert.silence.delete": "Delete Silence Strategy", @@ -225,11 +226,13 @@ "alert.notice.template": "Notice Template", "alert.notice.template.new": "New Template", "alert.notice.template.edit": "Edit Template", - "alert.notice.template.showExample": "View a template example", + "alert.notice.template.show": "View Template Content", "alert.notice.template.delete": "Delete Template", "alert.notice.template.name": "Template Name", - "alert.notice.template.example": "Template Example", "alert.notice.template.type": "Notice Type", + "alert.notice.template.preset": "Template Type", + "alert.notice.template.preset.true": "System Preset", + "alert.notice.template.preset.false": "User Custom", "alert.notice.template.content": "Template Content", "alert.notice.receiver": "Message Receiver", "alert.notice.receiver.new": "New Receiver", @@ -272,18 +275,6 @@ "alert.notice.type.smn-topicUrn": "TopicUrn", "alert.notice.type.serverchan": "ServerChan", "alert.notice.type.serverchan-token": "ServerChanToken", - "alert.applier.type.sms": "SMS", - "alert.applier.type.email": "Email", - "alert.applier.type.wechat": "WeChat", - "alert.applier.type.wework": "WeWork", - "alert.applier.type.ding": "DingDing", - "alert.applier.type.fei-shu": "FeiShu", - "alert.applier.type.telegram": "Telegram", - "alert.applier.type.slack": "Slack WebHook", - "alert.applier.type.discord": "Discord", - "alert.applier.type.weChatApp": "WeChatApp", - "alert.applier.type.smn": "HuaWei Cloud SMN", - "alert.applier.type.serverchan": "ServerChan", "alert.notice.rule": "Alert Notice Policy", "alert.notice.rule.new": "New Notice Policy", "alert.notice.rule.edit": "Edit Notice Policy", @@ -451,6 +442,7 @@ "common.notify.copy-success": "Copy Success!", "common.button.ok": "OK", "common.button.cancel": "Cancel", + "common.button.return": "Return", "common.button.help": "Help", "common.button.edit": "Edit", "common.button.setting": "Setting", @@ -588,10 +580,10 @@ "about.github": "Github", "about.gitee": "Gitee", "about.issue": "Feedback", - "about.pr": "Contribution", - "about.discuss": "Discussion", + "about.pr": "Contribute", + "about.discuss": "Discuss", "about.doc": "Document", - "about.upgrade": "Upgrade Guide", + "about.upgrade": "Upgrade", "about.star": "Star", "validation.email.required": "Please enter your email!", "validation.email.wrong-format": "The email address is in the wrong format!", diff --git a/web-app/src/assets/i18n/zh-CN.json b/web-app/src/assets/i18n/zh-CN.json index 1dd60c04851..e9ffed4e4b2 100644 --- a/web-app/src/assets/i18n/zh-CN.json +++ b/web-app/src/assets/i18n/zh-CN.json @@ -164,6 +164,7 @@ "alert.setting.target.instance": "所属行实例", "alert.setting.target.system_value_row_count": "系统-指标值行数量", "alert.setting.operator": "支持操作符函数", + "alert.setting.search": "搜索阈值", "alert.silence.new": "新增静默策略", "alert.silence.edit": "编辑静默策略", "alert.silence.delete": "删除静默策略", @@ -225,12 +226,14 @@ "alert.notice.template": "通知模板", "alert.notice.template.new": "新增通知模板", "alert.notice.template.edit": "编辑通知模板", - "alert.notice.template.showExample": "查看模板示例", + "alert.notice.template.show": "查看模板", "alert.notice.template.delete": "删除通知模板", "alert.notice.template.name": "模板名称", - "alert.notice.template.example": "模板示例", "alert.notice.template.type": "通知方式", - "alert.notice.template.content": "通知模板内容", + "alert.notice.template.preset": "模版类型", + "alert.notice.template.preset.true": "系统内置模版", + "alert.notice.template.preset.false": "用户自定义模版", + "alert.notice.template.content": "模板内容", "alert.notice.receiver": "消息接收人", "alert.notice.receiver.new": "新增接收人", "alert.notice.receiver.edit": "编辑接收人", @@ -267,18 +270,7 @@ "alert.notice.type.smn": "华为云SMN", "alert.notice.type.smn-ak": "AK", "alert.notice.type.smn-sk": "SK", - "alert.applier.type.sms": "短信", - "alert.applier.type.email": "邮箱", - "alert.applier.type.wechat": "微信公众号", - "alert.applier.type.wework": "企业微信", - "alert.applier.type.ding": "钉钉", - "alert.applier.type.fei-shu": "飞书", - "alert.applier.type.telegram": "Telegram", - "alert.applier.type.slack": "Slack WebHook", - "alert.applier.type.discord": "Discord", - "alert.applier.type.weChatApp": "企业微信应用", - "alert.applier.type.smn": "华为云SMN", - "alert.applier.type.serverchan": "Server酱(ServerChan)", + "alert.notice.type.telegram": "Telegram", "alert.notice.type.smn-projectId": "项目ID", "alert.notice.type.smn-region": "地域", "alert.notice.type.smn-topicUrn": "TopicUrn", @@ -452,6 +444,7 @@ "common.button.ok": "确定", "common.button.detect": "测试", "common.button.cancel": "取消", + "common.button.return": "返回", "common.button.help": "帮助", "common.button.edit": "编辑", "common.button.setting": "配置", @@ -583,8 +576,8 @@ "about.point.4": "高性能,采集器集群横向扩展,支持多隔离网络监控,云边协同。", "about.point.5": "自由的阈值规则,邮件钉钉微信飞书短信等消息及时送达。", "about.help": "HertzBeat 的强大自定义,多类型支持,高性能,易扩展,希望能帮助用户快速构建自有监控系统。", - "about.github": "Github仓库", - "about.gitee": "Gitee仓库", + "about.github": "Github", + "about.gitee": "Gitee", "about.issue": "反馈问题", "about.pr": "贡献代码", "about.discuss": "讨论交流", diff --git a/web-app/src/assets/i18n/zh-TW.json b/web-app/src/assets/i18n/zh-TW.json index bc947c31dcd..e7c596a9fa1 100644 --- a/web-app/src/assets/i18n/zh-TW.json +++ b/web-app/src/assets/i18n/zh-TW.json @@ -163,6 +163,7 @@ "alert.setting.target.instance": "所屬行實例", "alert.setting.target.system_value_row_count": "系統-指標值行數量", "alert.setting.operator": "支持操作符函數", + "alert.setting.search": "搜尋閾值", "alert.silence.new": "新增靜默策略", "alert.silence.edit": "編輯靜默策略", "alert.silence.delete": "刪除靜默策略", @@ -224,12 +225,14 @@ "alert.notice.template": "通知模板", "alert.notice.template.new": "新增通知模板", "alert.notice.template.edit": "編輯通知模板", - "alert.notice.template.showExample": "查看模板實例", + "alert.notice.template.show": "查看模板", "alert.notice.template.delete": "刪除通知模板", "alert.notice.template.name": "模板名稱", - "alert.notice.template.example": "模板實例", "alert.notice.template.type": "通知方式", - "alert.notice.template.content": "通知模板内容", + "alert.notice.template.preset": "模版類型", + "alert.notice.template.preset.true": "系統內建模版", + "alert.notice.template.preset.false": "用戶自定義模版", + "alert.notice.template.content": "模板内容", "alert.notice.receiver": "消息接收人", "alert.notice.receiver.new": "新增接收人", "alert.notice.receiver.edit": "編輯接收人", @@ -271,18 +274,7 @@ "alert.notice.type.smn-topicUrn": "TopicUrn", "alert.notice.type.serverchan": "ServerChan", "alert.notice.type.serverchan-token": "ServerChanToken", - "alert.applier.type.sms": "短信", - "alert.applier.type.email": "郵箱", - "alert.applier.type.wechat": "微信公衆號", - "alert.applier.type.wework": "企業微信", - "alert.applier.type.ding": "釘釘", - "alert.applier.type.fei-shu": "飛書", - "alert.applier.type.telegram": "Telegram", - "alert.applier.type.slack": "Slack WebHook", - "alert.applier.type.discord": "Discord", - "alert.applier.type.weChatApp": "企業微信應用", - "alert.applier.type.smn": "華為雲SMN", - "alert.applier.type.serverchan": "ServerChan", + "alert.notice.type.telegram": "Telegram", "alert.notice.rule": "告警通知策略", "alert.notice.rule.new": "新增通知策略", "alert.notice.rule.edit": "編輯通知策略", @@ -458,6 +450,7 @@ "common.button.ok": "確定", "common.button.detect": "測試", "common.button.cancel": "取消", + "common.button.return": "返回", "common.button.help": "幫助", "common.button.edit": "編輯", "common.button.setting": "配置", @@ -582,8 +575,8 @@ "about.point.4": "高性能,採集器集群橫向擴展,支持多隔離網絡監控,雲邊協同。", "about.point.5": "自由的閾值規則,郵件釘釘微信飛書短信等消息及時送達。", "about.help": "HertzBeat 的強大自定義,多類型支持,高性能,易擴展,希望能幫助用戶快速構建自有監控系統。", - "about.github": "Github倉庫", - "about.gitee": "Gitee倉庫", + "about.github": "Github", + "about.gitee": "Gitee", "about.issue": "反饋問題", "about.pr": "貢獻代碼", "about.discuss": "討論交流",