Improvements for action logs
This commit is contained in:
parent
32f08120c2
commit
d0fed74a24
@ -358,8 +358,10 @@ ThingPageBase {
|
|||||||
text: actionType.displayName
|
text: actionType.displayName
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
ProgressButton {
|
||||||
Layout.fillWidth: true
|
// Layout.fillWidth: true
|
||||||
|
imageSource: "send"
|
||||||
|
longpressEnabled: false
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (actionDelegate.actionType.paramTypes.count === 0) {
|
if (actionDelegate.actionType.paramTypes.count === 0) {
|
||||||
@ -423,6 +425,7 @@ ThingPageBase {
|
|||||||
Item {
|
Item {
|
||||||
Layout.preferredHeight: preferredSize
|
Layout.preferredHeight: preferredSize
|
||||||
Layout.preferredWidth: preferredSize
|
Layout.preferredWidth: preferredSize
|
||||||
|
visible: preferredSize > 0
|
||||||
property int preferredSize: actionDelegate.pendingActionId !== -1 || pendingTimer.running ? Style.iconSize : 0
|
property int preferredSize: actionDelegate.pendingActionId !== -1 || pendingTimer.running ? Style.iconSize : 0
|
||||||
Behavior on preferredSize { NumberAnimation { duration: 100 } }
|
Behavior on preferredSize { NumberAnimation { duration: 100 } }
|
||||||
|
|
||||||
|
|||||||
@ -45,10 +45,11 @@ Page {
|
|||||||
readonly property bool isLogged: thing.loggedStateTypeIds.indexOf(stateType.id) >= 0
|
readonly property bool isLogged: thing.loggedStateTypeIds.indexOf(stateType.id) >= 0
|
||||||
|
|
||||||
readonly property bool canShowGraph: {
|
readonly property bool canShowGraph: {
|
||||||
switch (root.stateType.type) {
|
switch (root.stateType.type.toLowerCase()) {
|
||||||
case "Int":
|
case "int":
|
||||||
case "Double":
|
case "uint":
|
||||||
case "Bool":
|
case "double":
|
||||||
|
case "bool":
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
print("not showing graph for", root.stateType.type)
|
print("not showing graph for", root.stateType.type)
|
||||||
@ -119,10 +120,9 @@ Page {
|
|||||||
delegate: NymeaItemDelegate {
|
delegate: NymeaItemDelegate {
|
||||||
width: listView.width
|
width: listView.width
|
||||||
property NewLogEntry entry: logsModel.get(index)
|
property NewLogEntry entry: logsModel.get(index)
|
||||||
text: entry.values[root.stateType.name]
|
text: Types.toUiValue(entry.values[root.stateType.name], root.stateType.unit) + " " + Types.toUiUnit(root.stateType.unit)
|
||||||
subText: entry.timestamp.toLocaleString(Qt.locale())
|
subText: entry.timestamp.toLocaleString(Qt.locale())
|
||||||
progressive: false
|
progressive: false
|
||||||
Component.onCompleted: print("delegate:", JSON.stringify(entry.values), root.stateType.name, entry.values[root.stateType.name])
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user