Improvements for action logs
This commit is contained in:
parent
32f08120c2
commit
d0fed74a24
@ -358,8 +358,10 @@ ThingPageBase {
|
||||
text: actionType.displayName
|
||||
}
|
||||
|
||||
Button {
|
||||
Layout.fillWidth: true
|
||||
ProgressButton {
|
||||
// Layout.fillWidth: true
|
||||
imageSource: "send"
|
||||
longpressEnabled: false
|
||||
|
||||
onClicked: {
|
||||
if (actionDelegate.actionType.paramTypes.count === 0) {
|
||||
@ -423,6 +425,7 @@ ThingPageBase {
|
||||
Item {
|
||||
Layout.preferredHeight: preferredSize
|
||||
Layout.preferredWidth: preferredSize
|
||||
visible: preferredSize > 0
|
||||
property int preferredSize: actionDelegate.pendingActionId !== -1 || pendingTimer.running ? Style.iconSize : 0
|
||||
Behavior on preferredSize { NumberAnimation { duration: 100 } }
|
||||
|
||||
|
||||
@ -45,10 +45,11 @@ Page {
|
||||
readonly property bool isLogged: thing.loggedStateTypeIds.indexOf(stateType.id) >= 0
|
||||
|
||||
readonly property bool canShowGraph: {
|
||||
switch (root.stateType.type) {
|
||||
case "Int":
|
||||
case "Double":
|
||||
case "Bool":
|
||||
switch (root.stateType.type.toLowerCase()) {
|
||||
case "int":
|
||||
case "uint":
|
||||
case "double":
|
||||
case "bool":
|
||||
return true;
|
||||
}
|
||||
print("not showing graph for", root.stateType.type)
|
||||
@ -119,10 +120,9 @@ Page {
|
||||
delegate: NymeaItemDelegate {
|
||||
width: listView.width
|
||||
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())
|
||||
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