systemd: fetch unit state for local + remote nspawn containers (step 5)
This commit is contained in:
parent
2ab2af8a23
commit
5676b1ac62
3 changed files with 192 additions and 70 deletions
|
|
@ -43,6 +43,7 @@ Column {
|
|||
errorKind: _row.modelData.errorKind ?? ""
|
||||
errorReason: _row.modelData.errorReason ?? ""
|
||||
lastSeen: _row.modelData.lastSeen ?? 0
|
||||
containers: _row.modelData.containers ?? []
|
||||
onContentResized: root.contentResized()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@ Column {
|
|||
property string errorKind: ""
|
||||
property string errorReason: ""
|
||||
property int lastSeen: 0
|
||||
property var containers: []
|
||||
property int depth: 0
|
||||
|
||||
signal contentResized
|
||||
onHeightChanged: root.contentResized()
|
||||
|
|
@ -231,4 +233,37 @@ Column {
|
|||
accentColor: root.accentColor
|
||||
}
|
||||
}
|
||||
|
||||
// Nested containers running on this machine. Indented to convey hierarchy.
|
||||
Repeater {
|
||||
model: root.containers ?? []
|
||||
delegate: Item {
|
||||
id: _childWrap
|
||||
required property var modelData
|
||||
width: root.width
|
||||
height: _child.height + 4
|
||||
|
||||
SystemdMachineSection {
|
||||
id: _child
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 16
|
||||
width: parent.width - 16
|
||||
accentColor: root.accentColor
|
||||
machineName: _childWrap.modelData.name
|
||||
title: _childWrap.modelData.name
|
||||
marker: _childWrap.modelData.marker ?? ""
|
||||
systemState: _childWrap.modelData.systemState ?? "unknown"
|
||||
runningCount: _childWrap.modelData.runningCount ?? 0
|
||||
totalCount: _childWrap.modelData.totalCount ?? 0
|
||||
failedUnits: _childWrap.modelData.failedUnits ?? []
|
||||
runningUnits: _childWrap.modelData.runningUnits ?? []
|
||||
errorKind: _childWrap.modelData.errorKind ?? ""
|
||||
errorReason: _childWrap.modelData.errorReason ?? ""
|
||||
lastSeen: _childWrap.modelData.lastSeen ?? 0
|
||||
containers: _childWrap.modelData.containers ?? []
|
||||
depth: root.depth + 1
|
||||
onContentResized: root.contentResized()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue