diff --git a/src/types/dashboard.d.ts b/src/types/dashboard.d.ts
index 9183194e..3f6aba05 100644
--- a/src/types/dashboard.d.ts
+++ b/src/types/dashboard.d.ts
@@ -21,7 +21,7 @@ export type DashboardItem = {
layer: string;
isRoot: boolean;
name: string;
- topLevel: boolean;
+ isDefault: boolean;
};
export interface LayoutConfig {
x: number;
diff --git a/src/views/dashboard/List.vue b/src/views/dashboard/List.vue
index a85bf0a5..c5c768f7 100644
--- a/src/views/dashboard/List.vue
+++ b/src/views/dashboard/List.vue
@@ -73,7 +73,7 @@ limitations under the License. -->
--
-
+
>
- {{ scope.row.topLevel ? "Disable" : "Enable" }}
+ {{ scope.row.isDefault ? "Disable" : "Enable" }}
@@ -189,19 +189,19 @@ limitations under the License. -->
}
loading.value = true;
for (const item of arr) {
- const { layer, name, entity, isRoot, children, topLevel } = item.configuration;
+ const { layer, name, entity, isRoot, children, isDefault } = item.configuration;
const index = dashboardStore.dashboards.findIndex((d: DashboardItem) => d.id === item.id);
const p: DashboardItem = {
name: name.split(" ").join("-"),
layer: layer,
entity: entity,
isRoot: false,
- topLevel: false,
+ isDefault: false,
};
if (index > -1) {
p.id = item.id;
p.isRoot = isRoot;
- p.topLevel = topLevel;
+ p.isDefault = isDefault;
}
dashboardStore.setCurrentDashboard(p);
dashboardStore.setLayout(children);
@@ -394,7 +394,7 @@ limitations under the License. -->
loading.value = true;
for (const d of dashboardStore.dashboards) {
if (d.id === row.id) {
- d.topLevel = !row.topLevel;
+ d.isDefault = !row.isDefault;
const key = [d.layer, d.entity, d.name].join("_");
const layout = sessionStorage.getItem(key) || "{}";
const c = {
@@ -418,8 +418,8 @@ limitations under the License. -->
);
}
} else {
- if (d.layer === row.layer && [EntityType[0].value].includes(d.entity) && !row.topLevel && d.topLevel) {
- d.topLevel = false;
+ if (d.layer === row.layer && [EntityType[0].value].includes(d.entity) && !row.isDefault && d.isDefault) {
+ d.isDefault = false;
const key = [d.layer, d.entity, d.name].join("_");
const layout = sessionStorage.getItem(key) || "{}";
const c = {