-
-
+
+
+
+
+
-
-
+
diff --git a/nezha-fronted/src/components/page/dashboard/explore/promqlInput.vue b/nezha-fronted/src/components/page/dashboard/explore/promqlInput.vue
index cc44f07d2..16db86ef1 100644
--- a/nezha-fronted/src/components/page/dashboard/explore/promqlInput.vue
+++ b/nezha-fronted/src/components/page/dashboard/explore/promqlInput.vue
@@ -5,21 +5,20 @@
- Metric
-
+ Metric
+
-
+
-
-
@@ -37,7 +36,6 @@
dropDownVisible:false,
metricStore:[],
metricOptions:[],
- cascaderValue:'',
}
},
created() {
@@ -46,7 +44,7 @@
},
methods:{
clearExpression:function(){
- this.expressionList[this.index]='';
+ this.expressionChange();
},
addExpression:function(){
this.$emit('addExpression',this.index);
@@ -133,7 +131,7 @@
diff --git a/nezha-fronted/src/components/page/dashboard/metricPreview.vue b/nezha-fronted/src/components/page/dashboard/metricPreview.vue
index 511838981..98b38f1a7 100644
--- a/nezha-fronted/src/components/page/dashboard/metricPreview.vue
+++ b/nezha-fronted/src/components/page/dashboard/metricPreview.vue
@@ -10,6 +10,7 @@
+
diff --git a/nezha-fronted/src/components/page/dashboard/overview/chart.vue b/nezha-fronted/src/components/page/dashboard/overview/chart.vue
index 53754d9e8..30b176dc5 100644
--- a/nezha-fronted/src/components/page/dashboard/overview/chart.vue
+++ b/nezha-fronted/src/components/page/dashboard/overview/chart.vue
@@ -1,5 +1,5 @@
-
+
@@ -31,6 +31,7 @@
},
props:{
chartTitle:{type:String},
+ showToolbox:{type:Boolean,default:true},
chartType:{type:String,default:'line'},
tooltipFormatter:Function,
yAxisFormatter:Function,
@@ -45,7 +46,10 @@
}
},
created() {
-
+ this.option=chartConfig.getOption(this.chartType);
+ if(this.showToolbox == false){
+ this.option.grid.top=10;
+ }
},
methods:{
modifyOption:function(target,name,obj){
@@ -105,7 +109,7 @@
},
resize:function(){
if(this.chart){
- let height=this.$el.clientHeight ;
+ let height=this.$el.clientHeight;
let width=this.$el.clientWidth;
if(this.chartTitle){
height = height - 20;
@@ -116,6 +120,24 @@
this.chart.resize({width:width,height:height});
}
},
+ mouseEnterChart(){
+ if (this.chart&&this.showToolbox) {
+ this.chart.setOption({
+ toolbox: {
+ show:true,
+ }
+ })
+ }
+ },
+ mouseLeaveChart(){
+ if (this.chart) {
+ this.chart.setOption({
+ toolbox: {
+ show:false,
+ }
+ })
+ }
+ },
getBgColor:function(index){
let color=chartConfig.getBgColorList()[index];
return color;
@@ -246,7 +268,7 @@