diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/endpointQueryTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/endpointQueryTab.vue
index 8399cf1ac..aaaf50716 100644
--- a/nezha-fronted/src/components/common/bottomBox/tabs/endpointQueryTab.vue
+++ b/nezha-fronted/src/components/common/bottomBox/tabs/endpointQueryTab.vue
@@ -563,7 +563,7 @@
this.queryData = [];
this.tableData = [];
this.tableDataCopy = '';
- this.$get("/prom/api/v1/query?query={job='ed_" + this.currentEndpoint.id + "'}&time=" + this.formatTime).then(response=>{
+ this.$get("/prom/api/v1/query?query={endpoint='" + this.currentEndpoint.id + "'}&time=" + this.formatTime).then(response=>{
if(response.status==="success"){
let results = response.data.result;
this.queryData=JSON.parse(JSON.stringify(results));
diff --git a/nezha-fronted/src/components/common/language/en.js b/nezha-fronted/src/components/common/language/en.js
index 2a93f24d9..f2fe7e14f 100644
--- a/nezha-fronted/src/components/common/language/en.js
+++ b/nezha-fronted/src/components/common/language/en.js
@@ -210,7 +210,7 @@ const en = {
type:'type',
model:'model',
dc:'dataCenter'
- }
+ },
},
project:{
project:'Project',
@@ -233,8 +233,26 @@ const en = {
top:'Top',
chart:{
chartTitle:'Alert Trend'
- }
+ },
},
+ mapTooltip:{
+ asset:'asset',
+ state:'state',
+ ping:'ping',
+ inStock:'in stock',
+ outStock:'out stock',
+ active:'active',
+ inactive:'inactive',
+ alert:'alert',
+ high:'high',
+ medium:'medium',
+ low:'low',
+ endpoint:'endpoint',
+ total:'total',
+ up:'up',
+ down:'down',
+ prometheus:'prometheus',
+ }
}
},
validate: { //校验规则
@@ -271,7 +289,8 @@ const en = {
testSuccess:'Test success',
downloadSuccess : 'Download Success',
uploadSuccess: 'Upload Success',
- pressEnterToAdd: 'Press enter to add new line'
+ pressEnterToAdd: 'Press enter to add new line',
+ resetSuccess:'Reset success',
},
asset:{
asset: 'Asset',
@@ -281,6 +300,12 @@ const en = {
assetStatPre:'Last reply:',
assetStatDown:'Never',
pingInactive:'inactive',
+ left:{
+ dataCenter:'DataCenter',
+ assetType:'Asset Type',
+ vendor:'Vendor',
+ ping:'Ping',
+ },
createAssetTab:{
title:'New asset',//'新增资产'
sn:'SN',//SN
@@ -506,35 +531,6 @@ const en = {
remark: 'Remark',
type: 'Type'
},
- terminallog: {
- terminallog: 'TerminalLog',
- status: 'Status',//"状态"
- option: 'Operation',//"操作",
- host: 'Host',
- cmd: 'CMD',
- port: 'Port',
- userId: 'UserID',
- protocol: 'Protocol',
- user: 'User',
- detail: 'Terminal Log Detail',
- resize: 'Terminal Resize',
- download: 'Terminal Download',
- upload: 'Terminal Upload',
- selectFile: 'Select File',
- SSH: 'SSH',
- TELNET: 'TELNET',
- id: 'ID',
- time: 'Time',
- width: 'Width',
- height: 'Height',
- cols: 'Cols',
- rows: 'Rows',
- uuid: 'UUID',
- path: 'Path',
- file: 'File',
- success: 'Success',
- fail: 'Fail'
- },
mib:{
mib:'Mib',
fileName:'FileName',
@@ -670,17 +666,6 @@ const en = {
editModule: 'Edit module',//"编辑组件"
description: 'Description',//"描述"
createModule: 'New module',//"新增组件"
- version: 'Version',
- walk: 'Walk',
- maxRepetitions: 'Max repetitions',
- retries: 'Retries',
- timeout: 'Timeout',
- community: 'Community',
- securityLevel: 'Security level',
- authProtocol: 'Auth protocol',
- privProtocol: 'Priv protocol',
- contextName: 'Context name',
- privPassword: 'Priv password',
tip: {
defaultEndpointSet: 'Default endpoint settings',//"默认的Endpoint设置"
relation: 'Module associated Endpoint will configure the following ports/paths/parameters by default'//"组件关联的Endpoint将默认配置以下端口/路径/参数"
diff --git a/nezha-fronted/src/components/page/asset/asset.vue b/nezha-fronted/src/components/page/asset/asset.vue
index 725f4cef3..073429cd4 100644
--- a/nezha-fronted/src/components/page/asset/asset.vue
+++ b/nezha-fronted/src/components/page/asset/asset.vue
@@ -5,7 +5,7 @@
-
-
-
+
+
+
-
-
-
-
- {{scope.row.id}}
-
-
- {{scope.row.model.type.value}}
-
- {{scope.row.sn}}
-
- {{scope.row.host}}
-
-
- {{scope.row.state==1 ? $t('asset.createAssetTab.inStock') : $t('asset.createAssetTab.notInStock')}}
-
-
+
+
+
+
+ {{scope.row.id}}
+
+
+ {{scope.row.model.type.value}}
+
+ {{scope.row.sn}}
+
+ {{scope.row.host}}
+
+
+ {{scope.row.state==1 ? $t('asset.createAssetTab.inStock') : $t('asset.createAssetTab.notInStock')}}
+
+
{
+ if (response.code === 200) {
+ this.assetTypeCheckListData = response.data
+ }
+ })
+ },
+ getVendorData:function(){
+ this.$get('sys/dict/all?type=vendor').then(response => {
+ if (response.code === 200) {
+ this.vendorCheckListData = response.data
+ }
+ })
+ },
+ getPingData:function(){
+ this.pingCheckListData=[
+ {label:'up',value:1},
+ {label:'down',value:2},
+ ]
+ },
getUserData() {
this.$get('sys/user/list').then(response => {
if (response.code === 200) {
@@ -729,6 +815,33 @@
this.assetClick = true;
this.getSingleAsset();
},
+ changeAssetTypeCheckBox:function(){
+ if(this.assetTypeCheckList && this.assetTypeCheckList.length > 0){
+ let assetTypeIds=this.assetTypeCheckList.join(',');
+ this.pageObj.typeIds=assetTypeIds;
+ this.getAssetData();
+ }else{
+ this.pageObj.typeIds='';
+ }
+ },
+ changeVendorCheckBox:function(){
+ if(this.vendorCheckList && this.vendorCheckList.length > 0){
+ let vendorIds=this.vendorCheckList.join(',');
+ this.pageObj.vendorIds=vendorIds;
+ this.getAssetData();
+ }else{
+ this.pageObj.vendorIds='';
+ }
+ },
+ changePingCheckBox:function(){
+ if(this.pingCheckList && this.pingCheckList.length > 0){
+ let pingStates=this.pingCheckList.join(',');
+ this.pageObj.pingStates=pingStates;
+ this.getAssetData();
+ }else{
+ this.pageObj.pingStates='';
+ }
+ },
getSingleAsset() {
let checkedCount = this.checkList.length;
let allCount = this.checkListData.length;
@@ -844,6 +957,9 @@
created() {
this.getUserData();
this.getIDCOptionData();
+ this.getAssetTypeData();
+ this.getVendorData();
+ this.getPingData();
},
mounted() {
//是否存在分页缓存
diff --git a/nezha-fronted/src/components/page/config/mib.vue b/nezha-fronted/src/components/page/config/mib.vue
index edf1b5ea7..ff76d2cb4 100644
--- a/nezha-fronted/src/components/page/config/mib.vue
+++ b/nezha-fronted/src/components/page/config/mib.vue
@@ -78,8 +78,8 @@
-
-
+
+
diff --git a/nezha-fronted/src/components/page/config/system.vue b/nezha-fronted/src/components/page/config/system.vue
index f13bc8a13..0b3cc68a6 100644
--- a/nezha-fronted/src/components/page/config/system.vue
+++ b/nezha-fronted/src/components/page/config/system.vue
@@ -157,7 +157,7 @@
-
+
@@ -347,19 +347,20 @@
});
},
resetSys:function(){
+ let $temp=this;
this.$prompt(this.$t('config.system.reset.pwdTip'), this.$t('config.system.reset.promptTitle'), {
confirmButtonText: this.$t('config.system.reset.yes'),
cancelButtonText: this.$t('config.system.reset.no'),
inputType:'password',
}).then(({ value }) => {
- this.reset.password=value
- this.$refs['resetForm'].validate(valid=>{
+ $temp.reset.password=value
+ $temp.$refs['resetForm'].validate(valid=>{
if(valid){
- this.$delete('/sysConfig/reset',this.reset).then(response=>{
+ $temp.$put('/sysConfig/reset',$temp.reset).then(response=>{
if(response.code == 200){
- this.$message({duration: 2000, type: 'success', message: this.$t("tip.success")});
+ $temp.$message({duration: 2000, type: 'success', message: this.$t("tip.resetSuccess")});
}else{
- this.$message.error(response.msg);
+ $temp.$message.error(response.msg);
}
})
}
diff --git a/nezha-fronted/src/components/page/dashboard/overview/chartConfig.vue b/nezha-fronted/src/components/page/dashboard/overview/chartConfig.vue
index 8701be977..dd9e5d307 100644
--- a/nezha-fronted/src/components/page/dashboard/overview/chartConfig.vue
+++ b/nezha-fronted/src/components/page/dashboard/overview/chartConfig.vue
@@ -94,7 +94,7 @@
trigger: 'item',
type:'cross',
alwaysShowContent: false,
- backgroundColor:'#6E6E6E',
+ // backgroundColor: 'rgba(0,0,0,0.7)',
borderColor:'#ffffff',
borderRadius: 4,
borderWidth: 1,
diff --git a/nezha-fronted/src/components/page/dashboard/overview/overview.scss b/nezha-fronted/src/components/page/dashboard/overview/overview.scss
index 7a6adf51a..480715539 100644
--- a/nezha-fronted/src/components/page/dashboard/overview/overview.scss
+++ b/nezha-fronted/src/components/page/dashboard/overview/overview.scss
@@ -129,3 +129,4 @@
}
+
diff --git a/nezha-fronted/src/components/page/dashboard/overview/overview.vue b/nezha-fronted/src/components/page/dashboard/overview/overview.vue
index c98865b38..4ee8a050d 100644
--- a/nezha-fronted/src/components/page/dashboard/overview/overview.vue
+++ b/nezha-fronted/src/components/page/dashboard/overview/overview.vue
@@ -806,7 +806,7 @@
}else{
areaName=areaInfo.name;
}
- seriesDatas.push({name:areaName,value:[areaInfo.longitude,areaInfo.latitude,dcStat.assetTotal,dcStat.alertTotal]})
+ seriesDatas.push({name:areaName,value:[areaInfo.longitude,areaInfo.latitude,dcStat]})
}
}
}
@@ -836,14 +836,80 @@
},
/*加载数据 end*/
mapTooltipFormatter(params){
- var color = "orange";
- var a = "" + params.data.name + "
";
- a += "";
- a +=this.$t('dashboard.overview.asset.title')+': '+params.data.value[2] + "
";
- a +=this.$t('dashboard.overview.asset.alert')+': '+params.data.value[3] + "
";
- a += "
";
+ let dcStat=params.data.value[2];
+ let tooltip=`
+
+ `;
- return a;
+ return tooltip;
},
tooltipPosition:function(point,params,dom,rect,size){
dom.style.transform = "translateZ(0)";
@@ -1139,4 +1205,36 @@
flex-direction: column;
height: 100%;
}
+ .tooltip{
+ padding:5px;
+ min-width: 500px;
+ }
+ .tooltip-table{
+ border-spacing: 0px;
+ border-collapse:collapse;
+ }
+ .tooltip-table tr{
+ display: table-row;
+ vertical-align: inherit;
+ border-color: inherit;
+ }
+ .tooltip-table td{
+ min-width: 0;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+ text-overflow: ellipsis;
+ vertical-align: middle;
+ text-align: left;
+ border: 1px solid #EBEEF5;
+ display: table-cell;
+ padding:0px 5px ;
+ }
+ .flex-box{
+ display: flex;
+ justify-content: space-around;
+ }
+ .column-box{
+ flex-direction: column;
+ justify-content: space-between !important;
+ }