added a setview action and fullview mode to store

This commit is contained in:
Peter Olu 2022-04-23 14:33:16 +01:00
parent 1e1a26b8be
commit d1236895f5

View File

@ -38,6 +38,7 @@ interface DashboardState {
durationTime: Duration;
selectorStore: any;
showTopology: boolean;
fullView: boolean;
currentTabItems: LayoutConfig[];
dashboards: DashboardItem[];
currentDashboard: Nullable<DashboardItem>;
@ -56,6 +57,7 @@ export const dashboardStore = defineStore({
durationTime: useAppStoreWithOut().durationTime,
selectorStore: useSelectorStore(),
showTopology: false,
fullView: false,
currentTabItems: [],
dashboards: [],
currentDashboard: null,
@ -68,6 +70,9 @@ export const dashboardStore = defineStore({
setMode(mode: boolean) {
this.editMode = mode;
},
setViewMode(mode: boolean) {
this.fullView = mode;
},
resetDashboards(list: DashboardItem[]) {
this.dashboards = list;
sessionStorage.setItem("dashboards", JSON.stringify(list));