[web-app]i18n for alert notice
This commit is contained in:
@@ -3,14 +3,14 @@
|
||||
<nz-breadcrumb-item>
|
||||
<a [routerLink]="['/']">
|
||||
<i nz-icon nzType="home"></i>
|
||||
<span>仪表盘</span>
|
||||
<span>{{ 'menu.dashboard' | i18n }}</span>
|
||||
</a>
|
||||
</nz-breadcrumb-item>
|
||||
<nz-breadcrumb-item>
|
||||
<i nz-icon nzType="alert"></i>
|
||||
<span>告警通知配置</span>
|
||||
<span>{{ 'menu.alert.dispatch' | i18n }}</span>
|
||||
<a href="https://tancloud.cn/docs/help/alert_email" target="_blank" style="float: right; margin-right: 5%">
|
||||
<span>帮助 </span>
|
||||
<span>{{ 'common.button.help' | i18n }} </span>
|
||||
<i nz-icon nzType="question-circle" nzTheme="outline"></i>
|
||||
</a>
|
||||
</nz-breadcrumb-item>
|
||||
@@ -18,12 +18,12 @@
|
||||
<nz-divider></nz-divider>
|
||||
|
||||
<nz-tabset nzSize="large">
|
||||
<nz-tab nzTitle="告警接收人">
|
||||
<nz-tab [nzTitle]="'alert.notice.receiver' | i18n">
|
||||
<button nz-button nzType="primary" (click)="onNewNoticeReceiver()">
|
||||
<i nz-icon nzType="appstore-add" nzTheme="outline"></i>
|
||||
新增接收人
|
||||
{{ 'alert.notice.receiver.new' | i18n }}
|
||||
</button>
|
||||
<button nz-button nzType="primary" (click)="syncReceiver()" nz-tooltip nzTooltipTitle="刷新">
|
||||
<button nz-button nzType="primary" (click)="syncReceiver()" nz-tooltip [nzTooltipTitle]="'common.refresh' | i18n">
|
||||
<i nz-icon nzType="sync" nzTheme="outline"></i>
|
||||
</button>
|
||||
<nz-table
|
||||
@@ -35,11 +35,11 @@
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th nzAlign="center" nzWidth="10%">接收人</th>
|
||||
<th nzAlign="center" nzWidth="20%">通知方式</th>
|
||||
<th nzAlign="center" nzWidth="20%">配置</th>
|
||||
<th nzAlign="center" nzWidth="20%">最新修改时间</th>
|
||||
<th nzAlign="center" nzWidth="30%">操作</th>
|
||||
<th nzAlign="center" nzWidth="10%">{{ 'alert.notice.receiver.people' | i18n }}</th>
|
||||
<th nzAlign="center" nzWidth="20%">{{ 'alert.notice.receiver.type' | i18n }}</th>
|
||||
<th nzAlign="center" nzWidth="20%">{{ 'alert.notice.receiver.setting' | i18n }}</th>
|
||||
<th nzAlign="center" nzWidth="20%">{{ 'common.edit-time' | i18n }}</th>
|
||||
<th nzAlign="center" nzWidth="30%">{{ 'common.edit' | i18n }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -50,11 +50,11 @@
|
||||
<td nzAlign="center">
|
||||
<nz-tag *ngIf="data.type == 0" nzColor="orange">
|
||||
<i nz-icon nzType="notification" nzTheme="outline"></i>
|
||||
<span>短信</span>
|
||||
<span>{{ 'alert.notice.type.sms' | i18n }}</span>
|
||||
</nz-tag>
|
||||
<nz-tag *ngIf="data.type == 1" nzColor="orange">
|
||||
<i nz-icon nzType="notification" nzTheme="outline"></i>
|
||||
<span>邮件</span>
|
||||
<span>{{ 'alert.notice.type.email' | i18n }}</span>
|
||||
</nz-tag>
|
||||
<nz-tag *ngIf="data.type == 2" nzColor="orange">
|
||||
<i nz-icon nzType="notification" nzTheme="outline"></i>
|
||||
@@ -62,19 +62,19 @@
|
||||
</nz-tag>
|
||||
<nz-tag *ngIf="data.type == 3" nzColor="orange">
|
||||
<i nz-icon nzType="notification" nzTheme="outline"></i>
|
||||
<span>微信公众号</span>
|
||||
<span>{{ 'alert.notice.type.wechat' | i18n }}</span>
|
||||
</nz-tag>
|
||||
<nz-tag *ngIf="data.type == 4" nzColor="orange">
|
||||
<i nz-icon nzType="notification" nzTheme="outline"></i>
|
||||
<span>企业微信机器人</span>
|
||||
<span>{{ 'alert.notice.type.wework' | i18n }}</span>
|
||||
</nz-tag>
|
||||
<nz-tag *ngIf="data.type == 5" nzColor="orange">
|
||||
<i nz-icon nzType="notification" nzTheme="outline"></i>
|
||||
<span>钉钉机器人</span>
|
||||
<span>{{ 'alert.notice.type.ding' | i18n }}</span>
|
||||
</nz-tag>
|
||||
<nz-tag *ngIf="data.type == 6" nzColor="orange">
|
||||
<i nz-icon nzType="notification" nzTheme="outline"></i>
|
||||
<span>飞书机器人</span>
|
||||
<span>{{ 'alert.notice.type.fei-shu' | i18n }}</span>
|
||||
</nz-tag>
|
||||
</td>
|
||||
<td nzAlign="center">
|
||||
@@ -88,10 +88,22 @@
|
||||
</td>
|
||||
<td nzAlign="center">{{ (data.gmtUpdate ? data.gmtUpdate : data.gmtCreate) | date: 'YYYY-MM-dd HH:mm:ss' }}</td>
|
||||
<td nzAlign="center">
|
||||
<button nz-button nzType="primary" (click)="onEditOneNoticeReceiver(data)" nz-tooltip nzTooltipTitle="修改接收人">
|
||||
<button
|
||||
nz-button
|
||||
nzType="primary"
|
||||
(click)="onEditOneNoticeReceiver(data)"
|
||||
nz-tooltip
|
||||
[nzTooltipTitle]="'alert.notice.receiver.edit' | i18n"
|
||||
>
|
||||
<i nz-icon nzType="edit" nzTheme="outline"></i>
|
||||
</button>
|
||||
<button nz-button nzType="primary" (click)="onDeleteOneNoticeReceiver(data.id)" nz-tooltip nzTooltipTitle="删除接收人">
|
||||
<button
|
||||
nz-button
|
||||
nzType="primary"
|
||||
(click)="onDeleteOneNoticeReceiver(data.id)"
|
||||
nz-tooltip
|
||||
[nzTooltipTitle]="'alert.notice.receiver.delete' | i18n"
|
||||
>
|
||||
<i nz-icon nzType="delete" nzTheme="outline"></i>
|
||||
</button>
|
||||
</td>
|
||||
@@ -99,12 +111,12 @@
|
||||
</tbody>
|
||||
</nz-table>
|
||||
</nz-tab>
|
||||
<nz-tab nzTitle="告警通知策略">
|
||||
<nz-tab [nzTitle]="'alert.notice.rule' | i18n">
|
||||
<button nz-button nzType="primary" (click)="onNewNoticeRule()">
|
||||
<i nz-icon nzType="appstore-add" nzTheme="outline"></i>
|
||||
新增通知策略
|
||||
{{ 'alert.notice.rule.new' | i18n }}
|
||||
</button>
|
||||
<button nz-button nzType="primary" (click)="syncRule()" nz-tooltip nzTooltipTitle="刷新">
|
||||
<button nz-button nzType="primary" (click)="syncRule()" nz-tooltip [nzTooltipTitle]="'common.refresh' | i18n">
|
||||
<i nz-icon nzType="sync" nzTheme="outline"></i>
|
||||
</button>
|
||||
<nz-table
|
||||
@@ -116,12 +128,12 @@
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th nzAlign="center" nzWidth="15%">策略名称</th>
|
||||
<th nzAlign="center" nzWidth="12%">接收人</th>
|
||||
<th nzAlign="center" nzWidth="12%">转发所有</th>
|
||||
<th nzAlign="center" nzWidth="15%">是否启用</th>
|
||||
<th nzAlign="center" nzWidth="15%">最新修改时间</th>
|
||||
<th nzAlign="center" nzWidth="25%">操作</th>
|
||||
<th nzAlign="center" nzWidth="15%">{{ 'alert.notice.rule.name' | i18n }}</th>
|
||||
<th nzAlign="center" nzWidth="12%">{{ 'alert.notice.receiver.people' | i18n }}</th>
|
||||
<th nzAlign="center" nzWidth="12%">{{ 'alert.notice.rule.all' | i18n }}</th>
|
||||
<th nzAlign="center" nzWidth="15%">{{ 'alert.notice.rule.enable' | i18n }}</th>
|
||||
<th nzAlign="center" nzWidth="15%">{{ 'common.edit-time' | i18n }}</th>
|
||||
<th nzAlign="center" nzWidth="25%">{{ 'common.edit' | i18n }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -134,26 +146,38 @@
|
||||
</td>
|
||||
<td nzAlign="center">
|
||||
<nz-tag *ngIf="data.filterAll" nzColor="green">
|
||||
<span>是</span>
|
||||
<span>{{ 'common.yes' | i18n }}</span>
|
||||
</nz-tag>
|
||||
<nz-tag *ngIf="!data.filterAll" nzColor="orange">
|
||||
<span>否</span>
|
||||
<span>{{ 'common.no' | i18n }}</span>
|
||||
</nz-tag>
|
||||
</td>
|
||||
<td nzAlign="center">
|
||||
<nz-tag *ngIf="data.enable" nzColor="green">
|
||||
<span>开启</span>
|
||||
<span>{{ 'common.enable' | i18n }}</span>
|
||||
</nz-tag>
|
||||
<nz-tag *ngIf="!data.enable" nzColor="orange">
|
||||
<span>关闭</span>
|
||||
<span>{{ 'common.disable' | i18n }}</span>
|
||||
</nz-tag>
|
||||
</td>
|
||||
<td nzAlign="center">{{ (data.gmtUpdate ? data.gmtUpdate : data.gmtCreate) | date: 'YYYY-MM-dd HH:mm:ss' }}</td>
|
||||
<td nzAlign="center">
|
||||
<button nz-button nzType="primary" (click)="onEditOneNoticeRule(data)" nz-tooltip nzTooltipTitle="修改告警策略">
|
||||
<button
|
||||
nz-button
|
||||
nzType="primary"
|
||||
(click)="onEditOneNoticeRule(data)"
|
||||
nz-tooltip
|
||||
[nzTooltipTitle]="'alert.notice.rule.edit' | i18n"
|
||||
>
|
||||
<i nz-icon nzType="edit" nzTheme="outline"></i>
|
||||
</button>
|
||||
<button nz-button nzType="primary" (click)="onDeleteOneNoticeRule(data.id)" nz-tooltip nzTooltipTitle="删除告警策略">
|
||||
<button
|
||||
nz-button
|
||||
nzType="primary"
|
||||
(click)="onDeleteOneNoticeRule(data.id)"
|
||||
nz-tooltip
|
||||
[nzTooltipTitle]="'alert.notice.rule.delete' | i18n"
|
||||
>
|
||||
<i nz-icon nzType="delete" nzTheme="outline"></i>
|
||||
</button>
|
||||
</td>
|
||||
@@ -166,7 +190,7 @@
|
||||
<!-- 新增或修改通知接收人弹出框 -->
|
||||
<nz-modal
|
||||
[(nzVisible)]="isManageReceiverModalVisible"
|
||||
[nzTitle]="isManageReceiverModalAdd ? '新增接收人' : '修改接收人'"
|
||||
[nzTitle]="isManageReceiverModalAdd ? ('alert.notice.receiver.new' | i18n) : ('alert.notice.receiver.edit' | i18n)"
|
||||
(nzOnCancel)="onManageReceiverModalCancel()"
|
||||
(nzOnOk)="onManageReceiverModalOk()"
|
||||
nzMaskClosable="false"
|
||||
@@ -176,27 +200,27 @@
|
||||
<div *nzModalContent class="-inner-content">
|
||||
<form nz-form #receiverForm="ngForm">
|
||||
<nz-form-item>
|
||||
<nz-form-label [nzSpan]="7" nzFor="name" nzRequired="true">接收人名称</nz-form-label>
|
||||
<nz-form-label [nzSpan]="7" nzFor="name" nzRequired="true">{{ 'alert.notice.receiver.people.name' | i18n }}</nz-form-label>
|
||||
<nz-form-control [nzSpan]="12" [nzErrorTip]="'validation.required' | i18n">
|
||||
<input [(ngModel)]="receiver.name" nz-input required name="name" type="text" id="name" />
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="7" nzRequired="true" nzFor="type">通知方式 </nz-form-label>
|
||||
<nz-form-label nzSpan="7" nzRequired="true" nzFor="type">{{ 'alert.notice.receiver.type' | i18n }} </nz-form-label>
|
||||
<nz-form-control nzSpan="12" [nzErrorTip]="'validation.required' | i18n">
|
||||
<nz-select [(ngModel)]="receiver.type" nzPlaceHolder="Choose" required name="type" id="type">
|
||||
<nz-option [nzValue]="0" nzDisabled nzLabel="短信"></nz-option>
|
||||
<nz-option [nzValue]="1" nzLabel="邮箱"></nz-option>
|
||||
<nz-option [nzValue]="0" nzDisabled [nzLabel]="'alert.notice.type.sms' | i18n"></nz-option>
|
||||
<nz-option [nzValue]="1" [nzLabel]="'alert.notice.type.email' | i18n"></nz-option>
|
||||
<nz-option [nzValue]="2" nzLabel="WebHook"></nz-option>
|
||||
<nz-option [nzValue]="3" nzDisabled nzLabel="微信公众号"></nz-option>
|
||||
<nz-option [nzValue]="4" nzLabel="企业微信机器人"></nz-option>
|
||||
<nz-option [nzValue]="5" nzLabel="钉钉机器人"></nz-option>
|
||||
<nz-option [nzValue]="6" nzLabel="飞书机器人"></nz-option>
|
||||
<nz-option [nzValue]="3" nzDisabled [nzLabel]="'alert.notice.type.wechat' | i18n"></nz-option>
|
||||
<nz-option [nzValue]="4" [nzLabel]="'alert.notice.type.wework' | i18n"></nz-option>
|
||||
<nz-option [nzValue]="5" [nzLabel]="'alert.notice.type.ding' | i18n"></nz-option>
|
||||
<nz-option [nzValue]="6" [nzLabel]="'alert.notice.type.fei-shu' | i18n"></nz-option>
|
||||
</nz-select>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item *ngIf="receiver.type === 0">
|
||||
<nz-form-label [nzSpan]="7" nzFor="phone" [nzRequired]="receiver.type === 0">手机号</nz-form-label>
|
||||
<nz-form-label [nzSpan]="7" nzFor="phone" [nzRequired]="receiver.type === 0">{{ 'alert.notice.type.phone' | i18n }}</nz-form-label>
|
||||
<nz-form-control [nzSpan]="12" [nzErrorTip]="'validation.phone.invalid' | i18n">
|
||||
<input
|
||||
[(ngModel)]="receiver.phone"
|
||||
@@ -210,37 +234,45 @@
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item *ngIf="receiver.type === 1">
|
||||
<nz-form-label [nzSpan]="7" nzFor="email" [nzRequired]="receiver.type === 1">邮箱</nz-form-label>
|
||||
<nz-form-label [nzSpan]="7" nzFor="email" [nzRequired]="receiver.type === 1">{{ 'alert.notice.type.email' | i18n }}</nz-form-label>
|
||||
<nz-form-control [nzSpan]="12" [nzErrorTip]="'validation.email.invalid' | i18n">
|
||||
<input [(ngModel)]="receiver.email" nz-input [required]="receiver.type === 1" email name="email" type="email" id="email" />
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item *ngIf="receiver.type === 2">
|
||||
<nz-form-label [nzSpan]="7" nzFor="hookUrl" [nzRequired]="receiver.type === 2">URL地址</nz-form-label>
|
||||
<nz-form-label [nzSpan]="7" nzFor="hookUrl" [nzRequired]="receiver.type === 2">{{ 'alert.notice.type.url' | i18n }}</nz-form-label>
|
||||
<nz-form-control [nzSpan]="12" [nzErrorTip]="'validation.required' | i18n">
|
||||
<input [(ngModel)]="receiver.hookUrl" nz-input [required]="receiver.type === 2" name="hookUrl" type="url" id="hookUrl" />
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item *ngIf="receiver.type === 3">
|
||||
<nz-form-label [nzSpan]="7" nzFor="wechatId" [nzRequired]="receiver.type === 3">微信OPENID</nz-form-label>
|
||||
<nz-form-label [nzSpan]="7" nzFor="wechatId" [nzRequired]="receiver.type === 3">{{
|
||||
'alert.notice.type.wechat-id' | i18n
|
||||
}}</nz-form-label>
|
||||
<nz-form-control [nzSpan]="12" [nzErrorTip]="'validation.required' | i18n">
|
||||
<input [(ngModel)]="receiver.wechatId" nz-input [required]="receiver.type === 3" name="wechatId" type="text" />
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item *ngIf="receiver.type === 4">
|
||||
<nz-form-label [nzSpan]="7" nzFor="wechatId" [nzRequired]="receiver.type === 4">企业微信机器人KEY</nz-form-label>
|
||||
<nz-form-label [nzSpan]="7" nzFor="wechatId" [nzRequired]="receiver.type === 4">{{
|
||||
'alert.notice.type.wework-key' | i18n
|
||||
}}</nz-form-label>
|
||||
<nz-form-control [nzSpan]="12" [nzErrorTip]="'validation.required' | i18n">
|
||||
<input [(ngModel)]="receiver.wechatId" nz-input [required]="receiver.type === 4" name="wechatId" type="text" />
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item *ngIf="receiver.type === 5">
|
||||
<nz-form-label [nzSpan]="7" nzFor="accessToken" [nzRequired]="receiver.type === 5">机器人ACCESS_TOKEN</nz-form-label>
|
||||
<nz-form-label [nzSpan]="7" nzFor="accessToken" [nzRequired]="receiver.type === 5">{{
|
||||
'alert.notice.type.access-token' | i18n
|
||||
}}</nz-form-label>
|
||||
<nz-form-control [nzSpan]="12" [nzErrorTip]="'validation.required' | i18n">
|
||||
<input [(ngModel)]="receiver.accessToken" nz-input [required]="receiver.type === 5" name="accessToken" type="text" />
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item *ngIf="receiver.type === 6">
|
||||
<nz-form-label [nzSpan]="7" nzFor="wechatId" [nzRequired]="receiver.type === 6">飞书机器人KEY</nz-form-label>
|
||||
<nz-form-label [nzSpan]="7" nzFor="wechatId" [nzRequired]="receiver.type === 6">{{
|
||||
'alert.notice.type.fei-shu-key' | i18n
|
||||
}}</nz-form-label>
|
||||
<nz-form-control [nzSpan]="12" [nzErrorTip]="'validation.required' | i18n">
|
||||
<input [(ngModel)]="receiver.wechatId" nz-input [required]="receiver.type === 6" name="wechatId" type="text" />
|
||||
</nz-form-control>
|
||||
@@ -252,7 +284,7 @@
|
||||
<!-- 新增或修改通知策略弹出框 -->
|
||||
<nz-modal
|
||||
[(nzVisible)]="isManageRuleModalVisible"
|
||||
[nzTitle]="isManageRuleModalAdd ? '新增策略' : '修改策略'"
|
||||
[nzTitle]="isManageRuleModalAdd ? ('alert.notice.rule.new' | i18n) : ('alert.notice.rule.edit' | i18n)"
|
||||
(nzOnCancel)="onManageRuleModalCancel()"
|
||||
(nzOnOk)="onManageRuleModalOk()"
|
||||
nzMaskClosable="false"
|
||||
@@ -262,19 +294,19 @@
|
||||
<div *nzModalContent class="-inner-content">
|
||||
<form nz-form #ruleForm="ngForm">
|
||||
<nz-form-item>
|
||||
<nz-form-label [nzSpan]="7" nzFor="rule_name" nzRequired="true">策略名称</nz-form-label>
|
||||
<nz-form-label [nzSpan]="7" nzFor="rule_name" nzRequired="true">{{ 'alert.notice.rule.name' | i18n }}</nz-form-label>
|
||||
<nz-form-control [nzSpan]="8" [nzErrorTip]="'validation.required' | i18n">
|
||||
<input [(ngModel)]="rule.name" nz-input required name="rule_name" type="text" id="rule_name" />
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="7" nzRequired="true" nzFor="filterAll">转发所有</nz-form-label>
|
||||
<nz-form-label nzSpan="7" nzRequired="true" nzFor="filterAll">{{ 'alert.notice.rule.all' | i18n }}</nz-form-label>
|
||||
<nz-form-control nzSpan="8">
|
||||
<nz-switch [(ngModel)]="rule.filterAll" disabled name="filterAll" id="filterAll"></nz-switch>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="7" nzRequired="true" nzFor="receiver">接收人</nz-form-label>
|
||||
<nz-form-label nzSpan="7" nzRequired="true" nzFor="receiver">{{ 'alert.notice.receiver.people' | i18n }}</nz-form-label>
|
||||
<nz-form-control nzSpan="8" [nzErrorTip]="'validation.required' | i18n">
|
||||
<nz-select
|
||||
[(ngModel)]="rule.receiverId"
|
||||
@@ -291,7 +323,7 @@
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="7" nzRequired="true" nzFor="enable">是否启用</nz-form-label>
|
||||
<nz-form-label nzSpan="7" nzRequired="true" nzFor="enable">{{ 'alert.notice.rule.enable' | i18n }}</nz-form-label>
|
||||
<nz-form-control nzSpan="8">
|
||||
<nz-switch [(ngModel)]="rule.enable" name="enable" id="enable"></nz-switch>
|
||||
</nz-form-control>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, Inject, OnInit } from '@angular/core';
|
||||
import { I18NService } from '@core';
|
||||
import { ALAIN_I18N_TOKEN } from '@delon/theme';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { NzNotificationService } from 'ng-zorro-antd/notification';
|
||||
import { finalize } from 'rxjs/operators';
|
||||
@@ -18,7 +20,8 @@ export class AlertNoticeComponent implements OnInit {
|
||||
private notifySvc: NzNotificationService,
|
||||
private noticeReceiverSvc: NoticeReceiverService,
|
||||
private modal: NzModalService,
|
||||
private noticeRuleSvc: NoticeRuleService
|
||||
private noticeRuleSvc: NoticeRuleService,
|
||||
@Inject(ALAIN_I18N_TOKEN) private i18nSvc: I18NService
|
||||
) {}
|
||||
|
||||
receivers!: NoticeReceiver[];
|
||||
@@ -78,9 +81,9 @@ export class AlertNoticeComponent implements OnInit {
|
||||
|
||||
onDeleteOneNoticeReceiver(receiveId: number) {
|
||||
this.modal.confirm({
|
||||
nzTitle: '请确认是否删除!',
|
||||
nzOkText: '确定',
|
||||
nzCancelText: '取消',
|
||||
nzTitle: this.i18nSvc.fanyi('common.confirm.delete'),
|
||||
nzOkText: this.i18nSvc.fanyi('common.button.ok'),
|
||||
nzCancelText: this.i18nSvc.fanyi('common.button.cancel'),
|
||||
nzOkDanger: true,
|
||||
nzOkType: 'primary',
|
||||
nzOnOk: () => this.deleteOneNoticeReceiver(receiveId)
|
||||
@@ -98,23 +101,23 @@ export class AlertNoticeComponent implements OnInit {
|
||||
.subscribe(
|
||||
message => {
|
||||
if (message.code === 0) {
|
||||
this.notifySvc.success('删除成功!', '');
|
||||
this.notifySvc.success(this.i18nSvc.fanyi('common.notify.delete-success'), '');
|
||||
this.loadReceiversTable();
|
||||
} else {
|
||||
this.notifySvc.error('删除失败!', message.msg);
|
||||
this.notifySvc.error(this.i18nSvc.fanyi('common.notify.delete-fail'), message.msg);
|
||||
}
|
||||
},
|
||||
error => {
|
||||
this.notifySvc.error('删除失败!', error.msg);
|
||||
this.notifySvc.error(this.i18nSvc.fanyi('common.notify.delete-fail'), error.msg);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
onDeleteOneNoticeRule(ruleId: number) {
|
||||
this.modal.confirm({
|
||||
nzTitle: '请确认是否删除!',
|
||||
nzOkText: '确定',
|
||||
nzCancelText: '取消',
|
||||
nzTitle: this.i18nSvc.fanyi('common.confirm.delete'),
|
||||
nzOkText: this.i18nSvc.fanyi('common.button.ok'),
|
||||
nzCancelText: this.i18nSvc.fanyi('common.button.cancel'),
|
||||
nzOkDanger: true,
|
||||
nzOkType: 'primary',
|
||||
nzOnOk: () => this.deleteOneNoticeRule(ruleId)
|
||||
@@ -132,14 +135,14 @@ export class AlertNoticeComponent implements OnInit {
|
||||
.subscribe(
|
||||
message => {
|
||||
if (message.code === 0) {
|
||||
this.notifySvc.success('删除成功!', '');
|
||||
this.notifySvc.success(this.i18nSvc.fanyi('common.notify.delete-success'), '');
|
||||
this.loadRulesTable();
|
||||
} else {
|
||||
this.notifySvc.error('删除失败!', message.msg);
|
||||
this.notifySvc.error(this.i18nSvc.fanyi('common.notify.delete-fail'), message.msg);
|
||||
}
|
||||
},
|
||||
error => {
|
||||
this.notifySvc.error('删除失败!', error.msg);
|
||||
this.notifySvc.error(this.i18nSvc.fanyi('common.notify.delete-fail'), error.msg);
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -179,14 +182,14 @@ export class AlertNoticeComponent implements OnInit {
|
||||
message => {
|
||||
if (message.code === 0) {
|
||||
this.isManageReceiverModalVisible = false;
|
||||
this.notifySvc.success('新增成功!', '');
|
||||
this.notifySvc.success(this.i18nSvc.fanyi('common.notify.new-success'), '');
|
||||
this.loadReceiversTable();
|
||||
} else {
|
||||
this.notifySvc.error('新增失败!', message.msg);
|
||||
this.notifySvc.error(this.i18nSvc.fanyi('common.notify.new-fail'), message.msg);
|
||||
}
|
||||
},
|
||||
error => {
|
||||
this.notifySvc.error('新增失败!', error.msg);
|
||||
this.notifySvc.error(this.i18nSvc.fanyi('common.notify.new-fail'), error.msg);
|
||||
}
|
||||
);
|
||||
} else {
|
||||
@@ -202,14 +205,14 @@ export class AlertNoticeComponent implements OnInit {
|
||||
message => {
|
||||
if (message.code === 0) {
|
||||
this.isManageReceiverModalVisible = false;
|
||||
this.notifySvc.success('修改成功!', '');
|
||||
this.notifySvc.success(this.i18nSvc.fanyi('common.notify.edit-success'), '');
|
||||
this.loadReceiversTable();
|
||||
} else {
|
||||
this.notifySvc.error('修改失败!', message.msg);
|
||||
this.notifySvc.error(this.i18nSvc.fanyi('common.notify.edit-fail'), message.msg);
|
||||
}
|
||||
},
|
||||
error => {
|
||||
this.notifySvc.error('修改失败!', error.msg);
|
||||
this.notifySvc.error(this.i18nSvc.fanyi('common.notify.edit-fail'), error.msg);
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -310,14 +313,14 @@ export class AlertNoticeComponent implements OnInit {
|
||||
message => {
|
||||
if (message.code === 0) {
|
||||
this.isManageRuleModalVisible = false;
|
||||
this.notifySvc.success('新增成功!', '');
|
||||
this.notifySvc.success(this.i18nSvc.fanyi('common.notify.new-success'), '');
|
||||
this.loadRulesTable();
|
||||
} else {
|
||||
this.notifySvc.error('新增失败!', message.msg);
|
||||
this.notifySvc.error(this.i18nSvc.fanyi('common.notify.new-fail'), message.msg);
|
||||
}
|
||||
},
|
||||
error => {
|
||||
this.notifySvc.error('新增失败!', error.msg);
|
||||
this.notifySvc.error(this.i18nSvc.fanyi('common.notify.new-fail'), error.msg);
|
||||
}
|
||||
);
|
||||
} else {
|
||||
@@ -333,14 +336,14 @@ export class AlertNoticeComponent implements OnInit {
|
||||
message => {
|
||||
if (message.code === 0) {
|
||||
this.isManageRuleModalVisible = false;
|
||||
this.notifySvc.success('修改成功!', '');
|
||||
this.notifySvc.success(this.i18nSvc.fanyi('common.notify.edit-success'), '');
|
||||
this.loadRulesTable();
|
||||
} else {
|
||||
this.notifySvc.error('修改失败!', message.msg);
|
||||
this.notifySvc.error(this.i18nSvc.fanyi('common.notify.edit-fail'), message.msg);
|
||||
}
|
||||
},
|
||||
error => {
|
||||
this.notifySvc.error('修改失败!', error.msg);
|
||||
this.notifySvc.error(this.i18nSvc.fanyi('common.notify.edit-fail'), error.msg);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -113,6 +113,33 @@
|
||||
"alert.center.confirm.mark-done": "Please confirm whether to mark processed!",
|
||||
"alert.center.confirm.mark-no-batch": "Please confirm whether to mark Pending in batch!",
|
||||
"alert.center.confirm.mark-no": "Please confirm whether to mark Pending!",
|
||||
"alert.notice.receiver": "Alert Receiver",
|
||||
"alert.notice.receiver.new": "New Receiver",
|
||||
"alert.notice.receiver.edit": "Edit Receiver",
|
||||
"alert.notice.receiver.delete": "Delete Receiver",
|
||||
"alert.notice.receiver.people": "Receiver",
|
||||
"alert.notice.receiver.people.name": "Receiver Name",
|
||||
"alert.notice.receiver.type": "Notice Type",
|
||||
"alert.notice.receiver.setting": "Setting",
|
||||
"alert.notice.type.sms": "SMS",
|
||||
"alert.notice.type.phone": "Phone",
|
||||
"alert.notice.type.email": "Email",
|
||||
"alert.notice.type.url": "URL",
|
||||
"alert.notice.type.wechat": "Open WeChat",
|
||||
"alert.notice.type.wechat-id": "WeChat OPENID",
|
||||
"alert.notice.type.wework": "WeWork Robot",
|
||||
"alert.notice.type.wework-key": "WeWork Robot KEY",
|
||||
"alert.notice.type.access-token": "Robot ACCESS_TOKEN",
|
||||
"alert.notice.type.ding": "DingDing Robot",
|
||||
"alert.notice.type.fei-shu": "FeiShu Robot",
|
||||
"alert.notice.type.fei-shu-key": "FeiShu Robot KEY",
|
||||
"alert.notice.rule": "Alert Notice Rule",
|
||||
"alert.notice.rule.new": "New Notice Rule",
|
||||
"alert.notice.rule.edit": "Edit Notice Rule",
|
||||
"alert.notice.rule.delete": "Delete Notice Rule",
|
||||
"alert.notice.rule.name": "Rule Name",
|
||||
"alert.notice.rule.all": "Dispatch ALl",
|
||||
"alert.notice.rule.enable": "Enable",
|
||||
"dashboard.alerts.title": "Recently Alerts List",
|
||||
"dashboard.alerts.enter": "Go Alert Center",
|
||||
"dashboard.alerts.distribute": "The Distribution Of Alerts",
|
||||
@@ -174,6 +201,10 @@
|
||||
"common.new-time": "Create Time",
|
||||
"common.edit": "Operate",
|
||||
"common.total": "Total",
|
||||
"common.yes": "Yes",
|
||||
"common.no": "No",
|
||||
"common.enable": "Enable",
|
||||
"common.disable": "Disable",
|
||||
"common.notify.no-select-edit": "No items selected for editing!",
|
||||
"common.notify.one-select-edit": "Only one selection can be edited!",
|
||||
"common.confirm.delete": "Please confirm whether to delete!",
|
||||
@@ -181,6 +212,10 @@
|
||||
"common.confirm.delete-batch": "Please confirm whether to delete in batches!",
|
||||
"common.notify.delete-success": "Delete Success!",
|
||||
"common.notify.delete-fail": "Delete Failed!",
|
||||
"common.notify.new-success": "Add Success!",
|
||||
"common.notify.new-fail": "Add Failed!",
|
||||
"common.notify.edit-success": "Edit Success!",
|
||||
"common.notify.edit-fail": "Edit Failed!",
|
||||
"common.notify.no-select-cancel": "No items selected for cancel!",
|
||||
"common.confirm.cancel-batch": "Please confirm whether to cancel monitor in batches!",
|
||||
"common.confirm.cancel": "Please confirm whether to cancel monitor!",
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
"alert": {
|
||||
"": "告警",
|
||||
"center": "告警中心",
|
||||
"setting": "告警配置",
|
||||
"setting": "告警阈值",
|
||||
"dispatch": "告警通知"
|
||||
},
|
||||
"extras": {
|
||||
@@ -113,6 +113,33 @@
|
||||
"alert.center.confirm.mark-done": "请确认是否标记已处理!",
|
||||
"alert.center.confirm.mark-no-batch": "请确认是否批量标记未处理!",
|
||||
"alert.center.confirm.mark-no": "请确认是否标记未处理!",
|
||||
"alert.notice.receiver": "告警接收人",
|
||||
"alert.notice.receiver.new": "新增接收人",
|
||||
"alert.notice.receiver.edit": "编辑接收人",
|
||||
"alert.notice.receiver.delete": "删除接收人",
|
||||
"alert.notice.receiver.people": "接收人",
|
||||
"alert.notice.receiver.people.name": "接收人名称",
|
||||
"alert.notice.receiver.type": "通知方式",
|
||||
"alert.notice.receiver.setting": "配置",
|
||||
"alert.notice.type.sms": "短信",
|
||||
"alert.notice.type.phone": "手机号",
|
||||
"alert.notice.type.email": "邮箱",
|
||||
"alert.notice.type.url": "URL地址",
|
||||
"alert.notice.type.wechat": "微信公众号",
|
||||
"alert.notice.type.wechat-id": "微信OPENID",
|
||||
"alert.notice.type.wework": "企业微信机器人",
|
||||
"alert.notice.type.wework-key": "企业微信机器人KEY",
|
||||
"alert.notice.type.access-token": "机器人ACCESS_TOKEN",
|
||||
"alert.notice.type.ding": "钉钉机器人",
|
||||
"alert.notice.type.fei-shu": "飞书机器人",
|
||||
"alert.notice.type.fei-shu-key": "飞书机器人KEY",
|
||||
"alert.notice.rule": "告警通知策略",
|
||||
"alert.notice.rule.new": "新增通知策略",
|
||||
"alert.notice.rule.edit": "编辑通知策略",
|
||||
"alert.notice.rule.delete": "删除通知策略",
|
||||
"alert.notice.rule.name": "策略名称",
|
||||
"alert.notice.rule.all": "转发所有",
|
||||
"alert.notice.rule.enable": "是否启用",
|
||||
"dashboard.alerts.title": "最近告警列表",
|
||||
"dashboard.alerts.enter": "进入告警中心",
|
||||
"dashboard.alerts.distribute": "告警分布",
|
||||
@@ -174,6 +201,10 @@
|
||||
"common.new-time": "创建时间",
|
||||
"common.edit": "操作",
|
||||
"common.total": "总量",
|
||||
"common.yes": "是",
|
||||
"common.no": "否",
|
||||
"common.enable": "开启",
|
||||
"common.disable": "关闭",
|
||||
"common.notify.no-select-edit": "未选中任何待编辑项!",
|
||||
"common.notify.one-select-edit": "只能对一个选中项进行编辑!",
|
||||
"common.confirm.delete": "请确认是否删除!",
|
||||
@@ -181,6 +212,10 @@
|
||||
"common.confirm.delete-batch": "请确认是否批量删除!",
|
||||
"common.notify.delete-success": "删除成功!",
|
||||
"common.notify.delete-fail": "删除失败!",
|
||||
"common.notify.new-success": "新增成功!",
|
||||
"common.notify.new-fail": "新增失败!",
|
||||
"common.notify.edit-success": "修改成功!",
|
||||
"common.notify.edit-fail": "修改失败!",
|
||||
"common.notify.mark-success": "标记成功!",
|
||||
"common.notify.mark-fail": "标记失败!",
|
||||
"common.notify.no-select-cancel": "未选中任何待取消项!",
|
||||
|
||||
Reference in New Issue
Block a user