mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2025-12-06 06:36:15 +00:00
SystemMonitorTab: add network polling
This commit is contained in:
@@ -1845,6 +1845,9 @@
|
||||
"description": "Passe die Warn-/Kritisch-Schwellen und die Abfrageintervalle für jede Systemmetrik an.",
|
||||
"label": "Schwellenwerte"
|
||||
},
|
||||
"network-section": {
|
||||
"label": "Netzwerk"
|
||||
},
|
||||
"title": "Systemmonitor",
|
||||
"use-custom-highlight-colors": {
|
||||
"description": "Wenn deaktiviert, werden die Standard-Hervorhebungsfarben des Themes verwendet.",
|
||||
|
||||
@@ -1814,9 +1814,6 @@
|
||||
"disk-warning-threshold": {
|
||||
"label": "Warning threshold"
|
||||
},
|
||||
"network-section": {
|
||||
"label": "Network"
|
||||
},
|
||||
"general": {
|
||||
"section": {
|
||||
"description": "Configure the system monitor behavior and appearance.",
|
||||
@@ -1841,6 +1838,9 @@
|
||||
"polling-interval": {
|
||||
"label": "Polling interval"
|
||||
},
|
||||
"network-section": {
|
||||
"label": "Network"
|
||||
},
|
||||
"temp-warning-threshold": {
|
||||
"label": "Warning threshold"
|
||||
},
|
||||
|
||||
@@ -1845,6 +1845,9 @@
|
||||
"description": "Ajusta los umbrales de advertencia/crítico y los intervalos de sondeo para cada métrica del sistema.",
|
||||
"label": "Umbrales"
|
||||
},
|
||||
"network-section": {
|
||||
"label": "Red"
|
||||
},
|
||||
"title": "Monitor del sistema",
|
||||
"use-custom-highlight-colors": {
|
||||
"description": "Cuando está desactivado, se usan los colores de resaltado predeterminados del tema.",
|
||||
|
||||
@@ -1845,6 +1845,9 @@
|
||||
"description": "Ajustez les seuils d’avertissement/critiques et les intervalles d’interrogation pour chaque métrique système.",
|
||||
"label": "Seuils"
|
||||
},
|
||||
"network-section": {
|
||||
"label": "Réseau"
|
||||
},
|
||||
"title": "Moniteur système",
|
||||
"use-custom-highlight-colors": {
|
||||
"description": "Lorsque cette option est désactivée, les couleurs de surbrillance par défaut du thème sont utilisées.",
|
||||
|
||||
@@ -1845,6 +1845,9 @@
|
||||
"description": "Pas de waarschuwing/kritieke drempels en de pollingsintervallen voor elke systeemmetriek aan.",
|
||||
"label": "Drempels"
|
||||
},
|
||||
"network-section": {
|
||||
"label": "Netwerk"
|
||||
},
|
||||
"title": "Systeemmonitor",
|
||||
"use-custom-highlight-colors": {
|
||||
"description": "Indien uitgeschakeld, worden de standaard markeerkleuren van het thema gebruikt.",
|
||||
|
||||
@@ -1845,6 +1845,9 @@
|
||||
"description": "Ajuste os limites de aviso/crítico e os intervalos de consulta para cada métrica do sistema.",
|
||||
"label": "Limiares"
|
||||
},
|
||||
"network-section": {
|
||||
"label": "Rede"
|
||||
},
|
||||
"title": "Monitor do Sistema",
|
||||
"use-custom-highlight-colors": {
|
||||
"description": "Quando desativado, são usadas as cores de destaque padrão do tema.",
|
||||
|
||||
@@ -1845,6 +1845,9 @@
|
||||
"description": "Настройте пороги предупреждения/критические пороги и интервалы опроса для каждой системной метрики.",
|
||||
"label": "Пороги"
|
||||
},
|
||||
"network-section": {
|
||||
"label": "Сеть"
|
||||
},
|
||||
"title": "Системный монитор",
|
||||
"use-custom-highlight-colors": {
|
||||
"description": "Если отключено, используются цвета выделения по умолчанию темы.",
|
||||
|
||||
@@ -1845,6 +1845,9 @@
|
||||
"description": "Her sistem metriği için uyarı/kritik eşiklerini ve yoklama aralıklarını ayarlayın.",
|
||||
"label": "Eşikler"
|
||||
},
|
||||
"network-section": {
|
||||
"label": "Ağ"
|
||||
},
|
||||
"title": "Sistem İzleme",
|
||||
"use-custom-highlight-colors": {
|
||||
"description": "Devre dışı bırakıldığında, tema varsayılan vurgulama renkleri kullanılır.",
|
||||
|
||||
@@ -1845,6 +1845,9 @@
|
||||
"description": "Налаштуйте пороги попередження/критичні пороги та інтервали опитування для кожного системного показника.",
|
||||
"label": "Пороги"
|
||||
},
|
||||
"network-section": {
|
||||
"label": "Мережа"
|
||||
},
|
||||
"title": "Системний монітор",
|
||||
"use-custom-highlight-colors": {
|
||||
"description": "Якщо вимкнено, використовуються кольори підсвічування за замовчуванням теми.",
|
||||
|
||||
@@ -1845,6 +1845,9 @@
|
||||
"description": "为每个系统指标调整警告/严重阈值和轮询间隔。",
|
||||
"label": "阈值"
|
||||
},
|
||||
"network-section": {
|
||||
"label": "网络"
|
||||
},
|
||||
"title": "系统监视器",
|
||||
"use-custom-highlight-colors": {
|
||||
"description": "关闭时将使用主题默认高亮颜色。",
|
||||
|
||||
@@ -238,6 +238,7 @@
|
||||
"tempPollingInterval": 3000,
|
||||
"memPollingInterval": 3000,
|
||||
"diskPollingInterval": 3000,
|
||||
"networkPollingInterval": 3000,
|
||||
"useCustomColors": false,
|
||||
"warningColor": "",
|
||||
"criticalColor": ""
|
||||
|
||||
@@ -414,6 +414,7 @@ Singleton {
|
||||
property int tempPollingInterval: 3000
|
||||
property int memPollingInterval: 3000
|
||||
property int diskPollingInterval: 3000
|
||||
property int networkPollingInterval: 3000
|
||||
property bool useCustomColors: false
|
||||
property string warningColor: ""
|
||||
property string criticalColor: ""
|
||||
|
||||
@@ -433,4 +433,39 @@ ColumnLayout {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Network
|
||||
NText {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: Style.marginM
|
||||
text: I18n.tr("settings.system-monitor.network-section.label")
|
||||
pointSize: Style.fontSizeM
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: Style.marginM
|
||||
|
||||
ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: Style.marginM
|
||||
|
||||
NText {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: I18n.tr("settings.system-monitor.polling-interval.label")
|
||||
pointSize: Style.fontSizeS
|
||||
}
|
||||
|
||||
NSpinBox {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
from: 250
|
||||
to: 10000
|
||||
stepSize: 250
|
||||
value: Settings.data.systemMonitor.networkPollingInterval
|
||||
onValueChanged: Settings.data.systemMonitor.networkPollingInterval = value
|
||||
suffix: " ms"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,10 +117,15 @@ Singleton {
|
||||
// Timer for network speeds
|
||||
Timer {
|
||||
id: networkTimer
|
||||
interval: root.defaultIntervalMs
|
||||
interval: root.normalizeInterval(Settings.data.systemMonitor.networkPollingInterval)
|
||||
repeat: true
|
||||
running: true
|
||||
triggeredOnStart: true
|
||||
onIntervalChanged: {
|
||||
if (running) {
|
||||
restart();
|
||||
}
|
||||
}
|
||||
onTriggered: netDevFile.reload()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user