fix: update ConfigInfo schema to match Supervisor API response
All checks were successful
Build and Push Docker Image to Gitea / build-and-push (push) Successful in 1m11s

Updated the ConfigInfoSchema to accurately reflect the data structure
returned by Supervisor's getAllConfigInfo() XML-RPC method, fixing Zod
validation errors on the /config page.

Schema changes:
- Removed fields not in API: environment, priority, process_name, numprocs, numprocs_start, username
- Added missing fields: autorestart, killasgroup, process_prio, group_prio, stdout_syslog, stderr_syslog, serverurl
- Fixed type mismatches:
  - stopsignal: string → number (API returns signal numbers like 15)
  - uid: number|null → string (API returns username strings)
  - directory: string|null → string

Updated ConfigTable.tsx to use process_prio instead of priority and
removed the non-existent numprocs column.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-23 22:39:33 +01:00
parent 20877abbc7
commit 145d37193c
2 changed files with 18 additions and 25 deletions

View File

@@ -91,7 +91,6 @@ export function ConfigTable({ configs }: ConfigTableProps) {
Autostart <SortIcon field="autostart" />
</th>
<th className="text-center p-3">Priority</th>
<th className="text-center p-3">Processes</th>
</tr>
</thead>
<tbody>
@@ -117,8 +116,7 @@ export function ConfigTable({ configs }: ConfigTableProps) {
)}
/>
</td>
<td className="p-3 text-center text-sm">{config.priority}</td>
<td className="p-3 text-center text-sm">{config.numprocs}</td>
<td className="p-3 text-center text-sm">{config.process_prio}</td>
</tr>
))}
</tbody>
@@ -159,15 +157,9 @@ export function ConfigTable({ configs }: ConfigTableProps) {
<div className="mt-1 text-xs break-all">{config.directory}</div>
</div>
<div className="flex gap-4 pt-2">
<div>
<span className="text-muted-foreground">Priority:</span>
<span className="ml-2 font-mono">{config.priority}</span>
</div>
<div>
<span className="text-muted-foreground">Processes:</span>
<span className="ml-2 font-mono">{config.numprocs}</span>
</div>
<div className="pt-2">
<span className="text-muted-foreground">Priority:</span>
<span className="ml-2 font-mono">{config.process_prio}</span>
</div>
</div>
</CardContent>