feat:promeServer 配置新增thanos 选项

This commit is contained in:
wangwenrui
2020-09-01 15:36:21 +08:00
parent 1bc2f99116
commit 702e00f973
3 changed files with 74 additions and 9 deletions

View File

@@ -44,8 +44,9 @@
<span v-if="item.prop == 'idc'" >{{scope.row[item.prop]?scope.row[item.prop].name:'-'}}</span>
<span v-else-if="item.prop == 'type'">
{{scope.row[item.prop] == '1' ? 'Global' : ''}}
{{scope.row[item.prop] == '2' ? 'Per-Datacenter' : ''}}
<!--{{scope.row[item.prop] == '1' ? 'Global' : ''}}
{{scope.row[item.prop] == '2' ? 'Per-Datacenter' : ''}}-->
{{findServerType(scope.row[item.prop]).text}}
</span>
<span v-else-if="item.prop == 'status'">
<el-popover placement="right" width="200" trigger="hover" :content="$t('asset.assetStatPre')+(scope.row.checkTime?scope.row.checkTime:$t('asset.assetStatDown'))">
@@ -214,6 +215,7 @@
}],
},
searchLabel: {}, //搜索参数
promServerType:null,
}
},
methods: {
@@ -372,6 +374,17 @@
this.$set(this.searchLabel, "orderBy", orderBy);
this.getTableData();
},
findServerType(type){
if(!this.promServerType){
this.promServerType=[];
this.$CONSTANTS.promServer.theData.forEach(item=>{
this.promServerType=this.promServerType.concat(item.children)
})
}
return this.promServerType.find(item=>{
return item.value == type
})
}
},
mounted() {
//初始化数据