diff --git a/nezha-fronted/src/assets/stylus/main.scss b/nezha-fronted/src/assets/stylus/main.scss
index 263e7c098..332b1f37a 100644
--- a/nezha-fronted/src/assets/stylus/main.scss
+++ b/nezha-fronted/src/assets/stylus/main.scss
@@ -1198,7 +1198,7 @@ li{
.dc-asset-state-out {
background-color: orange;
}
-.dc-asset-state-high {
+.dc-asset-state-P1 {
background-color: rgba(255, 0, 0, 0.6);
}
.chart-box-dropdown {
diff --git a/nezha-fronted/src/components/common/alert/alertMessageTable.vue b/nezha-fronted/src/components/common/alert/alertMessageTable.vue
index 4e33472cf..600a45eb0 100644
--- a/nezha-fronted/src/components/common/alert/alertMessageTable.vue
+++ b/nezha-fronted/src/components/common/alert/alertMessageTable.vue
@@ -74,11 +74,11 @@
-
- P1
+ P1
- P2
+ P2
- P3
+ P3
@@ -825,7 +825,7 @@
? JSON.parse(localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + '/alertList'))
: this.tableTitle;
- console.info(this.tools.customTableTitle)
+ // console.info(this.tools.customTableTitle)
//是否存在分页缓存
let pageSize = localStorage.getItem('nz-pageSize-' + localStorage.getItem('nz-username') + '-' + this.tableId);
if (pageSize != 'undefined' && pageSize != null) {
@@ -938,25 +938,30 @@
.pointer{
cursor: pointer;
}
- .severity .high{
+ .severity .P1{
background: #F5846A;
border-radius: 2px;
font-size: 12px;
color: #FFFFFF;
padding: 2px 6px;
}
- .severity .medium{
+ .severity .P2{
background: #F7A54A;
border-radius: 2px;
font-size: 12px;
color: #FFFFFF;
padding: 2px 6px;
}
- .severity .low{
+ .severity .P3{
background: #F1C13D;
border-radius: 2px;
font-size: 12px;
color: #FFFFFF;
padding: 2px 6px;
}
+ .red,.green{
+ color: white;
+ padding: 2px 5px;
+ border-radius: 4px;
+ }
diff --git a/nezha-fronted/src/components/common/alert/alertRuleInfo.vue b/nezha-fronted/src/components/common/alert/alertRuleInfo.vue
index ced86be47..c08149cca 100644
--- a/nezha-fronted/src/components/common/alert/alertRuleInfo.vue
+++ b/nezha-fronted/src/components/common/alert/alertRuleInfo.vue
@@ -16,9 +16,9 @@
Level
- {{$CONSTANTS.alertMessage.severityData.find(s => {return s.value == 'high'}).label}}
- {{$CONSTANTS.alertMessage.severityData.find(s => {return s.value == 'medium'}).label}}
- {{$CONSTANTS.alertMessage.severityData.find(s => {return s.value == 'low'}).label}}
+ {{$CONSTANTS.alertMessage.severityData.find(s => {return s.value == 'P1'}).label}}
+ {{$CONSTANTS.alertMessage.severityData.find(s => {return s.value == 'P2'}).label}}
+ {{$CONSTANTS.alertMessage.severityData.find(s => {return s.value == 'P3'}).label}}
diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/cabinetTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/cabinetTab.vue
index 470ad486d..b4da2db20 100644
--- a/nezha-fronted/src/components/common/bottomBox/tabs/cabinetTab.vue
+++ b/nezha-fronted/src/components/common/bottomBox/tabs/cabinetTab.vue
@@ -58,12 +58,12 @@
placement="top-start"
offset="-128"
trigger="hover"
- :content="$t('overall.result.total') + ':' + scope.row.alertStat.total + ',' + $t('alert.config.high') + ':' + scope.row.alertStat.high + ',' + $t('alert.config.medium') + ':' + scope.row.alertStat.medium+ ',' + $t('alert.config.low') + ':' + scope.row.alertStat.low">
+ :content="$t('overall.result.total') + ':' + scope.row.alertStat.total + ',' + $t('alert.config.P1') + ':' + scope.row.alertStat.P1 + ',' + $t('alert.config.P2') + ':' + scope.row.alertStat.P2+ ',' + $t('alert.config.P3') + ':' + scope.row.alertStat.P3">
{{scope.row.alertStat.total}}
- {{scope.row.alertStat.high}}
- {{scope.row.alertStat.medium}}
- {{scope.row.alertStat.low}}
+ {{scope.row.alertStat.P1}}
+ {{scope.row.alertStat.P2}}
+ {{scope.row.alertStat.P3}}
diff --git a/nezha-fronted/src/components/common/js/constants.js b/nezha-fronted/src/components/common/js/constants.js
index f70d0da02..a4edc807d 100644
--- a/nezha-fronted/src/components/common/js/constants.js
+++ b/nezha-fronted/src/components/common/js/constants.js
@@ -97,9 +97,9 @@ export const asset = {
export const alertMessage = {
severityData: [
- {value: 'medium', label: i18n.t("alert.config.medium")},
- {value: 'high', label: i18n.t("alert.config.high")},
- {value: 'low', label: i18n.t("alert.config.low")}
+ {value: 'P2', label: i18n.t("alert.config.P2")},
+ {value: 'P1', label: i18n.t("alert.config.P1")},
+ {value: 'P3', label: i18n.t("alert.config.P3")}
],
typeData: [
{value: 1, label: i18n.t('alert.config.typeOption.project')},
@@ -107,9 +107,9 @@ export const alertMessage = {
{value: 3, label: i18n.t('alert.config.typeOption.asset')}
],
levels:[
- {value: 'medium', label: i18n.t("alert.config.medium")},
- {value: 'high', label: i18n.t("alert.config.high")},
- {value: 'low', label: i18n.t("alert.config.low")}
+ {value: 'P2', label: i18n.t("alert.config.P2")},
+ {value: 'P1', label: i18n.t("alert.config.P1")},
+ {value: 'P3', label: i18n.t("alert.config.P3")}
],
states:[
{value: '1', label: i18n.t('alert.list.pending')},
diff --git a/nezha-fronted/src/components/common/language/cn.js b/nezha-fronted/src/components/common/language/cn.js
index f622020c9..6efec01fa 100644
--- a/nezha-fronted/src/components/common/language/cn.js
+++ b/nezha-fronted/src/components/common/language/cn.js
@@ -275,9 +275,9 @@ const cn = {
num: "数量",
alert: "告警",
alertTotal: "总计",
- alertLow: "低",
- alertMedium: "中",
- alertHigh: "高",
+ alertP3: "P3",
+ alertP2: "P2",
+ alertP1: "P1",
inStock: "在库",
outStock: "出库",
pingUp: "Up",
@@ -329,9 +329,9 @@ const cn = {
active: "在线",
inactive: "宕机",
alert: "告警",
- high: "高",
- medium: "中",
- low: "低",
+ P1: "P1",
+ P2: "P2",
+ P3: "P3",
endpoint: "Endpoint",
total: "总计",
up: "up",
@@ -767,9 +767,9 @@ const cn = {
alertConfig: "告警规则",
createAlertConfig: "新增告警规则",
editAlertConfig: "修改告警规则",
- medium: "中",
- high: "高",
- low: "低",
+ P1: "P1",
+ P2: "P2",
+ P3: "P3",
typeOption: {
project: "系统",
module: "组件",
diff --git a/nezha-fronted/src/components/common/language/en.js b/nezha-fronted/src/components/common/language/en.js
index 61ff121a3..2a15d4918 100644
--- a/nezha-fronted/src/components/common/language/en.js
+++ b/nezha-fronted/src/components/common/language/en.js
@@ -182,7 +182,7 @@ const en = {
param:'Parameters',
select:'Select',
alertRule:'Alert rule',
- level:'Level',
+ level:'Priority',
state:'State'
},
valMapping:{
@@ -280,9 +280,9 @@ const en = {
num:'Num',
alert:'Alert',
alertTotal:'Total',
- alertLow:'Low',
- alertMedium:'Medium',
- alertHigh:'High',
+ alertP3:'P3',
+ alertP2:'P2',
+ alertP1:'P1',
inStock:'In stock',
outStock:'Out stock',
pingUp:'Up',
@@ -313,7 +313,7 @@ const en = {
},
alert:{
alertMessage: 'Alert messages',
- level:'Level',
+ level:'Priority',
alertRule:'Alert rule',
ruleNum:'Rule num',
alertNum:'Alert num',
@@ -334,9 +334,9 @@ const en = {
active:'active',
inactive:'inactive',
alert:'alert',
- high:'high',
- medium:'medium',
- low:'low',
+ P1: "P1",
+ P2: "P2",
+ P3: "P3",
endpoint:'endpoint',
total:'total',
up:'up',
@@ -743,7 +743,7 @@ const en = {
alertList: 'Alert message',//"告警信息"
alertConfig: 'Alert rule',//"告警规则"
alertName: 'Alert name',//"告警名称"
- severity: 'Level',//"等级"
+ severity: 'Priority',//"等级"
description: 'Description',//"描述"
summary: 'Summary',//"概要"
startAt: 'Start time',//"开始时间"
@@ -774,10 +774,10 @@ const en = {
alertConfig: 'Alert rule',//"告警规则"
createAlertConfig: 'New alert rule',//"新增告警规则"
editAlertConfig: 'Edit alert rule',//"修改告警规则"
- medium: 'Medium',//"中"
alertNum: 'Alert number', //告警信息数量
- high: 'High',//"高"
- low: 'Low',//"低"
+ P1: "P1",
+ P2: "P2",
+ P3: "P3",
typeOption: {
project: 'Project',//'系统'
module: 'Module',//'组件'
diff --git a/nezha-fronted/src/components/common/project/popData/Main.vue b/nezha-fronted/src/components/common/project/popData/Main.vue
index 72d889dc5..9969a2b34 100644
--- a/nezha-fronted/src/components/common/project/popData/Main.vue
+++ b/nezha-fronted/src/components/common/project/popData/Main.vue
@@ -32,16 +32,16 @@
Alert messages
- high
- {{moduleInfo.alertStat.high}}
+ P1
+ {{moduleInfo.alertStat.P1}}
- medium
- {{moduleInfo.alertStat.medium}}
+ P2
+ {{moduleInfo.alertStat.P2}}
- low
- {{moduleInfo.alertStat.low}}
+ P3
+ {{moduleInfo.alertStat.P3}}
@@ -64,9 +64,9 @@
return{
moduleInfo:{
alertStat:{
- high:0,
- low:0,
- medium:0,
+ P1:0,
+ P3:0,
+ P2:0,
},
assetStat:{
down:0,
diff --git a/nezha-fronted/src/components/common/project/popData/alertTable.vue b/nezha-fronted/src/components/common/project/popData/alertTable.vue
index 12c0f33d5..59c2f57a3 100644
--- a/nezha-fronted/src/components/common/project/popData/alertTable.vue
+++ b/nezha-fronted/src/components/common/project/popData/alertTable.vue
@@ -85,11 +85,11 @@
-
- P1
+ P1
- P2
+ P2
- P3
+ P3
@@ -514,21 +514,21 @@
padding: 2px 5px;
border-radius: 4px;
}
- .severity .high{
+ .severity .P1{
background: #F5846A;
border-radius: 2px;
font-size: 12px;
color: #FFFFFF;
padding: 2px 6px;
}
- .severity .medium{
+ .severity .P2{
background: #F7A54A;
border-radius: 2px;
font-size: 12px;
color: #FFFFFF;
padding: 2px 6px;
}
- .severity .low{
+ .severity .P3{
background: #F1C13D;
border-radius: 2px;
font-size: 12px;
diff --git a/nezha-fronted/src/components/common/project/topology.vue b/nezha-fronted/src/components/common/project/topology.vue
index 757d04d86..9ad5f036f 100644
--- a/nezha-fronted/src/components/common/project/topology.vue
+++ b/nezha-fronted/src/components/common/project/topology.vue
@@ -641,7 +641,7 @@
obj.error=true;
obj.endpointError=true;
}
- if(item.state.alertStat.high> 0 || item.state.alertStat.low>0 || item.state.alertStat.medium>0){
+ if(item.state.alertStat.P1> 0 || item.state.alertStat.P3>0 || item.state.alertStat.P2>0){
obj.error=true;
obj.alertError=true;
}
diff --git a/nezha-fronted/src/components/common/project/visNetwork.vue b/nezha-fronted/src/components/common/project/visNetwork.vue
index 5f2fe27a0..dd0347893 100644
--- a/nezha-fronted/src/components/common/project/visNetwork.vue
+++ b/nezha-fronted/src/components/common/project/visNetwork.vue
@@ -66,24 +66,24 @@
-
- {{returnSeverityLabel('high')}}
+
+ {{returnSeverityLabel('P1')}}
{{projectInfo.alertStat[0] || 0}}
-
- {{returnSeverityLabel('medium')}}
+
+ {{returnSeverityLabel('P2')}}
{{projectInfo.alertStat[1] || 0}}
-
- {{returnSeverityLabel('low')}}
+
+ {{returnSeverityLabel('P3')}}
{{projectInfo.alertStat[2] || 0}}
@@ -451,6 +451,7 @@
color: #fff;
text-align: center;
margin-bottom: 5px;
+ line-height: 22px;
}
.facade-top-right-content > div > div:last-child{
text-align: center;
@@ -458,44 +459,44 @@
flex: 1;
height: calc(100% - 2px);
}
- .content-high-title{
+ .content-P1-title{
background: #F2866E;
border-radius: 4px 0 0 4px;
width: 54px;
height: 100%;
}
- .content-high-title + div{
+ .content-P1-title + div{
border: 1px solid #F4907A;
font-size: 12px;
color: #F4907A;
}
- .content-medium-title{
+ .content-P2-title{
background: #F89984;
border-radius: 4px 0 0 4px;
width: 54px;
height: 100%;
}
- .content-medium-title + div{
+ .content-P2-title + div{
border: 1px solid #F9A28F;
font-size: 12px;
color: #F9A28F;
}
- .content-low-title{
+ .content-P3-title{
background: #F7BA78;
border-radius: 4px 0 0 4px;
width: 54px;
height: 100%;
}
- .content-low-title + div{
+ .content-P3-title + div{
border: 1px solid #F7BA78;
font-size: 12px;
color: #F7BA78;
}
- .right-content-high{
+ .right-content-P1{
border: 1px solid ;
}
.align--center{
diff --git a/nezha-fronted/src/components/common/searchSelectInfo.vue b/nezha-fronted/src/components/common/searchSelectInfo.vue
index d1e565dfd..6ff1959b5 100644
--- a/nezha-fronted/src/components/common/searchSelectInfo.vue
+++ b/nezha-fronted/src/components/common/searchSelectInfo.vue
@@ -3,16 +3,16 @@
const searchSelectInfo = { // value: 传给后台的值;label:显示给用户看的值
severity: [ //告警级别
{
- value: 'medium',
- label: i18n.t("alert.config.medium")
+ value: 'P2',
+ label: i18n.t("alert.config.P2")
},
{
- value: 'high',
- label: i18n.t("alert.config.high")
+ value: 'P1',
+ label: i18n.t("alert.config.P1")
},
{
- value: 'low',
- label: i18n.t("alert.config.low")
+ value: 'P3',
+ label: i18n.t("alert.config.P3")
}
],
promType: [ //promServer类型
diff --git a/nezha-fronted/src/components/page/alert/config.vue b/nezha-fronted/src/components/page/alert/config.vue
index 52f465ce1..ed60fbeb4 100644
--- a/nezha-fronted/src/components/page/alert/config.vue
+++ b/nezha-fronted/src/components/page/alert/config.vue
@@ -2,21 +2,21 @@
.config {
height: 100%;
}
- .severity .high{
+ .severity .P1{
background: #F5846A;
border-radius: 2px;
font-size: 12px;
color: #FFFFFF;
padding: 2px 6px;
}
- .severity .medium{
+ .severity .P2{
background: #F7A54A;
border-radius: 2px;
font-size: 12px;
color: #FFFFFF;
padding: 2px 6px;
}
- .severity .low{
+ .severity .P3{
background: #F1C13D;
border-radius: 2px;
font-size: 12px;
@@ -96,11 +96,11 @@
- P1
+ P1
- P2
+ P2
- P3
+ P3
@@ -189,7 +189,7 @@
unit:2,
operator: '>',
last: 60,
- severity: 'medium',
+ severity: 'P2',
summary: '',
description: '',
},
diff --git a/nezha-fronted/src/components/page/dashboard/overview/overview.vue b/nezha-fronted/src/components/page/dashboard/overview/overview.vue
index 6558cd239..41fe7dca7 100644
--- a/nezha-fronted/src/components/page/dashboard/overview/overview.vue
+++ b/nezha-fronted/src/components/page/dashboard/overview/overview.vue
@@ -175,7 +175,7 @@
formatAssetData:function(data,totalData){
if(data && totalData){
data=data.map((item)=>{
- item.alertInfo=`${item.alertHigh}/${item.alertMedium}/${item.alertLow}`;
+ item.alertInfo=`${item.alertP1}/${item.alertP2}/${item.alertP3}`;
return item;
})
let assetStatData={
@@ -203,16 +203,16 @@
value:totalData.outStock
},
{
- label:this.$t('dashboard.overview.asset.alertLow'),
- value:totalData.alertLow
+ label:this.$t('dashboard.overview.asset.alertP3'),
+ value:totalData.alertP3
},
{
- label:this.$t('dashboard.overview.asset.alertMedium'),
- value:totalData.alertMedium
+ label:this.$t('dashboard.overview.asset.alertP2'),
+ value:totalData.alertP2
},
{
- label:this.$t('dashboard.overview.asset.alertHigh'),
- value:totalData.alertHigh
+ label:this.$t('dashboard.overview.asset.alertP1'),
+ value:totalData.alertP1
},
]
},
@@ -267,16 +267,16 @@
prop:'alertTotal'
},
{
- label:this.$t('dashboard.overview.asset.alertLow'),
- prop:'alertLow'
+ label:this.$t('dashboard.overview.asset.alertP3'),
+ prop:'alertP3'
},
{
- label:this.$t('dashboard.overview.asset.alertMedium'),
- prop:'alertMedium'
+ label:this.$t('dashboard.overview.asset.alertP2'),
+ prop:'alertP2'
},
{
- label:this.$t('dashboard.overview.asset.alertHigh'),
- prop:'alertHigh'
+ label:this.$t('dashboard.overview.asset.alertP1'),
+ prop:'alertP1'
},
]
}
@@ -516,16 +516,16 @@
showPopover: true,
popover: [
{
- label:this.$t('dashboard.overview.asset.alertLow'),
- prop:'alertLow'
+ label:this.$t('dashboard.overview.asset.alertP3'),
+ prop:'alertP3'
},
{
- label:this.$t('dashboard.overview.asset.alertMedium'),
- prop:'alertMedium'
+ label:this.$t('dashboard.overview.asset.alertP2'),
+ prop:'alertP2'
},
{
- label:this.$t('dashboard.overview.asset.alertHigh'),
- prop:'alertHigh'
+ label:this.$t('dashboard.overview.asset.alertP1'),
+ prop:'alertP1'
},
]
}
@@ -893,16 +893,16 @@
| ${this.$t('dashboard.overview.mapTooltip.alert')} |
- ${this.$t('dashboard.overview.mapTooltip.high')} |
- ${dcStat.alertHigh} |
+ ${this.$t('dashboard.overview.mapTooltip.P1')} |
+ ${dcStat.alertP1} |
- | ${this.$t('dashboard.overview.mapTooltip.medium')} |
- ${dcStat.alertMedium} |
+ ${this.$t('dashboard.overview.mapTooltip.P2')} |
+ ${dcStat.alertP2} |
- | ${this.$t('dashboard.overview.mapTooltip.low')} |
- ${dcStat.alertLow} |
+ ${this.$t('dashboard.overview.mapTooltip.P3')} |
+ ${dcStat.alertP3} |
diff --git a/nezha-fronted/src/components/page/dashboard/overview/overview2.vue b/nezha-fronted/src/components/page/dashboard/overview/overview2.vue
index 9c60aac36..be34c99f8 100644
--- a/nezha-fronted/src/components/page/dashboard/overview/overview2.vue
+++ b/nezha-fronted/src/components/page/dashboard/overview/overview2.vue
@@ -988,16 +988,16 @@
| ${this.$t('dashboard.overview.mapTooltip.alert')} |
- ${this.$t('dashboard.overview.mapTooltip.high')} |
- ${dcStat.alertHigh} |
+ ${this.$t('dashboard.overview.mapTooltip.P1')} |
+ ${dcStat.alertP1} |
- | ${this.$t('dashboard.overview.mapTooltip.medium')} |
- ${dcStat.alertMedium} |
+ ${this.$t('dashboard.overview.mapTooltip.P2')} |
+ ${dcStat.alertP2} |
- | ${this.$t('dashboard.overview.mapTooltip.low')} |
- ${dcStat.alertLow} |
+ ${this.$t('dashboard.overview.mapTooltip.P3')} |
+ ${dcStat.alertP3} |