fix:修改alertMes 点击查看不显示的问题
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
<div class="chart-header__title" v-else >
|
||||
<span @click="groupShow"> <i class="nz-icon" :class="chartInfo.param.collapse ? 'nz-icon-arrow-right': 'nz-icon-arrow-down'"></i></span>
|
||||
{{chartInfo.name}}
|
||||
<span v-show="chartInfo.param.collapse" class="collapse-content">({{chartData.length}} charts)</span>
|
||||
</div>
|
||||
<div class="chart-header__tools" v-if="chartInfo.type !== 'endpointInfo' && chartInfo.type !== 'assetInfo'">
|
||||
<span v-if="chartInfo.param.link" class="chart-header__tool" @click="openUrl">
|
||||
|
||||
@@ -238,6 +238,7 @@ export default {
|
||||
groupShow (chart) {
|
||||
const index = this.copyDataList.findIndex(item => item.id === chart.id)
|
||||
this.$set(this.copyDataList, index, chart)
|
||||
this.onScroll(this.scrollTop)
|
||||
},
|
||||
moveChart () {
|
||||
if (this.timer) {
|
||||
|
||||
@@ -589,12 +589,14 @@ export default {
|
||||
this.chartLoading = true
|
||||
if (this.currentMsg.alertRule.type === 1) {
|
||||
const chartInfo = lodash.cloneDeep(lineData)
|
||||
chartInfo.elements = [{}]
|
||||
chartInfo.elements[0].expression = encodeURIComponent(this.currentMsg.alertRule.expr.replace(/\"/g, '\'').replace(/\r|\n+/g, ''))
|
||||
chartInfo.elements[0].filter = encodeURIComponent(decodeURIComponent(this.promQueryParamLabels(this.currentMsg.labels)))
|
||||
chartInfo.unit = this.currentMsg.unit
|
||||
this.showFullscreen(true, chartInfo)
|
||||
} else if (this.currentMsg.alertRule.type === 2) {
|
||||
const chartInfo = lodash.cloneDeep(logData)
|
||||
chartInfo.elements = [{}]
|
||||
chartInfo.elements[0].expression = encodeURIComponent(this.currentMsg.alertRule.expr.replace(/\"/g, '\'').replace(/\r|\n+/g, ''))
|
||||
chartInfo.elements[0].filter = encodeURIComponent(decodeURIComponent(this.promQueryParamLabels(this.currentMsg.labels)))
|
||||
chartInfo.unit = this.currentMsg.unit
|
||||
|
||||
@@ -571,12 +571,14 @@ export default {
|
||||
this.chartLoading = true
|
||||
if (this.currentMsg.alertRule.type === 1) {
|
||||
const chartInfo = lodash.cloneDeep(lineData)
|
||||
chartInfo.elements = [{}]
|
||||
chartInfo.elements[0].expression = encodeURIComponent(this.currentMsg.alertRule.expr.replace(/\"/g, '\'').replace(/\r|\n+/g, ''))
|
||||
chartInfo.elements[0].filter = encodeURIComponent(decodeURIComponent(this.promQueryParamLabels(this.currentMsg.labels)))
|
||||
chartInfo.unit = this.currentMsg.unit
|
||||
this.showFullscreen(true, chartInfo)
|
||||
} else if (this.currentMsg.alertRule.type === 2) {
|
||||
const chartInfo = lodash.cloneDeep(logData)
|
||||
chartInfo.elements = [{}]
|
||||
chartInfo.elements[0].expression = encodeURIComponent(this.currentMsg.alertRule.expr.replace(/\"/g, '\'').replace(/\r|\n+/g, ''))
|
||||
chartInfo.elements[0].filter = encodeURIComponent(decodeURIComponent(this.promQueryParamLabels(this.currentMsg.labels)))
|
||||
chartInfo.unit = this.currentMsg.unit
|
||||
|
||||
Reference in New Issue
Block a user