make sure the status is always exposed in the json data. make sure display_name for metadata is included. Update mocked test data for frontend.

pull/228/head
Jason Kulatunga 3 years ago
parent deba21fe19
commit 5789c836db

@ -19,7 +19,7 @@ type SmartAtaAttribute struct {
//Generated data //Generated data
TransformedValue int64 `json:"transformed_value"` TransformedValue int64 `json:"transformed_value"`
Status int64 `json:"status,omitempty"` Status int64 `json:"status"`
StatusReason string `json:"status_reason,omitempty"` StatusReason string `json:"status_reason,omitempty"`
FailureRate float64 `json:"failure_rate,omitempty"` FailureRate float64 `json:"failure_rate,omitempty"`
} }

@ -13,7 +13,7 @@ type SmartNvmeAttribute struct {
Threshold int64 `json:"thresh"` Threshold int64 `json:"thresh"`
TransformedValue int64 `json:"transformed_value"` TransformedValue int64 `json:"transformed_value"`
Status int64 `json:"status,omitempty"` Status int64 `json:"status"`
StatusReason string `json:"status_reason,omitempty"` StatusReason string `json:"status_reason,omitempty"`
FailureRate float64 `json:"failure_rate,omitempty"` FailureRate float64 `json:"failure_rate,omitempty"`
} }

@ -13,7 +13,7 @@ type SmartScsiAttribute struct {
Threshold int64 `json:"thresh"` Threshold int64 `json:"thresh"`
TransformedValue int64 `json:"transformed_value"` TransformedValue int64 `json:"transformed_value"`
Status int64 `json:"status,omitempty"` Status int64 `json:"status"`
StatusReason string `json:"status_reason,omitempty"` StatusReason string `json:"status_reason,omitempty"`
FailureRate float64 `json:"failure_rate,omitempty"` FailureRate float64 `json:"failure_rate,omitempty"`
} }

