Implement alias filtering across multiple pages
Publish telemt-api gateway Docker image / test (push) Successful in 25s
Publish telemt-api gateway Docker image / build-and-push (push) Successful in 2m25s

- Introduced an `AliasFilterSelect` component to streamline alias selection in various routes, enhancing user experience.
- Refactored alias handling logic to use a single filter mechanism, improving consistency and reducing code duplication.
- Updated API calls to utilize the new alias filtering logic, ensuring accurate data retrieval based on user-selected aliases.
- Enhanced the loading of available aliases dynamically from aggregated summary data, keeping the interface up-to-date.
This commit is contained in:
Denozordec
2026-03-30 20:04:33 +07:00
parent d0d7b8c1e6
commit 725ab0bf6e
6 changed files with 144 additions and 158 deletions
@@ -0,0 +1,32 @@
<script lang="ts">
import * as Select from "$lib/components/ui/select/index.js";
let {
availableAliases = [],
value = $bindable("all"),
label = "Alias",
allLabel = "All nodes"
}: {
availableAliases: string[];
value?: string;
label?: string;
allLabel?: string;
} = $props();
let selectedLabel = $derived(value === "all" ? allLabel : value);
</script>
<label class="text-xs text-muted-foreground">
{label}
<Select.Root type="single" bind:value>
<Select.Trigger class="mt-1 w-[220px]">
{selectedLabel}
</Select.Trigger>
<Select.Content>
<Select.Item value="all">{allLabel}</Select.Item>
{#each availableAliases as alias (alias)}
<Select.Item value={alias}>{alias}</Select.Item>
{/each}
</Select.Content>
</Select.Root>
</label>