diff --git a/src/components/MonitorList.vue b/src/components/MonitorList.vue
index c790c4d95..40a21bd8a 100644
--- a/src/components/MonitorList.vue
+++ b/src/components/MonitorList.vue
@@ -100,16 +100,16 @@ export default {
down: 0,
pending: 2,
maintenance: 3,
- 1: 'up',
- 0: 'down',
- 2: 'pending',
- 3: 'maintenance',
+ 1: "up",
+ 0: "down",
+ 2: "pending",
+ 3: "maintenance",
},
activeStates: {
running: true,
paused: false,
- true: 'running',
- false: 'paused',
+ true: "running",
+ false: "paused",
},
};
},
@@ -293,11 +293,11 @@ export default {
updateFilter(newFilter) {
const newQuery = { ...this.$router.currentRoute.value.query };
- for (const [key, value] of Object.entries(newFilter)) {
+ for (const [ key, value ] of Object.entries(newFilter)) {
if (!value
|| (value instanceof Array && value.length === 0)) {
delete newQuery[key];
- continue
+ continue;
}
newQuery[key] = value instanceof Array
diff --git a/src/components/MonitorListFilter.vue b/src/components/MonitorListFilter.vue
index 8262af6b7..a0afc7c11 100644
--- a/src/components/MonitorListFilter.vue
+++ b/src/components/MonitorListFilter.vue
@@ -14,10 +14,10 @@
-
+
{{ $t('Status') }}
@@ -29,7 +29,7 @@
{{ $root.stats.up }}
-
+
@@ -42,7 +42,7 @@
{{ $root.stats.down }}
-
+
@@ -55,7 +55,7 @@
{{ $root.stats.pending }}
-
+
@@ -68,7 +68,7 @@
{{ $root.stats.maintenance }}
-
+
@@ -77,10 +77,10 @@
-
+
-
- {{ $t("Running") }}
+
+ {{ $t("Running") }}
{{ $t("filterActivePaused") }}
@@ -94,7 +94,7 @@
{{ $t("Running") }}
{{ $root.stats.active }}
-
+
@@ -107,7 +107,7 @@
{{ $t("filterActivePaused") }}
{{ $root.stats.pause }}
-
+
@@ -116,11 +116,11 @@
-
+
@@ -134,7 +134,7 @@
{{ getTaggedMonitorCount(tag) }}
-
+
@@ -167,9 +167,9 @@ export default {
return {
tagsList: [],
filterNames: [
- 'status',
- 'active',
- 'tags',
+ "status",
+ "active",
+ "tags",
],
};
},
@@ -194,15 +194,15 @@ export default {
this.getExistingTags();
},
methods: {
- getActiveFilters: function() {
+ getActiveFilters: function () {
const filters = Object.fromEntries(
Array.from(Object.entries(this.$router.currentRoute.value.query ?? {}))
);
return {
- status: filters['status'] ? filters['status'].split(',') : [],
- active: filters['active'] ? filters['active'].split(',') : [],
- tags: filters['tags'] ? filters['tags'].split(',') : [],
+ status: filters["status"] ? filters["status"].split(",") : [],
+ active: filters["active"] ? filters["active"].split(",") : [],
+ tags: filters["tags"] ? filters["tags"].split(",") : [],
};
},
toggleStatusFilter(status) {
@@ -211,16 +211,16 @@ export default {
};
const statusStates = {
- 1: 'up',
- 0: 'down',
- 2: 'pending',
- 3: 'maintenance',
+ 1: "up",
+ 0: "down",
+ 2: "pending",
+ 3: "maintenance",
};
const finalStatus = statusStates[status];
- if (newFilter.status.includes(''+finalStatus)) {
- newFilter.status = newFilter.status.filter(item => item !== ''+finalStatus);
+ if (newFilter.status.includes("" + finalStatus)) {
+ newFilter.status = newFilter.status.filter(item => item !== "" + finalStatus);
} else {
newFilter.status.push(finalStatus);
}
@@ -232,8 +232,8 @@ export default {
...this.getActiveFilters(),
};
- if (newFilter.active.includes(''+active)) {
- newFilter.active = newFilter.active.filter(item => item !== ''+active);
+ if (newFilter.active.includes("" + active)) {
+ newFilter.active = newFilter.active.filter(item => item !== "" + active);
} else {
newFilter.active.push(active);
}
@@ -245,8 +245,8 @@ export default {
...this.getActiveFilters(),
};
- if (newFilter.tags.includes(''+tag.name)) {
- newFilter.tags = newFilter.tags.filter(item => item !== ''+tag.name);
+ if (newFilter.tags.includes("" + tag.name)) {
+ newFilter.tags = newFilter.tags.filter(item => item !== "" + tag.name);
} else {
newFilter.tags.push(tag.name);
}