mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-13 08:17:33 +00:00
fix: update
This commit is contained in:
parent
09e4f6786c
commit
b7fe7b4e4c
@ -25,7 +25,7 @@ import { NewControl, TextConfig, TimeRangeConfig, ControlsTypes } from "../data"
|
|||||||
import type { AxiosResponse } from "axios";
|
import type { AxiosResponse } from "axios";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import { EntityType } from "@/views/dashboard/data";
|
import { EntityType, MetricModes } from "@/views/dashboard/data";
|
||||||
interface DashboardState {
|
interface DashboardState {
|
||||||
showConfig: boolean;
|
showConfig: boolean;
|
||||||
layout: LayoutConfig[];
|
layout: LayoutConfig[];
|
||||||
@ -92,6 +92,9 @@ export const dashboardStore = defineStore({
|
|||||||
metricTypes: [""],
|
metricTypes: [""],
|
||||||
metrics: [""],
|
metrics: [""],
|
||||||
};
|
};
|
||||||
|
if (type === "Widget") {
|
||||||
|
newItem.metricMode = MetricModes.Expression;
|
||||||
|
}
|
||||||
if (type === "Tab") {
|
if (type === "Tab") {
|
||||||
newItem.h = 36;
|
newItem.h = 36;
|
||||||
newItem.activedTabIndex = 0;
|
newItem.activedTabIndex = 0;
|
||||||
@ -167,6 +170,9 @@ export const dashboardStore = defineStore({
|
|||||||
metricTypes: [""],
|
metricTypes: [""],
|
||||||
metrics: [""],
|
metrics: [""],
|
||||||
};
|
};
|
||||||
|
if (type === "Widget") {
|
||||||
|
newItem.metricMode = MetricModes.Expression;
|
||||||
|
}
|
||||||
if (type === "Topology") {
|
if (type === "Topology") {
|
||||||
newItem.h = 32;
|
newItem.h = 32;
|
||||||
newItem.graph = {
|
newItem.graph = {
|
||||||
|
@ -280,12 +280,22 @@ limitations under the License. -->
|
|||||||
...dashboardStore.selectedGrid,
|
...dashboardStore.selectedGrid,
|
||||||
metrics: [""],
|
metrics: [""],
|
||||||
metricTypes: [""],
|
metricTypes: [""],
|
||||||
|
expressions: [""],
|
||||||
|
typesOfMQE: [""],
|
||||||
});
|
});
|
||||||
states.metrics = [""];
|
states.metrics = [""];
|
||||||
states.metricTypes = [""];
|
states.metricTypes = [""];
|
||||||
defaultLen.value = 5;
|
defaultLen.value = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isExpression.value) {
|
||||||
|
dashboardStore.selectWidget({
|
||||||
|
...dashboardStore.selectedGrid,
|
||||||
|
graph: chart,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
setMetricType(chart);
|
setMetricType(chart);
|
||||||
|
}
|
||||||
setDashboards(chart.type);
|
setDashboards(chart.type);
|
||||||
states.dashboardName = "";
|
states.dashboardName = "";
|
||||||
defaultLen.value = 10;
|
defaultLen.value = 10;
|
||||||
|
Loading…
Reference in New Issue
Block a user