diff --git a/nezha-fronted/src/components/common/table/settings/chartTmplTable.vue b/nezha-fronted/src/components/common/table/settings/chartTmplTable.vue
index a090996d9..14c15a506 100644
--- a/nezha-fronted/src/components/common/table/settings/chartTmplTable.vue
+++ b/nezha-fronted/src/components/common/table/settings/chartTmplTable.vue
@@ -34,6 +34,9 @@
{{scope.row[item.prop]===1?'Asset':'endpoint'}}
+
+ {{chartTypeList.find(title=>title.id == scope.row[item.prop]).name}}
+
{{scope.row[item.prop] || '-'}}
-
@@ -76,6 +79,10 @@ export default {
label: this.$t('config.exprTemp.name'),
prop: 'name',
show: true
+ }, {
+ label: this.$t('config.exprTemp.type'),
+ prop: 'type',
+ show: true
}, {
label: this.$t('config.exprTemp.varType'),
prop: 'varType',
@@ -85,7 +92,64 @@ export default {
prop: 'remark',
show: true
}
- ]
+ ],
+ chartTypeList: [
+ {
+ id: 'line',
+ name: this.$t('dashboard.panel.chartForm.typeVal.line.label')
+ },
+ {
+ id: 'stackArea',
+ name: this.$t('dashboard.panel.chartForm.typeVal.stackArea.label')
+ },
+ {
+ id: 'bar',
+ name: this.$t('dashboard.panel.chartForm.typeVal.bar.label')
+ },
+ {
+ id: 'singleStat',
+ name: this.$t('dashboard.panel.chartForm.typeVal.singleStat.label')
+ },
+ {
+ id: 'pie',
+ name: this.$t('dashboard.panel.chartForm.typeVal.pie.label')
+ },
+ {
+ id: 'table',
+ name: this.$t('dashboard.panel.chartForm.typeVal.table.label')
+ },
+ {
+ id: 'alertList',
+ name: this.$t('dashboard.panel.chartForm.typeVal.alertList.label')
+ },
+ {
+ id: 'text',
+ name: this.$t('dashboard.panel.chartForm.typeVal.text.label')
+ },
+ {
+ id: 'url',
+ name: this.$t('dashboard.panel.chartForm.typeVal.url.label')
+ },
+ {
+ id: 'group',
+ name: this.$t('dashboard.panel.chartForm.typeVal.group.label')
+ }
+
+ ],
+ }
+ },
+ methods: {
+ typeIcon (row) {
+ let str = 'nz-icon'
+ switch (row.type) {
+ case 'line':
+ str += 'nz-icon-multitext'
+ break
+ default :
+ str += 'nz-icon-multitext'
+ break
+ }
+ return str
}
}
}
diff --git a/nezha-fronted/src/components/common/table/settings/endpointTable.vue b/nezha-fronted/src/components/common/table/settings/endpointTable.vue
index 3db1251e5..82fc1f27e 100644
--- a/nezha-fronted/src/components/common/table/settings/endpointTable.vue
+++ b/nezha-fronted/src/components/common/table/settings/endpointTable.vue
@@ -66,7 +66,22 @@
- {{scope.row[item.prop]}}
+
+
+
+
{{scope.row[item.prop] ? scope.row[item.prop] : ''}}
@@ -157,6 +172,29 @@ export default {
const creatDom = document.getElementById('creatDom')
creatDom.parentNode.removeChild(creatDom)
this.$message.success(this.$t('overall.copySuccess'))
+ },
+ suspendedStr (status) { // 10进制转为2进制 分别给对应的状态
+ const arr = status.toString(2).split('')
+ while (arr.length < 5) {
+ arr.unshift('0')
+ }
+ arr.pop()
+ let str = ''
+ arr.forEach((item, index) => {
+ if (index === 0) {
+ str += `
`
+ }
+ if (index === 1) {
+ str += `
`
+ }
+ if (index === 2) {
+ str += `
`
+ }
+ if (index === 3) {
+ str += `
`
+ }
+ })
+ return str
}
},
computed: {}
@@ -190,6 +228,9 @@ export default {
.endpoint-num, .alert-num{
cursor: pointer;
}
+ .inline-block{
+ display: inline-block;
+ }