57 lines
1.7 KiB
QML
57 lines
1.7 KiB
QML
pragma ComponentBehavior: Bound
|
|
|
|
import QtQuick
|
|
import "../services" as S
|
|
import NovaStats as NS
|
|
|
|
Column {
|
|
id: root
|
|
|
|
required property color accentColor
|
|
property bool active: true
|
|
signal contentResized
|
|
|
|
onHeightChanged: root.contentResized()
|
|
|
|
Component.onCompleted: NS.SystemdService.setAppletOpen(true)
|
|
Component.onDestruction: NS.SystemdService.setAppletOpen(false)
|
|
|
|
Repeater {
|
|
model: S.SystemdService.machines
|
|
|
|
delegate: Column {
|
|
id: _row
|
|
required property var modelData
|
|
required property int index
|
|
width: root.width
|
|
|
|
Separator {
|
|
visible: _row.index > 0
|
|
}
|
|
|
|
SystemdMachineSection {
|
|
width: _row.width
|
|
accentColor: root.accentColor
|
|
hostTarget: _row.modelData.isLocal ? "" : _row.modelData.name
|
|
machineName: ""
|
|
title: _row.modelData.name
|
|
marker: _row.modelData.marker ?? ""
|
|
systemState: _row.modelData.systemState ?? "unknown"
|
|
runningCount: _row.modelData.runningCount ?? 0
|
|
totalCount: _row.modelData.totalCount ?? 0
|
|
failedUnits: _row.modelData.failedUnits ?? []
|
|
runningUnits: _row.modelData.runningUnits ?? []
|
|
errorKind: _row.modelData.errorKind ?? ""
|
|
errorReason: _row.modelData.errorReason ?? ""
|
|
lastSeen: _row.modelData.lastSeen ?? 0
|
|
containers: _row.modelData.containers ?? []
|
|
onContentResized: root.contentResized()
|
|
}
|
|
}
|
|
}
|
|
|
|
Item {
|
|
width: 1
|
|
height: 4
|
|
}
|
|
}
|