diff --git a/nezha-fronted/src/components/charts/chart-list.vue b/nezha-fronted/src/components/charts/chart-list.vue
index 1eb957c34..e43d6f55c 100644
--- a/nezha-fronted/src/components/charts/chart-list.vue
+++ b/nezha-fronted/src/components/charts/chart-list.vue
@@ -512,7 +512,7 @@
this.dataList.push({
id: -10,
panelId: 0,
- title: this.$t("dashboard.panel.chartForm.statistics"),
+ title: this.$t("alert.config.chart.affectEntity"),
span: 4,
height: 350,
type: "alertRuleInfo",
@@ -1425,7 +1425,7 @@
if (response.code == 200) {
response.data && function () {
if (response.data.project && response.data.project.length > 0) {
- detail.push({title: vm.$t("project.project.project"), data: convert(response.data.project)});
+ detail.push({title: vm.$t("overall.entity"), data: convert(response.data.project)});
}
/*if (response.data.module && response.data.module.length > 0) {
detail.push({title: vm.$t("project.module.module"), data: convert(response.data.module)});
diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/endpointQueryTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/endpointQueryTab.vue
index e023336c4..ef312f6f5 100644
--- a/nezha-fronted/src/components/common/bottomBox/tabs/endpointQueryTab.vue
+++ b/nezha-fronted/src/components/common/bottomBox/tabs/endpointQueryTab.vue
@@ -107,7 +107,7 @@
-
+
@@ -155,7 +155,8 @@
panelData: [], //chart-box的panel下拉框数据,
hideSameLabels: true,
sameLabels:['instance','module','project','asset','endpoint','datacenter'],
- chartUnit:5
+ chartUnit:5,
+ rightBox: {show: false}
}
},
methods: {
@@ -163,22 +164,25 @@
this.$emit('changeTab', tab);
},
saveChart() { //新增chart
- this.$refs.addChartModal.setTitle(this.$t("dashboard.panel.createChartTitle"));
- this.$refs.addChartModal.show(true);
- let metricInfo = {};
- metricInfo.elements = [];
- //console.info("aaa", this.selectedEndpoints)
- for(let i = 0; i < this.selectedEndpoints.length; i++) {
- let type = 'expert';
- // if (this.selectedEndpoints[i].type == '1') {
- // type = 'expert';
- // } else if (this.selectedEndpoints[i].type == '2') {
- // type = 'normal';
- // }
- metricInfo.elements.push({expression: this.selectedEndpoints[i].element, type: type});
- }
- this.$refs.addChartModal.createData(-1, metricInfo);
- this.$refs.addChartModal.setUnit(this.chartUnit)
+ this.rightBox.show = true;
+ this.$nextTick(() => {
+ this.$refs.addChartModal.setTitle(this.$t("dashboard.panel.createChartTitle"));
+ this.$refs.addChartModal.show(true);
+ let metricInfo = {};
+ metricInfo.elements = [];
+ //console.info("aaa", this.selectedEndpoints)
+ for(let i = 0; i < this.selectedEndpoints.length; i++) {
+ let type = 'expert';
+ // if (this.selectedEndpoints[i].type == '1') {
+ // type = 'expert';
+ // } else if (this.selectedEndpoints[i].type == '2') {
+ // type = 'normal';
+ // }
+ metricInfo.elements.push({expression: this.selectedEndpoints[i].element, type: type});
+ }
+ this.$refs.addChartModal.createData(-1, metricInfo);
+ this.$refs.addChartModal.setUnit(this.chartUnit)
+ });
},
dropdownHandler(show) {
if (show) {
diff --git a/nezha-fronted/src/components/common/header.vue b/nezha-fronted/src/components/common/header.vue
index c0ec33a44..e7e85366f 100644
--- a/nezha-fronted/src/components/common/header.vue
+++ b/nezha-fronted/src/components/common/header.vue
@@ -147,7 +147,7 @@
ref="addEndpointBox">
-
@@ -253,6 +253,7 @@
},
IDCOptionData: [],
addUnitShow: false,
+ assetBoxShow: false,
userDatas:[],
showChangePwd:false,
}
@@ -260,6 +261,7 @@
methods: {
closeAsset() {
this.addUnitShow = false;
+ this.assetBoxShow = false;
},
refreshAsset(flag) {
if (flag && this.$route.path == "/asset") {
@@ -323,9 +325,11 @@
} else if (item.type == 5) {
this.$refs.alertConfigBox.show(true, true);
} else if (item.type == 4) {
- this.addUnitShow = true;
- this.$refs.assetAddUnit.show();
- this.$refs.assetAddUnit.resetAsset();
+ this.assetBoxShow = true;
+ this.$nextTick(() => {
+ this.addUnitShow = true;
+ this.$refs.assetAddUnit.resetAsset();
+ });
} else if (item.type == 6) {
this.currentDc = {
id: '',
diff --git a/nezha-fronted/src/components/common/language/cn.js b/nezha-fronted/src/components/common/language/cn.js
index 675a59334..a5eb0e65e 100644
--- a/nezha-fronted/src/components/common/language/cn.js
+++ b/nezha-fronted/src/components/common/language/cn.js
@@ -27,6 +27,7 @@ const cn = {
signOut: "登出",
select: "选择",
ok: "Ok",
+ entity: "实体",
all: "全选",
value: "值",
other: "其他",
diff --git a/nezha-fronted/src/components/common/language/en.js b/nezha-fronted/src/components/common/language/en.js
index 6d3aaabe8..d2b6921e9 100644
--- a/nezha-fronted/src/components/common/language/en.js
+++ b/nezha-fronted/src/components/common/language/en.js
@@ -32,6 +32,7 @@ const en = {
signOut: 'Logout',//'登出'
select: 'Select',//'选择'
ok: 'Ok',//OK
+ entity: 'Entity',
all: 'All',//'全选'
value: 'Value',
other: 'Others',//"其他"
diff --git a/nezha-fronted/src/components/common/rightBox/assetBox.vue b/nezha-fronted/src/components/common/rightBox/assetBox.vue
index 61d982e89..268e4f670 100644
--- a/nezha-fronted/src/components/common/rightBox/assetBox.vue
+++ b/nezha-fronted/src/components/common/rightBox/assetBox.vue
@@ -206,7 +206,7 @@
-
+
@@ -415,7 +415,6 @@
modelClickData: '',
popState: true,
obj: null,
- addUnitShow: false,
rules: {
sn: [
{required: true, message: this.$t('validate.required'), trigger: 'blur'}
@@ -677,21 +676,22 @@
idc:this.obj.idc,
cabinet:this.obj.cabinet,
u:[this.obj.cabinetStart,this.obj.cabinetEnd]
- }
- this.$refs.locationCascader.initComponet(initLocationData)
- this.assetViewData.moduleNum = this.obj.moduleNum
- this.assetViewData.alertNum = this.obj.alertNum
- this.assetViewData.cabinetName = this.obj.cabinet == null ? '' : this.obj.cabinet.name
- this.getCabinetOptionData(this.obj.idc.id)
- this.assetType = this.obj.model.type.code
+ };
+ this.$refs.locationCascader.initComponet(initLocationData);
+ this.assetViewData.moduleNum = this.obj.moduleNum;
+ this.assetViewData.alertNum = this.obj.alertNum;
+ this.assetViewData.cabinetName = this.obj.cabinet == null ? '' : this.obj.cabinet.name;
+ this.getCabinetOptionData(this.obj.idc.id);
+ this.assetType = this.obj.model.type.code;
this.assetData.impi=this.obj.impi?this.obj.impi:{host:'',port:''};
- this.assetData.sn = this.obj.sn
- this.assetData.host = this.obj.host
- this.assetData.state = this.obj.state
+ this.assetData.sn = this.obj.sn;
+ this.assetData.host = this.obj.host;
+ this.assetData.state = this.obj.state;
this.assetData.idcId = this.obj.idc.id;
+ this.assetData.id = this.obj.id;
this.assetData.tags = this.obj.tags;
this.assetData.accounts = this.obj.accounts;
- this.assetData.cabinetId = this.obj.cabinet == null ? '' : this.obj.cabinet.id
+ this.assetData.cabinetId = this.obj.cabinet == null ? '' : this.obj.cabinet.id;
this.assetData.purchaseDate = this.obj.purchaseDate;
if (this.assetData.accounts && this.assetData.accounts.length > 0) {
this.accountType = this.assetData.accounts[0].protocol.toUpperCase();
@@ -737,6 +737,7 @@
if (response.code === 200) {
this.IDCOptionData = response.data.list;
this.markOptionData(this.IDCOptionData);
+ console.info(this.IDCOptionData)
if (isUpdate) {
this.$store.commit('assetDcListChange');
this.$emit('refreshData');
@@ -1232,11 +1233,6 @@
})
});
},
- tabControl(data) {
- if (data === 'close') {
- this.addUnitShow = false
- }
- },
editing() {
},
getSingleIDCData(data, item, itemData) {
@@ -1405,9 +1401,13 @@
},
mounted() {
this.getUserData()
- this.getIDCOptionData();
this.getVendorOptionData();
this.getAssetTypeOptionData();
+ this.showAccountOp = false;
+ this.$nextTick(() => {
+ this.getIDCOptionData();
+ });
+ this.showAccountOp = false;
window.onresize = () => {
this.tableHeight = document.documentElement.clientHeight - 200;
}
diff --git a/nezha-fronted/src/components/common/rightBox/locationCascader.vue b/nezha-fronted/src/components/common/rightBox/locationCascader.vue
index 243785b56..f3b37f4df 100644
--- a/nezha-fronted/src/components/common/rightBox/locationCascader.vue
+++ b/nezha-fronted/src/components/common/rightBox/locationCascader.vue
@@ -85,8 +85,7 @@
oldUChecked:[],
}
},
- created(){
- this.queryIdcInfos();
+ mounted(){
},
methods:{
toggleDropdown:function(){
@@ -366,11 +365,8 @@
}
}
},
- mounted() {
- },
computed:{
inputShowInfo:function(){
- console.log(this.selectedData)
let idcName=this.selectedData.idc?this.selectedData.idc.name+'/':'';
let cabinetName=this.selectedData.cabinet?this.selectedData.cabinet.name+'/':'';
@@ -395,6 +391,13 @@
handler(n,o){
this.$emit('change',n);
}
+ },
+ idcOption: {
+ deep: true,
+ immediate: true,
+ handler(n, o) {
+ this.queryIdcInfos();
+ }
}
}
}
diff --git a/nezha-fronted/src/components/page/alert/config.vue b/nezha-fronted/src/components/page/alert/config.vue
index 3b7f6cb40..f486f5e83 100644
--- a/nezha-fronted/src/components/page/alert/config.vue
+++ b/nezha-fronted/src/components/page/alert/config.vue
@@ -98,8 +98,8 @@
-
+
- {{account.protocol}}
+ {{account.protocol}}
@@ -207,7 +207,7 @@
-
{
+ this.editUnitShow = true;
+ this.$refs['assetEditUnit'].accountSwitch=false;
+ this.$refs['assetEditUnit'].getAssetData('');
+ this.$refs['assetEditUnit'].resetAsset();
+ });
}
if (data === 'showEdit') {
- this.editUnitShow = true;
- this.$refs['assetEditUnit'].show();
- this.$refs['assetEditUnit'].getAssetData(id)
+ this.rightBox.show = true;
+ this.$nextTick(() => {
+ this.editUnitShow = true;
+ this.$refs['assetEditUnit'].accountSwitch=false;
+ this.$refs['assetEditUnit'].getAssetData(id)
+ });
}
if (data === 'showView') {
this.alertMsgAsset = Object.assign({}, id);