diff --git a/src/components/pages/NodePage.vue b/src/components/pages/NodePage.vue
index 9577967..5e67dd1 100644
--- a/src/components/pages/NodePage.vue
+++ b/src/components/pages/NodePage.vue
@@ -53,6 +53,7 @@
+
+
+
+
Device Metrics
+
+
+
+ -
+
Battery Level
+
+
+ Plugged-In
+ {{ node.deviceMetrics.batteryLevel }}%
+
+ ???
+
+
+
+
+ -
+
Voltage
+
+ {{ node.deviceMetrics.voltage.toFixed(2) }}v
+ ???
+
+
+
+
+ -
+
Channel Utilization
+
+ {{ node.deviceMetrics.channelUtilization.toFixed(2) }}%
+ ???
+
+
+
+
+ -
+
Air Util Tx
+
+ {{ node.deviceMetrics.airUtilTx.toFixed(2) }}%
+ ???
+
+
+
+
+ -
+
Uptime
+
+ {{ formatUptimeSeconds(node.deviceMetrics.uptimeSeconds) }}
+ ???
+
+
+
+
+
+
@@ -121,6 +178,15 @@ export default {
getRoleName: (roleId) => NodeUtils.getRoleName(roleId),
getHardwareName: (roleId) => NodeUtils.getHardwareName(roleId),
latLongIntegerToLatLong: (latLongInteger) => NodeUtils.latLongIntegerToLatLong(latLongInteger),
+ formatUptimeSeconds: function(secondsToFormat) {
+ secondsToFormat = Number(secondsToFormat);
+ const days = Math.floor(secondsToFormat / (3600 * 24));
+ const hours = Math.floor((secondsToFormat % (3600 * 24)) / 3600);
+ const minutes = Math.floor((secondsToFormat % 3600) / 60);
+ const seconds = Math.floor(secondsToFormat % 60);
+ const daysPlural = days === 1 ? 'day' : 'days';
+ return `${days} ${daysPlural} ${hours}h ${minutes}m ${seconds}s`;
+ },
onNodeDeleted() {
// go back to main page