diff --git a/web-app/src/app/routes/dashboard/dashboard.component.html b/web-app/src/app/routes/dashboard/dashboard.component.html
index 5f9f41b..722c568 100644
--- a/web-app/src/app/routes/dashboard/dashboard.component.html
+++ b/web-app/src/app/routes/dashboard/dashboard.component.html
@@ -10,19 +10,19 @@
-
+
- 紧急告警
+ {{ 'alert.priority.0' | i18n }}
- 严重告警
+ {{ 'alert.priority.1' | i18n }}
- 警告告警
+ {{ 'alert.priority.2' | i18n }}
[{{ alert.monitorName }}]
{{ alert.content }}
@@ -165,5 +165,5 @@
- 进入告警中心
+ {{ 'dashboard.alerts.enter' | i18n }}
diff --git a/web-app/src/app/routes/dashboard/dashboard.component.ts b/web-app/src/app/routes/dashboard/dashboard.component.ts
index 626821b..c8c9be8 100644
--- a/web-app/src/app/routes/dashboard/dashboard.component.ts
+++ b/web-app/src/app/routes/dashboard/dashboard.component.ts
@@ -48,13 +48,13 @@ export class DashboardComponent implements OnInit, OnDestroy {
ngOnInit(): void {
this.appsCountTheme = {
title: {
- text: '监控总览',
- subtext: '监控类型纳管数量分布',
+ text: this.i18nSvc.fanyi('dashboard.monitors.title'),
+ subtext: this.i18nSvc.fanyi('dashboard.monitors.sub-title'),
left: 'center'
},
tooltip: {
trigger: 'item',
- formatter: '{a}
{b} : {c}个监控 占比({d}%)'
+ formatter: `{a}
{b} : {c}${this.i18nSvc.fanyi('dashboard.monitors.formatter')}({d}%)`
},
legend: {
show: false,
@@ -66,7 +66,7 @@ export class DashboardComponent implements OnInit, OnDestroy {
calculable: true,
series: [
{
- name: '总量',
+ name: this.i18nSvc.fanyi('dashboard.monitors.total'),
type: 'pie',
selectedMode: 'single',
color: '#722ED1',
@@ -81,10 +81,10 @@ export class DashboardComponent implements OnInit, OnDestroy {
labelLine: {
show: false
},
- data: [{ value: 0, name: '监控总量' }]
+ data: [{ value: 0, name: this.i18nSvc.fanyi('dashboard.monitors.total') }]
},
{
- name: '纳管数量分布',
+ name: this.i18nSvc.fanyi('dashboard.monitors.distribute'),
type: 'pie',
radius: ['45%', '65%'],
labelLine: {
@@ -127,7 +127,7 @@ export class DashboardComponent implements OnInit, OnDestroy {
};
this.alertsTheme = {
title: {
- subtext: '告警分布',
+ subtext: this.i18nSvc.fanyi('dashboard.alerts.distribute'),
left: 'center'
},
tooltip: {
@@ -138,14 +138,14 @@ export class DashboardComponent implements OnInit, OnDestroy {
},
xAxis: {
type: 'category',
- data: ['警告告警', '严重告警', '紧急告警']
+ data: [this.i18nSvc.fanyi('alert.priority.2'), this.i18nSvc.fanyi('alert.priority.1'), this.i18nSvc.fanyi('alert.priority.0')]
},
yAxis: {
type: 'value'
},
series: [
{
- name: '告警数量',
+ name: this.i18nSvc.fanyi('dashboard.alerts.num'),
type: 'bar',
data: [
{
@@ -176,7 +176,7 @@ export class DashboardComponent implements OnInit, OnDestroy {
};
this.alertsDealTheme = {
title: {
- subtext: '告警处理',
+ subtext: this.i18nSvc.fanyi('dashboard.alerts.deal'),
left: 'center'
},
tooltip: {
@@ -184,7 +184,7 @@ export class DashboardComponent implements OnInit, OnDestroy {
},
series: [
{
- name: '告警处理率',
+ name: this.i18nSvc.fanyi('dashboard.alerts.deal-percent'),
type: 'gauge',
progress: {
show: true
@@ -196,7 +196,7 @@ export class DashboardComponent implements OnInit, OnDestroy {
data: [
{
value: 100,
- name: '告警处理率'
+ name: this.i18nSvc.fanyi('dashboard.alerts.deal-percent')
}
]
}
@@ -279,7 +279,7 @@ export class DashboardComponent implements OnInit, OnDestroy {
}
});
// @ts-ignore
- this.appsCountTheme.series[0].data = [{ value: total, name: '监控总量' }];
+ this.appsCountTheme.series[0].data = [{ value: total, name: this.i18nSvc.fanyi('dashboard.monitors.total') }];
// @ts-ignore
this.appsCountTheme.series[1].data = this.appsCountTableData;
this.appsCountEChartOption = this.appsCountTheme;
@@ -397,7 +397,7 @@ export class DashboardComponent implements OnInit, OnDestroy {
this.alertsDealTheme.series[0].data = [
{
value: summary.rate,
- name: '告警处理率'
+ name: this.i18nSvc.fanyi('dashboard.alerts.deal-percent')
}
];
this.alertsEChartOption = this.alertsTheme;
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 74dd314..b89485b 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
@@ -3,12 +3,12 @@
- 仪表盘
+ {{ 'menu.dashboard' | i18n }}
- {{ 'monitor.app.' + app | i18n }} 监控列表
+ {{ 'monitor.app.' + app | i18n }} {{ 'monitors.list' | i18n }}
@@ -17,35 +17,37 @@
-
@@ -82,12 +84,12 @@