fix: Word and colour Windows workloads correctly across the UI
Server Deploy / deploy (push) Canceled after 0s
Chart Release / chart (push) Canceled after 0s
Agent Release / build (push) Successful in 14m1s
Agent Release / msi (push) Successful in 1m22s

This commit is contained in:
2026-08-13 12:57:37 +00:00
parent ddf0814803
commit a0fbf5b9ba
10 changed files with 65 additions and 21 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ export default function WorkloadsPage() {
<div className="p-4 sm:p-6 lg:p-8">
<div className="mb-6">
<h1 className="text-2xl font-bold text-text-primary">Workloads</h1>
<p className="mt-1 text-sm text-text-secondary">Containers and systemd services across the fleet, as last reported by each agent.</p>
<p className="mt-1 text-sm text-text-secondary">Containers and services across the fleet, as last reported by each agent.</p>
</div>
<Card className="mb-6">
@@ -82,7 +82,7 @@ export function MaintenanceTab({
<span className="font-mono text-xs text-text-secondary">{u.current_version || "n/a"}</span>
</Td>
<Td label={isWindows ? "KB" : "Available"}>
<span className="font-mono text-xs text-success">{u.new_version}</span>
<span className="font-mono text-xs text-success">{u.new_version || "n/a"}</span>
</Td>
</Tr>
))}
@@ -94,6 +94,7 @@ export function WorkloadList({ serverId, canControl, isWindows }: { serverId: st
workload={w}
canControl={canControl}
busy={control.isPending}
isWindows={isWindows}
onAction={(action) => control.mutate({ w, action })}
onLogs={() => setLogTarget(w)}
/>
+3 -1
View File
@@ -45,12 +45,14 @@ export function WorkloadRow({
workload,
canControl,
busy,
isWindows,
onAction,
onLogs,
}: {
workload: Workload;
canControl: boolean;
busy: boolean;
isWindows: boolean;
onAction: (action: WorkloadAction) => void;
onLogs: () => void;
}) {
@@ -66,7 +68,7 @@ export function WorkloadRow({
{!!w.restarts && w.restarts > 0 && <Badge variant="warning">{w.restarts} restarts</Badge>}
</div>
<p className="mt-1 truncate text-xs text-text-secondary">
{w.kind === "container" ? w.image || "no image" : "systemd unit"}
{w.kind === "container" ? w.image || "no image" : isWindows ? "Windows service" : "systemd unit"}
{w.ports && w.ports.length > 0 && <span className="ml-2 font-mono">{w.ports.join(" ")}</span>}
</p>
</div>
+1 -1
View File
@@ -1122,7 +1122,7 @@ export const vulnerabilities = {
export type WorkloadKind = "container" | "unit";
export type WorkloadAction = "start" | "stop" | "restart";
/** One container or one systemd unit.
/** One Docker container, one systemd unit, or one Windows service.
*
* `state` is deliberately not a shared vocabulary across the two kinds:
* containers report running/exited/paused/restarting/created, units report