import QtQuick import QtQuick.Layouts import "../controls" import "../../components" import "../../services" import "../../metrics" SettingsPage { SettingsSection { padded: true MetricsCard { Layout.fillWidth: true } } SettingsSection { title: "Collection" description: "GPU updates at most every 5 seconds; storage every 15 seconds. All views share one collector." PreferenceSlider { label: "Sampling interval" icon: "󰔟" setting: "metrics.interval" from: 1 to: 30 step: 1 unit: " s" } SettingRow { title: "GPU" icon: "󰢮" setting: "metrics.gpu" GlassComboBox { Layout.preferredWidth: 240 model: [ { id: "auto", name: "Automatic" } ].concat(MetricsService.gpus).concat(ConfigService.data.metrics.gpu === "auto" || MetricsService.gpus.some(g => g.id === ConfigService.data.metrics.gpu) ? [] : [ { id: ConfigService.data.metrics.gpu, name: "Unavailable · " + ConfigService.data.metrics.gpu } ]) textRole: "name" valueRole: "id" currentIndex: model.findIndex(g => g.id === ConfigService.data.metrics.gpu) onActivated: ConfigService.setValue("metrics.gpu", currentValue) } } PreferenceChoice { label: "Network interface" description: "Auto totals physical interfaces to avoid counting VPN/bridge traffic twice" icon: "󰛳" setting: "metrics.networkInterface" choices: Array.from(new Set(["auto", ConfigService.data.metrics.networkInterface].concat((MetricsService.network.interfaces || []).map(i => i.name)))) } SettingRow { title: "Storage paths" description: "JSON array, up to eight local paths. Remote filesystem paths can block the collector." icon: "󰋊" setting: "metrics.storagePaths" GlassTextField { Layout.preferredWidth: 240 text: JSON.stringify(ConfigService.data.metrics.storagePaths) onEditingFinished: { try { ConfigService.setValue("metrics.storagePaths", JSON.parse(text)); } catch (e) { text = JSON.stringify(ConfigService.data.metrics.storagePaths); } } } } } SettingNote { text: "Missing sensor values are shown as —. CPU temperature is the hottest supported CPU hwmon sensor. RAM usage excludes available cache; storage free includes reserved blocks." } }