fix:explore save chart 失效修复
This commit is contained in:
@@ -360,6 +360,11 @@
|
||||
'chart-metric':ChartMetric,
|
||||
'chart-preview':chartPreview,
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(()=>{
|
||||
console.log(!this.isUrl && !this.isSingleStat)
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
show(show) {
|
||||
if(this.showPanel){
|
||||
@@ -574,7 +579,7 @@
|
||||
addCharts(params) {
|
||||
let panelId;
|
||||
//先处理panel
|
||||
if (this.showPanel.type) {
|
||||
if (this.showPanel&&this.showPanel.type) {
|
||||
panelId = this.panelData[0].id;
|
||||
} else {
|
||||
panelId = this.autocompleteExist(this.panelName2);
|
||||
@@ -813,7 +818,9 @@
|
||||
});
|
||||
|
||||
} else {
|
||||
console.log(this.$refs)
|
||||
this.$nextTick(() => {
|
||||
|
||||
this.$refs.chartTag[0].setMdata(elementInfo.elements[0]);
|
||||
});
|
||||
}
|
||||
@@ -1023,6 +1030,7 @@
|
||||
deep: true,
|
||||
immediate: true,
|
||||
handler(n, o) {
|
||||
if(this.showPanel){
|
||||
if (!this.showPanel.type) {
|
||||
if (this.selectFirstPanel) {
|
||||
this.selectFirstPanel = false;
|
||||
@@ -1037,6 +1045,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
if(this.$refs.chartTag){
|
||||
|
||||
@@ -191,7 +191,7 @@ instance_cpu_time_ns{app="fox", proc="widget", rev="4d3a513", env="prod", job="c
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<chart-box ref="addChartModal" :panel-data="panelData" @on-create-success="createSuccess"></chart-box>
|
||||
<chart-box ref="addChartModal" :panel-data="panelData" @on-create-success="createSuccess" :show-panel="{}"></chart-box>
|
||||
<element-set
|
||||
:allowed-all="true"
|
||||
v-clickoutside="elementsetHide"
|
||||
@@ -316,7 +316,8 @@ instance_cpu_time_ns{app="fox", proc="widget", rev="4d3a513", env="prod", job="c
|
||||
})
|
||||
if(result.metric&&Object.keys(result.metric).length>0){
|
||||
let metric = Object.assign({}, result.metric);
|
||||
seriesItem.name += metric.__name__?metric.__name__:''+ '{';
|
||||
seriesItem.name += metric.__name__?metric.__name__:'';
|
||||
seriesItem.name +='{'
|
||||
delete metric.__name__;
|
||||
for (let key in metric) {
|
||||
seriesItem.name += key + "=" + '"' + metric[key] + '",';
|
||||
|
||||
Reference in New Issue
Block a user