mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-10-15 12:49:17 +00:00
feat: apply dashboard config
This commit is contained in:
@@ -63,7 +63,7 @@ export const dashboardStore = defineStore({
|
||||
this.showConfig = show;
|
||||
},
|
||||
selectWidget(widget: Nullable<LayoutConfig>) {
|
||||
this.selectedWidget = ConfigData || widget;
|
||||
this.selectedWidget = ConfigData || widget; //todo
|
||||
},
|
||||
setLayer(id: string) {
|
||||
this.layerId = id;
|
||||
@@ -71,6 +71,13 @@ export const dashboardStore = defineStore({
|
||||
setEntity(type: string) {
|
||||
this.entity = type;
|
||||
},
|
||||
setConfigs(param: { [key: string]: unknown }) {
|
||||
const index = this.layout.findIndex((d: LayoutConfig) => d.i === param.i);
|
||||
this.layout[index] = {
|
||||
...this.layout[index],
|
||||
...param,
|
||||
};
|
||||
},
|
||||
async fetchMetricType(item: string) {
|
||||
const res: AxiosResponse = await graph
|
||||
.query("queryTypeOfMetrics")
|
||||
|
@@ -25,8 +25,8 @@ export const ConfigData: LayoutConfig = {
|
||||
queryMetricType: "readMetricsValues",
|
||||
chart: "Line",
|
||||
widget: {
|
||||
title: "Title",
|
||||
tips: "Tooltip",
|
||||
title: "Title123",
|
||||
tips: "Tooltip123",
|
||||
},
|
||||
graph: {
|
||||
showBackground: true,
|
||||
|
Reference in New Issue
Block a user