From abdc45a799890e45c6d4d1ef549ee3577b4a9e4a Mon Sep 17 00:00:00 2001 From: Mikail Killi Date: Mon, 14 Oct 2024 17:23:30 +0200 Subject: [PATCH] Updated web interface with axios requests, additonal functions and styling --- web/src/components/HeaderBar.vue | 36 +---- web/src/components/ListViewElement.vue | 36 +++-- web/src/components/TableCategory.vue | 177 ++++++++++++++----------- web/src/types.ts | 25 ++-- 4 files changed, 138 insertions(+), 136 deletions(-) diff --git a/web/src/components/HeaderBar.vue b/web/src/components/HeaderBar.vue index 263f498..1dc7858 100644 --- a/web/src/components/HeaderBar.vue +++ b/web/src/components/HeaderBar.vue @@ -3,29 +3,9 @@ - -
- - diff --git a/web/src/components/TableCategory.vue b/web/src/components/TableCategory.vue index 09df7de..d596d6c 100644 --- a/web/src/components/TableCategory.vue +++ b/web/src/components/TableCategory.vue @@ -5,26 +5,32 @@ Node/Name Status - Latitude - Longitude + Latitude + Longitude Battery - Gemessene - Temperatur - Laufzeit + Temperature + Runtime {{ node.name }} - - {{ node.status }} + + {{ node.sensorData.voltage ? 'ONLINE' : 'OFFLINE' }} - {{ node.position.lat }} - {{ node.position.lng }} - {{ node.battery }}% - {{ node.temperature }}°C - {{ node.runtime }} + {{ node.coordla }} + {{ node.coordlong }} + {{ calculateBatteryPercentage(node.sensorData.voltage, node.batteryMinimum, node.batteryMaximum) }}% + {{ node.sensorData.temperature }}°C + {{ formatRuntime(node.sensorData.uptime) }} @@ -32,92 +38,103 @@