From 9159fb86960a7caa8f08bcf3641601f6de4435ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=85=E8=86=80?= Date: Fri, 23 Oct 2026 23:23:50 +0800 Subject: [PATCH] fix(console): allow selecting a group named all The all sentinel collides with a valid group id. Use a value that cannot be a group id so that group stays selectable. --- app/components/AuditLog.vue | 6 +++--- app/components/MetricsPanel.vue | 6 +++--- app/components/SendLogs.vue | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/components/AuditLog.vue b/app/components/AuditLog.vue index 9372dcf..1cfec3d 100644 --- a/app/components/AuditLog.vue +++ b/app/components/AuditLog.vue @@ -6,7 +6,7 @@ [ - { label: t("audit.allGroups"), value: "all" }, + { label: t("audit.allGroups"), value: "*" }, // "*" is no group id: one named "all" stays selectable ...props.groups.map((g) => ({ label: g.name || g.id, value: g.id })), ]); function onGroupFilter(value: string): void { - emit("update:selectedGroupId", value === "all" ? "" : value); + emit("update:selectedGroupId", value === "*" ? "" : value); emit("filter"); } diff --git a/app/components/MetricsPanel.vue b/app/components/MetricsPanel.vue index e5ee098..1a8c152 100644 --- a/app/components/MetricsPanel.vue +++ b/app/components/MetricsPanel.vue @@ -20,7 +20,7 @@ const emit = defineEmits<{ const sortBy = ref<"total" | "failed" | "rate">("total"); const groupOptions = computed(() => [ - { label: t("metrics.allGroups"), value: "all" }, + { label: t("metrics.allGroups"), value: "*" }, // "*" is no group id: one named "all" stays selectable ...props.groups.map((g) => ({ label: g.name || g.id, value: g.id })), ]); @@ -34,7 +34,7 @@ function pctOf(count: number, total: number): string { } function onGroupFilter(value: string): void { - emit("update:selectedGroupId", value === "all" ? "" : value); + emit("update:selectedGroupId", value === "*" ? "" : value); emit("filter"); } @@ -120,7 +120,7 @@ function cycleSort(): void { {{ t("logs.filterGroup") }} [ - { label: t("logs.allGroups"), value: "all" }, + { label: t("logs.allGroups"), value: "*" }, // "*" is no group id: one named "all" stays selectable ...props.groups.map((g) => ({ label: g.name || g.id, value: g.id })), ]); @@ -142,7 +142,7 @@ function refresh(): void { } function onGroupFilter(value: string): void { - emit("update:selectedGroupId", value === "all" ? "" : value); + emit("update:selectedGroupId", value === "*" ? "" : value); emit("filter"); }