status-desktop/ui/imports/shared/stores/MetricsStore.qml

17 lines
482 B
QML

import QtQml 2.15
QtObject {
id: root
function toggleCentralizedMetrics(enabled) {
metrics.toggleCentralizedMetrics(enabled)
}
function addCentralizedMetricIfEnabled(eventName, eventValue = null) {
let eventValueJsonStr = !!eventValue ? JSON.stringify(eventValue) : ""
metrics.addCentralizedMetricIfEnabled(eventName, eventValueJsonStr)
}
readonly property bool isCentralizedMetricsEnabled : metrics.isCentralizedMetricsEnabled
}