Fix docker_enabled inconsistency

This commit is contained in:
2025-11-14 23:41:16 +01:00
parent c04c952293
commit 4f8f4b96cd
4 changed files with 18 additions and 31 deletions

View File

@@ -59,12 +59,8 @@ function InstanceCard({
// Fetch the most up-to-date instance data from the backend
const instanceData = await instancesApi.get(instance.name);
// Remove docker_enabled as it's a computed field, not persisted to disk
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { docker_enabled, ...persistedData } = instanceData;
// Convert to JSON string with pretty formatting (matching backend format)
const jsonString = JSON.stringify(persistedData, null, 2);
const jsonString = JSON.stringify(instanceData, null, 2);
// Create a blob and download link
const blob = new Blob([jsonString], { type: "application/json" });
@@ -101,7 +97,7 @@ function InstanceCard({
{/* Badges row */}
<div className="flex items-center gap-2 flex-wrap">
<BackendBadge backend={instance.options?.backend_type} docker={instance.docker_enabled} />
<BackendBadge backend={instance.options?.backend_type} docker={instance.options?.docker_enabled} />
{running && <HealthBadge health={health} />}
</div>
</div>

View File

@@ -27,5 +27,4 @@ export interface Instance {
name: string;
status: InstanceStatus;
options?: CreateInstanceOptions;
docker_enabled?: boolean; // indicates backend is running via Docker
}