From 78056d986dd95bfe20b371dd6d9d6719b4cb1716 Mon Sep 17 00:00:00 2001 From: Evan Langlais Date: Mon, 15 Apr 2019 23:01:02 -0400 Subject: [PATCH] Removing unnecessary if, introducing optional values in generator state --- src/app/generator-object.ts | 10 +++++----- src/app/statistics/statistics.component.html | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/app/generator-object.ts b/src/app/generator-object.ts index acca0df..f912f63 100644 --- a/src/app/generator-object.ts +++ b/src/app/generator-object.ts @@ -10,10 +10,10 @@ export interface GeneratorState { online: boolean; status: string; status_code: number; - fault_count: number | null; - fault_codes: Array; - status_count: number; - status_codes: Array; - ip: string; + fault_count?: number; + fault_codes?: Array; + status_count?: number; + status_codes?: Array; + ip?: string; } diff --git a/src/app/statistics/statistics.component.html b/src/app/statistics/statistics.component.html index b01f43d..db195b7 100644 --- a/src/app/statistics/statistics.component.html +++ b/src/app/statistics/statistics.component.html @@ -107,61 +107,61 @@

Faults

-
Overcrank
+
Overcrank
Overcrank
-
High Engine
Temperature
+
High Engine
Temperature
High Engine
Temperature
-
Low Oil
Pressure
+
Low Oil
Pressure
Low Oil
Pressure
-
Overspeed
+
Overspeed
Overspeed
-
Emergency Stop
+
Emergency Stop
Emergency Stop
-
Low Fuel
+
Low Fuel
Low Fuel
-
Low Coolant
Level/Aux
+
Low Coolant
Level/Aux
Low Coolant
Level/Aux
-
Low Cranking
Voltage
+
Low Cranking
Voltage
Low Cranking
Voltage
-
Battery Voltage
(Hi/Lo)
+
Battery Voltage
(Hi/Lo)
Battery Voltage
(Hi/Lo)
-
Common Fault
+
Common Fault
Common Fault