diff --git a/src/public/index.html b/src/public/index.html
index 15feb55..df29df7 100644
--- a/src/public/index.html
+++ b/src/public/index.html
@@ -852,7 +852,7 @@
Uptime
- {{ selectedNode.uptime_seconds }} seconds
+ {{ formatUptimeSeconds(selectedNode.uptime_seconds) }}
???
@@ -2452,6 +2452,15 @@
window._onHideNodeNeighboursClick();
this.selectedNodeToShowNeighbours = null;
},
+ formatUptimeSeconds: function(secondsToFormat) {
+ secondsToFormat = Number(secondsToFormat);
+ var days = Math.floor(secondsToFormat / (3600 * 24));
+ var hours = Math.floor((secondsToFormat % (3600 * 24)) / 3600);
+ var minutes = Math.floor((secondsToFormat % 3600) / 60);
+ var seconds = Math.floor(secondsToFormat % 60);
+ var daysPlural = days === 1 ? 'day' : 'days';
+ return `${days} ${daysPlural} ${hours}h ${minutes}m ${seconds}s`;
+ },
},
computed: {
searchedNodes() {