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