diff --git a/src/types/dashboard.d.ts b/src/types/dashboard.d.ts index 9f23c9ee..5a24e53d 100644 --- a/src/types/dashboard.d.ts +++ b/src/types/dashboard.d.ts @@ -34,9 +34,7 @@ export interface LayoutConfig { type: string; widget?: WidgetConfig; graph?: GraphConfig; - metrics?: string[]; expressions?: string[]; - metricTypes?: string[]; typesOfMQE?: string[]; children?: { name: string; children: LayoutConfig[]; expression?: string; enable?: boolean }[]; activedTabIndex?: number; @@ -76,7 +74,6 @@ export type Filters = { export type MetricConfigOpt = { unit?: string; label?: string; - calculation?: string; labelsIndex?: string; sortOrder?: string; topN?: number; diff --git a/src/views/dashboard/configuration/widget/metric/Index.vue b/src/views/dashboard/configuration/widget/metric/Index.vue index f1eeb1cf..7f00dc9c 100644 --- a/src/views/dashboard/configuration/widget/metric/Index.vue +++ b/src/views/dashboard/configuration/widget/metric/Index.vue @@ -160,7 +160,6 @@ limitations under the License. --> unit: "", label: "", labelsIndex: "", - calculation: "", sortOrder: "DES", }); @@ -203,6 +202,11 @@ limitations under the License. --> }, []); states.dashboardList = arr.length ? arr : [{ label: "", value: "" }]; + if (states.metrics && states.metrics[0]) { + queryMetrics(); + } else { + emit("update", {}); + } } function changeChartType(item: Option) { @@ -211,8 +215,6 @@ limitations under the License. --> if (states.isList) { dashboardStore.selectWidget({ ...dashboardStore.selectedGrid, - metrics: [""], - metricTypes: [""], expressions: [""], typesOfMQE: [""], }); @@ -250,7 +252,6 @@ limitations under the License. --> ...dashboardStore.selectedGrid, typesOfMQE: states.metricTypes, }); - emit("update", params.source || {}); }