From 67d1c592a5bc3317693aa6edb1177bdfdcc31fd1 Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Sat, 19 Sep 2020 11:25:19 -0600 Subject: [PATCH] include the device type in the title, if it's non-standard. --- .../src/app/modules/dashboard/dashboard.component.html | 2 +- .../src/app/modules/dashboard/dashboard.component.ts | 9 +++++++++ .../src/app/modules/detail/detail.component.html | 4 ++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/webapp/frontend/src/app/modules/dashboard/dashboard.component.html b/webapp/frontend/src/app/modules/dashboard/dashboard.component.html index af1bc68..68d42d7 100644 --- a/webapp/frontend/src/app/modules/dashboard/dashboard.component.html +++ b/webapp/frontend/src/app/modules/dashboard/dashboard.component.html @@ -66,7 +66,7 @@
/dev/{{disk.device_name}} - {{disk.model_name}} + class="font-bold text-md text-secondary uppercase tracking-wider">{{deviceTitle(disk)}}
Last Updated on {{disk.smart_results[0]?.date | date:'MMMM dd, yyyy' }} diff --git a/webapp/frontend/src/app/modules/dashboard/dashboard.component.ts b/webapp/frontend/src/app/modules/dashboard/dashboard.component.ts index a6e0b82..b244655 100644 --- a/webapp/frontend/src/app/modules/dashboard/dashboard.component.ts +++ b/webapp/frontend/src/app/modules/dashboard/dashboard.component.ts @@ -164,6 +164,15 @@ export class DashboardComponent implements OnInit, AfterViewInit, OnDestroy }); } + deviceTitle(disk){ + var title = [`/dev/${disk.device_name}`] + if (disk.device_type && disk.device_type != 'scsi' && disk.device_type != 'ata'){ + title.push(disk.device_type) + } + title.push(disk.model_name) + return title.join(' - ') + } + /** * Track by function for ngFor loops * diff --git a/webapp/frontend/src/app/modules/detail/detail.component.html b/webapp/frontend/src/app/modules/detail/detail.component.html index 3f64cdb..7706f90 100644 --- a/webapp/frontend/src/app/modules/detail/detail.component.html +++ b/webapp/frontend/src/app/modules/detail/detail.component.html @@ -56,6 +56,10 @@
/dev/{{data.data.device_name}}
+
+
{{data.data.device_type}}
+
Device Type
+
{{data.data.manufacturer}}
Model Family