From eff8b69d38386a95276ff53a805b4380356d5390 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Thu, 7 Feb 2019 19:27:21 +0000 Subject: [PATCH] Use new HTTP API parameter in client --- Changelog.md | 5 ++++- client_src/js/DeviceReadingDisplay.mjs | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Changelog.md b/Changelog.md index 5c0dcb0..817d756 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,7 +1,10 @@ # Changelog ## v0.3.1 - 7th February 2019 - - [API] Added `device-id` parameter to the `list-reading-types` action. + - Hidden measurement types in the device graph if a device hasn't reported any readings of that type + +### API Backend + - Added `device-id` parameter to the `list-reading-types` action. ## v0.3.0 - 1st February 2019 - Installed a library to fix bugs in the device marker tabbing system diff --git a/client_src/js/DeviceReadingDisplay.mjs b/client_src/js/DeviceReadingDisplay.mjs index 4453fe0..f281128 100644 --- a/client_src/js/DeviceReadingDisplay.mjs +++ b/client_src/js/DeviceReadingDisplay.mjs @@ -153,7 +153,7 @@ class DeviceReadingDisplay { } async fetch_reading_types() { - this.reading_types = JSON.parse(await GetFromUrl(`${this.config.api_root}?action=list-reading-types`)); + this.reading_types = JSON.parse(await GetFromUrl(`${this.config.api_root}?action=list-reading-types&device-id=${this.device_id}`)); } async switch_graph_type_handler(event) {