@ -69,7 +69,7 @@
} }
}, },
"local_time": { "local_time": {
"time_t": 1635117644, "time_t": 1635107644,
"asctime": "Sun Jun 30 00:03:30 2021 UTC" "asctime": "Sun Jun 30 00:03:30 2021 UTC"
}, },
"smart_status": { "smart_status": {

@ -69,7 +69,7 @@
} }
}, },
"local_time": { "local_time": {
"time_t": 1635117644, "time_t": 1635127644,
"asctime": "Tue Feb 23 00:03:30 2021 UTC" "asctime": "Tue Feb 23 00:03:30 2021 UTC"
}, },
"smart_status": { "smart_status": {

@ -6,7 +6,7 @@ package thresholds
// https://www.micromat.com/product_manuals/drive_scope_manual_01.pdf // https://www.micromat.com/product_manuals/drive_scope_manual_01.pdf
type NvmeAttributeMetadata struct { type NvmeAttributeMetadata struct {
ID string `json:"-"` ID string `json:"-"`
DisplayName string `json:"-"` DisplayName string `json:"display_name"`
Ideal string `json:"ideal"` Ideal string `json:"ideal"`
Critical bool `json:"critical"` Critical bool `json:"critical"`
Description string `json:"description"` Description string `json:"description"`

@ -2,7 +2,7 @@ package thresholds
type ScsiAttributeMetadata struct { type ScsiAttributeMetadata struct {
ID string `json:"-"` ID string `json:"-"`
DisplayName string `json:"-"` DisplayName string `json:"display_name"`
Ideal string `json:"ideal"` Ideal string `json:"ideal"`
Critical bool `json:"critical"` Critical bool `json:"critical"`
Description string `json:"description"` Description string `json:"description"`

File diff suppressed because it is too large Load Diff

@ -2,7 +2,7 @@ export const sda = {
"data": { "data": {
"device": { "device": {
"CreatedAt": "2021-06-24T21:17:31.301226-07:00", "CreatedAt": "2021-06-24T21:17:31.301226-07:00",
"UpdatedAt": "2021-06-26T14:26:20.856273-07:00", "UpdatedAt": "2021-10-24T16:37:56.981833-07:00",
"DeletedAt": null, "DeletedAt": null,
"wwn": "0x5002538e40a22954", "wwn": "0x5002538e40a22954",
"device_name": "sda", "device_name": "sda",
@ -23,7 +23,7 @@ export const sda = {
"device_status": 0 "device_status": 0
}, },
"smart_results": [{ "smart_results": [{
"date": "2020-06-10T12:01:02Z", "date": "2021-10-24T23:20:44Z",
"device_wwn": "0x5002538e40a22954", "device_wwn": "0x5002538e40a22954",
"device_protocol": "NVMe", "device_protocol": "NVMe",
"temp": 36, "temp": 36,
@ -32,211 +32,228 @@ export const sda = {
"attrs": { "attrs": {
"available_spare": { "available_spare": {
"attribute_id": "available_spare", "attribute_id": "available_spare",
"name": "Available Spare",
"value": 100, "value": 100,
"thresh": 10, "thresh": 10,
"transformed_value": 0 "transformed_value": 0,
"status": 0
}, },
"controller_busy_time": { "controller_busy_time": {
"attribute_id": "controller_busy_time", "attribute_id": "controller_busy_time",
"name": "Controller Busy Time",
"value": 3060, "value": 3060,
"thresh": -1, "thresh": -1,
"transformed_value": 0 "transformed_value": 0,
"status": 0
}, },
"critical_comp_time": { "critical_comp_time": {
"attribute_id": "critical_comp_time", "attribute_id": "critical_comp_time",
"name": "Critical CompTime",
"value": 0, "value": 0,
"thresh": -1, "thresh": -1,
"transformed_value": 0 "transformed_value": 0,
"status": 0
}, },
"critical_warning": { "critical_warning": {
"attribute_id": "critical_warning", "attribute_id": "critical_warning",
"name": "Critical Warning",
"value": 0, "value": 0,
"thresh": 0, "thresh": 0,
"transformed_value": 0 "transformed_value": 0,
"status": 0
}, },
"data_units_read": { "data_units_read": {
"attribute_id": "data_units_read", "attribute_id": "data_units_read",
"name": "Data Units Read",
"value": 9511859, "value": 9511859,
"thresh": -1, "thresh": -1,
"transformed_value": 0 "transformed_value": 0,
"status": 0
}, },
"data_units_written": { "data_units_written": {
"attribute_id": "data_units_written", "attribute_id": "data_units_written",
"name": "Data Units Written",
"value": 7773431, "value": 7773431,
"thresh": -1, "thresh": -1,
"transformed_value": 0 "transformed_value": 0,
"status": 0
}, },
"host_reads": { "host_reads": {
"attribute_id": "host_reads", "attribute_id": "host_reads",
"name": "Host Reads",
"value": 111303174, "value": 111303174,
"thresh": -1, "thresh": -1,
"transformed_value": 0 "transformed_value": 0,
"status": 0
}, },
"host_writes": { "host_writes": {
"attribute_id": "host_writes", "attribute_id": "host_writes",
"name": "Host Writes",
"value": 83170961, "value": 83170961,
"thresh": -1, "thresh": -1,
"transformed_value": 0 "transformed_value": 0,
"status": 0
}, },
"media_errors": { "media_errors": {
"attribute_id": "media_errors", "attribute_id": "media_errors",
"name": "Media Errors",
"value": 0, "value": 0,
"thresh": 0, "thresh": 0,
"transformed_value": 0 "transformed_value": 0,
"status": 0
}, },
"num_err_log_entries": { "num_err_log_entries": {
"attribute_id": "num_err_log_entries", "attribute_id": "num_err_log_entries",
"name": "Numb Err Log Entries",
"value": 0, "value": 0,
"thresh": 0, "thresh": 0,
"transformed_value": 0 "transformed_value": 0,
"status": 0
}, },
"percentage_used": { "percentage_used": {
"attribute_id": "percentage_used", "attribute_id": "percentage_used",
"name": "Percentage Used",
"value": 0, "value": 0,
"thresh": 100, "thresh": 100,
"transformed_value": 0 "transformed_value": 0,
"status": 0
}, },
"power_cycles": { "power_cycles": {
"attribute_id": "power_cycles", "attribute_id": "power_cycles",
"name": "Power Cycles",
"value": 266, "value": 266,
"thresh": -1, "thresh": -1,
"transformed_value": 0 "transformed_value": 0,
"status": 0
}, },
"power_on_hours": { "power_on_hours": {
"attribute_id": "power_on_hours", "attribute_id": "power_on_hours",
"name": "Power on Hours",
"value": 2401, "value": 2401,
"thresh": -1, "thresh": -1,
"transformed_value": 0 "transformed_value": 0,
"status": 0
}, },
"temperature": { "temperature": {
"attribute_id": "temperature", "attribute_id": "temperature",
"name": "Temperature",
"value": 36, "value": 36,
"thresh": -1, "thresh": -1,
"transformed_value": 0 "transformed_value": 0,
"status": 0
}, },
"unsafe_shutdowns": { "unsafe_shutdowns": {
"attribute_id": "unsafe_shutdowns", "attribute_id": "unsafe_shutdowns",
"name": "Unsafe Shutdowns",
"value": 43, "value": 43,
"thresh": -1, "thresh": -1,
"transformed_value": 0 "transformed_value": 0,
"status": 0
}, },
"warning_temp_time": { "warning_temp_time": {
"attribute_id": "warning_temp_time", "attribute_id": "warning_temp_time",
"name": "Warning Temp Time",
"value": 0, "value": 0,
"thresh": -1, "thresh": -1,
"transformed_value": 0 "transformed_value": 0,
} "status": 0
} }
},
"Status": 0
}] }]
}, },
"metadata": { "metadata": {
"available_spare": { "available_spare": {
"display_name": "Available Spare",
"ideal": "high", "ideal": "high",
"critical": true, "critical": true,
"description": "Contains a normalized percentage (0 to 100%) of the remaining spare capacity available.", "description": "Contains a normalized percentage (0 to 100%) of the remaining spare capacity available.",
"display_type": "" "display_type": ""
}, },
"controller_busy_time": { "controller_busy_time": {
"display_name": "Controller Busy Time",
"ideal": "", "ideal": "",
"critical": false, "critical": false,
"description": "Contains the amount of time the controller is busy with I/O commands. The controller is busy when there is a command outstanding to an I/O Queue (specifically, a command was issued via an I/O Submission Queue Tail doorbell write and the corresponding completion queue entry has not been posted yet to the associated I/O Completion Queue). This value is reported in minutes.", "description": "Contains the amount of time the controller is busy with I/O commands. The controller is busy when there is a command outstanding to an I/O Queue (specifically, a command was issued via an I/O Submission Queue Tail doorbell write and the corresponding completion queue entry has not been posted yet to the associated I/O Completion Queue). This value is reported in minutes.",
"display_type": "" "display_type": ""
}, },
"critical_comp_time": { "critical_comp_time": {
"display_name": "Critical CompTime",
"ideal": "", "ideal": "",
"critical": false, "critical": false,
"description": "Contains the amount of time in minutes that the controller is operational and the Composite Temperature is greater the Critical Composite Temperature Threshold (CCTEMP) field in the Identify Controller data structure.", "description": "Contains the amount of time in minutes that the controller is operational and the Composite Temperature is greater the Critical Composite Temperature Threshold (CCTEMP) field in the Identify Controller data structure.",
"display_type": "" "display_type": ""
}, },
"critical_warning": { "critical_warning": {
"display_name": "Critical Warning",
"ideal": "low", "ideal": "low",
"critical": true, "critical": true,
"description": "This field indicates critical warnings for the state of the controller. Each bit corresponds to a critical warning type; multiple bits may be set. If a bit is cleared to 0, then that critical warning does not apply. Critical warnings may result in an asynchronous event notification to the host. Bits in this field represent the current associated state and are not persistent.", "description": "This field indicates critical warnings for the state of the controller. Each bit corresponds to a critical warning type; multiple bits may be set. If a bit is cleared to 0, then that critical warning does not apply. Critical warnings may result in an asynchronous event notification to the host. Bits in this field represent the current associated state and are not persistent.",
"display_type": "" "display_type": ""
}, },
"data_units_read": { "data_units_read": {
"display_name": "Data Units Read",
"ideal": "", "ideal": "",
"critical": false, "critical": false,
"description": "Contains the number of 512 byte data units the host has read from the controller; this value does not include metadata. This value is reported in thousands (i.e., a value of 1 corresponds to 1000 units of 512 bytes read) and is rounded up. When the LBA size is a value other than 512 bytes, the controller shall convert the amount of data read to 512 byte units.", "description": "Contains the number of 512 byte data units the host has read from the controller; this value does not include metadata. This value is reported in thousands (i.e., a value of 1 corresponds to 1000 units of 512 bytes read) and is rounded up. When the LBA size is a value other than 512 bytes, the controller shall convert the amount of data read to 512 byte units.",
"display_type": "" "display_type": ""
}, },
"data_units_written": { "data_units_written": {
"display_name": "Data Units Written",
"ideal": "", "ideal": "",
"critical": false, "critical": false,
"description": "Contains the number of 512 byte data units the host has written to the controller; this value does not include metadata. This value is reported in thousands (i.e., a value of 1 corresponds to 1000 units of 512 bytes written) and is rounded up. When the LBA size is a value other than 512 bytes, the controller shall convert the amount of data written to 512 byte units.", "description": "Contains the number of 512 byte data units the host has written to the controller; this value does not include metadata. This value is reported in thousands (i.e., a value of 1 corresponds to 1000 units of 512 bytes written) and is rounded up. When the LBA size is a value other than 512 bytes, the controller shall convert the amount of data written to 512 byte units.",
"display_type": "" "display_type": ""
}, },
"host_reads": { "host_reads": {
"display_name": "Host Reads",
"ideal": "", "ideal": "",
"critical": false, "critical": false,
"description": "Contains the number of read commands completed by the controller", "description": "Contains the number of read commands completed by the controller",
"display_type": "" "display_type": ""
}, },
"host_writes": { "host_writes": {
"display_name": "Host Writes",
"ideal": "", "ideal": "",
"critical": false, "critical": false,
"description": "Contains the number of write commands completed by the controller", "description": "Contains the number of write commands completed by the controller",
"display_type": "" "display_type": ""
}, },
"media_errors": { "media_errors": {
"display_name": "Media Errors",
"ideal": "low", "ideal": "low",
"critical": true, "critical": true,
"description": "Contains the number of occurrences where the controller detected an unrecovered data integrity error. Errors such as uncorrectable ECC, CRC checksum failure, or LBA tag mismatch are included in this field.", "description": "Contains the number of occurrences where the controller detected an unrecovered data integrity error. Errors such as uncorrectable ECC, CRC checksum failure, or LBA tag mismatch are included in this field.",
"display_type": "" "display_type": ""
}, },
"num_err_log_entries": { "num_err_log_entries": {
"display_name": "Numb Err Log Entries",
"ideal": "low", "ideal": "low",
"critical": true, "critical": true,
"description": "Contains the number of Error Information log entries over the life of the controller.", "description": "Contains the number of Error Information log entries over the life of the controller.",
"display_type": "" "display_type": ""
}, },
"percentage_used": { "percentage_used": {
"display_name": "Percentage Used",
"ideal": "low", "ideal": "low",
"critical": true, "critical": true,
"description": "Contains a vendor specific estimate of the percentage of NVM subsystem life used based on the actual usage and the manufacturers prediction of NVM life. A value of 100 indicates that the estimated endurance of the NVM in the NVM subsystem has been consumed, but may not indicate an NVM subsystem failure. The value is allowed to exceed 100. Percentages greater than 254 shall be represented as 255. This value shall be updated once per power-on hour (when the controller is not in a sleep state).", "description": "Contains a vendor specific estimate of the percentage of NVM subsystem life used based on the actual usage and the manufacturers prediction of NVM life. A value of 100 indicates that the estimated endurance of the NVM in the NVM subsystem has been consumed, but may not indicate an NVM subsystem failure. The value is allowed to exceed 100. Percentages greater than 254 shall be represented as 255. This value shall be updated once per power-on hour (when the controller is not in a sleep state).",
"display_type": "" "display_type": ""
}, },
"power_cycles": { "power_cycles": {
"display_name": "Power Cycles",
"ideal": "", "ideal": "",
"critical": false, "critical": false,
"description": "Contains the number of power cycles.", "description": "Contains the number of power cycles.",
"display_type": "" "display_type": ""
}, },
"power_on_hours": { "power_on_hours": {
"display_name": "Power on Hours",
"ideal": "", "ideal": "",
"critical": false, "critical": false,
"description": "Contains the number of power-on hours. Power on hours is always logging, even when in low power mode.", "description": "Contains the number of power-on hours. Power on hours is always logging, even when in low power mode.",
"display_type": "" "display_type": ""
}, },
"temperature": { "temperature": {
"display_name": "Temperature",
"ideal": "", "ideal": "",
"critical": false, "critical": false,
"description": "", "description": "",
"display_type": "" "display_type": ""
}, },
"unsafe_shutdowns": { "unsafe_shutdowns": {
"display_name": "Unsafe Shutdowns",
"ideal": "", "ideal": "",
"critical": false, "critical": false,
"description": "Contains the number of unsafe shutdowns. This count is incremented when a shutdown notification (CC.SHN) is not received prior to loss of power.", "description": "Contains the number of unsafe shutdowns. This count is incremented when a shutdown notification (CC.SHN) is not received prior to loss of power.",
"display_type": "" "display_type": ""
}, },
"warning_temp_time": { "warning_temp_time": {
"display_name": "Warning Temp Time",
"ideal": "", "ideal": "",
"critical": false, "critical": false,
"description": "Contains the amount of time in minutes that the controller is operational and the Composite Temperature is greater than or equal to the Warning Composite Temperature Threshold (WCTEMP) field and less than the Critical Composite Temperature Threshold (CCTEMP) field in the Identify Controller data structure.", "description": "Contains the amount of time in minutes that the controller is operational and the Composite Temperature is greater than or equal to the Warning Composite Temperature Threshold (WCTEMP) field and less than the Critical Composite Temperature Threshold (CCTEMP) field in the Identify Controller data structure.",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -2,7 +2,7 @@ export const sdd = {
"data": { "data": {
"device": { "device": {
"CreatedAt": "2021-06-24T21:17:31.30374-07:00", "CreatedAt": "2021-06-24T21:17:31.30374-07:00",
"UpdatedAt": "2021-06-26T14:26:20.902325-07:00", "UpdatedAt": "2021-10-24T16:37:57.013758-07:00",
"DeletedAt": null, "DeletedAt": null,
"wwn": "0x5000cca252c859cc", "wwn": "0x5000cca252c859cc",
"device_name": "sdd", "device_name": "sdd",
@ -23,7 +23,7 @@ export const sdd = {
"device_status": 0 "device_status": 0
}, },
"smart_results": [{ "smart_results": [{
"date": "2020-08-21T22:27:02Z", "date": "2021-10-24T23:20:44Z",
"device_wwn": "0x5000cca252c859cc", "device_wwn": "0x5000cca252c859cc",
"device_protocol": "SCSI", "device_protocol": "SCSI",
"temp": 34, "temp": 34,
@ -32,272 +32,186 @@ export const sdd = {
"attrs": { "attrs": {
"read_correction_algorithm_invocations": { "read_correction_algorithm_invocations": {
"attribute_id": "read_correction_algorithm_invocations", "attribute_id": "read_correction_algorithm_invocations",
"name": "Read Correction Algorithm Invocations",
"value": 0, "value": 0,
"thresh": -1, "thresh": -1,
"transformed_value": 0 "transformed_value": 0,
"status": 0
}, },
"read_errors_corrected_by_eccdelayed": { "read_errors_corrected_by_eccdelayed": {
"attribute_id": "read_errors_corrected_by_eccdelayed", "attribute_id": "read_errors_corrected_by_eccdelayed",
"name": "Read Errors Corrected by ECC Delayed",
"value": 0, "value": 0,
"thresh": -1, "thresh": -1,
"transformed_value": 0 "transformed_value": 0,
"status": 0
}, },
"read_errors_corrected_by_eccfast": { "read_errors_corrected_by_eccfast": {
"attribute_id": "read_errors_corrected_by_eccfast", "attribute_id": "read_errors_corrected_by_eccfast",
"name": "Read Errors Corrected by ECC Fast",
"value": 300357663, "value": 300357663,
"thresh": -1, "thresh": -1,
"transformed_value": 0 "transformed_value": 0,
"status": 0
}, },
"read_errors_corrected_by_rereads_rewrites": { "read_errors_corrected_by_rereads_rewrites": {
"attribute_id": "read_errors_corrected_by_rereads_rewrites", "attribute_id": "read_errors_corrected_by_rereads_rewrites",
"name": "Read Errors Corrected by ReReads/ReWrites",
"value": 0, "value": 0,
"thresh": 0, "thresh": 0,
"transformed_value": 0 "transformed_value": 0,
"status": 0
}, },
"read_total_errors_corrected": { "read_total_errors_corrected": {
"attribute_id": "read_total_errors_corrected", "attribute_id": "read_total_errors_corrected",
"name": "Read Total Errors Corrected",
"value": 300357663, "value": 300357663,
"thresh": -1, "thresh": -1,
"transformed_value": 0 "transformed_value": 0,
"status": 0
}, },
"read_total_uncorrected_errors": { "read_total_uncorrected_errors": {
"attribute_id": "read_total_uncorrected_errors", "attribute_id": "read_total_uncorrected_errors",
"name": "Read Total Uncorrected Errors",
"value": 0, "value": 0,
"thresh": 0, "thresh": 0,
"transformed_value": 0 "transformed_value": 0,
"status": 0
}, },
"scsi_grown_defect_list": { "scsi_grown_defect_list": {
"attribute_id": "scsi_grown_defect_list", "attribute_id": "scsi_grown_defect_list",
"name": "Grown Defect List",
"value": 56, "value": 56,
"thresh": 0, "thresh": 0,
"transformed_value": 0 "transformed_value": 0,
"status": 0
}, },
"write_correction_algorithm_invocations": { "write_correction_algorithm_invocations": {
"attribute_id": "write_correction_algorithm_invocations", "attribute_id": "write_correction_algorithm_invocations",
"name": "Write Correction Algorithm Invocations",
"value": 0, "value": 0,
"thresh": -1, "thresh": -1,
"transformed_value": 0 "transformed_value": 0,
"status": 0
}, },
"write_errors_corrected_by_eccdelayed": { "write_errors_corrected_by_eccdelayed": {
"attribute_id": "write_errors_corrected_by_eccdelayed", "attribute_id": "write_errors_corrected_by_eccdelayed",
"name": "Write Errors Corrected by ECC Delayed",
"value": 0, "value": 0,
"thresh": -1, "thresh": -1,
"transformed_value": 0 "transformed_value": 0,
"status": 0
}, },
"write_errors_corrected_by_eccfast": { "write_errors_corrected_by_eccfast": {
"attribute_id": "write_errors_corrected_by_eccfast", "attribute_id": "write_errors_corrected_by_eccfast",
"name": "Write Errors Corrected by ECC Fast",
"value": 0, "value": 0,
"thresh": -1, "thresh": -1,
"transformed_value": 0 "transformed_value": 0,
"status": 0
}, },
"write_errors_corrected_by_rereads_rewrites": { "write_errors_corrected_by_rereads_rewrites": {
"attribute_id": "write_errors_corrected_by_rereads_rewrites", "attribute_id": "write_errors_corrected_by_rereads_rewrites",
"name": "Write Errors Corrected by ReReads/ReWrites",
"value": 0, "value": 0,
"thresh": 0, "thresh": 0,
"transformed_value": 0 "transformed_value": 0,
"status": 0
}, },
"write_total_errors_corrected": { "write_total_errors_corrected": {
"attribute_id": "write_total_errors_corrected", "attribute_id": "write_total_errors_corrected",
"name": "Write Total Errors Corrected",
"value": 0, "value": 0,
"thresh": -1, "thresh": -1,
"transformed_value": 0 "transformed_value": 0,
"status": 0
}, },
"write_total_uncorrected_errors": { "write_total_uncorrected_errors": {
"attribute_id": "write_total_uncorrected_errors", "attribute_id": "write_total_uncorrected_errors",
"name": "Write Total Uncorrected Errors",
"value": 0, "value": 0,
"thresh": 0, "thresh": 0,
"transformed_value": 0 "transformed_value": 0,
"status": 0
} }
}
},{
"date": "2020-08-21T22:27:02Z",
"device_wwn": "0x5000cca252c859cc",
"device_protocol": "SCSI",
"temp": 34,
"power_on_hours": 43549,
"power_cycle_count": 0,
"attrs": {
"read_correction_algorithm_invocations": {
"attribute_id": "read_correction_algorithm_invocations",
"name": "Read Correction Algorithm Invocations",
"value": 0,
"thresh": -1,
"transformed_value": 0
},
"read_errors_corrected_by_eccdelayed": {
"attribute_id": "read_errors_corrected_by_eccdelayed",
"name": "Read Errors Corrected by ECC Delayed",
"value": 0,
"thresh": -1,
"transformed_value": 0
},
"read_errors_corrected_by_eccfast": {
"attribute_id": "read_errors_corrected_by_eccfast",
"name": "Read Errors Corrected by ECC Fast",
"value": 300357663,
"thresh": -1,
"transformed_value": 0
},
"read_errors_corrected_by_rereads_rewrites": {
"attribute_id": "read_errors_corrected_by_rereads_rewrites",
"name": "Read Errors Corrected by ReReads/ReWrites",
"value": 0,
"thresh": 0,
"transformed_value": 0
},
"read_total_errors_corrected": {
"attribute_id": "read_total_errors_corrected",
"name": "Read Total Errors Corrected",
"value": 300357663,
"thresh": -1,
"transformed_value": 0
},
"read_total_uncorrected_errors": {
"attribute_id": "read_total_uncorrected_errors",
"name": "Read Total Uncorrected Errors",
"value": 0,
"thresh": 0,
"transformed_value": 0
}, },
"scsi_grown_defect_list": { "Status": 0
"attribute_id": "scsi_grown_defect_list",
"name": "Grown Defect List",
"value": 56,
"thresh": 0,
"transformed_value": 0
},
"write_correction_algorithm_invocations": {
"attribute_id": "write_correction_algorithm_invocations",
"name": "Write Correction Algorithm Invocations",
"value": 0,
"thresh": -1,
"transformed_value": 0
},
"write_errors_corrected_by_eccdelayed": {
"attribute_id": "write_errors_corrected_by_eccdelayed",
"name": "Write Errors Corrected by ECC Delayed",
"value": 0,
"thresh": -1,
"transformed_value": 0
},
"write_errors_corrected_by_eccfast": {
"attribute_id": "write_errors_corrected_by_eccfast",
"name": "Write Errors Corrected by ECC Fast",
"value": 0,
"thresh": -1,
"transformed_value": 0
},
"write_errors_corrected_by_rereads_rewrites": {
"attribute_id": "write_errors_corrected_by_rereads_rewrites",
"name": "Write Errors Corrected by ReReads/ReWrites",
"value": 0,
"thresh": 0,
"transformed_value": 0
},
"write_total_errors_corrected": {
"attribute_id": "write_total_errors_corrected",
"name": "Write Total Errors Corrected",
"value": 0,
"thresh": -1,
"transformed_value": 0
},
"write_total_uncorrected_errors": {
"attribute_id": "write_total_uncorrected_errors",
"name": "Write Total Uncorrected Errors",
"value": 0,
"thresh": 0,
"transformed_value": 0
}
}
}] }]
}, },
"metadata": { "metadata": {
"read_correction_algorithm_invocations": { "read_correction_algorithm_invocations": {
"display_name": "Read Correction Algorithm Invocations",
"ideal": "", "ideal": "",
"critical": false, "critical": false,
"description": "", "description": "",
"display_type": "" "display_type": ""
}, },
"read_errors_corrected_by_eccdelayed": { "read_errors_corrected_by_eccdelayed": {
"display_name": "Read Errors Corrected by ECC Delayed",
"ideal": "", "ideal": "",
"critical": false, "critical": false,
"description": "", "description": "",
"display_type": "" "display_type": ""
}, },
"read_errors_corrected_by_eccfast": { "read_errors_corrected_by_eccfast": {
"display_name": "Read Errors Corrected by ECC Fast",
"ideal": "", "ideal": "",
"critical": false, "critical": false,
"description": "", "description": "",
"display_type": "" "display_type": ""
}, },
"read_errors_corrected_by_rereads_rewrites": { "read_errors_corrected_by_rereads_rewrites": {
"display_name": "Read Errors Corrected by ReReads/ReWrites",
"ideal": "low", "ideal": "low",
"critical": true, "critical": true,
"description": "", "description": "",
"display_type": "" "display_type": ""
}, },
"read_total_errors_corrected": { "read_total_errors_corrected": {
"display_name": "Read Total Errors Corrected",
"ideal": "", "ideal": "",
"critical": false, "critical": false,
"description": "", "description": "",
"display_type": "" "display_type": ""
}, },
"read_total_uncorrected_errors": { "read_total_uncorrected_errors": {
"display_name": "Read Total Uncorrected Errors",
"ideal": "low", "ideal": "low",
"critical": true, "critical": true,
"description": "", "description": "",
"display_type": "" "display_type": ""
}, },
"scsi_grown_defect_list": { "scsi_grown_defect_list": {
"display_name": "Grown Defect List",
"ideal": "low", "ideal": "low",
"critical": true, "critical": true,
"description": "", "description": "",
"display_type": "" "display_type": ""
}, },
"write_correction_algorithm_invocations": { "write_correction_algorithm_invocations": {
"display_name": "Write Correction Algorithm Invocations",
"ideal": "", "ideal": "",
"critical": false, "critical": false,
"description": "", "description": "",
"display_type": "" "display_type": ""
}, },
"write_errors_corrected_by_eccdelayed": { "write_errors_corrected_by_eccdelayed": {
"display_name": "Write Errors Corrected by ECC Delayed",
"ideal": "", "ideal": "",
"critical": false, "critical": false,
"description": "", "description": "",
"display_type": "" "display_type": ""
}, },
"write_errors_corrected_by_eccfast": { "write_errors_corrected_by_eccfast": {
"display_name": "Write Errors Corrected by ECC Fast",
"ideal": "", "ideal": "",
"critical": false, "critical": false,
"description": "", "description": "",
"display_type": "" "display_type": ""
}, },
"write_errors_corrected_by_rereads_rewrites": { "write_errors_corrected_by_rereads_rewrites": {
"display_name": "Write Errors Corrected by ReReads/ReWrites",
"ideal": "low", "ideal": "low",
"critical": true, "critical": true,
"description": "", "description": "",
"display_type": "" "display_type": ""
}, },
"write_total_errors_corrected": { "write_total_errors_corrected": {
"display_name": "Write Total Errors Corrected",
"ideal": "", "ideal": "",
"critical": false, "critical": false,
"description": "", "description": "",
"display_type": "" "display_type": ""
}, },
"write_total_uncorrected_errors": { "write_total_uncorrected_errors": {
"display_name": "Write Total Uncorrected Errors",
"ideal": "low", "ideal": "low",
"critical": true, "critical": true,
"description": "", "description": "",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -139,15 +139,15 @@
<td mat-cell <td mat-cell
*matCellDef="let attribute"> *matCellDef="let attribute">
<span class="inline-flex items-center font-bold text-xs px-2 py-2px rounded-full tracking-wide uppercase" <span class="inline-flex items-center font-bold text-xs px-2 py-2px rounded-full tracking-wide uppercase"
[ngClass]="{'red-200': attribute.status === 'failed', [ngClass]="{'red-200': getAttributeStatusName(attribute.status) === 'failed',
'green-200': attribute.status === 'passed', 'green-200': getAttributeStatusName(attribute.status) === 'passed',
'yellow-200': attribute.status === 'warn' 'yellow-200': getAttributeStatusName(attribute.status) === 'warn'
}"> }">
<span class="w-2 h-2 rounded-full mr-2" <span class="w-2 h-2 rounded-full mr-2"
[ngClass]="{'bg-red': attribute.status === 'failed', [ngClass]="{'bg-red': getAttributeStatusName(attribute.status) === 'failed',
'bg-green': attribute.status === 'passed', 'bg-green': getAttributeStatusName(attribute.status) === 'passed',
'bg-yellow': attribute.status === 'warn'}"></span> 'bg-yellow': getAttributeStatusName(attribute.status) === 'warn'}"></span>
<span class="pr-2px leading-relaxed whitespace-no-wrap" matTooltip="{{attribute.status_reason}}">{{attribute.status}}</span> <span class="pr-2px leading-relaxed whitespace-no-wrap" matTooltip="{{attribute.status_reason}}">{{getAttributeStatusName(attribute.status)}}</span>
</span> </span>
</td> </td>
</ng-container> </ng-container>
@ -183,7 +183,7 @@
<td mat-cell <td mat-cell
*matCellDef="let attribute"> *matCellDef="let attribute">
<span class="pr-6 whitespace-no-wrap" matTooltip="{{getAttributeDescription(attribute)}}"> <span class="pr-6 whitespace-no-wrap" matTooltip="{{getAttributeDescription(attribute)}}">
{{attribute.name}} <mat-icon *ngIf="getAttributeDescription(attribute)" class="icon-size-10" [svgIcon]="'info'"></mat-icon> {{getAttributeName(attribute)}} <mat-icon *ngIf="getAttributeDescription(attribute)" class="icon-size-10" [svgIcon]="'info'"></mat-icon>
</span> </span>
</td> </td>
</ng-container> </ng-container>

@ -107,6 +107,26 @@ export class DetailComponent implements OnInit, AfterViewInit, OnDestroy {
// ----------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------
// @ Private methods // @ Private methods
// ----------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------
getAttributeStatusName(attribute_status){
if(attribute_status == 0){
return "passed"
} else if (attribute_status == 1){
return "warn"
} else if (attribute_status == 2){
return "failed"
}
return
}
getAttributeName(attribute_data){
let attribute_metadata = this.metadata[attribute_data.attribute_id]
if(!attribute_metadata){
return 'Unknown Attribute Name'
} else {
return attribute_metadata.display_name
}
return
}
getAttributeDescription(attribute_data){ getAttributeDescription(attribute_data){
let attribute_metadata = this.metadata[attribute_data.attribute_id] let attribute_metadata = this.metadata[attribute_data.attribute_id]
if(!attribute_metadata){ if(!attribute_metadata){

Loading…
Cancel
Save