From 3b137964fc1b1b10912e9f91321e9d0df1cf6ec7 Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Tue, 10 May 2022 09:19:40 -0700 Subject: [PATCH] make sure we include the host id in the temp history label. --- webapp/frontend/src/app/data/mock/summary/data.ts | 2 +- .../src/app/modules/dashboard/dashboard.component.ts | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/webapp/frontend/src/app/data/mock/summary/data.ts b/webapp/frontend/src/app/data/mock/summary/data.ts index 70acf16..801497d 100644 --- a/webapp/frontend/src/app/data/mock/summary/data.ts +++ b/webapp/frontend/src/app/data/mock/summary/data.ts @@ -138,7 +138,7 @@ export const summary = { "device_protocol": "", "device_type": "", "label": "", - "host_id": "", + "host_id": "custom host id", "device_status": 1 }, "smart": { diff --git a/webapp/frontend/src/app/modules/dashboard/dashboard.component.ts b/webapp/frontend/src/app/modules/dashboard/dashboard.component.ts index a0d6738..2fdbf0b 100644 --- a/webapp/frontend/src/app/modules/dashboard/dashboard.component.ts +++ b/webapp/frontend/src/app/modules/dashboard/dashboard.component.ts @@ -91,8 +91,14 @@ export class DashboardComponent implements OnInit, AfterViewInit, OnDestroy if (!deviceSummary.temp_history){ continue } + + let deviceName = `/dev/${deviceSummary.device.device_name}` + if(deviceSummary.device.host_id){ + deviceName = `${deviceSummary.device.host_id} - ${deviceName}` + } + var deviceSeriesMetadata = { - name: `/dev/${deviceSummary.device.device_name}`, + name: deviceName, data: [] }