mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-10-15 12:49:17 +00:00
feat: add switch to control dashboard mode (#31)
This commit is contained in:
@@ -41,6 +41,7 @@ interface DashboardState {
|
||||
currentTabItems: LayoutConfig[];
|
||||
dashboards: DashboardItem[];
|
||||
currentDashboard: Nullable<DashboardItem>;
|
||||
editMode: boolean;
|
||||
}
|
||||
|
||||
export const dashboardStore = defineStore({
|
||||
@@ -58,11 +59,15 @@ export const dashboardStore = defineStore({
|
||||
currentTabItems: [],
|
||||
dashboards: [],
|
||||
currentDashboard: null,
|
||||
editMode: false,
|
||||
}),
|
||||
actions: {
|
||||
setLayout(data: LayoutConfig[]) {
|
||||
this.layout = data;
|
||||
},
|
||||
setMode(mode: boolean) {
|
||||
this.editMode = mode;
|
||||
},
|
||||
resetDashboards(list: DashboardItem[]) {
|
||||
this.dashboards = list;
|
||||
sessionStorage.setItem("dashboards", JSON.stringify(list));
|
||||
|
Reference in New Issue
Block a user