diff --git a/nezha-fronted/src/components/charts/chart-single-stat.vue b/nezha-fronted/src/components/charts/chart-single-stat.vue index f162e3e03..ee7c1b063 100644 --- a/nezha-fronted/src/components/charts/chart-single-stat.vue +++ b/nezha-fronted/src/components/charts/chart-single-stat.vue @@ -436,7 +436,7 @@ export default { if(this.mapping&&!this.mapping.color){ this.mapping.color={bac:'#fff',text:'#000'} } - this.serieSingleStat = mapping?mapping.text.replace('{{value}}', singleStatTmp):chartDataFormat.getUnit(chartItem.unit?chartItem.unit:2).compute(singleStatTmp,null,2); + this.serieSingleStat = mapping?mapping.text.replace('{{value}}', singleStatTmp).replace('{{name}}', chartItem.elements[0].legend):chartDataFormat.getUnit(chartItem.unit?chartItem.unit:2).compute(singleStatTmp,null,2); }else{ this.serieSingleStat = chartDataFormat.getUnit(chartItem.unit?chartItem.unit:2).compute(singleStatTmp,null,2); } @@ -472,7 +472,7 @@ export default { if(this.mapping&&!this.mapping.color){ this.mapping.color={bac:'#fff',text:'#000'} } - this.serieSingleStat = mapping?mapping.text.replace('{{value}}', singleStatTmp):chartDataFormat.getUnit(chartItem.unit?chartItem.unit:2).compute(singleStatTmp,null,2); + this.serieSingleStat = mapping?mapping.text.replace('{{value}}', singleStatTmp).replace('{{name}}', chartItem.elements[0].legend):chartDataFormat.getUnit(chartItem.unit?chartItem.unit:2).compute(singleStatTmp,null,2); }else{ this.serieSingleStat = chartDataFormat.getUnit(chartItem.unit?chartItem.unit:2).compute(singleStatTmp,null,2); } diff --git a/nezha-fronted/src/components/charts/chart-table.vue b/nezha-fronted/src/components/charts/chart-table.vue index 62ccc02c5..33b54db96 100644 --- a/nezha-fronted/src/components/charts/chart-table.vue +++ b/nezha-fronted/src/components/charts/chart-table.vue @@ -409,7 +409,7 @@ } this.mapping=mapping; item.mapping=mapping; - item.value = mapping?mapping.text.replace('{{value}}', item.value):chartDataFormat.getUnit(chartItem.unit?chartItem.unit:2).compute(value,null,2); + item.value = mapping?mapping.text.replace('{{value}}', item.value).replace('{{name}}', item.element.alias):chartDataFormat.getUnit(chartItem.unit?chartItem.unit:2).compute(value,null,2); } return item; })); diff --git a/nezha-fronted/src/components/page/config/terminallog.vue b/nezha-fronted/src/components/page/config/terminallog.vue index 38c16c6d5..203c0602b 100644 --- a/nezha-fronted/src/components/page/config/terminallog.vue +++ b/nezha-fronted/src/components/page/config/terminallog.vue @@ -217,32 +217,19 @@ searchMsg: { //给搜索框子组件传递的信息 zheze_none: true, searchLabelList: [ - // { - // id: 10, - // name: this.$t('config.terminallog.protocol'), - // type: 'selectType', - // label: 'protocol', - // disabled: false - // }, { - id: 11, - name: this.$t('config.terminallog.host'), - type: 'input', - label: 'host', - disabled: false - },{ - id: 12, - name: this.$t('config.terminallog.user'), - type: 'input', - label: 'user', - disabled: false - },{ - id: 14, - name: this.$t('config.terminallog.userId'), - type: 'input', - label: 'userId', - disabled: false - } + id: 11, + name: this.$t('config.terminallog.host'), + type: 'input', + label: 'host', + disabled: false + },{ + id: 12, + name: this.$t('config.terminallog.user'), + type: 'input', + label: 'username', + disabled: false + } ], }, searchLabel: {}, //搜索参数