diff --git a/ui/src/lib/components/endpoints.svelte b/ui/src/lib/components/endpoints.svelte new file mode 100644 index 0000000..3d73401 --- /dev/null +++ b/ui/src/lib/components/endpoints.svelte @@ -0,0 +1,189 @@ + + +
+ {#each groups as group (group.frontend.type + group.frontend.name)} +
+
+ {group.frontend.name} + {group.frontend.type} + + {#each group.frontend.kinds as k (k)} + + {/each} + + {#if Object.keys(group.frontend.default_agents).length > 0} + + {Object.entries(group.frontend.default_agents) + .map(([k, v]) => `${k}→${v}`) + .join(", ")} + + {/if} +
+ {#if group.note} +

{group.note}

+ {/if} + {#each group.endpoints as ep (ep.label)} +
+ {ep.label} + + {ep.url} + {#if ep.hint} + + {ep.hint} + + {/if} + + +
+ {/each} +
+ {/each} +
diff --git a/ui/src/routes/+page.svelte b/ui/src/routes/+page.svelte index e7c7e28..bc1b97d 100644 --- a/ui/src/routes/+page.svelte +++ b/ui/src/routes/+page.svelte @@ -7,6 +7,7 @@ UsageResponse, } from "$lib/api/types"; import EmptyState from "$lib/components/empty-state.svelte"; + import Endpoints from "$lib/components/endpoints.svelte"; import ErrorNote from "$lib/components/error-note.svelte"; import KindBadge from "$lib/components/kind-badge.svelte"; import LimitBar from "$lib/components/limit-bar.svelte"; @@ -88,15 +89,6 @@ }); const windows = $derived(gateway.limits?.windows ?? []); const tape = $derived(gateway.tape.slice(0, 40)); - - function frontendUrl(port: number | null, publicBase: string | null) { - if (publicBase) { - return publicBase; - } - return port - ? `${window.location.protocol}//${window.location.hostname}:${port}` - : ""; - } Now · Beaver @@ -347,34 +339,10 @@

- Frontends + Endpoints

{#if agents} - + {:else} {/if}