fix: 修改 valiue Mapping 不显示的问题

This commit is contained in:
zhangyu
2021-12-23 16:06:38 +08:00
parent 14dac415d8
commit 2890eee11d
3 changed files with 17 additions and 3 deletions

View File

@@ -88,6 +88,9 @@ export default {
gauge.value = getMetricTypeValue(data.values, chartInfo.param.statistics || 'last') gauge.value = getMetricTypeValue(data.values, chartInfo.param.statistics || 'last')
gauge.max = getMetricTypeValue(data.values, 'max') gauge.max = getMetricTypeValue(data.values, 'max')
gauge.min = getMetricTypeValue(data.values, 'min') gauge.min = getMetricTypeValue(data.values, 'min')
if (gauge.min === gauge.max) {
gauge.min = gauge.max / 2
}
gauge.label = data.metric gauge.label = data.metric
gauge.legend = this.handleLegend(chartInfo, data, expressionIndex, dataIndex, colorIndex).alias gauge.legend = this.handleLegend(chartInfo, data, expressionIndex, dataIndex, colorIndex).alias
gauge.name = this.handleLegend(chartInfo, data, expressionIndex, dataIndex, colorIndex).name gauge.name = this.handleLegend(chartInfo, data, expressionIndex, dataIndex, colorIndex).name

View File

@@ -508,9 +508,9 @@
></el-switch> ></el-switch>
</div> </div>
<transition name="el-zoom-in-top"> <transition name="el-zoom-in-top">
<el-row v-if="chartConfig.param.enable.thresholds"> <el-row v-if="chartConfig.param.enable.valueMapping">
<div <div
v-for="(item,index) in chartConfig.param.thresholds" v-for="(item,index) in chartConfig.param.valueMapping"
:key="index" :key="index"
> >
<div class="chart-title chart-title-config"> <div class="chart-title chart-title-config">

View File

@@ -399,6 +399,17 @@ export default {
this.chartConfig.param.tags = newTags this.chartConfig.param.tags = newTags
this.chartConfig.param.indexs = newTags.map(item => item.text).join(',') this.chartConfig.param.indexs = newTags.map(item => item.text).join(',')
this.change() this.change()
} },
enableChange (type) {
switch (type) {
case 'valueMapping':
break;
case 'legend':
break;
case '':
break;
}
this.change()
},
} }
} }