Files
metabuilder/qml/MetaBuilder/CSystemTab.qml
johndoe6345789 827387d807 style(qt6): enforce 80-character line margin across all QML and JS files
88 files reformatted — zero logic changes:
- All views, components, and JS modules wrapped to 80-char margin
- Long property bindings, ternaries, and strings broken at natural points
- Theme.qml theme definitions expanded to multi-line
- StyleVariables tokens wrapped
- Section comment rulers trimmed to 80 chars

Trade-off: LOC increases from line wrapping (compact single-line properties
now span 2-3 lines). Content unchanged.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 15:20:01 +00:00

169 lines
6.0 KiB
QML

import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import QmlComponents 1.0
Rectangle {
id: root
color: "transparent"
property var daemons: []
property var systemMetrics: ({
cpu: 0, memory: 0, disk: 0, network: 0
})
signal reseedRequested()
signal clearCacheRequested()
signal restartRequested(string target)
ScrollView {
anchors.fill: parent; clip: true
ColumnLayout {
width: parent.width; spacing: 16
CText { variant: "h3"; text: "System Overview" }
CText { variant: "h4"; text: "Daemon Status" }
GridLayout {
Layout.fillWidth: true
columns: 2
columnSpacing: 16; rowSpacing: 16
Repeater {
model: root.daemons
delegate: CCard {
Layout.fillWidth: true
FlexRow {
Layout.fillWidth: true; spacing: 10
CText {
variant: "subtitle1"
text: modelData.name
}
CStatusBadge {
status: modelData.status
=== "healthy"
? "success" : "warning"
text: modelData.status
}
Item { Layout.fillWidth: true }
CBadge {
text: ":" + modelData.port
badgeColor: Theme.info
}
}
CText {
variant: "caption"
text: "Uptime: "
+ modelData.uptime
color: Theme.textSecondary
}
}
}
}
CDivider { Layout.fillWidth: true }
CText { variant: "h4"; text: "System Metrics" }
GridLayout {
Layout.fillWidth: true
columns: 4
columnSpacing: 16; rowSpacing: 16
Repeater {
model: [
{ label: "CPU", value: root.systemMetrics.cpu },
{ label: "Memory",
value: root.systemMetrics.memory },
{ label: "Disk",
value: root.systemMetrics.disk },
{ label: "Network",
value: root.systemMetrics.network }
]
delegate: CSystemMetricCard {
label: modelData.label
value: modelData.value
}
}
}
CDivider { Layout.fillWidth: true }
CText { variant: "h4"; text: "System Actions" }
FlexRow {
Layout.fillWidth: true; spacing: 12
CButton {
text: "Force Re-seed"
variant: "primary"; size: "sm"
onClicked: root.reseedRequested()
}
CButton {
text: "Clear Cache"
variant: "ghost"; size: "sm"
onClicked: root.clearCacheRequested()
}
CButton {
text: "Restart DBAL"
variant: "danger"; size: "sm"
onClicked: {
root.restartRequested("DBAL")
}
}
CButton {
text: "Restart Redis"
variant: "danger"; size: "sm"
onClicked: {
root.restartRequested("Redis")
}
}
}
CDivider { Layout.fillWidth: true }
CText { variant: "h4"; text: "Environment" }
CCard {
Layout.fillWidth: true
RowLayout {
Layout.fillWidth: true; spacing: 24
ColumnLayout {
spacing: 4
CText {
variant: "caption"
text: "Version"
color: Theme.textSecondary
}
CText {
variant: "body1"
text: "2.5.0-rc1"
}
}
ColumnLayout {
spacing: 4
CText {
variant: "caption"
text: "Build Date"
color: Theme.textSecondary
}
CText {
variant: "body1"
text: "2026-03-15"
}
}
ColumnLayout {
spacing: 4
CText {
variant: "caption"
text: "Node Count"
color: Theme.textSecondary
}
CText {
variant: "body1"
text: "4 nodes"
}
}
ColumnLayout {
spacing: 4
CText {
variant: "caption"
text: "Platform"
color: Theme.textSecondary
}
CText {
variant: "body1"
text: "MetaBuilder Universal"
}
}
}
}
}
}
}