systemd applet: aggregate counts + lazy running list (step 2)

This commit is contained in:
Damocles 2026-05-07 19:01:42 +02:00
commit 3fb9a36f3b
4 changed files with 212 additions and 125 deletions

View file

@ -13,38 +13,31 @@ Column {
onHeightChanged: root.contentResized()
// Local machine header + units
SystemdMachineSection {
width: root.width
accentColor: root.accentColor
machineName: ""
title: S.SystemdService.hostname
marker: " this machine"
systemState: S.SystemdService.systemState
units: S.SystemdService.failedUnits
startExpanded: true
}
// Containers
Repeater {
model: S.SystemdService.containers
model: S.SystemdService.machines
delegate: Column {
id: _row
required property var modelData
required property int index
width: root.width
Separator {}
Separator {
visible: _row.index > 0
}
SystemdMachineSection {
width: _row.width
accentColor: root.accentColor
machineName: _row.modelData.name
machineName: _row.modelData.isLocal ? "" : _row.modelData.name
title: _row.modelData.name
marker: ""
marker: _row.modelData.marker ?? ""
systemState: _row.modelData.systemState ?? "unknown"
units: _row.modelData.failedUnits ?? []
startExpanded: (_row.modelData.failedUnits ?? []).length > 0
runningCount: _row.modelData.runningCount ?? 0
totalCount: _row.modelData.totalCount ?? 0
failedUnits: _row.modelData.failedUnits ?? []
runningUnits: _row.modelData.runningUnits ?? []
onContentResized: root.contentResized()
}
}
}