This is an automated email from the ASF dual-hosted git repository. gongchao pushed a commit to branch integte-extern-alarm in repository https://gitbox.apache.org/repos/asf/hertzbeat.git
commit 8f7d85d5d6255d7ba98dcb08fde487650feaf47e Author: tomsun28 <[email protected]> AuthorDate: Sat Jan 11 15:09:04 2025 +0800 [webapp] add alert integration Signed-off-by: tomsun28 <[email protected]> --- .../alert-integration.component.html | 18 ++++++++----- web-app/src/assets/i18n/en-US.json | 30 ++++++++++++---------- web-app/src/assets/i18n/zh-CN.json | 5 +++- web-app/src/assets/i18n/zh-TW.json | 4 +++ 4 files changed, 37 insertions(+), 20 deletions(-) diff --git a/web-app/src/app/routes/alert/alert-integration/alert-integration.component.html b/web-app/src/app/routes/alert/alert-integration/alert-integration.component.html index ccbb2569c2..32849778b6 100644 --- a/web-app/src/app/routes/alert/alert-integration/alert-integration.component.html +++ b/web-app/src/app/routes/alert/alert-integration/alert-integration.component.html @@ -46,7 +46,7 @@ <div style="display: flex; justify-content: space-between"> <h2>{{ selectedSource.name }}</h2> <button [nzLoading]="generateLoading" nz-button (click)="generateToken()" style="margin-right: 16px">{{ - 'alert.integration.new-token' | i18n + 'alert.integration.token.new' | i18n }}</button> </div> <markdown [data]="markdownContent"></markdown> @@ -58,15 +58,21 @@ [(nzVisible)]="isModalVisible" nzMaskClosable="false" nzWidth="40%" - nzTitle="API 认证 Token" + [nzTitle]="'alert.integration.token.title' | i18n" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()" [nzOkText]="null" - [nzCancelText]="'common.button.return' | i18n" + [nzCancelText]="'common.button.confirm' | i18n" > <div *nzModalContent class="-inner-content"> - <p>'The token you generated that can be used to access the HertzBeat API.'</p> - <code>{{ token }}</code> - <p>此内容只会展示一次,请妥善保存Token.</p> + <div> + <p>{{ 'alert.integration.token.desc' | i18n }}</p> + </div> + <div style="width: 100%"> + <textarea rows="6" style="width: 100%; border-radius: 4px">{{ token }}</textarea> + </div> + <div style="text-align: center; font-weight: lighter"> + <p>{{ 'alert.integration.token.notice' | i18n }}</p> + </div> </div> </nz-modal> diff --git a/web-app/src/assets/i18n/en-US.json b/web-app/src/assets/i18n/en-US.json index 3b308b4614..0e01eda120 100644 --- a/web-app/src/assets/i18n/en-US.json +++ b/web-app/src/assets/i18n/en-US.json @@ -9,7 +9,7 @@ "clear.local.storage": "Clear Local Storage", "monitor": { "": "Monitoring", - "center": "Monitor Center", + "center": "Monitors", "bulletin": "Bulletin", "service": "Service Monitor", "db": "DB Monitor", @@ -38,26 +38,26 @@ }, "alert": { "": "Alerting", - "center": "Alarm Center", - "group": "Group Converge", - "converge": "Alarm Converge", - "inhibit": "Alarm Inhibit", - "setting": "Threshold Rule", - "silence": "Alarm Silence", + "center": "Alarms", + "group": "Group", + "converge": "Converge", + "inhibit": "Inhibit", + "setting": "Threshold", + "silence": "Silence", "dispatch": "Notification", "integration": "Integration" }, "advanced": { "": "Advanced", - "collector": "Collector Cluster", - "labels": "Labels Manage", - "define": "Monitor Template", - "status": "Status Page", - "plugins": "Plugins Manage" + "collector": "Collector", + "labels": "Labels", + "define": "Template", + "status": "Status", + "plugins": "Plugins" }, "extras": { "": "More", - "help": "Help Center", + "help": "Help", "setting": "Setting", "settings": "Settings", "about": "About" @@ -382,6 +382,10 @@ "alert.integration.source.prometheus": "Prometheus", "alert.integration.source.alertmanager": "Alertmanager", "alert.integration.source.tencent": "Tencent Cloud", + "alert.integration.token.new": "Click to Generate Token", + "alert.integration.token.desc": "Token you generated that can be used to access the HertzBeat API.", + "alert.integration.token.title": "Access Token", + "alert.integration.token.notice": "Token only be displayed once. Please keep your token secure. Do not share it with others.", "dashboard.alerts.title": "Recently Alarms List", "dashboard.alerts.title-no": "Recently Pending Alarms", "dashboard.alerts.no": "No Pending Alarms", diff --git a/web-app/src/assets/i18n/zh-CN.json b/web-app/src/assets/i18n/zh-CN.json index f02620b307..2b96a4e8d2 100644 --- a/web-app/src/assets/i18n/zh-CN.json +++ b/web-app/src/assets/i18n/zh-CN.json @@ -384,7 +384,10 @@ "alert.integration.source.prometheus": "Prometheus", "alert.integration.source.alertmanager": "Alertmanager", "alert.integration.source.tencent": "腾讯云监控", - "alert.integration.new-token": "点击生成 Token", + "alert.integration.token.new": "点击生成 Token", + "alert.integration.token.desc": "生成的 Token 可用于访问 HertzBeat API", + "alert.integration.token.title": "访问认证 Token", + "alert.integration.token.notice": "此内容只会展示一次,请妥善保管您的 Token,不要泄露给他人", "dashboard.alerts.title": "最近告警列表", "dashboard.alerts.title-no": "最近未处理告警", "dashboard.alerts.no": "暂无未处理告警", diff --git a/web-app/src/assets/i18n/zh-TW.json b/web-app/src/assets/i18n/zh-TW.json index 28c8089abf..183c857b22 100644 --- a/web-app/src/assets/i18n/zh-TW.json +++ b/web-app/src/assets/i18n/zh-TW.json @@ -396,6 +396,10 @@ "alert.integration.source.prometheus": "Prometheus", "alert.integration.source.alertmanager": "Alertmanager", "alert.integration.source.tencent": "腾讯云监控", + "alert.integration.token.new": "点击生成 Token", + "alert.integration.token.desc": "生成的 Token 可用于访问 HertzBeat API", + "alert.integration.token.title": "访问认证 Token", + "alert.integration.token.notice": "此内容只会展示一次,请妥善保管您的 Token,不要泄露给他人", "dashboard.alerts.title": "最近告警列表", "dashboard.alerts.title-no": "最近未處理告警", "dashboard.alerts.no": "暫無未處理告警", --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
