mirror of
https://github.com/lordmathis/llamactl.git
synced 2025-11-05 16:44:22 +00:00
Fix export functionality to exclude computed field from JSON output
This commit is contained in:
@@ -59,8 +59,12 @@ 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(instanceData, null, 2);
|
||||
const jsonString = JSON.stringify(persistedData, null, 2);
|
||||
|
||||
// Create a blob and download link
|
||||
const blob = new Blob([jsonString], { type: "application/json" });
|
||||
|
||||
Reference in New Issue
Block a user