Files
evcharger-app/MqttPage.qml
T

89 lines
1.9 KiB
QML

import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import EVChargerApp
NavigationPage {
title: qsTr("MQTT")
GeneralOnOffSwitch {
apiKey: "mce"
}
WhiteBox {
Layout.fillWidth: true
GridLayout {
anchors.fill: parent
columns: 2
Label {
text: qsTr("Trying to connect:")
font.bold: true
}
ApiKeyValueItem {
apiKey: "mcs"
}
Label {
text: qsTr("Is connected:")
font.bold: true
}
ApiKeyValueItem {
apiKey: "mcc"
}
Label {
text: qsTr("Connected since:")
font.bold: true
}
ApiKeyValueHelper {
id: connectedSince
deviceConnection: mainScreen.deviceConnection
apiKey: "mcca"
}
Text {
text: connectedSince.value ? formatDuration(connectedSince.value - rebootTime.value) : ""
}
Label {
text: qsTr("Command Counter:")
font.bold: true
}
ApiKeyValueItem {
apiKey: "mcsl"
}
Label {
text: qsTr("Last error:")
font.bold: true
}
ApiKeyValueItem {
apiKey: "mlr"
wrapMode: Text.Wrap
}
Label {
text: qsTr("Last error age:")
font.bold: true
}
ApiKeyValueHelper {
id: lastErrorAge
deviceConnection: mainScreen.deviceConnection
apiKey: "mlra"
}
Text {
text: lastErrorAge.value ? formatDuration(lastErrorAge.value - rebootTime.value) : ""
}
}
}
}