NEZ-1924 fix:Explore保存Metrics时不显示表达式
This commit is contained in:
@@ -46,6 +46,7 @@
|
|||||||
style="">
|
style="">
|
||||||
<promql-input
|
<promql-input
|
||||||
:from-father-data="true"
|
:from-father-data="true"
|
||||||
|
:isTopo="true"
|
||||||
:metricOptionsParent="metricOptions"
|
:metricOptionsParent="metricOptions"
|
||||||
:id="index"
|
:id="index"
|
||||||
:key="index"
|
:key="index"
|
||||||
@@ -222,6 +223,7 @@
|
|||||||
style="width: 100%; border-radius: 2px; padding-right: 60px;">
|
style="width: 100%; border-radius: 2px; padding-right: 60px;">
|
||||||
<promql-input
|
<promql-input
|
||||||
:from-father-data="true"
|
:from-father-data="true"
|
||||||
|
:isTopo="true"
|
||||||
:metricOptionsParent="metricOptions"
|
:metricOptionsParent="metricOptions"
|
||||||
:id="index"
|
:id="index"
|
||||||
:pqid="'vm'"
|
:pqid="'vm'"
|
||||||
|
|||||||
@@ -464,6 +464,10 @@ export default {
|
|||||||
},
|
},
|
||||||
type: {
|
type: {
|
||||||
type: String // metric和log两种,为空时视为metric
|
type: String // metric和log两种,为空时视为metric
|
||||||
|
},
|
||||||
|
isTopo: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
// metricOptions: {type: Array},
|
// metricOptions: {type: Array},
|
||||||
// metricStore: {type: Array}
|
// metricStore: {type: Array}
|
||||||
@@ -1098,14 +1102,16 @@ export default {
|
|||||||
immediate: true,
|
immediate: true,
|
||||||
handler (n, o) {
|
handler (n, o) {
|
||||||
this.codeMirrorValue[this.index] = n[this.index]
|
this.codeMirrorValue[this.index] = n[this.index]
|
||||||
// setTimeout(() => {
|
if (this.isTopo) {
|
||||||
// const text = this.newView.state.doc.toString()
|
setTimeout(() => {
|
||||||
// this.newView.dispatch(
|
const text = this.newView.state.doc.toString()
|
||||||
// this.newView.state.update({
|
this.newView.dispatch(
|
||||||
// changes: { from: 0, to: text.length, insert: this.codeMirrorValue[this.index] }
|
this.newView.state.update({
|
||||||
// })
|
changes: { from: 0, to: text.length, insert: this.codeMirrorValue[this.index] }
|
||||||
// )
|
})
|
||||||
// }, 200)
|
)
|
||||||
|
}, 200)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user