diff --git a/domain-server/resources/web/index.shtml b/domain-server/resources/web/index.shtml
index 0f720ebe79..ea941a73fd 100644
--- a/domain-server/resources/web/index.shtml
+++ b/domain-server/resources/web/index.shtml
@@ -31,7 +31,7 @@
<%- node.username %> |
<%- node.public.ip %>:<%- node.public.port %> |
<%- node.local.ip %>:<%- node.local.port %> |
- <%- ((Date.now() - node.wake_timestamp) / 1000).toLocaleString() %> |
+ <%- node.uptime %> |
<%- (typeof node.pending_credits == 'number' ? node.pending_credits.toLocaleString() : 'N/A') %> |
|
diff --git a/domain-server/resources/web/js/tables.js b/domain-server/resources/web/js/tables.js
index 0b29d4e6c9..b2e0679d8b 100644
--- a/domain-server/resources/web/js/tables.js
+++ b/domain-server/resources/web/js/tables.js
@@ -9,9 +9,9 @@ $(document).ready(function(){
json.nodes.sort(function(a, b){
if (a.type === b.type) {
- if (a.wake_timestamp < b.wake_timestamp) {
+ if (a.uptime > b.uptime) {
return 1;
- } else if (a.wake_timestamp > b.wake_timestamp) {
+ } else if (a.uptime < b.uptime) {
return -1;
} else {
return 0;
diff --git a/domain-server/src/DomainServer.cpp b/domain-server/src/DomainServer.cpp
index 071626ef1e..369cb3b761 100644
--- a/domain-server/src/DomainServer.cpp
+++ b/domain-server/src/DomainServer.cpp
@@ -1480,7 +1480,7 @@ const char JSON_KEY_PUBLIC_SOCKET[] = "public";
const char JSON_KEY_LOCAL_SOCKET[] = "local";
const char JSON_KEY_POOL[] = "pool";
const char JSON_KEY_PENDING_CREDITS[] = "pending_credits";
-const char JSON_KEY_WAKE_TIMESTAMP[] = "wake_timestamp";
+const char JSON_KEY_UPTIME[] = "uptime";
const char JSON_KEY_USERNAME[] = "username";
const char JSON_KEY_VERSION[] = "version";
QJsonObject DomainServer::jsonObjectForNode(const SharedNodePointer& node) {
@@ -1502,7 +1502,7 @@ QJsonObject DomainServer::jsonObjectForNode(const SharedNodePointer& node) {
nodeJson[JSON_KEY_LOCAL_SOCKET] = jsonForSocket(node->getLocalSocket());
// add the node uptime in our list
- nodeJson[JSON_KEY_WAKE_TIMESTAMP] = QString::number(node->getWakeTimestamp());
+ nodeJson[JSON_KEY_UPTIME] = QString::number((QDateTime::currentMSecsSinceEpoch() - node->getWakeTimestamp()) / 1000.0);
// if the node has pool information, add it
DomainServerNodeData* nodeData = reinterpret_cast(node->getLinkedData());