Skip to content

Commit

Permalink
Make slowlog timestamps human-readable
Browse files Browse the repository at this point in the history
  • Loading branch information
uglide committed May 11, 2021
1 parent 99cb313 commit 3ac08f5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/qml/common/platformutils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

var dateTimeFormat = "yyyy-MM-dd hh:mm:ss.zzz"

function isOSX() {
return Qt.platform.os == "osx"
}
Expand Down
10 changes: 10 additions & 0 deletions src/qml/server-info/ServerInfoTabs.qml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import QtQuick.Dialogs 1.2
import QtQuick.Window 2.2
import QtCharts 2.3
import "./../common"
import "./../common/platformutils.js" as PlatformUtils
import "./../settings"


Expand Down Expand Up @@ -723,6 +724,15 @@ Repeater {
role: "time"
title: qsTranslate("RDM","Processed at")
width: 150

delegate: Text {
text: {
return new Date(modelData['time']*1000).toLocaleString(
locale, PlatformUtils.dateTimeFormat);
}
elide: styleData.elideMode
}

}

LC.TableViewColumn {
Expand Down
2 changes: 1 addition & 1 deletion src/qml/value-editor/filters/StreamFilters.qml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RowLayout {
objectName: "rdm_stream_filter"

property bool enabled: streamRangeSlider.from < streamRangeSlider.to
property string dateTimeFormat: "yyyy-MM-dd hh:mm:ss.zzz"
property string dateTimeFormat: PlatformUtils.dateTimeFormat
property string inputMask: "9999-99-99 99:99:99.999"

function setStreamFilter() {
Expand Down

0 comments on commit 3ac08f5

Please sign in to comment.