Skip to content

Modern Docker Management, Designed for Everyone

chore(deps-dev): bump svelte-check-rs from 0.9.7 to 0.9.11 (#2616)

dependabot[bot]d7fdb5d30a2d
diff --git a/frontend/package.json b/frontend/package.json
index 34ed62b15..0aa2b6904 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -62,7 +62,7 @@
"mode-watcher": "^1.1.0",
"paneforge": "^1.0.2",
"runed": "^0.37.1",
- "svelte-check-rs": "^0.9.7",
+ "svelte-check-rs": "^0.9.11",
"svelte-sonner": "^1.1.1",
"svelte-toolbelt": "^0.10.6",
"sveltekit-superforms": "^2.30.1",
diff --git a/frontend/src/lib/utils/form.utils.ts b/frontend/src/lib/utils/form.utils.ts
index 834428279..dfbe963b7 100644
--- a/frontend/src/lib/utils/form.utils.ts
+++ b/frontend/src/lib/utils/form.utils.ts
@@ -13,7 +13,7 @@ export type FormInput<T> = {
error: string | null;
};
-type FormInputs<T> = {
+export type FormInputs<T> = {
[K in keyof T]: FormInput<T[K]>;
};
diff --git a/frontend/src/routes/(app)/+layout.svelte b/frontend/src/routes/(app)/+layout.svelte
index fdfd3dd9d..41e73f360 100644
--- a/frontend/src/routes/(app)/+layout.svelte
+++ b/frontend/src/routes/(app)/+layout.svelte
@@ -13,16 +13,7 @@
import { navigationItems, getManagementItems, type NavigationItem } from '$lib/config/navigation-config';
import { isEditableTarget, matchesShortcutEvent } from '$lib/utils/keyboard-shortcut.utils';
import { cn } from '$lib/utils';
- import type { Snippet } from 'svelte';
- import type { LayoutData } from './$types';
-
- let {
- data,
- children
- }: {
- data: LayoutData;
- children: Snippet;
- } = $props();
+ let { data, children }: LayoutProps = $props();
const versionInformation = $derived(data.versionInformation);
const user = $derived(data.user);
@@ -78,6 +69,7 @@
event.preventDefault();
goto(match.url);
}
+ $effect(() => void handleNavigationShortcut);
function flattenNavigationItems(items: NavigationItem[]): NavigationItem[] {
return items.flatMap((item) => [item, ...(item.items ? flattenNavigationItems(item.items) : [])]);
diff --git a/frontend/src/routes/(app)/containers/+page.svelte b/frontend/src/routes/(app)/containers/+page.svelte
index 9f12dd71b..3f2caace2 100644
--- a/frontend/src/routes/(app)/containers/+page.svelte
+++ b/frontend/src/routes/(app)/containers/+page.svelte
@@ -136,7 +136,7 @@
loading: isRefreshing,
disabled: isRefreshing
}
- ].filter((b): b is ActionButton => b !== null)
+ ].filter((b) => b !== null) as ActionButton[]
);
const statCards: StatCardConfig[] = $derived([
diff --git a/frontend/src/routes/(app)/containers/[containerId]/+page.svelte b/frontend/src/routes/(app)/containers/[containerId]/+page.svelte
index 0a50133ce..9d732ca51 100644
--- a/frontend/src/routes/(app)/containers/[containerId]/+page.svelte
+++ b/frontend/src/routes/(app)/containers/[containerId]/+page.svelte
@@ -152,7 +152,7 @@
const rootComposeFilename = $derived.by(() => {
const cf = composeInfo?.configFiles;
if (!cf) return 'compose.yml';
- const first = cf.split(',')[0].trim();
+ const first = cf.split(',')[0]?.trim() ?? '';
return first.split('/').pop() || 'compose.yml';
});
@@ -165,7 +165,7 @@
const hasServiceInContent = (content: string, serviceName: string): boolean => {
try {
const parsed = parseYaml(content) as Record<string, unknown> | null;
- return !!(parsed?.services && (parsed.services as Record<string, unknown>)[serviceName]);
+ return !!(parsed?.['services'] && (parsed['services'] as Record<string, unknown>)[serviceName]);
} catch {
return false;
}
diff --git a/frontend/src/routes/(app)/containers/components/ContainerComposePanel.svelte b/frontend/src/routes/(app)/containers/components/ContainerComposePanel.svelte
index bd0f00293..590cfb284 100644
--- a/frontend/src/routes/(app)/containers/components/ContainerComposePanel.svelte
+++ b/frontend/src/routes/(app)/containers/components/ContainerComposePanel.svelte
@@ -16,7 +16,7 @@
rootFilename?: string;
} = $props();
- const sourceContent = $derived(includeFile ? includeFile.content : (project.composeContent ?? ''));
+ const sourceContent = $derived(includeFile ? (includeFile.content ?? '') : (project.composeContent ?? ''));
// This component is keyed by compose source identity in the parent route, so capturing the initial source is intentional.
// svelte-ignore state_referenced_locally
let composeContent = $state(sourceContent);
diff --git a/frontend/src/routes/(app)/containers/components/ContainerConfiguration.svelte b/frontend/src/routes/(app)/containers/components/ContainerConfiguration.svelte
index b70b4cd59..c8bc731ae 100644
--- a/frontend/src/routes/(app)/containers/components/ContainerConfiguration.svelte
+++ b/frontend/src/routes/(app)/containers/components/ContainerConfiguration.svelte
@@ -34,7 +34,7 @@
{#if env.includes('=')}
{@const [key, ...valueParts] = env.split('=')}
{@const value = valueParts.join('=')}
- <KeyValueCard label={key} valueTitle={m.common_click_to_select()}>{value}</KeyValueCard>
+ <KeyValueCard label={key ?? ''} valueTitle={m.common_click_to_select()}>{value}</KeyValueCard>
{:else}
<KeyValueCard
label={m.swarm_service_env_var()}
diff --git a/frontend/src/routes/(app)/containers/components/ContainerLogsPanel.svelte b/frontend/src/routes/(app)/containers/components/ContainerLogsPanel.svelte
index 7bb7adc67..c3a15aa74 100644
--- a/frontend/src/routes/(app)/containers/components/ContainerLogsPanel.svelte
+++ b/frontend/src/routes/(app)/containers/components/ContainerLogsPanel.svelte
@@ -35,7 +35,7 @@
} = $props();
let isStreaming = $state(false);
- let viewer = $state<LogViewer>();
+ let viewer = $state<ReturnType<typeof LogViewer>>();
let autoStartLogs = $state(false);
let hasAutoStarted = $state(false);
let showParsedJson = $state(false);
@@ -48,10 +48,6 @@
const cpuUsagePercent = $derived(calculateCPUPercent(stats));
const memoryUsageBytes = $derived(calculateMemoryUsage(stats));
const memoryLimitBytes = $derived(stats?.memory_stats?.limit || 0);
- const memoryUsagePercent = $derived.by(() => {
- if (!memoryLimitBytes) return 0;
- return Math.min(Math.max((memoryUsageBytes / memoryLimitBytes) * 100, 0), 100);
- });
const cpuValue = $derived(isRunning ? `${cpuUsagePercent.toFixed(1)}%` : m.common_na());
const cpuDetail = $derived.by(() => {
if (!isRunning) return m.common_na();
@@ -64,11 +60,11 @@
? `${onlineCpus} ${onlineCpus === 1 ? m.containers_stats_cpu_unit_singular() : m.common_cpus()}`
: m.common_na();
});
- const memoryValue = $derived(isRunning ? bytes.format(memoryUsageBytes, { unitSeparator: ' ' }) : m.common_na());
+ const memoryValue = $derived(isRunning ? (bytes.format(memoryUsageBytes, { unitSeparator: ' ' }) ?? '') : m.common_na());
const memoryDetail = $derived.by(() => {
if (!isRunning) return m.common_na();
if (!memoryLimitBytes) return m.common_na();
- return bytes.format(memoryLimitBytes, { unitSeparator: ' ' });
+ return bytes.format(memoryLimitBytes, { unitSeparator: ' ' }) ?? '';
});
function resetHistory() {
diff --git a/frontend/src/routes/(app)/containers/components/ContainerNetwork.svelte b/frontend/src/routes/(app)/containers/components/ContainerNetwork.svelte
index edf3897ad..65fdb6617 100644
--- a/frontend/src/routes/(app)/containers/components/ContainerNetwork.svelte
+++ b/frontend/src/routes/(app)/containers/components/ContainerNetwork.svelte
@@ -5,16 +5,6 @@
import type { ContainerDetailsDto } from '$lib/types/container.type';
import { NetworksIcon } from '$lib/icons';
- interface NetworkConfig {
- IPAddress?: string;
- IPPrefixLen?: number;
- Gateway?: string;
- MacAddress?: string;
- Aliases?: string[];
- Links?: string[];
- [key: string]: any;
- }
-
interface Props {
container: ContainerDetailsDto;
}
diff --git a/frontend/src/routes/(app)/containers/components/ContainerShell.svelte b/frontend/src/routes/(app)/containers/components/ContainerShell.svelte
index 8fb080a6a..cb8d6e5dc 100644
--- a/frontend/src/routes/(app)/containers/components/ContainerShell.svelte
+++ b/frontend/src/routes/(app)/containers/components/ContainerShell.svelte
@@ -19,14 +19,12 @@
let reconnectKey = $state(0);
let lastContainerId = $state<string | undefined>(undefined);
let lastShellForUrl = $state<string | undefined>(undefined);
- let hasShellOverride = $state(false);
let lastDefaultShell = $state<string | undefined>(undefined);
$effect(() => {
const defaultShell = $settingsStore.defaultShell;
if (defaultShell !== lastDefaultShell) {
lastDefaultShell = defaultShell;
- hasShellOverride = false;
const fallbackShell = defaultShell || '/bin/sh';
if (selectedShell !== fallbackShell) {
selectedShell = fallbackShell;
@@ -59,8 +57,6 @@
}
function handleShellChange(shell: string) {
- const defaultShell = $settingsStore.defaultShell || '/bin/sh';
- hasShellOverride = shell !== defaultShell;
selectedShell = shell;
}
diff --git a/frontend/src/routes/(app)/containers/components/ContainerStats.svelte b/frontend/src/routes/(app)/containers/components/ContainerStats.svelte
index 2a04c1ee8..39b195303 100644
--- a/frontend/src/routes/(app)/containers/components/ContainerStats.svelte
+++ b/frontend/src/routes/(app)/containers/components/ContainerStats.svelte
@@ -65,7 +65,7 @@
.reduce((acc, item) => acc + item.value, 0);
});
- const memoryCacheBytes = $derived(stats?.memory_stats?.stats?.file ?? stats?.memory_stats?.stats?.cache ?? 0);
+ const memoryCacheBytes = $derived(stats?.memory_stats?.stats?.file ?? stats?.memory_stats?.stats?.['cache'] ?? 0);
const memoryActiveBytes = $derived(stats?.memory_stats?.stats?.active_anon || 0);
const memoryInactiveBytes = $derived(stats?.memory_stats?.stats?.inactive_anon || 0);
</script>
diff --git a/frontend/src/routes/(app)/containers/components/container-detail-stats-sync.svelte b/frontend/src/routes/(app)/containers/components/container-detail-stats-sync.svelte
index e150cd261..73e1b91f4 100644
--- a/frontend/src/routes/(app)/containers/components/container-detail-stats-sync.svelte
+++ b/frontend/src/routes/(app)/containers/components/container-detail-stats-sync.svelte
@@ -17,6 +17,9 @@
hasInitialStatsLoaded?: boolean;
} = $props();
+ void stats;
+ void hasInitialStatsLoaded;
+
let statsWebSocket: ReconnectingWebSocket<ContainerStatsType> | null = null;
let isConnecting = false;
diff --git a/frontend/src/routes/(app)/containers/container-table.actions.ts b/frontend/src/routes/(app)/containers/container-table.actions.ts
index 72d024ead..9d9ac86ee 100644
--- a/frontend/src/routes/(app)/containers/container-table.actions.ts
+++ b/frontend/src/routes/(app)/containers/container-table.actions.ts
@@ -126,8 +126,8 @@ export function createContainerActions({
label: m.common_remove(),
destructive: true,
action: async (checkboxStates) => {
- const force = !!checkboxStates.force;
- const volumes = !!checkboxStates.volumes;
+ const force = !!checkboxStates['force'];
+ const volumes = !!checkboxStates['volumes'];
actionStatus[id] = 'removing';
handleApiResultWithCallbacks({
result: await tryCatch(containerService.deleteContainer(id, { force, volumes })),
@@ -304,8 +304,8 @@ export function createContainerActions({
label: m.common_remove(),
destructive: true,
action: async (checkboxStates) => {
- const force = !!checkboxStates.force;
- const volumes = !!checkboxStates.volumes;
+ const force = !!checkboxStates['force'];
+ const volumes = !!checkboxStates['volumes'];
isBulkLoading.remove = true;
const results = await Promise.allSettled(ids.map((id) => containerService.deleteContainer(id, { force, volumes })));
diff --git a/frontend/src/routes/(app)/containers/container-table.helpers.ts b/frontend/src/routes/(app)/containers/container-table.helpers.ts
index e17387b5d..58cfbb55a 100644
--- a/frontend/src/routes/(app)/containers/container-table.helpers.ts
+++ b/frontend/src/routes/(app)/containers/container-table.helpers.ts
@@ -20,8 +20,9 @@ export function parseImageRef(imageRef: string): { repo: string; tag: string } {
}
export function getContainerDisplayName(container: ContainerSummaryDto): string {
- if (container.names && container.names.length > 0) {
- return container.names[0].replace(/^\//, '');
+ const first = container.names?.[0];
+ if (first) {
+ return first.replace(/^\//, '');
}
return container.id.substring(0, 12);
}
diff --git a/frontend/src/routes/(app)/containers/container-table.svelte b/frontend/src/routes/(app)/containers/container-table.svelte
index 5864992b3..b28f0b4a2 100644
--- a/frontend/src/routes/(app)/containers/container-table.svelte
+++ b/frontend/src/routes/(app)/containers/container-table.svelte
@@ -110,7 +110,7 @@
}
function setShowInternal(value: boolean) {
- const currentSetting = (customSettings.showInternalContainers as boolean) ?? false;
+ const currentSetting = (customSettings['showInternalContainers'] as boolean) ?? false;
const currentRequest = requestOptions?.includeInternal ?? false;
if (value === currentSetting && value === currentRequest) return;
@@ -155,10 +155,10 @@
let mobileFieldVisibility = $state<Record<string, boolean>>({});
let customSettings = $state<Record<string, unknown>>({});
let showInternal = $derived.by(() => {
- return (customSettings.showInternalContainers as boolean) ?? false;
+ return (customSettings['showInternalContainers'] as boolean) ?? false;
});
let hideExposedPorts = $derived.by(() => {
- return (customSettings.hideExposedPorts as boolean) ?? false;
+ return (customSettings['hideExposedPorts'] as boolean) ?? false;
});
let collapsedGroupsState = $state<PersistedState<Record<string, boolean>> | null>(null);
let collapsedGroups = $derived(collapsedGroupsState?.current ?? {});
@@ -171,8 +171,8 @@
);
const shouldConnect = $derived.by(() => {
- const cpuVisible = columnVisibility.cpuUsage !== false;
- const memoryVisible = columnVisibility.memoryUsage !== false;
+ const cpuVisible = columnVisibility['cpuUsage'] !== false;
+ const memoryVisible = columnVisibility['memoryUsage'] !== false;
const statsVisible = cpuVisible || memoryVisible;
if (!statsVisible) {
@@ -188,13 +188,13 @@
onMount(() => {
collapsedGroupsState = new PersistedState<Record<string, boolean>>('container-groups-collapsed', {});
- const persistedInternal = (customSettings.showInternalContainers as boolean) ?? false;
+ const persistedInternal = (customSettings['showInternalContainers'] as boolean) ?? false;
const currentInternal = requestOptions?.includeInternal ?? false;
if (persistedInternal !== currentInternal) {
setShowInternal(persistedInternal);
}
- const persistedGroupByProject = (customSettings.groupByProject as boolean) ?? false;
+ const persistedGroupByProject = (customSettings['groupByProject'] as boolean) ?? false;
if (persistedGroupByProject !== groupByProject) {
groupByProject = persistedGroupByProject;
}
@@ -473,10 +473,10 @@
};
}}
title={(item) => getContainerDisplayName(item)}
- subtitle={(item) => ((mobileFieldVisibility.id ?? true) ? (item.id.length > 12 ? item.id : null) : null)}
+ subtitle={(item) => ((mobileFieldVisibility['id'] ?? true) ? (item.id.length > 12 ? item.id : null) : null)}
badges={[
(item) =>
- (mobileFieldVisibility.state ?? true)
+ (mobileFieldVisibility['state'] ?? true)
? {
variant: getStateBadgeVariant(item.state),
text: capitalizeFirstLetter(item.state)
@@ -489,14 +489,14 @@
getValue: (item: ContainerSummaryDto) => item.image,
icon: ImagesIcon,
iconVariant: 'blue' as const,
- show: mobileFieldVisibility.image ?? true
+ show: mobileFieldVisibility['image'] ?? true
},
{
label: m.common_status(),
getValue: (item: ContainerSummaryDto) => item.status,
icon: ClockIcon,
iconVariant: 'purple' as const,
- show: (mobileFieldVisibility.status ?? true) && item.status !== undefined
+ show: (mobileFieldVisibility['status'] ?? true) && item.status !== undefined
},
{
label: m.containers_ip_address(),
@@ -504,7 +504,7 @@
icon: NetworksIcon,
iconVariant: 'sky' as const,
type: 'mono' as const,
- show: mobileFieldVisibility.ipAddress ?? false
+ show: mobileFieldVisibility['ipAddress'] ?? false
},
{
label: m.containers_cpu_usage(),
@@ -516,7 +516,7 @@
},
icon: ClockIcon,
iconVariant: 'orange' as const,
- show: mobileFieldVisibility.cpuUsage ?? false
+ show: mobileFieldVisibility['cpuUsage'] ?? false
},
{
label: m.containers_memory_usage(),
@@ -528,10 +528,10 @@
},
icon: ClockIcon,
iconVariant: 'purple' as const,
- show: mobileFieldVisibility.memoryUsage ?? false
+ show: mobileFieldVisibility['memoryUsage'] ?? false
}
]}
- footer={(mobileFieldVisibility.created ?? true)
+ footer={(mobileFieldVisibility['created'] ?? true)
? {
label: m.common_created(),
getValue: (item) => format(new Date(item.created * 1000), 'PP p'),
@@ -541,9 +541,9 @@
rowActions={RowActions}
onclick={(item: ContainerSummaryDto) => goto(`/containers/${item.id}`)}
>
- {#if ((mobileFieldVisibility.ports ?? true) && item.ports && item.ports.length > 0) || (mobileFieldVisibility.updates ?? true)}
+ {#if ((mobileFieldVisibility['ports'] ?? true) && item.ports && item.ports.length > 0) || (mobileFieldVisibility['updates'] ?? true)}
<div class="flex flex-row gap-4 border-t pt-3">
- {#if (mobileFieldVisibility.ports ?? true) && item.ports && item.ports.length > 0}
+ {#if (mobileFieldVisibility['ports'] ?? true) && item.ports && item.ports.length > 0}
<div class="flex min-w-0 flex-1 items-start gap-2.5">
<div class="flex size-7 shrink-0 items-center justify-center rounded-lg bg-sky-500/10">
<NetworksIcon class="size-3.5 text-sky-500" />
@@ -558,7 +558,7 @@
</div>
</div>
{/if}
- {#if mobileFieldVisibility.updates ?? true}
+ {#if mobileFieldVisibility['updates'] ?? true}
{@const imageRef = parseImageRef(item.image)}
<div class="flex min-w-0 flex-1 items-start gap-2.5">
<div class="flex min-w-0 flex-col">
@@ -710,19 +710,17 @@
/>
{#snippet CustomViewOptions()}
- <DropdownMenu.CheckboxItem bind:checked={() => groupByProject, (v) => setGroupByProject(!!v)}>
+ <DropdownMenu.CheckboxItem checked={groupByProject} onCheckedChange={(v) => setGroupByProject(!!v)}>
{m.containers_group_by_project()}
</DropdownMenu.CheckboxItem>
- <DropdownMenu.CheckboxItem bind:checked={() => showInternal, (v) => setShowInternal(!!v)}>
+ <DropdownMenu.CheckboxItem checked={showInternal} onCheckedChange={(v) => setShowInternal(!!v)}>
{`${m.common_show()} ${m.internal()} ${m.containers_title()}`}
</DropdownMenu.CheckboxItem>
<DropdownMenu.CheckboxItem
- bind:checked={
- () => hideExposedPorts,
- (v) => {
- customSettings = { ...customSettings, hideExposedPorts: !!v };
- }
- }
+ checked={hideExposedPorts}
+ onCheckedChange={(v) => {
+ customSettings = { ...customSettings, hideExposedPorts: !!v };
+ }}
>
{m.containers_hide_unexposed_ports()}
</DropdownMenu.CheckboxItem>
diff --git a/frontend/src/routes/(app)/customize/+page.svelte b/frontend/src/routes/(app)/customize/+page.svelte
index efa6d98be..c0e7911c1 100644
--- a/frontend/src/routes/(app)/customize/+page.svelte
+++ b/frontend/src/routes/(app)/customize/+page.svelte
@@ -22,7 +22,7 @@
} from '$lib/icons';
import HeaderCard from '$lib/components/header-card.svelte';
- let { data } = $props();
+ let {}: PageProps = $props();
let searchQuery = $state('');
let showSearchResults = $state(false);
let searchResults = $state<CustomizeCategory[]>([]);
@@ -59,7 +59,7 @@
return [...orderedCategories, ...unmatchedCategories];
}
- async function performSearch(query: string, immediate = false) {
+ async function performSearch(query: string) {
const trimmedQuery = query.trim();
if (!trimmedQuery) {
@@ -91,7 +91,7 @@
}
const debouncedSearch = debounced((query: string) => {
- void performSearch(query, false);
+ void performSearch(query);
}, 300);
function navigateToCategory(categoryUrl: string) {
@@ -141,7 +141,7 @@
}}
onkeydown={(e) => {
if (e.key === 'Enter') {
- performSearch((e.currentTarget as HTMLInputElement).value, true);
+ performSearch((e.currentTarget as HTMLInputElement).value);
}
}}
/>
diff --git a/frontend/src/routes/(app)/customize/git-repositories/repository-table.svelte b/frontend/src/routes/(app)/customize/git-repositories/repository-table.svelte
index 2b309c7e5..c12151a6c 100644
--- a/frontend/src/routes/(app)/customize/git-repositories/repository-table.svelte
+++ b/frontend/src/routes/(app)/customize/git-repositories/repository-table.svelte
@@ -225,7 +225,7 @@
{item}
icon={{ component: GitBranchIcon, variant: 'blue' as const }}
title={(item) => item.name}
- subtitle={(item) => ((mobileFieldVisibility.id ?? false) ? item.id : item.url)}
+ subtitle={(item) => ((mobileFieldVisibility['id'] ?? false) ? item.id : item.url)}
badges={[{ variant: 'blue' as const, text: m.resource_repository_cap() }]}
fields={[
{
@@ -233,14 +233,14 @@
getValue: (item: GitRepository) => item.url,
icon: LinkIcon,
iconVariant: 'gray' as const,
- show: mobileFieldVisibility.url ?? true
+ show: mobileFieldVisibility['url'] ?? true
},
{
label: m.git_repository_auth_type(),
getValue: (item: GitRepository) => item.authType,
icon: KeyIcon,
iconVariant: 'gray' as const,
- show: mobileFieldVisibility.authType ?? true
+ show: mobileFieldVisibility['authType'] ?? true
}
]}
rowActions={RowActions}
diff --git a/frontend/src/routes/(app)/customize/registries/+page.svelte b/frontend/src/routes/(app)/customize/registries/+page.svelte
index 7c492f63a..dfe31f65d 100644
--- a/frontend/src/routes/(app)/customize/registries/+page.svelte
+++ b/frontend/src/routes/(app)/customize/registries/+page.svelte
@@ -1,7 +1,5 @@
<script lang="ts">
- import * as Card from '$lib/components/ui/card/index.js';
import * as Dialog from '$lib/components/ui/dialog/index.js';
- import { InfoIcon } from '$lib/icons';
import { toast } from 'svelte-sonner';
import type { ContainerRegistry, ContainerRegistryPullUsage } from '$lib/types/container-registry.type';
import type { ContainerRegistryCreateDto, ContainerRegistryUpdateDto } from '$lib/types/container-registry.type';
diff --git a/frontend/src/routes/(app)/customize/registries/registry-table.svelte b/frontend/src/routes/(app)/customize/registries/registry-table.svelte
index 542422a58..57f72089a 100644
--- a/frontend/src/routes/(app)/customize/registries/registry-table.svelte
+++ b/frontend/src/routes/(app)/customize/registries/registry-table.svelte
@@ -250,7 +250,7 @@
{item}
icon={{ component: RegistryIcon, variant: 'purple' as const }}
title={(item) => item.url}
- subtitle={(item) => ((mobileFieldVisibility.id ?? true) ? item.id : null)}
+ subtitle={(item) => ((mobileFieldVisibility['id'] ?? true) ? item.id : null)}
badges={[{ variant: 'purple' as const, text: m.common_registry() }]}
fields={[
{
@@ -260,7 +260,7 @@
icon: UserIcon,
iconVariant: 'gray' as const,
show:
- (mobileFieldVisibility.username ?? true) &&
+ (mobileFieldVisibility['username'] ?? true) &&
(item.registryType === 'ecr' ? !!item.awsAccessKeyId : item.username !== undefined)
},
{
@@ -268,14 +268,14 @@
getValue: (item: ContainerRegistry) => item.description,
icon: ExternalLinkIcon,
iconVariant: 'gray' as const,
- show: (mobileFieldVisibility.description ?? true) && item.description !== undefined
+ show: (mobileFieldVisibility['description'] ?? true) && item.description !== undefined
},
{
label: m.registries_pull_usage(),
getValue: (item: ContainerRegistry) => formatPullUsage(item),
icon: RegistryIcon,
iconVariant: 'gray' as const,
- show: mobileFieldVisibility.pullUsage ?? true
+ show: mobileFieldVisibility['pullUsage'] ?? true
}
]}
rowActions={RowActions}
diff --git a/frontend/src/routes/(app)/customize/templates/[id]/+page.svelte b/frontend/src/routes/(app)/customize/templates/[id]/+page.svelte
index c9d10d647..3f216513f 100644
--- a/frontend/src/routes/(app)/customize/templates/[id]/+page.svelte
+++ b/frontend/src/routes/(app)/customize/templates/[id]/+page.svelte
@@ -17,7 +17,6 @@
import { ComposeEditorSplit } from '$lib/components/compose';
import { z } from 'zod/v4';
import {
- TrashIcon,
ArrowLeftIcon,
ProjectsIcon,
CodeIcon,
diff --git a/frontend/src/routes/(app)/customize/templates/components/RegistryManager.svelte b/frontend/src/routes/(app)/customize/templates/components/RegistryManager.svelte
index 4b295fc22..223ae555a 100644
--- a/frontend/src/routes/(app)/customize/templates/components/RegistryManager.svelte
+++ b/frontend/src/routes/(app)/customize/templates/components/RegistryManager.svelte
@@ -7,7 +7,7 @@
import { Snippet } from '$lib/components/ui/snippet';
import { m } from '$lib/paraglide/messages';
import type { TemplateRegistry } from '$lib/types/template.type';
- import { TrashIcon, RegistryIcon, CommunityIcon, RefreshIcon, ExternalLinkIcon, AddIcon, AlertTriangleIcon } from '$lib/icons';
+ import { RegistryIcon, CommunityIcon, ExternalLinkIcon, AlertTriangleIcon } from '$lib/icons';
let {
registries,
diff --git a/frontend/src/routes/(app)/customize/templates/default/+page.svelte b/frontend/src/routes/(app)/customize/templates/default/+page.svelte
index c964d625e..eff795830 100644
--- a/frontend/src/routes/(app)/customize/templates/default/+page.svelte
+++ b/frontend/src/routes/(app)/customize/templates/default/+page.svelte
@@ -14,7 +14,7 @@
import { ComposeEditorSplit } from '$lib/components/compose';
import { untrack } from 'svelte';
import type { Template } from '$lib/types/template.type';
- import { ArrowLeftIcon, CodeIcon, VariableIcon, SaveIcon } from '$lib/icons';
+ import { ArrowLeftIcon, CodeIcon, VariableIcon } from '$lib/icons';
let { data } = $props();
diff --git a/frontend/src/routes/(app)/customize/templates/template-table.svelte b/frontend/src/routes/(app)/customize/templates/template-table.svelte
index 21d6c4a93..73a00f76f 100644
--- a/frontend/src/routes/(app)/customize/templates/template-table.svelte
+++ b/frontend/src/routes/(app)/customize/templates/template-table.svelte
@@ -129,7 +129,7 @@
collapsedGroupsState = new PersistedState<Record<string, boolean>>('template-groups-collapsed', {});
});
- let groupByRegistry = $derived((customSettings.groupByRegistry as boolean) ?? false);
+ let groupByRegistry = $derived((customSettings['groupByRegistry'] as boolean) ?? false);
function toggleGroup(groupName: string) {
if (!collapsedGroupsState) return;
@@ -227,10 +227,10 @@
alt: item.name
})}
title={(item) => item.name}
- subtitle={(item) => ((mobileFieldVisibility.description ?? true) ? item.description : null)}
+ subtitle={(item) => ((mobileFieldVisibility['description'] ?? true) ? item.description : null)}
badges={[
(item) =>
- (mobileFieldVisibility.type ?? true)
+ (mobileFieldVisibility['type'] ?? true)
? {
variant: item.isRemote ? 'green' : 'blue',
text: item.isRemote ? m.templates_remote() : m.templates_local()
@@ -242,7 +242,7 @@
onclick={(item: Template) => goto(`/customize/templates/${item.id}`)}
>
{#snippet children()}
- {#if (mobileFieldVisibility.tags ?? true) && item.metadata?.tags && item.metadata.tags.length > 0}
+ {#if (mobileFieldVisibility['tags'] ?? true) && item.metadata?.tags && item.metadata.tags.length > 0}
<div class="flex items-start gap-2.5 border-t pt-3">
<div class="flex size-7 shrink-0 items-center justify-center rounded-lg bg-purple-500/10">
<TagIcon class="size-3.5 text-purple-500" />
@@ -340,7 +340,8 @@
{#snippet CustomViewOptions()}
<DropdownMenu.CheckboxItem
- bind:checked={() => groupByRegistry, (v) => (customSettings = { ...customSettings, groupByRegistry: !!v })}
+ checked={groupByRegistry}
+ onCheckedChange={(v) => (customSettings = { ...customSettings, groupByRegistry: !!v })}
>
{m.templates_group_by_registry()}
</DropdownMenu.CheckboxItem>
diff --git a/frontend/src/routes/(app)/customize/variables/+page.svelte b/frontend/src/routes/(app)/customize/variables/+page.svelte
index 6612e338a..9740bd908 100644
--- a/frontend/src/routes/(app)/customize/variables/+page.svelte
+++ b/frontend/src/routes/(app)/customize/variables/+page.svelte
@@ -10,7 +10,7 @@
import type { Variable } from '$lib/types/variable.type';
import { untrack } from 'svelte';
import { m } from '$lib/paraglide/messages';
- import { AddIcon, SearchIcon, CloseIcon, AlertIcon, VariableIcon, CopyIcon } from '$lib/icons';
+ import { SearchIcon, CloseIcon, AlertIcon, VariableIcon } from '$lib/icons';
let { data } = $props();
let envVars = $state<Variable[]>(untrack(() => [...data.variables]));
@@ -54,33 +54,6 @@
envVars = envVars.filter((_, i) => i !== index);
}
- function duplicateEnvVar(index: number) {
- const varToDuplicate = envVars[index];
- let baseKey = varToDuplicate.key;
- let counter = 1;
-
- // Check if key already ends with _# pattern
- const match = baseKey.match(/^(.+)_(\d+)$/);
- if (match) {
- baseKey = match[1];
- counter = parseInt(match[2], 10) + 1;
- }
-
- let newKey = `${baseKey}_${counter}`;
-
- // Find next available number
- while (envVars.some((v) => v.key === newKey)) {
- counter++;
- newKey = `${baseKey}_${counter}`;
- }
-
- const newVar = {
- key: newKey,
- value: varToDuplicate.value
- };
- envVars = [...envVars.slice(0, index + 1), newVar, ...envVars.slice(index + 1)];
- }
-
async function onSubmit() {
isLoading = true;
@@ -118,7 +91,7 @@
searchQuery = '';
}
- function handleKeyDown(event: KeyboardEvent, index: number) {
+ function handleKeyDown(event: KeyboardEvent) {
if (event.key === 'Enter') {
event.preventDefault();
addEnvVar();
@@ -233,7 +206,7 @@
bind:value={envVar.key}
disabled={isLoading}
class="font-mono text-sm"
- onkeydown={(e) => handleKeyDown(e, actualIndex)}
+ onkeydown={(e) => handleKeyDown(e)}
oninput={(e) => {
const target = e.target as HTMLInputElement;
const cursorPos = target.selectionStart || 0;
@@ -257,7 +230,7 @@
bind:value={envVar.value}
disabled={isLoading}
class="font-mono text-sm"
- onkeydown={(e) => handleKeyDown(e, actualIndex)}
+ onkeydown={(e) => handleKeyDown(e)}
/>
<InputGroup.Addon align="inline-end">
<CopyButton text={envVar.value} variant="ghost" tabindex={-1} />
diff --git a/frontend/src/routes/(app)/dashboard/+page.svelte b/frontend/src/routes/(app)/dashboard/+page.svelte
index 0baa126fa..4c4626051 100644
--- a/frontend/src/routes/(app)/dashboard/+page.svelte
+++ b/frontend/src/routes/(app)/dashboard/+page.svelte
@@ -22,7 +22,6 @@
import DashboardContainerTable from './dash-container-table.svelte';
import DashboardImageTable from './dash-image-table.svelte';
import DashboardAllEnvironmentsView from './dashboard-all-environments-view.svelte';
- import type { PageData } from './$types';
import { m } from '$lib/paraglide/messages';
import { goto, invalidateAll } from '$app/navigation';
import { systemService } from '$lib/services/system-service';
@@ -45,7 +44,7 @@
CheckIcon
} from '$lib/icons';
- let { data }: { data: PageData } = $props();
+ let { data }: PageProps = $props();
const emptyDashboard: DashboardSnapshot = {
containers: {
data: [],
@@ -656,9 +655,7 @@
</div>
</section>
- {#if dockerInfoDialogOpen}
- <DockerInfoDialog bind:open={dockerInfoDialogOpen} {dockerInfo} {dockerInfoPromise} errorMessage={dockerInfoError} />
- {/if}
+ <DockerInfoDialog bind:open={dockerInfoDialogOpen} {dockerInfo} {dockerInfoPromise} errorMessage={dockerInfoError} />
<PruneConfirmationDialog
bind:open={isPruneDialogOpen}
diff --git a/frontend/src/routes/(app)/dashboard/dash-container-table.svelte b/frontend/src/routes/(app)/dashboard/dash-container-table.svelte
index dab43748d..9fd0931e4 100644
--- a/frontend/src/routes/(app)/dashboard/dash-container-table.svelte
+++ b/frontend/src/routes/(app)/dashboard/dash-container-table.svelte
@@ -12,6 +12,7 @@
import { m } from '$lib/paraglide/messages';
import { containerService } from '$lib/services/container-service';
import { goto } from '$app/navigation';
+ import { untrack } from 'svelte';
import { IsMobile } from '$lib/hooks';
import { ContainersIcon, ArrowRightIcon } from '$lib/icons';
import IconImage from '$lib/components/icon-image.svelte';
@@ -63,28 +64,29 @@
}
function updateRequestLimit(limit: number) {
+ const currentOptions = untrack(() => requestOptions);
+ if (currentOptions.pagination?.limit === limit) return;
+
requestOptions = {
- ...requestOptions,
+ ...currentOptions,
pagination: {
- page: requestOptions.pagination?.page ?? 1,
+ page: currentOptions.pagination?.page ?? 1,
limit
}
};
}
- function handleLayoutChange(height: number) {
- lastMeasuredHeight = height;
- const nextLimit = calculateLimitForHeight(height);
+ $effect(() => {
+ const nextLimit = calculateLimitForHeight(lastMeasuredHeight);
displayLimit = nextLimit;
updateRequestLimit(nextLimit);
- }
+ });
async function refreshContainers(options: SearchPaginationSortRequest) {
requestOptions = options;
const result = await containerService.getContainers(options);
containers = result;
displayLimit = result.pagination?.itemsPerPage ?? displayLimit;
- handleLayoutChange(lastMeasuredHeight);
return result;
}
@@ -97,12 +99,8 @@
</script>
{#snippet NameCell({ item }: { item: ContainerSummaryDto })}
- {@const displayName =
- item.names && item.names.length > 0
- ? item.names[0].startsWith('/')
- ? item.names[0].substring(1)
- : item.names[0]
- : item.id.substring(0, 12)}
+ {@const firstName = item.names?.[0] ?? ''}
+ {@const displayName = firstName ? (firstName.startsWith('/') ? firstName.substring(1) : firstName) : item.id.substring(0, 12)}
{@const iconUrl = getArcaneIconUrlFromLabels(item.labels)}
<div class="flex items-center gap-2">
<IconImage src={iconUrl} alt={displayName} fallback={ContainersIcon} class="size-4" containerClass="size-7" />
@@ -114,7 +112,7 @@
<StatusBadge variant={getStatusVariant(item.state)} text={capitalizeFirstLetter(item.state)} />
{/snippet}
-{#snippet DashContainerMobileCard({ row, item }: { row: any; item: ContainerSummaryDto })}
+{#snippet DashContainerMobileCard({ item }: { item: ContainerSummaryDto })}
<UniversalMobileCard
{item}
icon={(item) => {
@@ -128,8 +126,9 @@
};
}}
title={(item) => {
- if (item.names && item.names.length > 0) {
- return item.names[0].startsWith('/') ? item.names[0].substring(1) : item.names[0];
+ const first = item.names?.[0];
+ if (first) {
+ return first.startsWith('/') ? first.substring(1) : first;
}
return item.id.substring(0, 12);
}}
@@ -151,10 +150,7 @@
/>
{/snippet}
-<div
- class="flex flex-col lg:h-full lg:min-h-0"
- bind:clientHeight={() => lastMeasuredHeight, (value) => handleLayoutChange(value)}
->
+<div class="flex flex-col lg:h-full lg:min-h-0" bind:clientHeight={lastMeasuredHeight}>
<Card.Root class="flex flex-col lg:h-full lg:min-h-0">
<Card.Header icon={ContainersIcon} class="shrink-0">
<div class="flex flex-1 items-center justify-between">
diff --git a/frontend/src/routes/(app)/dashboard/dash-image-table.svelte b/frontend/src/routes/(app)/dashboard/dash-image-table.svelte
index cbec4a16c..90f161770 100644
--- a/frontend/src/routes/(app)/dashboard/dash-image-table.svelte
+++ b/frontend/src/routes/(app)/dashboard/dash-image-table.svelte
@@ -11,6 +11,7 @@
import { m } from '$lib/paraglide/messages';
import { imageService } from '$lib/services/image-service';
import { goto } from '$app/navigation';
+ import { untrack } from 'svelte';
import { IsMobile } from '$lib/hooks';
import { ImagesIcon, ArrowRightIcon } from '$lib/icons';
@@ -61,28 +62,29 @@
}
function updateRequestLimit(limit: number) {
+ const currentOptions = untrack(() => requestOptions);
+ if (currentOptions.pagination?.limit === limit) return;
+
requestOptions = {
- ...requestOptions,
+ ...currentOptions,
pagination: {
- page: requestOptions.pagination?.page ?? 1,
+ page: currentOptions.pagination?.page ?? 1,
limit
}
};
}
- function handleLayoutChange(height: number) {
- lastMeasuredHeight = height;
- const nextLimit = calculateLimitForHeight(height);
+ $effect(() => {
+ const nextLimit = calculateLimitForHeight(lastMeasuredHeight);
displayLimit = nextLimit;
updateRequestLimit(nextLimit);
- }
+ });
async function refreshImages(options: SearchPaginationSortRequest) {
requestOptions = options;
const result = await imageService.getImages(options);
images = result;
displayLimit = result.pagination?.itemsPerPage ?? displayLimit;
- handleLayoutChange(lastMeasuredHeight);
return result;
}
@@ -128,7 +130,7 @@
{bytes.format(item.size)}
{/snippet}
-{#snippet DashImageMobileCard({ row, item }: { row: any; item: ImageSummaryDto })}
+{#snippet DashImageMobileCard({ item }: { item: ImageSummaryDto })}
<UniversalMobileCard
{item}
icon={(item: ImageSummaryDto) => ({
@@ -156,10 +158,7 @@
/>
{/snippet}
-<div
- class="flex flex-col lg:h-full lg:min-h-0"
- bind:clientHeight={() => lastMeasuredHeight, (value) => handleLayoutChange(value)}
->
+<div class="flex flex-col lg:h-full lg:min-h-0" bind:clientHeight={lastMeasuredHeight}>
<Card.Root class="flex flex-col lg:h-full lg:min-h-0">
<Card.Header icon={ImagesIcon} class="shrink-0">
<div class="flex flex-1 items-center justify-between">
diff --git a/frontend/src/routes/(app)/dashboard/dashboard-all-environments-view.svelte b/frontend/src/routes/(app)/dashboard/dashboard-all-environments-view.svelte
index 73e9ce6e5..6a9736e55 100644
--- a/frontend/src/routes/(app)/dashboard/dashboard-all-environments-view.svelte
+++ b/frontend/src/routes/(app)/dashboard/dashboard-all-environments-view.svelte
@@ -74,19 +74,6 @@
let upgradeDialogOpenById = $state<Record<string, boolean>>({});
let upgradeDialogUpgradingById = $state<Record<string, boolean>>({});
- function getUpgradeOpen(id: string): boolean {
- return upgradeDialogOpenById[id] ?? false;
- }
- function setUpgradeOpen(id: string, value: boolean): void {
- upgradeDialogOpenById[id] = value;
- }
- function getUpgradeUpgrading(id: string): boolean {
- return upgradeDialogUpgradingById[id] ?? false;
- }
- function setUpgradeUpgrading(id: string, value: boolean): void {
- upgradeDialogUpgradingById[id] = value;
- }
-
const storeUser = fromStore(userStore);
const availableEnvironments = $derived(environmentStore.available);
const currentEnvironmentId = $derived(environmentStore.selected?.id ?? null);
@@ -795,10 +782,8 @@
debug={debugUpgrade}
onRefreshRequested={refreshOverview}
render="trigger"
- bind:open={() => getUpgradeOpen(environment.id), (v) => setUpgradeOpen(environment.id, v)}
- bind:upgrading={
- () => getUpgradeUpgrading(environment.id), (v) => setUpgradeUpgrading(environment.id, v)
- }
+ bind:open={upgradeDialogOpenById[environment.id]}
+ bind:upgrading={upgradeDialogUpgradingById[environment.id]}
/>
</ArcaneTooltip.Content>
</ArcaneTooltip.Root>
@@ -818,10 +803,8 @@
debug={debugUpgrade}
onRefreshRequested={refreshOverview}
render="dialog"
- bind:open={() => getUpgradeOpen(environment.id), (v) => setUpgradeOpen(environment.id, v)}
- bind:upgrading={
- () => getUpgradeUpgrading(environment.id), (v) => setUpgradeUpgrading(environment.id, v)
- }
+ bind:open={upgradeDialogOpenById[environment.id]}
+ bind:upgrading={upgradeDialogUpgradingById[environment.id]}
/>
{/if}
{/if}
diff --git a/frontend/src/routes/(app)/environments/[id]/+page.svelte b/frontend/src/routes/(app)/environments/[id]/+page.svelte
index d39538be5..a2479419c 100644
--- a/frontend/src/routes/(app)/environments/[id]/+page.svelte
+++ b/frontend/src/routes/(app)/environments/[id]/+page.svelte
@@ -1,6 +1,5 @@
<script lang="ts">
import { onMount } from 'svelte';
- import { z } from 'zod/v4';
import * as Tabs from '$lib/components/ui/tabs/index.js';
import { TabBar, type TabItem } from '$lib/components/tab-bar';
import { ActionButtonGroup, type ActionButton } from '$lib/components/action-button-group/index.js';
@@ -26,6 +25,7 @@
import GeneralTab from './components/GeneralTab.svelte';
import DockerTab from './components/DockerTab.svelte';
import JobsTab from './components/JobsTab.svelte';
+ import { environmentFormSchema, type EnvironmentFormValues } from './components/environment-form-schema';
import TrivySecuritySettings from '$lib/components/settings/trivy-security-settings.svelte';
import {
ArrowLeftIcon,
@@ -203,53 +203,7 @@
activeTab = value;
}
- // Form schema combining environment info and settings
- const formSchema = z.object({
- // Environment basic info
- name: z.string().min(1),
- enabled: z.boolean(),
- apiUrl: z.string(),
- // Settings
- pollingEnabled: z.boolean(),
- autoUpdate: z.boolean(),
- autoInjectEnv: z.boolean(),
- followProjectSymlinks: z.boolean(),
- defaultDeployPullPolicy: z.enum(['missing', 'always', 'never']),
- defaultShell: z.string(),
- projectsDirectory: z.string(),
- swarmStackSourcesDirectory: z.string(),
- diskUsagePath: z.string(),
- maxImageUploadSize: z.coerce.number(),
- gitSyncMaxFiles: z.coerce.number().int().nonnegative(),
- gitSyncMaxTotalSizeMb: z.coerce.number().int().nonnegative(),
- gitSyncMaxBinarySizeMb: z.coerce.number().int().nonnegative(),
- baseServerUrl: z.string(),
- scheduledPruneEnabled: z.boolean(),
- pruneContainerMode: z.enum(['none', 'stopped', 'olderThan']),
- pruneContainerUntil: z.string(),
- pruneImageMode: z.enum(['none', 'dangling', 'all', 'olderThan']),
- pruneImageUntil: z.string(),
- pruneVolumeMode: z.enum(['none', 'anonymous', 'all']),
- pruneNetworkMode: z.enum(['none', 'unused', 'olderThan']),
- pruneNetworkUntil: z.string(),
- pruneBuildCacheMode: z.enum(['none', 'unused', 'all', 'olderThan']),
- pruneBuildCacheUntil: z.string(),
- vulnerabilityScanEnabled: z.boolean(),
- trivyImage: z.string(),
- trivyNetwork: z.string(),
- trivySecurityOpts: z.string(),
- trivyPrivileged: z.boolean(),
- trivyPreserveCacheOnVolumePrune: z.boolean(),
- trivyResourceLimitsEnabled: z.boolean(),
- trivyCpuLimit: z.coerce.number().int(m.security_session_timeout_integer()).nonnegative(),
- trivyMemoryLimitMb: z.coerce.number().int().nonnegative(),
- trivyConcurrentScanContainers: z.coerce.number().int().min(1, m.security_trivy_concurrent_scan_containers_min()),
- autoUpdateExcludedContainers: z.string().optional(),
- autoHealEnabled: z.boolean(),
- autoHealExcludedContainers: z.string(),
- autoHealMaxRestarts: z.coerce.number().int().min(1),
- autoHealRestartWindow: z.coerce.number().int().min(1)
- });
+ const formSchema = environmentFormSchema;
// Build current settings object from environment and settings data
const currentSettings = $derived({
@@ -298,7 +252,7 @@
});
// Custom save handler for environment-specific settings
- async function saveEnvironmentSettings(formData: z.infer<typeof formSchema>) {
+ async function saveEnvironmentSettings(formData: EnvironmentFormValues) {
// Update environment basic info
await environmentManagementService.update(environment.id, {
name: formData.name,
@@ -365,7 +319,7 @@
}
}
- let { formInputs, settingsForm, resetForm, onSubmit, registerOnMount } = $derived(
+ let { formInputs, settingsForm, resetForm, onSubmit } = $derived(
createSettingsForm({
schema: formSchema,
currentSettings,
diff --git a/frontend/src/routes/(app)/environments/[id]/components/DetailsTab.svelte b/frontend/src/routes/(app)/environments/[id]/components/DetailsTab.svelte
index 6cb0b5cc4..0e30d9dda 100644
--- a/frontend/src/routes/(app)/environments/[id]/components/DetailsTab.svelte
+++ b/frontend/src/routes/(app)/environments/[id]/components/DetailsTab.svelte
@@ -10,6 +10,7 @@
import { Spinner } from '$lib/components/ui/spinner/index.js';
import { m } from '$lib/paraglide/messages';
import { EnvironmentsIcon, TestIcon } from '$lib/icons';
+ import type { DetailsTabProps } from './tab-props';
let {
environment,
@@ -20,7 +21,7 @@
versionInformation,
isTestingConnection,
testConnection
- } = $props();
+ }: DetailsTabProps = $props();
let transportBadge = $derived.by((): { text: string; variant: 'blue' | 'purple' | 'gray' } => {
if (!environment.isEdge) {
diff --git a/frontend/src/routes/(app)/environments/[id]/components/DockerTab.svelte b/frontend/src/routes/(app)/environments/[id]/components/DockerTab.svelte
index dd128aba9..bbb553691 100644
--- a/frontend/src/routes/(app)/environments/[id]/components/DockerTab.svelte
+++ b/frontend/src/routes/(app)/environments/[id]/components/DockerTab.svelte
@@ -7,8 +7,9 @@
import PruneModeCard from '$lib/components/prune/prune-mode-card.svelte';
import { m } from '$lib/paraglide/messages';
import { DockerBrandIcon } from '$lib/icons';
+ import type { DockerTabProps } from './tab-props';
- let { formInputs, shellSelectValue, handleShellSelectChange, shellOptions } = $props();
+ let { formInputs, shellSelectValue, handleShellSelectChange, shellOptions }: DockerTabProps = $props();
const deployPullPolicyOptions = [
{ value: 'missing', label: 'Missing', description: m.deploy_pull_policy_missing() },
diff --git a/frontend/src/routes/(app)/environments/[id]/components/GeneralTab.svelte b/frontend/src/routes/(app)/environments/[id]/components/GeneralTab.svelte
index 605d853db..e90e56fa3 100644
--- a/frontend/src/routes/(app)/environments/[id]/components/GeneralTab.svelte
+++ b/frontend/src/routes/(app)/environments/[id]/components/GeneralTab.svelte
@@ -5,8 +5,9 @@
import TextInputWithLabel from '$lib/components/form/text-input-with-label.svelte';
import { m } from '$lib/paraglide/messages';
import { SettingsIcon } from '$lib/icons';
+ import type { GeneralTabProps } from './tab-props';
- let { formInputs } = $props();
+ let { formInputs }: GeneralTabProps = $props();
</script>
<Card.Root class="flex flex-col">
diff --git a/frontend/src/routes/(app)/environments/[id]/components/JobsTab.svelte b/frontend/src/routes/(app)/environments/[id]/components/JobsTab.svelte
index 589d9b7e3..808d9df28 100644
--- a/frontend/src/routes/(app)/environments/[id]/components/JobsTab.svelte
+++ b/frontend/src/routes/(app)/environments/[id]/components/JobsTab.svelte
@@ -15,8 +15,9 @@
import { JobsIcon } from '$lib/icons';
import type { JobStatus, JobPrerequisite } from '$lib/types/job-schedule.type';
import type { ContainerSummaryDto } from '$lib/types/container.type';
+ import type { JobsTabProps } from './tab-props';
- let { formInputs, environmentId } = $props();
+ let { formInputs, environmentId }: JobsTabProps = $props();
let refreshSignal = $state(0);
@@ -65,7 +66,7 @@
);
});
- function resolveSettingsUrl(job: JobStatus, prereq: JobPrerequisite): string | undefined {
+ function resolveSettingsUrl(_job: JobStatus, prereq: JobPrerequisite): string | undefined {
if (!prereq.settingsUrl) return undefined;
if (!environmentId) return prereq.settingsUrl;
@@ -311,7 +312,7 @@
{/if}
{:catch error}
<div class="text-destructive p-2 text-sm">
- {error.message || 'Failed to load containers'}
+ {(error instanceof Error ? error.message : '') || 'Failed to load containers'}
</div>
{/await}
</div>
@@ -404,7 +405,7 @@
{/if}
{:catch error}
<div class="text-destructive p-2 text-sm">
- {error.message || 'Failed to load containers'}
+ {(error instanceof Error ? error.message : '') || 'Failed to load containers'}
</div>
{/await}
</div>
@@ -422,7 +423,7 @@
{/if}
{:catch error}
<div class="border-destructive/50 bg-destructive/10 text-destructive rounded-lg border p-4">
- {error.message || error}
+ {(error instanceof Error ? error.message : '') || String(error)}
</div>
{/await}
</Card.Content>
diff --git a/frontend/src/routes/(app)/environments/[id]/components/environment-form-schema.ts b/frontend/src/routes/(app)/environments/[id]/components/environment-form-schema.ts
new file mode 100644
index 000000000..9464d2db0
--- /dev/null
+++ b/frontend/src/routes/(app)/environments/[id]/components/environment-form-schema.ts
@@ -0,0 +1,49 @@
+import { z } from 'zod/v4';
+import { m } from '$lib/paraglide/messages';
+
+export const environmentFormSchema = z.object({
+ name: z.string().min(1),
+ enabled: z.boolean(),
+ apiUrl: z.string(),
+ pollingEnabled: z.boolean(),
+ autoUpdate: z.boolean(),
+ autoInjectEnv: z.boolean(),
+ followProjectSymlinks: z.boolean(),
+ defaultDeployPullPolicy: z.enum(['missing', 'always', 'never']),
+ defaultShell: z.string(),
+ projectsDirectory: z.string(),
+ swarmStackSourcesDirectory: z.string(),
+ diskUsagePath: z.string(),
+ maxImageUploadSize: z.coerce.number(),
+ gitSyncMaxFiles: z.coerce.number().int().nonnegative(),
+ gitSyncMaxTotalSizeMb: z.coerce.number().int().nonnegative(),
+ gitSyncMaxBinarySizeMb: z.coerce.number().int().nonnegative(),
+ baseServerUrl: z.string(),
+ scheduledPruneEnabled: z.boolean(),
+ pruneContainerMode: z.enum(['none', 'stopped', 'olderThan']),
+ pruneContainerUntil: z.string(),
+ pruneImageMode: z.enum(['none', 'dangling', 'all', 'olderThan']),
+ pruneImageUntil: z.string(),
+ pruneVolumeMode: z.enum(['none', 'anonymous', 'all']),
+ pruneNetworkMode: z.enum(['none', 'unused', 'olderThan']),
+ pruneNetworkUntil: z.string(),
+ pruneBuildCacheMode: z.enum(['none', 'unused', 'all', 'olderThan']),
+ pruneBuildCacheUntil: z.string(),
+ vulnerabilityScanEnabled: z.boolean(),
+ trivyImage: z.string(),
+ trivyNetwork: z.string(),
+ trivySecurityOpts: z.string(),
+ trivyPrivileged: z.boolean(),
+ trivyPreserveCacheOnVolumePrune: z.boolean(),
+ trivyResourceLimitsEnabled: z.boolean(),
+ trivyCpuLimit: z.coerce.number().int(m.security_session_timeout_integer()).nonnegative(),
+ trivyMemoryLimitMb: z.coerce.number().int().nonnegative(),
+ trivyConcurrentScanContainers: z.coerce.number().int().min(1, m.security_trivy_concurrent_scan_containers_min()),
+ autoUpdateExcludedContainers: z.string().optional(),
+ autoHealEnabled: z.boolean(),
+ autoHealExcludedContainers: z.string(),
+ autoHealMaxRestarts: z.coerce.number().int().min(1),
+ autoHealRestartWindow: z.coerce.number().int().min(1)
+});
+
+export type EnvironmentFormValues = z.infer<typeof environmentFormSchema>;
diff --git a/frontend/src/routes/(app)/environments/[id]/components/tab-props.ts b/frontend/src/routes/(app)/environments/[id]/components/tab-props.ts
new file mode 100644
index 000000000..a321e2762
--- /dev/null
+++ b/frontend/src/routes/(app)/environments/[id]/components/tab-props.ts
@@ -0,0 +1,34 @@
+import type { Writable } from 'svelte/store';
+import type { FormInputs } from '$lib/utils/form.utils';
+import type { Environment, EnvironmentStatus } from '$lib/types/environment.type';
+import type { AppVersionInformation } from '$lib/types/application-configuration';
+import type { EnvironmentFormValues } from './environment-form-schema';
+
+export type EnvironmentFormInputs = Writable<FormInputs<EnvironmentFormValues>>;
+
+export interface DetailsTabProps {
+ environment: Environment;
+ formInputs: EnvironmentFormInputs;
+ currentStatus: EnvironmentStatus;
+ isLoadingVersion: boolean;
+ remoteVersion: AppVersionInformation | null;
+ versionInformation: AppVersionInformation | null | undefined;
+ isTestingConnection: boolean;
+ testConnection: () => void | Promise<void>;
+}
+
+export interface GeneralTabProps {
+ formInputs: EnvironmentFormInputs;
+}
+
+export interface DockerTabProps {
+ formInputs: EnvironmentFormInputs;
+ shellSelectValue: string;
+ handleShellSelectChange: (value: string) => void;
+ shellOptions: { value: string; label: string; description?: string }[];
+}
+
+export interface JobsTabProps {
+ formInputs: EnvironmentFormInputs;
+ environmentId: string;
+}
diff --git a/frontend/src/routes/(app)/environments/[id]/gitops/sync-table.svelte b/frontend/src/routes/(app)/environments/[id]/gitops/sync-table.svelte
index 8995a6d39..d3b510da1 100644
--- a/frontend/src/routes/(app)/environments/[id]/gitops/sync-table.svelte
+++ b/frontend/src/routes/(app)/environments/[id]/gitops/sync-table.svelte
@@ -124,7 +124,7 @@
});
}
- async function handlePerformSync(id: string, name: string) {
+ async function handlePerformSync(id: string, _name: string) {
isLoading.syncing = true;
const result = await tryCatch(gitOpsSyncService.performSync(environmentId, id));
handleApiResultWithCallbacks({
@@ -279,20 +279,12 @@
<span class="text-sm">{value ? format(new Date(value), 'PP p') : m.common_never()}</span>
{/snippet}
-{#snippet SyncMobileCardSnippet({
- item,
- mobileFieldVisibility,
- row
-}: {
- item: GitOpsSync;
- mobileFieldVisibility: FieldVisibility;
- row: Row<GitOpsSync>;
-})}
+{#snippet SyncMobileCardSnippet({ item, mobileFieldVisibility }: { item: GitOpsSync; mobileFieldVisibility: FieldVisibility })}
<UniversalMobileCard
{item}
icon={{ component: RefreshCwIcon, variant: 'purple' as const }}
title={(item) => item.name}
- subtitle={(item) => ((mobileFieldVisibility.id ?? false) ? item.id : item.branch)}
+ subtitle={(item) => ((mobileFieldVisibility['id'] ?? false) ? item.id : item.branch)}
badges={[{ variant: 'purple' as const, text: m.resource_sync_cap() }]}
fields={[
{
@@ -300,21 +292,21 @@
getValue: (item: GitOpsSync) => item.branch,
icon: GitBranchIcon,
iconVariant: 'gray' as const,
- show: mobileFieldVisibility.branch ?? true
+ show: mobileFieldVisibility['branch'] ?? true
},
{
label: m.git_sync_compose_path(),
getValue: (item: GitOpsSync) => item.composePath,
icon: FolderIcon,
iconVariant: 'gray' as const,
- show: mobileFieldVisibility.composePath ?? true
+ show: mobileFieldVisibility['composePath'] ?? true
}
]}
rowActions={RowActions}
/>
{/snippet}
-{#snippet RowActions({ item, row }: { item: GitOpsSync; row?: Row<GitOpsSync> })}
+{#snippet RowActions({ item }: { item: GitOpsSync })}
<DropdownMenu.Root>
<DropdownMenu.Trigger>
{#snippet child({ props })}
diff --git a/frontend/src/routes/(app)/environments/environment-table.svelte b/frontend/src/routes/(app)/environments/environment-table.svelte
index 2bdba1d1b..108111460 100644
--- a/frontend/src/routes/(app)/environments/environment-table.svelte
+++ b/frontend/src/routes/(app)/environments/environment-table.svelte
@@ -183,14 +183,13 @@
}
}
- function setUpgradeDialogOpen(next: boolean) {
- showUpgradeDialog = next;
- if (!next) {
+ $effect(() => {
+ if (!showUpgradeDialog) {
upgradingEnvironmentId = null;
selectedEnvironmentForUpgrade = null;
selectedVersionInfoForUpgrade = null;
}
- }
+ });
async function handleToggleEnabled(environment: Environment) {
const newEnabled = !environment.enabled;
@@ -348,7 +347,7 @@
{item}
icon={{ component: StatsIcon, variant: 'emerald' }}
title={(item: Environment) => item.name || item.id}
- subtitle={(item: Environment) => ((mobileFieldVisibility.id ?? true) ? item.id : null)}
+ subtitle={(item: Environment) => ((mobileFieldVisibility['id'] ?? true) ? item.id : null)}
badges={[
{ variant: 'green', text: m.sidebar_environment_label() },
...(environmentStore.selected?.id === item.id ? [{ variant: 'blue' as const, text: m.common_current() }] : [])
@@ -359,21 +358,21 @@
getValue: (item: Environment) => capitalizeFirstLetter(resolveEnvironmentStatus(item)),
icon: StatsIcon,
iconVariant: 'gray' as const,
- show: mobileFieldVisibility.status ?? true
+ show: mobileFieldVisibility['status'] ?? true
},
{
label: m.common_type(),
getValue: (item: Environment) => getEnvironmentTypeLabel(item),
icon: StatsIcon,
iconVariant: 'gray' as const,
- show: mobileFieldVisibility.type ?? true
+ show: mobileFieldVisibility['type'] ?? true
},
{
label: m.environments_api_url(),
getValue: (item: Environment) => item.apiUrl,
icon: StatsIcon,
iconVariant: 'gray' as const,
- show: (mobileFieldVisibility.apiUrl ?? true) && !!item.apiUrl
+ show: (mobileFieldVisibility['apiUrl'] ?? true) && !!item.apiUrl
}
]}
rowActions={RowActions}
@@ -478,7 +477,7 @@
/>
<UpdateCenterDialog
- bind:open={() => showUpgradeDialog, setUpgradeDialogOpen}
+ bind:open={showUpgradeDialog}
onConfirm={handleConfirmUpgrade}
versionInformation={selectedVersionInfoForUpgrade ?? undefined}
canInstall={isAdmin}
diff --git a/frontend/src/routes/(app)/events/event-table.svelte b/frontend/src/routes/(app)/events/event-table.svelte
index e60101915..c7adf58f4 100644
--- a/frontend/src/routes/(app)/events/event-table.svelte
+++ b/frontend/src/routes/(app)/events/event-table.svelte
@@ -199,10 +199,10 @@
variant: getIconVariant(item.severity)
})}
title={(item: Event) => item.title}
- subtitle={(item: Event) => ((mobileFieldVisibility.timestamp ?? true) ? formatTimestamp(item.timestamp) : null)}
+ subtitle={(item: Event) => ((mobileFieldVisibility['timestamp'] ?? true) ? formatTimestamp(item.timestamp) : null)}
badges={[
(item: Event) =>
- (mobileFieldVisibility.severity ?? true)
+ (mobileFieldVisibility['severity'] ?? true)
? {
variant: getSeverityBadgeVariant(item.severity),
text: item.severity
@@ -215,7 +215,7 @@
getValue: (item: Event) => item.type,
icon: TagIcon,
iconVariant: 'gray' as const,
- show: mobileFieldVisibility.type ?? true
+ show: mobileFieldVisibility['type'] ?? true
},
{
label: m.events_col_resource(),
@@ -227,7 +227,7 @@
},
icon: EnvironmentsIcon,
iconVariant: 'gray' as const,
- show: (mobileFieldVisibility.resource ?? true) && (!!item.resourceType || !!item.resourceName)
+ show: (mobileFieldVisibility['resource'] ?? true) && (!!item.resourceType || !!item.resourceName)
},
{
label: m.events_environment_label(),
@@ -237,14 +237,14 @@
},
icon: EnvironmentsIcon,
iconVariant: 'gray' as const,
- show: (mobileFieldVisibility.environment ?? true) && !!item.environmentId
+ show: (mobileFieldVisibility['environment'] ?? true) && !!item.environmentId
},
{
label: m.common_user(),
getValue: (item: Event) => item.username,
icon: UserIcon,
iconVariant: 'gray' as const,
- show: (mobileFieldVisibility.username ?? true) && !!item.username
+ show: (mobileFieldVisibility['username'] ?? true) && !!item.username
}
]}
rowActions={RowActions}
diff --git a/frontend/src/routes/(app)/images/+page.svelte b/frontend/src/routes/(app)/images/+page.svelte
index 6ad9651a7..59fd40bd9 100644
--- a/frontend/src/routes/(app)/images/+page.svelte
+++ b/frontend/src/routes/(app)/images/+page.svelte
@@ -285,7 +285,7 @@
<Dialog.Content>
<Dialog.Header>
<Dialog.Title>{m.images_prune_confirm_title()}</Dialog.Title>
- <Dialog.Description>{m.images_prune_confirm_description()}</Dialog.Description>
+ <Dialog.Description>{m.images_prune_confirm_description({ mode: imagePruneMode })}</Dialog.Description>
</Dialog.Header>
<div class="py-4">
<PruneModeCard
diff --git a/frontend/src/routes/(app)/images/[imageId]/+page.svelte b/frontend/src/routes/(app)/images/[imageId]/+page.svelte
index c4888bc75..200000097 100644
--- a/frontend/src/routes/(app)/images/[imageId]/+page.svelte
+++ b/frontend/src/routes/(app)/images/[imageId]/+page.svelte
@@ -210,7 +210,7 @@
label: m.common_delete(),
destructive: true,
action: async (checkboxStates) => {
- const force = !!checkboxStates.force;
+ const force = !!checkboxStates['force'];
await handleApiResultWithCallbacks({
result: await tryCatch(imageService.deleteImage(id, { force })),
message: m.images_remove_failed(),
diff --git a/frontend/src/routes/(app)/images/builds/+page.svelte b/frontend/src/routes/(app)/images/builds/+page.svelte
index 664f99f83..2f49df5a1 100644
--- a/frontend/src/routes/(app)/images/builds/+page.svelte
+++ b/frontend/src/routes/(app)/images/builds/+page.svelte
@@ -53,6 +53,8 @@
import { createMutation, createQuery, useQueryClient } from '@tanstack/svelte-query';
import { format } from 'date-fns';
+ let {}: PageProps = $props();
+
const buildsRoot = $derived((($settingsStore?.buildsDirectory ?? '/builds') as string).trim() || '/builds');
const buildsRootLabel = $derived.by(() => {
const raw = buildsRoot.trim();
diff --git a/frontend/src/routes/(app)/images/image-table.svelte b/frontend/src/routes/(app)/images/image-table.svelte
index 6ac316bc9..9f41f8273 100644
--- a/frontend/src/routes/(app)/images/image-table.svelte
+++ b/frontend/src/routes/(app)/images/image-table.svelte
@@ -90,7 +90,7 @@
label: m.common_remove(),
destructive: true,
action: async (checkboxStates) => {
- const force = !!checkboxStates.force;
+ const force = !!checkboxStates['force'];
isLoading.removing = true;
let successCount = 0;
let failureCount = 0;
@@ -142,7 +142,7 @@
label: m.common_remove(),
destructive: true,
action: async (checkboxStates) => {
- const force = !!checkboxStates.force;
+ const force = !!checkboxStates['force'];
isLoading.removing = true;
const result = await tryCatch(imageService.deleteImage(id, { force }));
@@ -221,8 +221,9 @@
async function handleUpdateInfoChanged(imageId: string, newUpdateInfo: ImageUpdateInfoDto) {
const imageIndex = images.data.findIndex((img) => img.id === imageId);
- if (imageIndex !== -1) {
- images.data[imageIndex].updateInfo = newUpdateInfo;
+ const image = imageIndex !== -1 ? images.data[imageIndex] : undefined;
+ if (image) {
+ image.updateInfo = newUpdateInfo;
images = { ...images, data: [...images.data] };
}
await onImageUpdated?.();
@@ -230,8 +231,9 @@
async function handleVulnerabilityScanChanged(imageId: string, newScanSummary: VulnerabilityScanSummary) {
const imageIndex = images.data.findIndex((img) => img.id === imageId);
- if (imageIndex !== -1) {
- images.data[imageIndex].vulnerabilityScan = newScanSummary;
+ const image = imageIndex !== -1 ? images.data[imageIndex] : undefined;
+ if (image) {
+ image.vulnerabilityScan = newScanSummary;
images = { ...images, data: [...images.data] };
}
if (newScanSummary.status === 'completed' || newScanSummary.status === 'failed') {
@@ -598,11 +600,9 @@
{/snippet}
{#snippet ImageMobileCardSnippet({
- row,
item,
mobileFieldVisibility
}: {
- row: any;
item: ImageSummaryDto;
mobileFieldVisibility: MobileFieldVisibility;
})}
@@ -616,16 +616,16 @@
if (item.repo && item.repo !== '<none>') return item.repo;
return m.images_untagged();
}}
- subtitle={(item) => ((mobileFieldVisibility.id ?? false) ? item.id : null)}
+ subtitle={(item) => ((mobileFieldVisibility['id'] ?? false) ? item.id : null)}
badges={[
(item: ImageSummaryDto) =>
- (mobileFieldVisibility.inUse ?? true)
+ (mobileFieldVisibility['inUse'] ?? true)
? item.inUse
? { variant: 'green' as const, text: m.common_in_use() }
: { variant: 'amber' as const, text: m.common_unused() }
: null,
(item: ImageSummaryDto) => {
- if (!(mobileFieldVisibility.updates ?? false)) return null;
+ if (!(mobileFieldVisibility['updates'] ?? false)) return null;
if (item.updateInfo?.hasUpdate) return { variant: 'blue' as const, text: m.images_has_updates() };
if (item.updateInfo?.error) return { variant: 'red' as const, text: m.common_error() };
if (item.updateInfo) return { variant: 'green' as const, text: m.images_no_updates() };
@@ -638,7 +638,7 @@
getValue: (item: ImageSummaryDto) => bytes.format(Number(item.size ?? 0)),
icon: VolumesIcon,
iconVariant: 'blue' as const,
- show: mobileFieldVisibility.size ?? true
+ show: mobileFieldVisibility['size'] ?? true
},
{
label: m.common_tags(),
@@ -650,17 +650,17 @@
},
icon: ImagesIcon,
iconVariant: 'purple' as const,
- show: mobileFieldVisibility.repoTags ?? true
+ show: mobileFieldVisibility['repoTags'] ?? true
},
{
label: m.images_used_by(),
getValue: (item: ImageSummaryDto) => item.usedBy?.map((usage) => usage.name).join(', ') || '—',
icon: ImagesIcon,
iconVariant: 'purple' as const,
- show: mobileFieldVisibility.usedBy ?? false
+ show: mobileFieldVisibility['usedBy'] ?? false
}
]}
- footer={(mobileFieldVisibility.created ?? true)
+ footer={(mobileFieldVisibility['created'] ?? true)
? {
label: m.common_created(),
getValue: (item) => format(new Date(Number(item.created || 0) * 1000), 'PP p'),
diff --git a/frontend/src/routes/(app)/images/vulnerabilities/+page.svelte b/frontend/src/routes/(app)/images/vulnerabilities/+page.svelte
index 533cd5d37..ea1cb38b7 100644
--- a/frontend/src/routes/(app)/images/vulnerabilities/+page.svelte
+++ b/frontend/src/routes/(app)/images/vulnerabilities/+page.svelte
@@ -68,9 +68,9 @@
function mapVulnerabilityRequest(options: SearchPaginationSortRequest): SearchPaginationSortRequest {
const filters = { ...(options.filters ?? {}) };
- if (filters.vulnSeverity) {
- filters.severity = filters.vulnSeverity;
- delete filters.vulnSeverity;
+ if (filters['vulnSeverity']) {
+ filters['severity'] = filters['vulnSeverity'];
+ delete filters['vulnSeverity'];
}
const sort = options.sort?.column === 'vulnSeverity' ? { ...options.sort, column: 'severity' } : options.sort;
diff --git a/frontend/src/routes/(app)/images/vulnerabilities/+page.ts b/frontend/src/routes/(app)/images/vulnerabilities/+page.ts
index fc3060759..d66de8aa8 100644
--- a/frontend/src/routes/(app)/images/vulnerabilities/+page.ts
+++ b/frontend/src/routes/(app)/images/vulnerabilities/+page.ts
@@ -10,9 +10,9 @@ import type { PageLoad } from './$types';
function mapVulnerabilityRequest(options: SearchPaginationSortRequest): SearchPaginationSortRequest {
const filters = { ...(options.filters ?? {}) };
- if (filters.vulnSeverity) {
- filters.severity = filters.vulnSeverity;
- delete filters.vulnSeverity;
+ if (filters['vulnSeverity']) {
+ filters['severity'] = filters['vulnSeverity'];
+ delete filters['vulnSeverity'];
}
const sort = options.sort?.column === 'vulnSeverity' ? { ...options.sort, column: 'severity' } : options.sort;
diff --git a/frontend/src/routes/(app)/images/vulnerabilities/security-vulnerability-table.svelte b/frontend/src/routes/(app)/images/vulnerabilities/security-vulnerability-table.svelte
index 0d43cf7bd..68d883c9b 100644
--- a/frontend/src/routes/(app)/images/vulnerabilities/security-vulnerability-table.svelte
+++ b/frontend/src/routes/(app)/images/vulnerabilities/security-vulnerability-table.svelte
@@ -82,7 +82,7 @@
}
function resolveSeverityFilter(options?: SearchPaginationSortRequest): string | undefined {
- const rawSeverity = options?.filters?.severity ?? options?.filters?.vulnSeverity;
+ const rawSeverity = options?.filters?.['severity'] ?? options?.filters?.['vulnSeverity'];
if (Array.isArray(rawSeverity)) {
const values = rawSeverity.map((entry) => String(entry).trim()).filter(Boolean);
return values.length ? values.join(',') : undefined;
@@ -118,9 +118,9 @@
async function refreshVulnerabilityTable(options: SearchPaginationSortRequest) {
const mergedFilters = { ...(options.filters ?? {}) };
- if (mergedFilters.vulnSeverity) {
- mergedFilters.severity = mergedFilters.vulnSeverity;
- delete mergedFilters.vulnSeverity;
+ if (mergedFilters['vulnSeverity']) {
+ mergedFilters['severity'] = mergedFilters['vulnSeverity'];
+ delete mergedFilters['vulnSeverity'];
}
const sort = options.sort?.column === 'vulnSeverity' ? { ...options.sort, column: 'severity' } : options.sort;
@@ -246,11 +246,9 @@
{/snippet}
{#snippet VulnerabilityMobileCard({
- row,
item,
mobileFieldVisibility
}: {
- row: any;
item: VulnerabilityRow;
mobileFieldVisibility: Record<string, boolean>;
})}
@@ -261,10 +259,10 @@
variant: getSeverityIconVariant(item.severity)
})}
title={(item) => item.vulnerabilityId}
- subtitle={(item) => ((mobileFieldVisibility.pkgName ?? true) ? item.pkgName : null)}
+ subtitle={(item) => ((mobileFieldVisibility['pkgName'] ?? true) ? item.pkgName : null)}
badges={[
(item) =>
- (mobileFieldVisibility.vulnSeverity ?? true)
+ (mobileFieldVisibility['vulnSeverity'] ?? true)
? { variant: getSeverityBadgeVariant(item.severity), text: getSeverityLabel(item.severity) }
: null
]}
@@ -274,7 +272,7 @@
getValue: (item) => item.imageName || item.imageId,
icon: ImagesIcon,
iconVariant: 'gray',
- show: mobileFieldVisibility.imageName ?? true
+ show: mobileFieldVisibility['imageName'] ?? true
},
{
label: m.vuln_installed_version(),
@@ -282,7 +280,7 @@
type: 'mono',
icon: CodeIcon,
iconVariant: 'blue',
- show: mobileFieldVisibility.installedVersion ?? true
+ show: mobileFieldVisibility['installedVersion'] ?? true
},
{
label: m.vuln_fixed_version(),
@@ -290,7 +288,7 @@
type: 'mono',
icon: CheckIcon,
iconVariant: item.fixedVersion ? 'emerald' : 'gray',
- show: mobileFieldVisibility.fixedVersion ?? true
+ show: mobileFieldVisibility['fixedVersion'] ?? true
}
]}
/>
diff --git a/frontend/src/routes/(app)/networks/[networkId]/+page.svelte b/frontend/src/routes/(app)/networks/[networkId]/+page.svelte
index 9ec7a6576..8268444e4 100644
--- a/frontend/src/routes/(app)/networks/[networkId]/+page.svelte
+++ b/frontend/src/routes/(app)/networks/[networkId]/+page.svelte
@@ -1,6 +1,5 @@
<script lang="ts">
import * as Card from '$lib/components/ui/card';
- import type { PageData } from './$types';
import {
AlertIcon,
VolumesIcon,
@@ -29,7 +28,7 @@
import { networkService } from '$lib/services/network-service';
import { ResourceDetailLayout, type DetailAction } from '$lib/layouts';
- let { data }: { data: PageData } = $props();
+ let { data }: PageProps = $props();
let errorMessage = $state('');
let isRemoving = $state(false);
diff --git a/frontend/src/routes/(app)/networks/network-table.svelte b/frontend/src/routes/(app)/networks/network-table.svelte
index b0ba90fba..23dbcdfad 100644
--- a/frontend/src/routes/(app)/networks/network-table.svelte
+++ b/frontend/src/routes/(app)/networks/network-table.svelte
@@ -130,7 +130,6 @@
}
const isAnyLoading = $derived(Object.values(isLoading).some((l) => l));
- const hasNetworks = $derived(networks?.data?.length > 0);
function getDriverVariant(driver: string): 'blue' | 'purple' | 'red' | 'orange' | 'gray' {
const variantMap: Record<string, 'blue' | 'purple' | 'red' | 'orange' | 'gray'> = {
@@ -210,11 +209,9 @@
{/snippet}
{#snippet NetworkMobileCardSnippet({
- row,
item,
mobileFieldVisibility
}: {
- row: any;
item: NetworkSummaryDto;
mobileFieldVisibility: FieldVisibility;
})}
@@ -225,10 +222,10 @@
variant: item.inUse ? 'emerald' : 'amber'
})}
title={(item: NetworkSummaryDto) => item.name}
- subtitle={(item: NetworkSummaryDto) => ((mobileFieldVisibility.id ?? true) ? item.id : null)}
+ subtitle={(item: NetworkSummaryDto) => ((mobileFieldVisibility['id'] ?? true) ? item.id : null)}
badges={[
(item: NetworkSummaryDto) =>
- (mobileFieldVisibility.inUse ?? true)
+ (mobileFieldVisibility['inUse'] ?? true)
? (item.isDefault ?? false) || DEFAULT_NETWORK_NAMES.has(item.name)
? { variant: 'gray', text: m.networks_predefined() }
: item.inUse
@@ -244,7 +241,7 @@
iconVariant: 'gray' as const,
type: 'badge' as const,
badgeVariant: getDriverVariant(item.driver),
- show: mobileFieldVisibility.driver ?? true
+ show: mobileFieldVisibility['driver'] ?? true
},
{
label: m.common_scope(),
@@ -253,7 +250,7 @@
iconVariant: 'gray' as const,
type: 'badge' as const,
badgeVariant: item.scope === 'local' ? ('green' as const) : ('amber' as const),
- show: mobileFieldVisibility.scope ?? true
+ show: mobileFieldVisibility['scope'] ?? true
}
]}
rowActions={RowActions}
diff --git a/frontend/src/routes/(app)/ports/port-table.svelte b/frontend/src/routes/(app)/ports/port-table.svelte
index 89f79c918..dddb19980 100644
--- a/frontend/src/routes/(app)/ports/port-table.svelte
+++ b/frontend/src/routes/(app)/ports/port-table.svelte
@@ -117,13 +117,13 @@
variant: item.isPublished ? 'blue' : 'gray'
})}
title={(item: PortMappingDto) => mappingTitle(item)}
- subtitle={(item: PortMappingDto) => ((mobileFieldVisibility.containerName ?? true) ? item.containerName : null)}
+ subtitle={(item: PortMappingDto) => ((mobileFieldVisibility['containerName'] ?? true) ? item.containerName : null)}
badges={[
(item: PortMappingDto) =>
- (mobileFieldVisibility.isPublished ?? true)
+ (mobileFieldVisibility['isPublished'] ?? true)
? {
- variant: item.isPublished ? 'sky' : 'gray',
- text: item.isPublished ? m.ports_published_label() : m.ports_exposed_label()
+ variant: item.isPublished ? 'blue' : 'gray',
+ text: String(item.isPublished ? m.ports_published_label() : m.ports_exposed_label())
}
: null
]}
@@ -133,7 +133,7 @@
getValue: (item: PortMappingDto) => String(item.containerPort),
icon: HashIcon,
iconVariant: 'gray' as const,
- show: mobileFieldVisibility.containerPort ?? true
+ show: mobileFieldVisibility['containerPort'] ?? true
},
{
label: m.common_type(),
@@ -142,21 +142,21 @@
iconVariant: 'gray' as const,
type: 'badge' as const,
badgeVariant: 'gray' as const,
- show: mobileFieldVisibility.protocol ?? true
+ show: mobileFieldVisibility['protocol'] ?? true
},
{
label: m.ports_host_ip(),
getValue: (item: PortMappingDto) => formatHostIp(item),
icon: GlobeIcon,
iconVariant: 'gray' as const,
- show: mobileFieldVisibility.hostIp ?? true
+ show: mobileFieldVisibility['hostIp'] ?? true
},
{
label: m.ports_container_name(),
getValue: (item: PortMappingDto) => item.containerName,
icon: ContainersIcon,
iconVariant: 'gray' as const,
- show: mobileFieldVisibility.containerName ?? true
+ show: mobileFieldVisibility['containerName'] ?? true
}
]}
onclick={() => void goto(`/containers/${item.containerId}`)}
diff --git a/frontend/src/routes/(app)/projects/+layout.svelte b/frontend/src/routes/(app)/projects/+layout.svelte
index 4de63ef8f..14d71260e 100644
--- a/frontend/src/routes/(app)/projects/+layout.svelte
+++ b/frontend/src/routes/(app)/projects/+layout.svelte
@@ -1,9 +1,7 @@
<script lang="ts">
import { m } from '$lib/paraglide/messages';
- import type { Snippet } from 'svelte';
-
- let { children }: { children: Snippet } = $props();
+ let { children }: LayoutProps = $props();
const pageTitle = $derived(`${m.layout_title()} | ${m.projects_title()}`);
</script>
diff --git a/frontend/src/routes/(app)/projects/+page.svelte b/frontend/src/routes/(app)/projects/+page.svelte
index 0bea9b369..5595394ad 100644
--- a/frontend/src/routes/(app)/projects/+page.svelte
+++ b/frontend/src/routes/(app)/projects/+page.svelte
@@ -20,9 +20,9 @@
function withArchivedFilter(options: SearchPaginationSortRequest, show: boolean): SearchPaginationSortRequest {
const filters = { ...(options.filters ?? {}) };
if (show) {
- filters.archived = 'true';
+ filters['archived'] = 'true';
} else {
- delete filters.archived;
+ delete filters['archived'];
}
return {
diff --git a/frontend/src/routes/(app)/projects/+page.ts b/frontend/src/routes/(app)/projects/+page.ts
index bf4cbbaec..95639ec5f 100644
--- a/frontend/src/routes/(app)/projects/+page.ts
+++ b/frontend/src/routes/(app)/projects/+page.ts
@@ -23,9 +23,9 @@ export const load: PageLoad = async ({ parent, url }) => {
} satisfies SearchPaginationSortRequest);
const filters = { ...(projectRequestOptions.filters ?? {}) };
if (showArchived) {
- filters.archived = 'true';
+ filters['archived'] = 'true';
} else {
- delete filters.archived;
+ delete filters['archived'];
}
projectRequestOptions.filters = Object.keys(filters).length ? filters : undefined;
diff --git a/frontend/src/routes/(app)/projects/[projectId]/+layout.svelte b/frontend/src/routes/(app)/projects/[projectId]/+layout.svelte
index 512a50c43..958f3fb75 100644
--- a/frontend/src/routes/(app)/projects/[projectId]/+layout.svelte
+++ b/frontend/src/routes/(app)/projects/[projectId]/+layout.svelte
@@ -2,11 +2,9 @@
import { page } from '$app/state';
import { m } from '$lib/paraglide/messages';
- import type { Snippet } from 'svelte';
+ let { children }: LayoutProps = $props();
- let { children }: { children: Snippet } = $props();
-
- const projectName = $derived(page.data.project.name);
+ const projectName = $derived(page.data['project'].name);
const pageTitle = $derived(`${m.layout_title()} | ${m.projects_title()} | ${projectName}`);
</script>
diff --git a/frontend/src/routes/(app)/projects/[projectId]/+page.svelte b/frontend/src/routes/(app)/projects/[projectId]/+page.svelte
index fe95ffc78..07cd72faf 100644
--- a/frontend/src/routes/(app)/projects/[projectId]/+page.svelte
+++ b/frontend/src/routes/(app)/projects/[projectId]/+page.svelte
@@ -985,7 +985,7 @@
<div
class="text-destructive flex h-full min-h-0 items-center justify-center rounded-lg border px-4 text-sm"
>
- {error.message}
+ {error instanceof Error ? error.message : String(error)}
</div>
{/await}
{/if}
@@ -996,7 +996,7 @@
<div class="text-muted-foreground flex h-full min-h-0 items-center justify-center rounded-lg border">
{m.common_loading()}
</div>
- {:then _loadedFile}
+ {:then}
<CodePanel
bind:open={includeFilesPanelStates[includeFile.relativePath]}
title={includeFile.relativePath}
@@ -1013,7 +1013,7 @@
<div
class="text-destructive flex h-full min-h-0 items-center justify-center rounded-lg border px-4 text-sm"
>
- {error.message}
+ {error instanceof Error ? error.message : String(error)}
</div>
{/await}
{/if}
@@ -1144,7 +1144,7 @@
<div
class="text-destructive flex h-full min-h-0 items-center justify-center rounded-lg border px-4 text-sm"
>
- {error.message}
+ {error instanceof Error ? error.message : String(error)}
</div>
{/await}
{/if}
@@ -1155,7 +1155,7 @@
<div class="text-muted-foreground flex h-full min-h-0 items-center justify-center rounded-lg border">
{m.common_loading()}
</div>
- {:then _loadedFile}
+ {:then}
<CodePanel
bind:open={includeFilesPanelStates[includeFile.relativePath]}
title={includeFile.relativePath}
@@ -1172,7 +1172,7 @@
<div
class="text-destructive flex h-full min-h-0 items-center justify-center rounded-lg border px-4 text-sm"
>
- {error.message}
+ {error instanceof Error ? error.message : String(error)}
</div>
{/await}
{/if}
@@ -1208,7 +1208,7 @@
<div class="text-muted-foreground flex h-full min-h-0 items-center justify-center rounded-lg border">
{m.common_loading()}
</div>
- {:then _loadedFile}
+ {:then}
<CodePanel
bind:open={includeFilesPanelStates[includeFile.relativePath]}
title={includeFile.relativePath}
@@ -1225,7 +1225,7 @@
<div
class="text-destructive flex h-full min-h-0 items-center justify-center rounded-lg border px-4 text-sm"
>
- {error.message}
+ {error instanceof Error ? error.message : String(error)}
</div>
{/await}
{/if}
diff --git a/frontend/src/routes/(app)/projects/components/CodePanel.svelte b/frontend/src/routes/(app)/projects/components/CodePanel.svelte
index ba477a80f..7708f60f6 100644
--- a/frontend/src/routes/(app)/projects/components/CodePanel.svelte
+++ b/frontend/src/routes/(app)/projects/components/CodePanel.svelte
@@ -58,7 +58,7 @@
const effectiveAutoHeight = $derived(autoHeight || isMobile.current);
</script>
-<Card.Root class="flex {effectiveAutoHeight ? '' : 'flex-1'} min-h-0 flex-col overflow-hidden">
+<Card.Root class="flex {effectiveAutoHeight ? '' : 'flex-1'} min-h-0 flex-col overflow-hidden" data-open={open}>
<Card.Header icon={CodeIcon} class="flex-shrink-0 items-center">
<Card.Title>
<h2>{title}</h2>
diff --git a/frontend/src/routes/(app)/projects/components/ProjectContainersTable.svelte b/frontend/src/routes/(app)/projects/components/ProjectContainersTable.svelte
index 1a2723d06..f29e481ca 100644
--- a/frontend/src/routes/(app)/projects/components/ProjectContainersTable.svelte
+++ b/frontend/src/routes/(app)/projects/components/ProjectContainersTable.svelte
@@ -27,7 +27,6 @@
RefreshIcon,
TrashIcon,
EllipsisIcon,
- ContainersIcon,
HealthIcon,
InspectIcon,
FolderXIcon,
@@ -147,8 +146,8 @@
label: m.common_remove(),
destructive: true,
action: async (checkboxStates) => {
- const force = !!checkboxStates.force;
- const volumes = !!checkboxStates.volumes;
+ const force = !!checkboxStates['force'];
+ const volumes = !!checkboxStates['volumes'];
actionStatus[id] = 'removing';
handleApiResultWithCallbacks({
@@ -356,11 +355,11 @@
{:else if item.ports && item.ports.length > 0}
{@const parsedPorts = item.ports.map((p) => {
const [numsPart, proto] = p.split('/');
- const nums = numsPart.split(':');
+ const nums = (numsPart ?? '').split(':');
if (nums.length === 2) {
- return { publicPort: parseInt(nums[0]), privatePort: parseInt(nums[1]), type: proto || 'tcp' };
+ return { publicPort: parseInt(nums[0] ?? ''), privatePort: parseInt(nums[1] ?? ''), type: proto || 'tcp' };
}
- return { privatePort: parseInt(nums[0]), type: proto || 'tcp' };
+ return { privatePort: parseInt(nums[0] ?? ''), type: proto || 'tcp' };
})}
<PortBadge ports={parsedPorts} />
{:else}
@@ -390,14 +389,14 @@
title={(item) => item.containerName || item.name}
badges={[
(item) =>
- (mobileFieldVisibility.status ?? true)
+ (mobileFieldVisibility['status'] ?? true)
? {
variant: item.status === 'running' ? 'green' : item.status === 'exited' ? 'red' : 'amber',
text: capitalizeFirstLetter(item.status)
}
: null,
(item) =>
- (mobileFieldVisibility.health ?? true) && item.health
+ (mobileFieldVisibility['health'] ?? true) && item.health
? { variant: getHealthColor(item.health), text: capitalizeFirstLetter(item.health) }
: null
]}
@@ -405,7 +404,7 @@
{
label: m.common_image(),
getValue: (item: ServiceWithId) => item.image,
- show: mobileFieldVisibility.image ?? true
+ show: mobileFieldVisibility['image'] ?? true
}
]}
rowActions={showActionsColumn ? MobileRowActions : undefined}
diff --git a/frontend/src/routes/(app)/projects/components/ProjectLogsPanel.svelte b/frontend/src/routes/(app)/projects/components/ProjectLogsPanel.svelte
index fdb0fd69e..921e2d593 100644
--- a/frontend/src/routes/(app)/projects/components/ProjectLogsPanel.svelte
+++ b/frontend/src/routes/(app)/projects/components/ProjectLogsPanel.svelte
@@ -14,7 +14,7 @@
} = $props();
let isStreaming = $state(false);
- let viewer = $state<LogViewer>();
+ let viewer = $state<ReturnType<typeof LogViewer>>();
let tailLines = $state(100);
let autoStartLogs = $state(false);
let hasAutoStarted = $state(false);
diff --git a/frontend/src/routes/(app)/projects/new/+layout.svelte b/frontend/src/routes/(app)/projects/new/+layout.svelte
index b8dff8caf..db8ea2c9d 100644
--- a/frontend/src/routes/(app)/projects/new/+layout.svelte
+++ b/frontend/src/routes/(app)/projects/new/+layout.svelte
@@ -1,9 +1,7 @@
<script lang="ts">
import { m } from '$lib/paraglide/messages';
- import type { Snippet } from 'svelte';
-
- let { children }: { children: Snippet } = $props();
+ let { children }: LayoutProps = $props();
const projectName = $derived(m.compose_project_name_placeholder());
const pageTitle = $derived(`${m.layout_title()} | ${m.projects_title()} | ${projectName}`);
diff --git a/frontend/src/routes/(app)/projects/new/+page.svelte b/frontend/src/routes/(app)/projects/new/+page.svelte
index 00a3bf4db..737f0ffd6 100644
--- a/frontend/src/routes/(app)/projects/new/+page.svelte
+++ b/frontend/src/routes/(app)/projects/new/+page.svelte
@@ -1,6 +1,6 @@
<script lang="ts">
import { ArcaneButton } from '$lib/components/arcane-button/index.js';
- import { ArrowLeftIcon, TerminalIcon, CopyIcon, InfoIcon, TemplateIcon, AddIcon, GitBranchIcon } from '$lib/icons';
+ import { ArrowLeftIcon, TerminalIcon, CopyIcon, TemplateIcon, AddIcon, GitBranchIcon } from '$lib/icons';
import { Spinner } from '$lib/components/ui/spinner/index.js';
import { Label } from '$lib/components/ui/label/index.js';
import { goto, invalidateAll } from '$app/navigation';
diff --git a/frontend/src/routes/(app)/settings/+layout.svelte b/frontend/src/routes/(app)/settings/+layout.svelte
index 54d7af1fa..f623a1f5c 100644
--- a/frontend/src/routes/(app)/settings/+layout.svelte
+++ b/frontend/src/routes/(app)/settings/+layout.svelte
@@ -10,11 +10,7 @@
import { cn } from '$lib/utils';
import MobileFloatingFormActions from '$lib/components/form/mobile-floating-form-actions.svelte';
- interface Props {
- children: import('svelte').Snippet;
- }
-
- let { children }: Props = $props();
+ let { children }: LayoutProps = $props();
let isSubPage = $derived(page.url.pathname !== '/settings');
let currentPageName = $derived(page.url.pathname.split('/').pop() || 'settings');
diff --git a/frontend/src/routes/(app)/settings/+page.svelte b/frontend/src/routes/(app)/settings/+page.svelte
index 6ec8015dd..1cc6baad9 100644
--- a/frontend/src/routes/(app)/settings/+page.svelte
+++ b/frontend/src/routes/(app)/settings/+page.svelte
@@ -28,6 +28,8 @@
import { getSettingsSubpageUrlsInNavOrder } from '$lib/config/navigation-config';
import HeaderCard from '$lib/components/header-card.svelte';
+ let {}: PageProps = $props();
+
let searchQuery = $state('');
let showSearchResults = $state(false);
let searchResults = $state<SettingsCategory[]>([]);
@@ -58,7 +60,7 @@
}
});
- async function performSearch(query: string, immediate = false) {
+ async function performSearch(query: string) {
const trimmedQuery = query.trim();
if (!trimmedQuery) {
@@ -90,7 +92,7 @@
}
const debouncedSearch = debounced((query: string) => {
- void performSearch(query, false);
+ void performSearch(query);
}, 300);
function navigateToCategory(categoryUrl: string) {
@@ -157,7 +159,7 @@
}}
onkeydown={(e) => {
if (e.key === 'Enter') {
- performSearch((e.currentTarget as HTMLInputElement).value, true);
+ performSearch((e.currentTarget as HTMLInputElement).value);
}
}}
/>
diff --git a/frontend/src/routes/(app)/settings/api-keys/api-key-table.svelte b/frontend/src/routes/(app)/settings/api-keys/api-key-table.svelte
index e63285410..ca7966d5d 100644
--- a/frontend/src/routes/(app)/settings/api-keys/api-key-table.svelte
+++ b/frontend/src/routes/(app)/settings/api-keys/api-key-table.svelte
@@ -214,7 +214,7 @@
{item}
icon={{ component: ApiKeyIcon, variant: 'blue' }}
title={(item: ApiKey) => item.name}
- subtitle={(item: ApiKey) => ((mobileFieldVisibility.keyPrefix ?? true) ? `${item.keyPrefix}...` : null)}
+ subtitle={(item: ApiKey) => ((mobileFieldVisibility['keyPrefix'] ?? true) ? `${item.keyPrefix}...` : null)}
badges={[
(item: ApiKey) => ({
variant: getStatusVariant(item),
@@ -227,21 +227,21 @@
getValue: (item: ApiKey) => item.description || '-',
icon: ApiKeyIcon,
iconVariant: 'gray' as const,
- show: mobileFieldVisibility.description ?? true
+ show: mobileFieldVisibility['description'] ?? true
},
{
label: m.api_key_expires_at(),
getValue: (item: ApiKey) => (item.expiresAt ? formatDate(item.expiresAt) : m.api_key_expires_never()),
icon: ApiKeyIcon,
iconVariant: 'gray' as const,
- show: mobileFieldVisibility.expiresAt ?? true
+ show: mobileFieldVisibility['expiresAt'] ?? true
},
{
label: m.api_key_last_used(),
getValue: (item: ApiKey) => formatDate(item.lastUsedAt),
icon: ApiKeyIcon,
iconVariant: 'gray' as const,
- show: mobileFieldVisibility.lastUsedAt ?? true
+ show: mobileFieldVisibility['lastUsedAt'] ?? true
}
]}
rowActions={RowActions}
diff --git a/frontend/src/routes/(app)/settings/authentication/+page.svelte b/frontend/src/routes/(app)/settings/authentication/+page.svelte
index f2e89385d..f918d8744 100644
--- a/frontend/src/routes/(app)/settings/authentication/+page.svelte
+++ b/frontend/src/routes/(app)/settings/authentication/+page.svelte
@@ -6,7 +6,6 @@
import { Switch } from '$lib/components/ui/switch/index.js';
import TextInputWithLabel from '$lib/components/form/text-input-with-label.svelte';
import { toast } from 'svelte-sonner';
- import type { PageData } from './$types';
import type { Settings } from '$lib/types/settings.type';
import * as ArcaneTooltip from '$lib/components/arcane-tooltip';
import { m } from '$lib/paraglide/messages';
@@ -20,7 +19,7 @@
import SettingsRow from '$lib/components/settings/settings-row.svelte';
import { cn } from '$lib/utils';
- let { data }: { data: PageData } = $props();
+ let { data }: PageProps = $props();
const currentSettings = $derived<Settings>($settingsStore || data.settings!);
const isReadOnly = $derived.by(() => $settingsStore.uiConfigDisabled);
const isAutoLoginEnabled = $derived(settingsStore.autoLoginEnabled.isEnabled());
diff --git a/frontend/src/routes/(app)/settings/builds/+page.svelte b/frontend/src/routes/(app)/settings/builds/+page.svelte
index 6d0536078..18c2e0e1b 100644
--- a/frontend/src/routes/(app)/settings/builds/+page.svelte
+++ b/frontend/src/routes/(app)/settings/builds/+page.svelte
@@ -40,8 +40,8 @@
getCurrentSettings: getFormDefaults,
onSave: async (payload) => {
const updated = { ...payload } as Record<string, unknown>;
- if (!updated.depotToken) {
- delete updated.depotToken;
+ if (!updated['depotToken']) {
+ delete updated['depotToken'];
}
await settingsService.updateSettings(updated);
},
diff --git a/frontend/src/routes/(app)/settings/notifications/+page.svelte b/frontend/src/routes/(app)/settings/notifications/+page.svelte
index c12f820b9..d2c084c62 100644
--- a/frontend/src/routes/(app)/settings/notifications/+page.svelte
+++ b/frontend/src/routes/(app)/settings/notifications/+page.svelte
@@ -71,16 +71,16 @@
}
// Provider form references for validation
- let emailFormRef: BuiltInProviderForm;
- let discordFormRef: BuiltInProviderForm;
- let telegramFormRef: BuiltInProviderForm;
- let signalFormRef: BuiltInProviderForm;
- let slackFormRef: BuiltInProviderForm;
- let ntfyFormRef: BuiltInProviderForm;
- let pushoverFormRef: BuiltInProviderForm;
- let gotifyFormRef: BuiltInProviderForm;
- let matrixFormRef: BuiltInProviderForm;
- let genericFormRef: BuiltInProviderForm;
+ let emailFormRef: ReturnType<typeof BuiltInProviderForm>;
+ let discordFormRef: ReturnType<typeof BuiltInProviderForm>;
+ let telegramFormRef: ReturnType<typeof BuiltInProviderForm>;
+ let signalFormRef: ReturnType<typeof BuiltInProviderForm>;
+ let slackFormRef: ReturnType<typeof BuiltInProviderForm>;
+ let ntfyFormRef: ReturnType<typeof BuiltInProviderForm>;
+ let pushoverFormRef: ReturnType<typeof BuiltInProviderForm>;
+ let gotifyFormRef: ReturnType<typeof BuiltInProviderForm>;
+ let matrixFormRef: ReturnType<typeof BuiltInProviderForm>;
+ let genericFormRef: ReturnType<typeof BuiltInProviderForm>;
// Saved settings from server (used to detect if settings exist)
let savedSettings = $state<Record<NotificationProviderKey, NotificationSettings | null>>({
diff --git a/frontend/src/routes/(app)/settings/notifications/providers/BuiltInProviderForm.svelte b/frontend/src/routes/(app)/settings/notifications/providers/BuiltInProviderForm.svelte
index b1e520d86..da125e164 100644
--- a/frontend/src/routes/(app)/settings/notifications/providers/BuiltInProviderForm.svelte
+++ b/frontend/src/routes/(app)/settings/notifications/providers/BuiltInProviderForm.svelte
@@ -1,25 +1,11 @@
<script lang="ts">
import { m } from '$lib/paraglide/messages';
import { z } from 'zod/v4';
- import type {
- NotificationProviderKey,
- ProviderFormValuesMap,
- DiscordFormValues,
- EmailFormValues,
- TelegramFormValues,
- SignalFormValues,
- SlackFormValues,
- NtfyFormValues,
- PushoverFormValues,
- GotifyFormValues,
- MatrixFormValues,
- GenericFormValues
- } from '$lib/types/notification-providers';
+ import type { NotificationProviderKey, ProviderFormValuesMap } from '$lib/types/notification-providers';
import ProviderFormWrapper from './ProviderFormWrapper.svelte';
import EventSubscriptions from './EventSubscriptions.svelte';
import DynamicProviderFormBuilder from './DynamicProviderFormBuilder.svelte';
- import NotificationProviderTestMenu from './NotificationProviderTestMenu.svelte';
- import type { NotificationProviderTestOption } from './NotificationProviderTestMenu.svelte';
+ import NotificationProviderTestMenu, { type NotificationProviderTestOption } from './NotificationProviderTestMenu.svelte';
import { mapZodFieldErrors } from './provider-form-validation';
import type { ProviderFormSchema } from './provider-form-schema';
diff --git a/frontend/src/routes/(app)/settings/notifications/providers/NotificationProviderTestMenu.svelte b/frontend/src/routes/(app)/settings/notifications/providers/NotificationProviderTestMenu.svelte
index 0bd210952..17d8b15ec 100644
--- a/frontend/src/routes/(app)/settings/notifications/providers/NotificationProviderTestMenu.svelte
+++ b/frontend/src/routes/(app)/settings/notifications/providers/NotificationProviderTestMenu.svelte
@@ -1,14 +1,16 @@
+<script module lang="ts">
+ export interface NotificationProviderTestOption {
+ label: string;
+ testType?: string;
+ }
+</script>
+
<script lang="ts">
import * as DropdownMenu from '$lib/components/ui/dropdown-menu';
import { ArcaneButton } from '$lib/components/arcane-button/index.js';
import { m } from '$lib/paraglide/messages';
import { ArrowDownIcon, SendEmailIcon } from '$lib/icons';
- export interface NotificationProviderTestOption {
- label: string;
- testType?: string;
- }
-
interface Props {
disabled?: boolean;
isTesting?: boolean;
diff --git a/frontend/src/routes/(app)/settings/timeouts/+page.svelte b/frontend/src/routes/(app)/settings/timeouts/+page.svelte
index b950a7e7f..900955f97 100644
--- a/frontend/src/routes/(app)/settings/timeouts/+page.svelte
+++ b/frontend/src/routes/(app)/settings/timeouts/+page.svelte
@@ -10,7 +10,6 @@
let { data } = $props();
- const currentSettings = $derived($settingsStore || data.settings!);
const isReadOnly = $derived.by(() => $settingsStore?.uiConfigDisabled);
const formSchema = z.object({
diff --git a/frontend/src/routes/(app)/settings/users/user-table.svelte b/frontend/src/routes/(app)/settings/users/user-table.svelte
index 16a05e13f..fd0aaffce 100644
--- a/frontend/src/routes/(app)/settings/users/user-table.svelte
+++ b/frontend/src/routes/(app)/settings/users/user-table.svelte
@@ -48,7 +48,7 @@
openConfirmDialog({
title: m.users_delete_selected_title({ count: selectedIds.length }),
- message: m.users_delete_selected_message({ count: selectedIds.length }),
+ message: m.users_delete_selected_message({ count: selectedIds.length, users: selectedIds.length }),
confirm: {
label: m.common_delete(),
destructive: true,
@@ -177,10 +177,10 @@
{item}
icon={{ component: UserIcon, variant: 'blue' }}
title={(item: User) => item.username}
- subtitle={(item: User) => ((mobileFieldVisibility.email ?? true) && item.email ? item.email : null)}
+ subtitle={(item: User) => ((mobileFieldVisibility['email'] ?? true) && item.email ? item.email : null)}
badges={[
(item: User) =>
- (mobileFieldVisibility.roles ?? true)
+ (mobileFieldVisibility['roles'] ?? true)
? {
variant: getRoleBadgeVariant(item.roles) === 'red' ? 'red' : 'green',
text: getRoleText(item.roles)
@@ -193,7 +193,7 @@
getValue: (item: User) => item.displayName,
icon: UserIcon,
iconVariant: 'gray' as const,
- show: (mobileFieldVisibility.displayName ?? true) && !!item.displayName
+ show: (mobileFieldVisibility['displayName'] ?? true) && !!item.displayName
}
]}
rowActions={RowActions}
diff --git a/frontend/src/routes/(app)/swarm/cluster/+page.svelte b/frontend/src/routes/(app)/swarm/cluster/+page.svelte
index 475d5c022..ee722745c 100644
--- a/frontend/src/routes/(app)/swarm/cluster/+page.svelte
+++ b/frontend/src/routes/(app)/swarm/cluster/+page.svelte
@@ -25,6 +25,8 @@
import { fromStore } from 'svelte/store';
import { toast } from 'svelte-sonner';
+ let {}: PageProps = $props();
+
const storeUser = fromStore(userStore);
const isAdmin = $derived(!!storeUser.current?.roles?.includes('admin'));
diff --git a/frontend/src/routes/(app)/swarm/configs/+page.svelte b/frontend/src/routes/(app)/swarm/configs/+page.svelte
index f69695d94..8f681ae81 100644
--- a/frontend/src/routes/(app)/swarm/configs/+page.svelte
+++ b/frontend/src/routes/(app)/swarm/configs/+page.svelte
@@ -18,6 +18,8 @@
import { formatDistanceToNow } from 'date-fns';
import { openConfirmDialog } from '$lib/components/confirm-dialog';
+ let {}: PageProps = $props();
+
const storeUser = fromStore(userStore);
const isAdmin = $derived(!!storeUser.current?.roles?.includes('admin'));
@@ -33,10 +35,8 @@
delete: false
});
- const selectedConfig = $derived(configs.find((config) => config.id === selectedConfigId) ?? null);
-
function getSpecName(spec: Record<string, unknown> | null | undefined, fallback: string): string {
- const name = spec && typeof spec === 'object' ? (spec as Record<string, unknown>).Name : undefined;
+ const name = spec && typeof spec === 'object' ? (spec as Record<string, unknown>)['Name'] : undefined;
return typeof name === 'string' && name.trim() ? name : fallback.slice(0, 12);
}
@@ -67,8 +67,8 @@
function selectConfig(config: SwarmConfigSummary) {
selectedConfigId = config.id;
const spec = (config.spec ?? {}) as Record<string, unknown>;
- editName = typeof spec.Name === 'string' ? spec.Name : '';
- editData = typeof spec.Data === 'string' ? decodeBase64ToText(spec.Data) : '';
+ editName = typeof spec['Name'] === 'string' ? spec['Name'] : '';
+ editData = typeof spec['Data'] === 'string' ? decodeBase64ToText(spec['Data']) : '';
}
function clearSelectedConfig() {
diff --git a/frontend/src/routes/(app)/swarm/nodes/nodes-table.svelte b/frontend/src/routes/(app)/swarm/nodes/nodes-table.svelte
index 134d65a5c..e03343d18 100644
--- a/frontend/src/routes/(app)/swarm/nodes/nodes-table.svelte
+++ b/frontend/src/routes/(app)/swarm/nodes/nodes-table.svelte
@@ -104,7 +104,8 @@
}
function regenerateAgentDeployment() {
- if (!selectedNode) return;
+ const node = selectedNode;
+ if (!node) return;
openConfirmDialog({
title: m.environments_regenerate_dialog_title(),
@@ -114,7 +115,7 @@
destructive: true,
action: async () => {
try {
- await loadAgentDeployment(selectedNode, true);
+ await loadAgentDeployment(node, true);
toast.success(m.environments_regenerate_key_success());
} catch {
toast.error(m.environments_regenerate_key_failed());
@@ -313,12 +314,12 @@
variant: item.role === 'manager' ? 'purple' : 'blue'
})}
title={(item: SwarmNodeSummary) => item.hostname}
- subtitle={(item: SwarmNodeSummary) => ((mobileFieldVisibility.engineVersion ?? false) ? (item.engineVersion ?? '') : null)}
+ subtitle={(item: SwarmNodeSummary) => ((mobileFieldVisibility['engineVersion'] ?? false) ? (item.engineVersion ?? '') : null)}
badges={[
(item: SwarmNodeSummary) =>
- (mobileFieldVisibility.status ?? true) ? { variant: statusVariant(item.status), text: item.status } : null,
+ (mobileFieldVisibility['status'] ?? true) ? { variant: statusVariant(item.status), text: item.status } : null,
(item: SwarmNodeSummary) =>
- (mobileFieldVisibility.agent ?? true)
+ (mobileFieldVisibility['agent'] ?? true)
? {
variant: getSwarmNodeAgentVariant(item.agent?.state),
text: getSwarmNodeAgentLabel(item.agent?.state)
@@ -331,14 +332,14 @@
getValue: (item: SwarmNodeSummary) => capitalizeFirstLetter(item.role),
icon: EnvironmentsIcon,
iconVariant: 'gray' as const,
- show: mobileFieldVisibility.role ?? true
+ show: mobileFieldVisibility['role'] ?? true
},
{
label: m.swarm_availability(),
getValue: (item: SwarmNodeSummary) => capitalizeFirstLetter(item.availability),
icon: EnvironmentsIcon,
iconVariant: 'gray' as const,
- show: mobileFieldVisibility.availability ?? true
+ show: mobileFieldVisibility['availability'] ?? true
},
{
label: m.common_labels(),
@@ -346,14 +347,14 @@
`${Object.keys(item.labels ?? {}).length + Object.keys(item.systemLabels ?? {}).length} labels`,
icon: TagIcon,
iconVariant: 'gray' as const,
- show: mobileFieldVisibility.labels ?? true
+ show: mobileFieldVisibility['labels'] ?? true
},
{
label: m.swarm_node_agent_column(),
getValue: (item: SwarmNodeSummary) => getSwarmNodeAgentLabel(item.agent?.state),
icon: EdgeConnectionIcon,
iconVariant: 'gray' as const,
- show: mobileFieldVisibility.agent ?? true
+ show: mobileFieldVisibility['agent'] ?? true
}
]}
rowActions={RowActions}
diff --git a/frontend/src/routes/(app)/swarm/nodes/swarm-node-label-dialog.svelte b/frontend/src/routes/(app)/swarm/nodes/swarm-node-label-dialog.svelte
index c6bd956b9..ac857ef91 100644
--- a/frontend/src/routes/(app)/swarm/nodes/swarm-node-label-dialog.svelte
+++ b/frontend/src/routes/(app)/swarm/nodes/swarm-node-label-dialog.svelte
@@ -28,7 +28,7 @@
await onAdd(key.trim(), value.trim());
handleCancel();
} catch (err) {
- toast.error(m.common_update_failed({ name: m.common_labels() }) + ': ' + extractApiErrorMessage(err));
+ toast.error(m.common_update_failed({ resource: m.common_labels() }) + ': ' + extractApiErrorMessage(err));
} finally {
isSubmitting = false;
}
diff --git a/frontend/src/routes/(app)/swarm/secrets/+page.svelte b/frontend/src/routes/(app)/swarm/secrets/+page.svelte
index 5ce1a03ed..c1c18fdfa 100644
--- a/frontend/src/routes/(app)/swarm/secrets/+page.svelte
+++ b/frontend/src/routes/(app)/swarm/secrets/+page.svelte
@@ -18,6 +18,8 @@
import { formatDistanceToNow } from 'date-fns';
import { openConfirmDialog } from '$lib/components/confirm-dialog';
+ let {}: PageProps = $props();
+
const storeUser = fromStore(userStore);
const isAdmin = $derived(!!storeUser.current?.roles?.includes('admin'));
@@ -33,10 +35,8 @@
delete: false
});
- const selectedSecret = $derived(secrets.find((secret) => secret.id === selectedSecretId) ?? null);
-
function getSpecName(spec: Record<string, unknown> | null | undefined, fallback: string): string {
- const name = spec && typeof spec === 'object' ? (spec as Record<string, unknown>).Name : undefined;
+ const name = spec && typeof spec === 'object' ? (spec as Record<string, unknown>)['Name'] : undefined;
return typeof name === 'string' && name.trim() ? name : fallback.slice(0, 12);
}
@@ -67,8 +67,8 @@
function selectSecret(secret: SwarmSecretSummary) {
selectedSecretId = secret.id;
const spec = (secret.spec ?? {}) as Record<string, unknown>;
- editName = typeof spec.Name === 'string' ? spec.Name : '';
- editData = typeof spec.Data === 'string' ? decodeBase64ToText(spec.Data) : '';
+ editName = typeof spec['Name'] === 'string' ? spec['Name'] : '';
+ editData = typeof spec['Data'] === 'string' ? decodeBase64ToText(spec['Data']) : '';
}
function clearSelectedSecret() {
diff --git a/frontend/src/routes/(app)/swarm/services/[serviceId]/+page.svelte b/frontend/src/routes/(app)/swarm/services/[serviceId]/+page.svelte
index dd53ba0d4..aeb5350fb 100644
--- a/frontend/src/routes/(app)/swarm/services/[serviceId]/+page.svelte
+++ b/frontend/src/routes/(app)/swarm/services/[serviceId]/+page.svelte
@@ -58,7 +58,6 @@
let userSelectedTab = $state<string>('overview');
let userScaleReplicas = $state<number | null>(null);
let userScaleReplicasServiceId = $state<string | null>(null);
- let isRefreshing = $state(false);
let isLoading = $state({ update: false, rollback: false, remove: false, scale: false });
// Editor state
@@ -153,11 +152,11 @@
const hostname = $derived(containerSpec?.Hostname || '');
const endpointPorts = $derived<SwarmServicePort[]>(
- ((service?.endpoint?.Ports as RawSwarmServicePort[] | undefined) ?? []).map(normalizePort)
+ ((service?.endpoint?.['Ports'] as RawSwarmServicePort[] | undefined) ?? []).map(normalizePort)
);
const specNetworks = $derived<ServiceNetworkAttachment[]>((spec?.TaskTemplate?.Networks ?? []).map(normalizeNetworkAttachment));
const virtualIPs = $derived<ServiceVirtualIP[]>(
- ((service?.endpoint?.VirtualIPs as RawServiceVirtualIP[] | undefined) ?? []).map(normalizeVirtualIP)
+ ((service?.endpoint?.['VirtualIPs'] as RawServiceVirtualIP[] | undefined) ?? []).map(normalizeVirtualIP)
);
const networkDetails = $derived<Record<string, ServiceNetworkDetail>>(service?.networkDetails ?? {});
@@ -195,11 +194,7 @@
}
async function refreshData() {
- isRefreshing = true;
await invalidateAll();
- setTimeout(() => {
- isRefreshing = false;
- }, 500);
}
// Editor
@@ -340,7 +335,7 @@
</div>
{/snippet}
- {#snippet tabContent(activeTab)}
+ {#snippet tabContent(_activeTab)}
<Tabs.Content value="overview" class="h-full">
<ServiceOverview {service} {serviceName} {serviceImage} {serviceMode} {desiredReplicas} {labels} />
</Tabs.Content>
diff --git a/frontend/src/routes/(app)/swarm/services/components/ServiceConfiguration.svelte b/frontend/src/routes/(app)/swarm/services/components/ServiceConfiguration.svelte
index d34eca2ef..e9c722389 100644
--- a/frontend/src/routes/(app)/swarm/services/components/ServiceConfiguration.svelte
+++ b/frontend/src/routes/(app)/swarm/services/components/ServiceConfiguration.svelte
@@ -36,7 +36,7 @@
{#if env.includes('=')}
{@const [key, ...valueParts] = env.split('=')}
{@const value = valueParts.join('=')}
- <KeyValueCard label={key}>{value}</KeyValueCard>
+ <KeyValueCard label={key ?? ''}>{value}</KeyValueCard>
{:else}
<KeyValueCard
label={m.common_name()}
diff --git a/frontend/src/routes/(app)/swarm/services/components/ServiceLogsPanel.svelte b/frontend/src/routes/(app)/swarm/services/components/ServiceLogsPanel.svelte
index d367c0df2..61868bd31 100644
--- a/frontend/src/routes/(app)/swarm/services/components/ServiceLogsPanel.svelte
+++ b/frontend/src/routes/(app)/swarm/services/components/ServiceLogsPanel.svelte
@@ -12,7 +12,7 @@
} = $props();
let isStreaming = $state(false);
- let viewer = $state<LogViewer>();
+ let viewer = $state<ReturnType<typeof LogViewer>>();
let autoScroll = $state(true);
let autoStartLogs = $state(false);
let showParsedJson = $state(false);
@@ -25,10 +25,6 @@
viewer?.stopLogStream();
}
- function handleClear() {
- viewer?.clearLogs();
- }
-
async function handleRefresh() {
await viewer?.clearLogs({ hard: true, restart: true });
}
@@ -72,7 +68,6 @@
disabled={!serviceId}
onStart={handleStart}
onStop={handleStop}
- onClear={handleClear}
onRefresh={handleRefresh}
/>
</div>
@@ -90,7 +85,6 @@
height="calc(100vh - 320px)"
onStart={handleStreamStart}
onStop={handleStreamStop}
- onClear={handleClear}
/>
</div>
</Card.Content>
diff --git a/frontend/src/routes/(app)/swarm/services/components/ServiceNetwork.svelte b/frontend/src/routes/(app)/swarm/services/components/ServiceNetwork.svelte
index 6881152e1..59dd4a0de 100644
--- a/frontend/src/routes/(app)/swarm/services/components/ServiceNetwork.svelte
+++ b/frontend/src/routes/(app)/swarm/services/components/ServiceNetwork.svelte
@@ -181,8 +181,8 @@
{#if info.configNetwork.scope}
<StatusBadge text={info.configNetwork.scope} variant="gray" size="sm" minWidth="none" />
{/if}
- {#if info.configNetwork.options?.parent}
- <span class="text-muted-foreground text-xs">{info.configNetwork.options.parent}</span>
+ {#if info.configNetwork.options?.['parent']}
+ <span class="text-muted-foreground text-xs">{info.configNetwork.options['parent']}</span>
{/if}
</div>
</div>
diff --git a/frontend/src/routes/(app)/swarm/services/components/ServiceOverview.svelte b/frontend/src/routes/(app)/swarm/services/components/ServiceOverview.svelte
index c281f580e..f880bddc3 100644
--- a/frontend/src/routes/(app)/swarm/services/components/ServiceOverview.svelte
+++ b/frontend/src/routes/(app)/swarm/services/components/ServiceOverview.svelte
@@ -175,28 +175,28 @@
</Card.Content>
</Card.Root>
- {#if updateStatus?.State}
+ {#if updateStatus?.['State']}
<Card.Root variant="subtle" class="sm:col-span-2">
<Card.Content class="flex flex-col gap-2 p-4">
<div class="text-muted-foreground text-xs font-semibold tracking-wide uppercase">{m.common_status()}</div>
<div class="flex items-center gap-2">
<StatusBadge
- variant={updateStatus.State === 'completed'
+ variant={updateStatus['State'] === 'completed'
? 'green'
- : updateStatus.State === 'updating'
+ : updateStatus['State'] === 'updating'
? 'amber'
- : updateStatus.State === 'paused'
+ : updateStatus['State'] === 'paused'
? 'amber'
: 'red'}
- text={updateStatus.State}
+ text={updateStatus['State']}
/>
- {#if updateStatus.Message}
- <span class="text-muted-foreground text-sm">{updateStatus.Message}</span>
+ {#if updateStatus['Message']}
+ <span class="text-muted-foreground text-sm">{updateStatus['Message']}</span>
{/if}
</div>
- {#if updateStatus.CompletedAt}
+ {#if updateStatus['CompletedAt']}
<div class="text-muted-foreground text-xs">
- {formatRelative(updateStatus.CompletedAt)}
+ {formatRelative(updateStatus['CompletedAt'])}
</div>
{/if}
</Card.Content>
diff --git a/frontend/src/routes/(app)/swarm/services/components/ServiceStorage.svelte b/frontend/src/routes/(app)/swarm/services/components/ServiceStorage.svelte
index c54fa5b01..bfeaa38f4 100644
--- a/frontend/src/routes/(app)/swarm/services/components/ServiceStorage.svelte
+++ b/frontend/src/routes/(app)/swarm/services/components/ServiceStorage.svelte
@@ -30,7 +30,7 @@
function isBindBackedVolume(mount: SwarmServiceMount): boolean {
const opts = mount.volumeOptions;
- return opts?.type === 'none' && opts?.o === 'bind';
+ return opts?.['type'] === 'none' && opts?.['o'] === 'bind';
}
function getMountLabel(type: string): string {
@@ -122,12 +122,12 @@
</Card.Root>
{/if}
- {#if bindBacked && mount.volumeOptions?.device}
+ {#if bindBacked && mount.volumeOptions?.['device']}
<Card.Root variant="outlined">
<Card.Content class="flex flex-col p-3">
<div class="text-muted-foreground mb-2 text-xs font-semibold">{m.dashboard_meter_gpu_device()}:</div>
<div class="text-foreground cursor-pointer font-mono text-sm font-medium break-all select-all">
- {mount.volumeOptions.device}
+ {mount.volumeOptions['device']}
</div>
</Card.Content>
</Card.Root>
diff --git a/frontend/src/routes/(app)/swarm/services/service-editor-dialog.svelte b/frontend/src/routes/(app)/swarm/services/service-editor-dialog.svelte
index 4a8af24d2..2810a43a4 100644
--- a/frontend/src/routes/(app)/swarm/services/service-editor-dialog.svelte
+++ b/frontend/src/routes/(app)/swarm/services/service-editor-dialog.svelte
@@ -126,6 +126,7 @@
isLoading,
onSubmit
}: ServiceEditorDialogProps = $props();
+ void open;
function asRecord(value: unknown): Record<string, unknown> | undefined {
return value && typeof value === 'object' && !Array.isArray(value) ? (value as Record<string, unknown>) : undefined;
@@ -206,7 +207,7 @@
envVars:
containerSpec?.Env?.map((envEntry) => {
const [key, ...valueParts] = envEntry.split('=');
- return { key, value: valueParts.join('=') };
+ return { key: key ?? '', value: valueParts.join('=') };
}) ?? [],
mounts:
containerSpec?.Mounts?.map((mount) => ({
@@ -282,36 +283,36 @@
}
const spec = structuredClone(form.baseSpec ?? {});
- spec.Name = form.name.value.trim();
+ spec['Name'] = form.name.value.trim();
const taskTemplate = ensureRecord(spec, 'TaskTemplate');
const containerSpec = ensureRecord(taskTemplate, 'ContainerSpec');
- containerSpec.Image = form.image.value.trim();
+ containerSpec['Image'] = form.image.value.trim();
- const baseMode = asRecord(form.baseSpec.Mode);
+ const baseMode = asRecord(form.baseSpec['Mode']);
if (form.mode === 'replicated') {
- spec.Mode = { Replicated: { Replicas: Math.max(0, parseInt(form.replicas.value, 10) || 1) } };
+ spec['Mode'] = { Replicated: { Replicas: Math.max(0, parseInt(form.replicas.value, 10) || 1) } };
} else if (form.mode === 'global') {
- spec.Mode = { Global: {} };
+ spec['Mode'] = { Global: {} };
} else if (form.mode === 'replicated-job') {
- spec.Mode = { ReplicatedJob: structuredClone(asRecord(baseMode?.ReplicatedJob) ?? {}) };
+ spec['Mode'] = { ReplicatedJob: structuredClone(asRecord(baseMode?.['ReplicatedJob']) ?? {}) };
} else {
- spec.Mode = { GlobalJob: structuredClone(asRecord(baseMode?.GlobalJob) ?? {}) };
+ spec['Mode'] = { GlobalJob: structuredClone(asRecord(baseMode?.['GlobalJob']) ?? {}) };
}
// Add optional container config
const commandParts = form.command.value.trim().split(' ').filter(Boolean);
if (commandParts.length > 0) {
- containerSpec.Command = commandParts;
+ containerSpec['Command'] = commandParts;
} else {
- delete containerSpec.Command;
+ delete containerSpec['Command'];
}
const argParts = form.args.value.trim().split(' ').filter(Boolean);
if (argParts.length > 0) {
- containerSpec.Args = argParts;
+ containerSpec['Args'] = argParts;
} else {
- delete containerSpec.Args;
+ delete containerSpec['Args'];
}
assignOptional(containerSpec, 'Dir', form.workingDir.value);
@@ -321,21 +322,21 @@
// Add environment variables
const filteredEnvVars = form.envVars.filter((entry) => entry.key.trim());
if (filteredEnvVars.length > 0) {
- containerSpec.Env = filteredEnvVars.map((entry) => `${entry.key}=${entry.value}`);
+ containerSpec['Env'] = filteredEnvVars.map((entry) => `${entry.key}=${entry.value}`);
} else {
- delete containerSpec.Env;
+ delete containerSpec['Env'];
}
// Add mounts
const filteredMounts = form.mounts.filter((mount) => mount.source.trim() && mount.target.trim());
if (filteredMounts.length > 0) {
- containerSpec.Mounts = filteredMounts.map((mount) => ({
+ containerSpec['Mounts'] = filteredMounts.map((mount) => ({
Type: mount.type,
Source: mount.source,
Target: mount.target
}));
} else {
- delete containerSpec.Mounts;
+ delete containerSpec['Mounts'];
}
// Add labels
@@ -345,24 +346,24 @@
filteredLabels.forEach((label) => {
nextLabels[label.key] = label.value;
});
- spec.Labels = nextLabels;
+ spec['Labels'] = nextLabels;
} else {
- delete spec.Labels;
+ delete spec['Labels'];
}
// Add ports
const filteredPorts = form.ports.filter((port) => port.target.trim());
if (filteredPorts.length > 0) {
const endpointSpec = ensureRecord(spec, 'EndpointSpec');
- endpointSpec.Ports = filteredPorts.map((port) => ({
+ endpointSpec['Ports'] = filteredPorts.map((port) => ({
TargetPort: parseInt(port.target, 10),
PublishedPort: port.published ? parseInt(port.published, 10) : undefined,
Protocol: port.protocol
}));
} else {
- const endpointSpec = asRecord(spec.EndpointSpec);
+ const endpointSpec = asRecord(spec['EndpointSpec']);
if (endpointSpec) {
- delete endpointSpec.Ports;
+ delete endpointSpec['Ports'];
}
}
diff --git a/frontend/src/routes/(app)/swarm/services/services-table.svelte b/frontend/src/routes/(app)/swarm/services/services-table.svelte
index fada01e41..22cba4008 100644
--- a/frontend/src/routes/(app)/swarm/services/services-table.svelte
+++ b/frontend/src/routes/(app)/swarm/services/services-table.svelte
@@ -187,10 +187,10 @@
variant: modeIconVariant(item.mode)
})}
title={(item: SwarmServiceSummary) => getShortName(item.name, item.stackName)}
- subtitle={(item: SwarmServiceSummary) => ((mobileFieldVisibility.stackName ?? true) ? (item.stackName ?? null) : null)}
+ subtitle={(item: SwarmServiceSummary) => ((mobileFieldVisibility['stackName'] ?? true) ? (item.stackName ?? null) : null)}
badges={[
(item: SwarmServiceSummary) =>
- (mobileFieldVisibility.mode ?? true)
+ (mobileFieldVisibility['mode'] ?? true)
? { variant: getSwarmServiceModeVariant(item.mode), text: getSwarmServiceModeLabel(item.mode) }
: null
]}
@@ -200,7 +200,7 @@
getValue: (item: SwarmServiceSummary) => `${item.runningReplicas} / ${item.replicas}`,
icon: GlobeIcon,
iconVariant: 'gray' as const,
- show: mobileFieldVisibility.replicas ?? true
+ show: mobileFieldVisibility['replicas'] ?? true
},
{
label: m.swarm_nodes_column(),
@@ -210,21 +210,21 @@
: m.common_na(),
icon: NetworksIcon,
iconVariant: 'gray' as const,
- show: mobileFieldVisibility.nodes ?? true
+ show: mobileFieldVisibility['nodes'] ?? true
},
{
label: m.swarm_networks(),
getValue: (item: SwarmServiceSummary) => (item.networks?.length ? item.networks.join(', ') : m.common_na()),
icon: NetworksIcon,
iconVariant: 'gray' as const,
- show: mobileFieldVisibility.networks ?? false
+ show: mobileFieldVisibility['networks'] ?? false
},
{
label: m.common_ports(),
getValue: (item: SwarmServiceSummary) => formatPortsList(item.ports).join(', ') || m.common_na(),
icon: GlobeIcon,
iconVariant: 'gray' as const,
- show: mobileFieldVisibility.ports ?? false
+ show: mobileFieldVisibility['ports'] ?? false
}
]}
rowActions={RowActions}
diff --git a/frontend/src/routes/(app)/swarm/stacks/[name]/+page.svelte b/frontend/src/routes/(app)/swarm/stacks/[name]/+page.svelte
index c33faedc7..d4202a6a7 100644
--- a/frontend/src/routes/(app)/swarm/stacks/[name]/+page.svelte
+++ b/frontend/src/routes/(app)/swarm/stacks/[name]/+page.svelte
@@ -1,6 +1,5 @@
<script lang="ts">
import { goto } from '$app/navigation';
- import { ArcaneButton } from '$lib/components/arcane-button/index.js';
import { TabBar, type TabItem } from '$lib/components/tab-bar';
import CodeEditor from '$lib/components/code-editor/editor.svelte';
import * as Card from '$lib/components/ui/card';
@@ -121,7 +120,7 @@
$effect(() => {
const validTabs = tabItems.map((item) => item.value as StackTab);
- if (validTabs.length > 0 && !validTabs.includes(selectedTab)) {
+ if (validTabs.length > 0 && !validTabs.includes(selectedTab) && validTabs[0]) {
selectedTab = validTabs[0];
}
});
diff --git a/frontend/src/routes/(app)/swarm/stacks/stacks-table.svelte b/frontend/src/routes/(app)/swarm/stacks/stacks-table.svelte
index c755a1406..1685df224 100644
--- a/frontend/src/routes/(app)/swarm/stacks/stacks-table.svelte
+++ b/frontend/src/routes/(app)/swarm/stacks/stacks-table.svelte
@@ -102,21 +102,22 @@
variant: 'purple'
})}
title={(item: SwarmStackSummary) => item.name}
- subtitle={(item: SwarmStackSummary) => ((mobileFieldVisibility.createdAt ?? true) ? formatTimestamp(item.createdAt) : null)}
+ subtitle={(item: SwarmStackSummary) =>
+ (mobileFieldVisibility['createdAt'] ?? true) ? formatTimestamp(item.createdAt) : null}
fields={[
{
label: m.services(),
getValue: (item: SwarmStackSummary) => String(item.services),
icon: LayersIcon,
iconVariant: 'gray' as const,
- show: mobileFieldVisibility.services ?? true
+ show: mobileFieldVisibility['services'] ?? true
},
{
label: m.common_updated(),
getValue: (item: SwarmStackSummary) => formatTimestamp(item.updatedAt),
icon: LayersIcon,
iconVariant: 'gray' as const,
- show: mobileFieldVisibility.updatedAt ?? false
+ show: mobileFieldVisibility['updatedAt'] ?? false
}
]}
rowActions={RowActions}
diff --git a/frontend/src/routes/(app)/swarm/tasks/tasks-table.svelte b/frontend/src/routes/(app)/swarm/tasks/tasks-table.svelte
index 842186f82..6964b8f16 100644
--- a/frontend/src/routes/(app)/swarm/tasks/tasks-table.svelte
+++ b/frontend/src/routes/(app)/swarm/tasks/tasks-table.svelte
@@ -76,10 +76,10 @@
variant: iconVariant(item.currentState)
})}
title={(item: SwarmTaskSummary) => item.name}
- subtitle={(item: SwarmTaskSummary) => ((mobileFieldVisibility.serviceName ?? true) ? item.serviceName : null)}
+ subtitle={(item: SwarmTaskSummary) => ((mobileFieldVisibility['serviceName'] ?? true) ? item.serviceName : null)}
badges={[
(item: SwarmTaskSummary) =>
- (mobileFieldVisibility.currentState ?? true)
+ (mobileFieldVisibility['currentState'] ?? true)
? { variant: stateVariant(item.currentState), text: item.currentState }
: null
]}
@@ -89,14 +89,14 @@
getValue: (item: SwarmTaskSummary) => item.nodeName,
icon: ConnectionIcon,
iconVariant: 'gray' as const,
- show: mobileFieldVisibility.nodeName ?? true
+ show: mobileFieldVisibility['nodeName'] ?? true
},
{
label: m.swarm_desired_state(),
getValue: (item: SwarmTaskSummary) => item.desiredState,
icon: ConnectionIcon,
iconVariant: 'gray' as const,
- show: mobileFieldVisibility.desiredState ?? false
+ show: mobileFieldVisibility['desiredState'] ?? false
}
]}
/>
diff --git a/frontend/src/routes/(app)/updates/+page.svelte b/frontend/src/routes/(app)/updates/+page.svelte
index 34d9039ca..cbcf673f3 100644
--- a/frontend/src/routes/(app)/updates/+page.svelte
+++ b/frontend/src/routes/(app)/updates/+page.svelte
@@ -66,16 +66,6 @@
)
);
const envId = $derived(environmentStore.selected?.id || '0');
- const containers = $derived(
- (containerSnapshot?.envId === envId ? containerSnapshot.value : null) ??
- containersQuery.data ??
- (envId === data.envId ? initialContainers : emptyContainers)
- );
- const projects = $derived(
- (projectSnapshot?.envId === envId ? projectSnapshot.value : null) ??
- projectsQuery.data ??
- (envId === data.envId ? initialProjects : emptyProjects)
- );
const containersQuery = createQuery(() => ({
queryKey: queryKeys.containers.list(envId, ensureStandaloneContainerUpdatesFilter(containerRequestOptions)),
@@ -92,6 +82,17 @@
refetchOnMount: false
}));
+ const containers = $derived(
+ (containerSnapshot?.envId === envId ? containerSnapshot.value : null) ??
+ containersQuery.data ??
+ (envId === data.envId ? initialContainers : emptyContainers)
+ );
+ const projects = $derived(
+ (projectSnapshot?.envId === envId ? projectSnapshot.value : null) ??
+ projectsQuery.data ??
+ (envId === data.envId ? initialProjects : emptyProjects)
+ );
+
const projectUpdatedImageRefs = $derived.by(() => {
const refs = new Set<string>();
for (const project of projects.data ?? []) {
@@ -217,7 +218,7 @@
<Tabs.Content value="containers" class="mt-4">
{#key `${envId}-containers`}
<ContainerUpdatesTable
- bind:containers={() => containers, (value) => (containerSnapshot = { envId, value })}
+ {containers}
bind:requestOptions={containerRequestOptions}
onRefreshData={async (options) => {
containerRequestOptions = ensureStandaloneContainerUpdatesFilter(options);
@@ -232,7 +233,7 @@
<Tabs.Content value="projects" class="mt-4">
{#key `${envId}-projects`}
<ProjectUpdatesTable
- bind:projects={() => projects, (value) => (projectSnapshot = { envId, value })}
+ {projects}
bind:requestOptions={projectRequestOptions}
updateInfoByRef={projectUpdateDetailsQuery.data}
onRefreshData={async (options) => {
diff --git a/frontend/src/routes/(app)/updates/project-updates-table.svelte b/frontend/src/routes/(app)/updates/project-updates-table.svelte
index bc9ee1ec0..ab33caf96 100644
--- a/frontend/src/routes/(app)/updates/project-updates-table.svelte
+++ b/frontend/src/routes/(app)/updates/project-updates-table.svelte
@@ -38,10 +38,10 @@
return format(parsed, 'PP p');
}
- function summarizeImageRefs(imageRefs: string[]) {
+ function summarizeImageRefs(imageRefs: string[]): string {
if (imageRefs.length === 0) return '-';
- if (imageRefs.length === 1) return imageRefs[0];
- return `${imageRefs[0]} +${imageRefs.length - 1} more`;
+ if (imageRefs.length === 1) return imageRefs[0] ?? '-';
+ return `${imageRefs[0] ?? ''} +${imageRefs.length - 1} more`;
}
function resolveProjectValue(project: Project, mode: 'current' | 'latest') {
@@ -51,7 +51,8 @@
return m.images_has_updates();
}
- const info = updateInfoByRef[updatedRefs[0]];
+ const firstRef = updatedRefs[0];
+ const info = firstRef ? updateInfoByRef[firstRef] : undefined;
if (!info) return '-';
const digest = mode === 'current' ? info.currentDigest : info.latestDigest;
@@ -66,7 +67,8 @@
function resolveCheckedAt(project: Project) {
const updatedRefs = project.updateInfo?.updatedImageRefs ?? [];
if (updatedRefs.length === 1) {
- return updateInfoByRef[updatedRefs[0]]?.checkTime ?? project.updateInfo?.lastCheckedAt ?? '';
+ const firstRef = updatedRefs[0];
+ return (firstRef ? updateInfoByRef[firstRef]?.checkTime : undefined) ?? project.updateInfo?.lastCheckedAt ?? '';
}
return project.updateInfo?.lastCheckedAt ?? '';
}
diff --git a/frontend/src/routes/(app)/volumes/components/volume-backup-table.svelte b/frontend/src/routes/(app)/volumes/components/volume-backup-table.svelte
index 0a1b36651..b9a1b8d01 100644
--- a/frontend/src/routes/(app)/volumes/components/volume-backup-table.svelte
+++ b/frontend/src/routes/(app)/volumes/components/volume-backup-table.svelte
@@ -50,7 +50,6 @@
sort: { column: 'createdAt', direction: 'desc' }
});
- let loading = $state(true);
let creating = $state(false);
let restoringFiles = $state(false);
let showRestoreFiles = $state(false);
@@ -66,7 +65,6 @@
});
async function loadData(options: SearchPaginationSortRequest): Promise<VolumeBackupListResponse> {
- loading = true;
try {
const result = await volumeBackupService.listBackups(volumeName, options);
backupsPaginated = result;
@@ -75,8 +73,6 @@
} catch (e: any) {
toast.error(e.message || 'Failed to load backups');
return backupsPaginated;
- } finally {
- loading = false;
}
}
@@ -298,7 +294,7 @@
getValue: (item) => formatBytes(item.size),
icon: InfoIcon,
iconVariant: 'gray',
- show: mobileFieldVisibility.size ?? true
+ show: mobileFieldVisibility['size'] ?? true
}
]}
footer={{
diff --git a/frontend/src/routes/(app)/volumes/volume-table.svelte b/frontend/src/routes/(app)/volumes/volume-table.svelte
index 92e67b55e..5ef4d3a48 100644
--- a/frontend/src/routes/(app)/volumes/volume-table.svelte
+++ b/frontend/src/routes/(app)/volumes/volume-table.svelte
@@ -40,7 +40,7 @@
});
let customSettings = $state<Record<string, unknown>>({});
let showInternal = $derived.by(() => {
- return (customSettings.showInternalVolumes as boolean) ?? false;
+ return (customSettings['showInternalVolumes'] as boolean) ?? false;
});
async function refreshVolumes(options: SearchPaginationSortRequest = requestOptions) {
@@ -57,7 +57,7 @@
}
function setShowInternal(value: boolean) {
- const currentSetting = (customSettings.showInternalVolumes as boolean) ?? false;
+ const currentSetting = (customSettings['showInternalVolumes'] as boolean) ?? false;
const currentRequest = requestOptions?.includeInternal ?? false;
if (value === currentSetting && value === currentRequest) return;
@@ -209,7 +209,7 @@
let mobileFieldVisibility = $state<Record<string, boolean>>({});
onMount(() => {
- const persistedInternal = (customSettings.showInternalVolumes as boolean) ?? false;
+ const persistedInternal = (customSettings['showInternalVolumes'] as boolean) ?? false;
const currentInternal = requestOptions?.includeInternal ?? false;
if (persistedInternal !== currentInternal) {
setShowInternal(persistedInternal);
@@ -271,10 +271,10 @@
variant: item.inUse ? 'emerald' : 'amber'
})}
title={(item) => item.name}
- subtitle={(item) => ((mobileFieldVisibility.id ?? true) ? item.id : null)}
+ subtitle={(item) => ((mobileFieldVisibility['id'] ?? true) ? item.id : null)}
badges={[
(item) =>
- (mobileFieldVisibility.inUse ?? true)
+ (mobileFieldVisibility['inUse'] ?? true)
? item.inUse
? { variant: 'green' as const, text: m.common_in_use() }
: { variant: 'amber' as const, text: m.common_unused() }
@@ -286,10 +286,10 @@
getValue: (item: VolumeSummaryDto) => item.driver,
icon: VolumesIcon,
iconVariant: 'gray' as const,
- show: mobileFieldVisibility.driver ?? true
+ show: mobileFieldVisibility['driver'] ?? true
}
]}
- footer={(mobileFieldVisibility.createdAt ?? true)
+ footer={(mobileFieldVisibility['createdAt'] ?? true)
? {
label: m.common_created(),
getValue: (item) => format(new Date(String(item.createdAt)), 'PP p'),
@@ -354,7 +354,7 @@
/>
{#snippet CustomViewOptions()}
- <DropdownMenu.CheckboxItem bind:checked={() => showInternal, (v) => setShowInternal(!!v)}>
+ <DropdownMenu.CheckboxItem checked={showInternal} onCheckedChange={(v) => setShowInternal(!!v)}>
{`${m.common_show()} ${m.internal()} ${m.volumes_title()}`}
</DropdownMenu.CheckboxItem>
{/snippet}
diff --git a/frontend/src/routes/(auth)/+layout.svelte b/frontend/src/routes/(auth)/+layout.svelte
index 099aa46f6..c7ab22429 100644
--- a/frontend/src/routes/(auth)/+layout.svelte
+++ b/frontend/src/routes/(auth)/+layout.svelte
@@ -1,7 +1,5 @@
<script lang="ts">
- import type { Snippet } from 'svelte';
-
- let { children }: { children: Snippet } = $props();
+ let { children }: LayoutProps = $props();
</script>
<main class="flex-1">
diff --git a/frontend/src/routes/(auth)/login/+page.svelte b/frontend/src/routes/(auth)/login/+page.svelte
index b2933f804..542e2cbda 100644
--- a/frontend/src/routes/(auth)/login/+page.svelte
+++ b/frontend/src/routes/(auth)/login/+page.svelte
@@ -3,7 +3,6 @@
import * as Alert from '$lib/components/ui/alert/index.js';
import * as InputGroup from '$lib/components/ui/input-group/index.js';
import { AlertIcon, LockIcon, UserIcon, GithubIcon, OpenIdIcon } from '$lib/icons';
- import type { PageData } from './$types';
import { goto } from '$app/navigation';
import userStore from '$lib/stores/user-store';
import { m } from '$lib/paraglide/messages';
@@ -14,7 +13,7 @@
import { onMount } from 'svelte';
import { createMutation, useQueryClient } from '@tanstack/svelte-query';
- let { data }: { data: PageData } = $props();
+ let { data }: PageProps = $props();
let error = $state<string | null>(null);
let username = $state('');
diff --git a/frontend/src/routes/(auth)/oidc/callback/+page.svelte b/frontend/src/routes/(auth)/oidc/callback/+page.svelte
index bed8546b1..f53f5e071 100644
--- a/frontend/src/routes/(auth)/oidc/callback/+page.svelte
+++ b/frontend/src/routes/(auth)/oidc/callback/+page.svelte
@@ -13,6 +13,8 @@
import { Spinner } from '$lib/components/ui/spinner/index.js';
import { createMutation, useQueryClient } from '@tanstack/svelte-query';
+ let {}: PageProps = $props();
+
let error = $state('');
const queryClient = useQueryClient();
diff --git a/frontend/src/routes/(auth)/oidc/login/+page.svelte b/frontend/src/routes/(auth)/oidc/login/+page.svelte
index ece2abc27..4505db967 100644
--- a/frontend/src/routes/(auth)/oidc/login/+page.svelte
+++ b/frontend/src/routes/(auth)/oidc/login/+page.svelte
@@ -7,6 +7,8 @@
import { Spinner } from '$lib/components/ui/spinner/index.js';
import { createMutation } from '@tanstack/svelte-query';
+ let {}: PageProps = $props();
+
let error = $state('');
const oidcLoginMutation = createMutation(() => ({
diff --git a/go.work.sum b/go.work.sum
index 7ec73a198..af0783e62 100644
--- a/go.work.sum
+++ b/go.work.sum
@@ -106,6 +106,7 @@ github.com/andybalholm/brotli v1.1.1 h1:PR2pgnyFznKEugtsUo0xLdDop5SKXd5Qf5ysW+7X
github.com/andybalholm/brotli v1.1.1/go.mod h1:05ib4cKhjx3OQYUY22hTVd34Bc8upXjOLL2rKwwZBoA=
github.com/andybalholm/brotli v1.2.0 h1:ukwgCxwYrmACq68yiUqwIWnGY0cTPox/M94sVwToPjQ=
github.com/andybalholm/brotli v1.2.0/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY=
+github.com/andybalholm/brotli v1.2.1 h1:R+f5xP285VArJDRgowrfb9DqL18yVK0gKAW/F+eTWro=
github.com/andybalholm/brotli v1.2.1/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY=
github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
@@ -252,11 +253,13 @@ github.com/bwesterb/go-ristretto v1.2.3 h1:1w53tCkGhCQ5djbat3+MH0BAQ5Kfgbt56UZQ/
github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=
github.com/bytedance/gopkg v0.1.3 h1:TPBSwH8RsouGCBcMBktLt1AymVo2TVsBVCY4b6TnZ/M=
github.com/bytedance/gopkg v0.1.3/go.mod h1:576VvJ+eJgyCzdjS+c4+77QF3p7ubbtiKARP3TxducM=
+github.com/bytedance/gopkg v0.1.4 h1:oZnQwnX82KAIWb7033bEwtxvTqXcYMxDBaQxo5JJHWM=
github.com/bytedance/gopkg v0.1.4/go.mod h1:v1zWfPm21Fb+OsyXN2VAHdL6TBb2L88anLQgdyje6R4=
github.com/bytedance/sonic v1.15.0 h1:/PXeWFaR5ElNcVE84U0dOHjiMHQOwNIx3K4ymzh/uSE=
github.com/bytedance/sonic v1.15.0/go.mod h1:tFkWrPz0/CUCLEF4ri4UkHekCIcdnkqXw9VduqpJh0k=
github.com/bytedance/sonic/loader v0.5.0 h1:gXH3KVnatgY7loH5/TkeVyXPfESoqSBSBEiDd5VjlgE=
github.com/bytedance/sonic/loader v0.5.0/go.mod h1:AR4NYCk5DdzZizZ5djGqQ92eEhCCcdf5x77udYiSJRo=
+github.com/bytedance/sonic/loader v0.5.1 h1:Ygpfa9zwRCCKSlrp5bBP/b/Xzc3VxsAW+5NIYXrOOpI=
github.com/bytedance/sonic/loader v0.5.1/go.mod h1:AR4NYCk5DdzZizZ5djGqQ92eEhCCcdf5x77udYiSJRo=
github.com/cenkalti/backoff/v4 v4.1.2 h1:6Yo7N8UP2K6LWZnW94DLVSSrbobcWdVzAYOisuDPIFo=
github.com/cenkalti/backoff/v4 v4.1.2/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=
@@ -458,9 +461,11 @@ github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49P
github.com/gin-contrib/cors v1.7.7/go.mod h1:K5tW0RkzJtWSiOdikXloy8VEZlgdVNpHNw8FpjUPNrE=
github.com/gin-contrib/sse v1.1.0 h1:n0w2GMuUpWDVp7qSpvze6fAu9iRxJY4Hmj6AmBOU05w=
github.com/gin-contrib/sse v1.1.0/go.mod h1:hxRZ5gVpWMT7Z0B0gSNYqqsSCNIJMjzvm6fqCz9vjwM=
+github.com/gin-contrib/sse v1.1.1 h1:uGYpNwTacv5R68bSGMapo62iLTRa9l5zxGCps4hK6ko=
github.com/gin-contrib/sse v1.1.1/go.mod h1:QXzuVkA0YO7o/gun03UI1Q+FTI8ZV/n5t03kIQAI89s=
github.com/gin-gonic/gin v1.11.0 h1:OW/6PLjyusp2PPXtyxKHU0RbX6I/l28FTdDlae5ueWk=
github.com/gin-gonic/gin v1.11.0/go.mod h1:+iq/FyxlGzII0KHiBGjuNn4UNENUlKbGlNmc+W50Dls=
+github.com/gin-gonic/gin v1.12.0 h1:b3YAbrZtnf8N//yjKeU2+MQsh2mY5htkZidOM7O0wG8=
github.com/gin-gonic/gin v1.12.0/go.mod h1:VxccKfsSllpKshkBWgVgRniFFAzFb9csfngsqANjnLc=
github.com/go-chi/chi/v5 v5.2.2 h1:CMwsvRVTbXVytCk1Wd72Zy1LAsAh9GxMmSNWLHCG618=
github.com/go-chi/chi/v5 v5.2.2/go.mod h1:L2yAIGWB3H+phAw1NxKwWM+7eUH/lU8pOMm5hHcoops=
@@ -490,6 +495,7 @@ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJn
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
github.com/go-playground/validator/v10 v10.30.1 h1:f3zDSN/zOma+w6+1Wswgd9fLkdwy06ntQJp0BBvFG0w=
github.com/go-playground/validator/v10 v10.30.1/go.mod h1:oSuBIQzuJxL//3MelwSLD5hc2Tu889bF0Idm9Dg26cM=
+github.com/go-playground/validator/v10 v10.30.2 h1:JiFIMtSSHb2/XBUbWM4i/MpeQm9ZK2xqPNk8vgvu5JQ=
github.com/go-playground/validator/v10 v10.30.2/go.mod h1:mAf2pIOVXjTEBrwUMGKkCWKKPs9NheYGabeB04txQSc=
github.com/go-rod/rod v0.116.2 h1:A5t2Ky2A+5eD/ZJQr1EfsQSe5rms5Xof/qj296e+ZqA=
github.com/go-rod/rod v0.116.2/go.mod h1:H+CMO9SCNc2TJ2WfrG+pKhITz57uGNYU43qYHh438Mg=
@@ -506,6 +512,7 @@ github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y=
github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8=
github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4=
github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
+github.com/goccy/go-json v0.10.6 h1:p8HrPJzOakx/mn/bQtjgNjdTcN+/S6FcG2CTtQOrHVU=
github.com/goccy/go-json v0.10.6/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
github.com/goccy/go-yaml v1.19.0/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA=
github.com/gocql/gocql v0.0.0-20210515062232-b7ef815b4556 h1:N/MD/sr6o61X+iZBAT2qEUF023s4KbA8RWfKzl0L6MQ=
@@ -522,9 +529,13 @@ github.com/gofiber/fiber/v2 v2.52.11 h1:5f4yzKLcBcF8ha1GQTWB+mpblWz3Vz6nSAbTL31H
github.com/gofiber/fiber/v2 v2.52.11/go.mod h1:YEcBbO/FB+5M1IZNBP9FO3J9281zgPAreiI1oqg8nDw=
github.com/gofiber/fiber/v2 v2.52.12 h1:0LdToKclcPOj8PktUdIKo9BUohjjwfnQl42Dhw8/WUw=
github.com/gofiber/fiber/v2 v2.52.12/go.mod h1:YEcBbO/FB+5M1IZNBP9FO3J9281zgPAreiI1oqg8nDw=
+github.com/gofiber/fiber/v2 v2.52.13 h1:TOKP64iqC9b5P49VrBW5tHhUOvDyrtJ0xePEfzJbCbk=
github.com/gofiber/fiber/v2 v2.52.13/go.mod h1:YEcBbO/FB+5M1IZNBP9FO3J9281zgPAreiI1oqg8nDw=
+github.com/gofiber/fiber/v3 v3.2.0 h1:g9+09D320foINPpCnR3ibQ5oBEFHjAWRRfDG1te54u8=
github.com/gofiber/fiber/v3 v3.2.0/go.mod h1:FHOsc2Db7HhHpsE62QAaJlXVV1pNkbZEptZ4jtti7m4=
+github.com/gofiber/schema v1.7.1 h1:oSJBKdgP8JeIME4TQSAqlNKTU2iBB+2RNmKi8Nsc+TI=
github.com/gofiber/schema v1.7.1/go.mod h1:A/X5Ffyru4p9eBdp99qu+nzviHzQiZ7odLT+TwxWhbk=
+github.com/gofiber/utils/v2 v2.0.4 h1:WwAxUA7L4MW2DjdEHF234lfqvBqd2vYYuBtA9TJq2ec=
github.com/gofiber/utils/v2 v2.0.4/go.mod h1:GGERKU3Vhj5z6hS8YKvxL99A54DjOvTFZ0cjZnG4Lj4=
github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0=
github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4=
@@ -871,6 +882,7 @@ github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 h1:Dx7Ovyv/SFnMFw
github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4=
github.com/phayes/permbits v0.0.0-20190612203442-39d7c581d2ee h1:P6U24L02WMfj9ymZTxl7CxS73JC99x3ukk+DBkgQGQs=
github.com/phayes/permbits v0.0.0-20190612203442-39d7c581d2ee/go.mod h1:3uODdxMgOaPYeWU7RzZLxVtJHZ/x1f/iHkBZuKJDzuY=
+github.com/philhofer/fwd v1.2.0 h1:e6DnBTl7vGY+Gz322/ASL4Gyp1FspeMvx1RNDoToZuM=
github.com/philhofer/fwd v1.2.0/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM=
github.com/pierrec/lz4/v4 v4.1.16 h1:kQPfno+wyx6C5572ABwV+Uo3pDFzQ7yhyGchSyRda0c=
github.com/pierrec/lz4/v4 v4.1.16/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
@@ -976,6 +988,7 @@ github.com/tink-crypto/tink-go/v2 v2.5.0 h1:B8KLF6AofxdBIE4UJIaFbmoj5/1ehEtt7/Mm
github.com/tink-crypto/tink-go/v2 v2.5.0/go.mod h1:2WbBA6pfNsAfBwDCggboaHeB2X29wkU8XHtGwh2YIk8=
github.com/tink-crypto/tink-go/v2 v2.6.0 h1:+KHNBHhWH33Vn+igZWcsgdEPUxKwBMEe0QC60t388v4=
github.com/tink-crypto/tink-go/v2 v2.6.0/go.mod h1:2WbBA6pfNsAfBwDCggboaHeB2X29wkU8XHtGwh2YIk8=
+github.com/tinylib/msgp v1.6.4 h1:mOwYbyYDLPj35mkA2BjjYejgJk9BuHxDdvRnb6v2ZcQ=
github.com/tinylib/msgp v1.6.4/go.mod h1:RSp0LW9oSxFut3KzESt5Voq4GVWyS+PSulT77roAqEA=
github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 h1:e/5i7d4oYZ+C1wj2THlRK+oAhjeS/TRQwMfkIuet3w0=
github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399/go.mod h1:LdwHTNJT99C5fTAzDz0ud328OgXz+gierycbcIx2fRs=
@@ -1003,6 +1016,7 @@ github.com/valyala/fasthttp v1.62.0 h1:8dKRBX/y2rCzyc6903Zu1+3qN0H/d2MsxPPmVNami
github.com/valyala/fasthttp v1.62.0/go.mod h1:FCINgr4GKdKqV8Q0xv8b+UxPV+H/O5nNFo3D+r54Htg=
github.com/valyala/fasthttp v1.69.0 h1:fNLLESD2SooWeh2cidsuFtOcrEi4uB4m1mPrkJMZyVI=
github.com/valyala/fasthttp v1.69.0/go.mod h1:4wA4PfAraPlAsJ5jMSqCE2ug5tqUPwKXxVj8oNECGcw=
+github.com/valyala/fasthttp v1.70.0 h1:LAhMGcWk13QZWm85+eg8ZBNbrq5mnkWFGbHMUJHIdXA=
github.com/valyala/fasthttp v1.70.0/go.mod h1:oDZEHHkJ/Buyklg6uURmYs19442zFSnCIfX3j1FY3pE=
github.com/valyala/fastjson v1.6.4 h1:uAUNq9Z6ymTgGhcm0UynUAB6tlbakBrz6CQFax3BXVQ=
github.com/valyala/fastjson v1.6.4/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY=
@@ -1079,6 +1093,7 @@ go.mongodb.org/mongo-driver v1.7.5 h1:ny3p0reEpgsR2cfA5cjgwFZg3Cv/ofFh/8jbhGtz9V
go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng=
go.mongodb.org/mongo-driver v1.17.6 h1:87JUG1wZfWsr6rIz3ZmpH90rL5tea7O3IHuSwHUpsss=
go.mongodb.org/mongo-driver v1.17.6/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ=
+go.mongodb.org/mongo-driver/v2 v2.5.0 h1:yXUhImUjjAInNcpTcAlPHiT7bIXhshCTL3jVBkF3xaE=
go.mongodb.org/mongo-driver/v2 v2.5.0/go.mod h1:yOI9kBsufol30iFsl1slpdq1I0eHPzybRWdyYUs8K/0=
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
go.opentelemetry.io/contrib/detectors/gcp v1.38.0 h1:ZoYbqX7OaA/TAikspPl3ozPI6iY6LiIY9I8cUfm+pJs=
@@ -1132,6 +1147,7 @@ go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw=
go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU=
golang.org/x/arch v0.24.0 h1:qlJ3M9upxvFfwRM51tTg3Yl+8CP9vCC1E7vlFpgv99Y=
golang.org/x/arch v0.24.0/go.mod h1:dNHoOeKiyja7GTvF9NJS1l3Z2yntpQNzgrjh1cU103A=
+golang.org/x/arch v0.25.0 h1:qnk6Ksugpi5Bz32947rkUgDt9/s5qvqDPl/gBKdMJLE=
golang.org/x/arch v0.25.0/go.mod h1:0X+GdSIP+kL5wPmpK7sdkEVTt2XoYP0cSjQSbZBwOi8=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 6d22b4d5d..024da9bff 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -207,8 +207,8 @@ importers:
specifier: ^0.37.1
svelte-check-rs:
- specifier: ^0.9.7
- version: 0.9.7(@typescript/[email protected])
+ specifier: ^0.9.11
+ version: 0.9.11(@typescript/[email protected])
svelte-sonner:
specifier: ^1.1.1
version: 1.1.1([email protected])
@@ -1470,28 +1470,28 @@ packages:
'@standard-schema/[email protected]':
resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==}
- '@svelte-check-rs/[email protected]':
- resolution: {integrity: sha512-8yPfMkneK7afJWEe+ihAvShaWplJ/WJb8UnGZJSwZ5IOz+heiROJdhYq5usgv8dX4OEF4ExJ0HosYNHfVY5T2A==}
+ '@svelte-check-rs/[email protected]':
+ resolution: {integrity: sha512-2dQJNtJOmtCh0SSRT/EELP908aT5bzx6CnT33tlz0autEpV1bUu30c5VnGDyhiopmRA954KukSW3Z9lI0VLYMQ==}
cpu: [arm64]
os: [darwin]
- '@svelte-check-rs/[email protected]':
- resolution: {integrity: sha512-JXK307xSrqhfjzCefPRio3wxRl+hJep4kRTdA5aJAdOhlzCg2lEBF24mC5fo1LX9Uz1PjNfSy6MZePzVnRl7+g==}
+ '@svelte-check-rs/[email protected]':
+ resolution: {integrity: sha512-WVpmkMn1Jy3Eod5B7RAKnQYCPmGri7pEO1V3l6AhSuG5pY7hobQzyEaBfVdoLdx4OgfscpWsb/gYk/K+bvUh/w==}
cpu: [x64]
os: [darwin]
- '@svelte-check-rs/[email protected]':
- resolution: {integrity: sha512-XM52mnkVhaKa8qehWtASGAX74ex8EjMmmBKSWw3eU4OiowFmt4VFp7LvTpphNnuCNLZJEDq/sNY0IhkvatTZFw==}
+ '@svelte-check-rs/[email protected]':
+ resolution: {integrity: sha512-bkQGmzVf9R18iEEb6V75T63fmJAltl1tj9/BdngqhjeV25SlfCXJglh/riFGawY4VaXjkTpgGpofEMCZ9OfYiw==}
cpu: [arm64]
os: [linux]
- '@svelte-check-rs/[email protected]':
- resolution: {integrity: sha512-qjpYrVALOBU6segt1FiGqjZzRKUFRL9Tl+nvYZ60Hz45F3uzbtyCymOR62bOf680Te6xqkzHsLVIz+bGjNX+Sw==}
+ '@svelte-check-rs/[email protected]':
+ resolution: {integrity: sha512-OM/zx7QcV65GAMWJngFbUt/oRJ8NkW0Th7VCtPXrRHB1W6bHnhKOhsEKOUMRd5LvKcyw2H3K5x3/V21XUP5Bug==}
cpu: [x64]
os: [linux]
- '@svelte-check-rs/[email protected]':
- resolution: {integrity: sha512-m+A9v3Bna3TY9aFbZz0Bq7hJ6ifoOzfoaDDSbyVxWFvv3xuMOwDSpQHq49PlJLPEBd4xDRCUixHfuo4SGz8C6w==}
+ '@svelte-check-rs/[email protected]':
+ resolution: {integrity: sha512-rhHkXrbN2xfcMYdP6zrt7ncfubLD4Gn3u4k7JEDu3A1kf9jA6243BJ4sNKCKslldzcPgjTgvDyyY8mAej1A9Jg==}
cpu: [x64]
os: [win32]
@@ -2873,8 +2873,8 @@ packages:
resolution: {integrity: sha512-uV+TFRZdXsqXTL2pRvujROjdZQ4RAlBUS5BTh9IGm+jTqQntYThciG/qu57Gs69yjnVUSqdxF9YLmSnpupBW9A==}
engines: {node: '>=14.0.0'}
- resolution: {integrity: sha512-70Iihg8/5JICDYVEcWp4NtLz5cXGgHXUQf66xy4H//CelAtvkjK9+ptfrYNeOLrTzrrkawRelOzsBWpNS0TPLQ==}
+ resolution: {integrity: sha512-U3ebZsxJMOM5SW+eJnkLn/zdyrWGWRPYMcmReOO5X1Qef1NVg4WFADnsuL9rqB+i6SC/y65eLPZmH/ifDX+6nw==}
hasBin: true
peerDependencies:
'@typescript/native-preview': '>=7.0.0-dev.0'
@@ -4109,19 +4109,19 @@ snapshots:
'@standard-schema/[email protected]': {}
- '@svelte-check-rs/[email protected]':
+ '@svelte-check-rs/[email protected]':
optional: true
- '@svelte-check-rs/[email protected]':
+ '@svelte-check-rs/[email protected]':
optional: true
- '@svelte-check-rs/[email protected]':
+ '@svelte-check-rs/[email protected]':
optional: true
- '@svelte-check-rs/[email protected]':
+ '@svelte-check-rs/[email protected]':
optional: true
- '@svelte-check-rs/[email protected]':
+ '@svelte-check-rs/[email protected]':
optional: true
@@ -5547,15 +5547,15 @@ snapshots:
optional: true
dependencies:
'@typescript/native-preview': 7.0.0-dev.20260504.1
optionalDependencies:
- '@svelte-check-rs/darwin-arm64': 0.9.7
- '@svelte-check-rs/darwin-x64': 0.9.7
- '@svelte-check-rs/linux-arm64': 0.9.7
- '@svelte-check-rs/linux-x64': 0.9.7
- '@svelte-check-rs/win32-x64': 0.9.7
+ '@svelte-check-rs/darwin-arm64': 0.9.11
+ '@svelte-check-rs/darwin-x64': 0.9.11
+ '@svelte-check-rs/linux-arm64': 0.9.11
+ '@svelte-check-rs/linux-x64': 0.9.11
+ '@svelte-check-rs/win32-x64': 0.9.11
dependencies:
diff --git a/tests/spec/dashboard-system-stats.spec.ts b/tests/spec/dashboard-system-stats.spec.ts
index c06bb70e6..2e8c93262 100644
--- a/tests/spec/dashboard-system-stats.spec.ts
+++ b/tests/spec/dashboard-system-stats.spec.ts
@@ -182,10 +182,7 @@ test.describe('Dashboard system stats websocket', () => {
countMatchingRequests(requestPaths, /\/api\/environments\/[^/]+\/system\/docker\/info$/)
).toBe(0);
- await page
- .getByRole('button', { name: /^Inspect$/ })
- .first()
- .click();
+ await page.getByRole('button', { name: 'Inspect' }).first().click();
await expect(page.getByRole('dialog')).toBeVisible();
await expect
.poll(() =>
@@ -196,10 +193,7 @@ test.describe('Dashboard system stats websocket', () => {
await page.getByRole('button', { name: /^Close$/ }).click();
await expect(page.getByRole('dialog')).not.toBeVisible();
- await page
- .getByRole('button', { name: /^Inspect$/ })
- .first()
- .click();
+ await page.getByRole('button', { name: 'Inspect' }).first().click();
await page.waitForTimeout(300);
expect(