fix: query

This commit is contained in:
Fine 2024-04-11 10:50:02 +08:00
parent b8d7faf4fc
commit 27133a1080
2 changed files with 5 additions and 7 deletions

View File

@ -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;

View File

@ -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 || {});
}