From b0b85ff3e784a3b6d4d561eb450308af7933ce5f Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Tue, 28 May 2024 21:45:03 +0200 Subject: [PATCH] feat: improve handling of lwm2m objects --- pages/device.page.tsx | 25 +++---- src/chart/toChartData.ts | 2 +- src/components/BME680.tsx | 4 +- src/components/DeviceHeader.tsx | 15 ++-- src/components/SignalQuality.tsx | 6 +- src/components/deviceInfo/NetworkInfo.tsx | 6 +- src/components/deviceInfo/NetworkModeInfo.tsx | 6 +- src/components/deviceInfo/SoftwareInfo.tsx | 5 +- .../PCA20035-solar/SolarThingyBattery.tsx | 4 +- .../model/PCA20035-solar/SolarThingyChart.tsx | 32 +++++++-- src/context/Device.tsx | 69 +++++++++++++++---- src/context/DeviceLocation.tsx | 12 ++-- src/context/DeviceState.tsx | 66 ------------------ src/context/{LwM2MHistory.tsx => History.tsx} | 46 +++++-------- src/map/CellularLocation.tsx | 7 +- src/map/GNSSLocation.tsx | 8 +-- src/map/Map.tsx | 9 ++- 17 files changed, 155 insertions(+), 167 deletions(-) delete mode 100644 src/context/DeviceState.tsx rename src/context/{LwM2MHistory.tsx => History.tsx} (55%) diff --git a/pages/device.page.tsx b/pages/device.page.tsx index 030c8f45..32e2252d 100644 --- a/pages/device.page.tsx +++ b/pages/device.page.tsx @@ -3,10 +3,9 @@ import { Navbar } from '#components/Navbar.js' import { Provider as ModelsProvider } from '#context/Models.js' import { Provider as DeviceProvider } from '#context/Device.js' import { Provider as DeviceLocationProvider } from '#context/DeviceLocation.js' -import { Provider as DeviceStateProvider } from '#context/DeviceState.js' import { Provider as FingerprintProvider } from '#context/Fingerprint.js' import { Provider as ParametersProvider } from '#context/Parameters.js' -import { Provider as LwM2MHistoryProvider } from '#context/LwM2MHistory.js' +import { Provider as HistoryProvider } from '#context/History.js' import { Device } from '#page/Device.js' import type { IndexPageProps } from './index.page.server.js' import { WebsocketDisconnectNotifier } from '#components/WebsocketDisconnectNotifier.js' @@ -17,18 +16,16 @@ export const Page = ({ models }: IndexPageProps) => ( - - - - - - - -