fix using linter.
This commit is contained in:
@@ -21,10 +21,10 @@ export class TreoConfigService
|
|||||||
{
|
{
|
||||||
let currentScrutinyConfig = defaultConfig
|
let currentScrutinyConfig = defaultConfig
|
||||||
|
|
||||||
let localConfigStr = localStorage.getItem(SCRUTINY_CONFIG_LOCAL_STORAGE_KEY)
|
const localConfigStr = localStorage.getItem(SCRUTINY_CONFIG_LOCAL_STORAGE_KEY)
|
||||||
if (localConfigStr){
|
if (localConfigStr){
|
||||||
//check localstorage for a value
|
// check localstorage for a value
|
||||||
let localConfig = JSON.parse(localConfigStr)
|
const localConfig = JSON.parse(localConfigStr)
|
||||||
currentScrutinyConfig = Object.assign({}, currentScrutinyConfig, localConfig) // make sure defaults are available if missing from localStorage.
|
currentScrutinyConfig = Object.assign({}, currentScrutinyConfig, localConfig) // make sure defaults are available if missing from localStorage.
|
||||||
}
|
}
|
||||||
// Set the private defaults
|
// Set the private defaults
|
||||||
@@ -38,20 +38,20 @@ export class TreoConfigService
|
|||||||
/**
|
/**
|
||||||
* Setter and getter for config
|
* Setter and getter for config
|
||||||
*/
|
*/
|
||||||
//Setter
|
// Setter
|
||||||
set config(value: any)
|
set config(value: any)
|
||||||
{
|
{
|
||||||
// Merge the new config over to the current config
|
// Merge the new config over to the current config
|
||||||
let config = _.merge({}, this._config.getValue(), value);
|
const config = _.merge({}, this._config.getValue(), value);
|
||||||
|
|
||||||
//Store the config in localstorage
|
// Store the config in localstorage
|
||||||
localStorage.setItem(SCRUTINY_CONFIG_LOCAL_STORAGE_KEY, JSON.stringify(config));
|
localStorage.setItem(SCRUTINY_CONFIG_LOCAL_STORAGE_KEY, JSON.stringify(config));
|
||||||
|
|
||||||
// Execute the observable
|
// Execute the observable
|
||||||
this._config.next(config);
|
this._config.next(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Getter
|
// Getter
|
||||||
get config$(): Observable<any>
|
get config$(): Observable<any>
|
||||||
{
|
{
|
||||||
return this._config.asObservable();
|
return this._config.asObservable();
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Layout } from "app/layout/layout.types";
|
import { Layout } from 'app/layout/layout.types';
|
||||||
|
|
||||||
// Theme type
|
// Theme type
|
||||||
export type Theme = "light" | "dark" | "system";
|
export type Theme = 'light' | 'dark' | 'system';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AppConfig interface. Update this interface to strictly type your config
|
* AppConfig interface. Update this interface to strictly type your config
|
||||||
@@ -28,12 +28,12 @@ export interface AppConfig
|
|||||||
* "ConfigService".
|
* "ConfigService".
|
||||||
*/
|
*/
|
||||||
export const appConfig: AppConfig = {
|
export const appConfig: AppConfig = {
|
||||||
theme : "light",
|
theme : 'light',
|
||||||
layout: "material",
|
layout: 'material',
|
||||||
|
|
||||||
dashboardDisplay: "name",
|
dashboardDisplay: 'name',
|
||||||
dashboardSort: "status",
|
dashboardSort: 'status',
|
||||||
|
|
||||||
temperatureUnit: "celsius",
|
temperatureUnit: 'celsius',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,264 +1,264 @@
|
|||||||
export const sda = {
|
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-10-24T16:37:56.981833-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',
|
||||||
"manufacturer": "ATA",
|
'manufacturer': 'ATA',
|
||||||
"model_name": "Samsung_SSD_860_EVO_500GB",
|
'model_name': 'Samsung_SSD_860_EVO_500GB',
|
||||||
"interface_type": "SCSI",
|
'interface_type': 'SCSI',
|
||||||
"interface_speed": "",
|
'interface_speed': '',
|
||||||
"serial_number": "S3YZNB0KBXXXXXX",
|
'serial_number': 'S3YZNB0KBXXXXXX',
|
||||||
"firmware": "002C",
|
'firmware': '002C',
|
||||||
"rotational_speed": 0,
|
'rotational_speed': 0,
|
||||||
"capacity": 500107862016,
|
'capacity': 500107862016,
|
||||||
"form_factor": "",
|
'form_factor': '',
|
||||||
"smart_support": false,
|
'smart_support': false,
|
||||||
"device_protocol": "NVMe",
|
'device_protocol': 'NVMe',
|
||||||
"device_type": "",
|
'device_type': '',
|
||||||
"label": "",
|
'label': '',
|
||||||
"host_id": "",
|
'host_id': '',
|
||||||
"device_status": 0
|
'device_status': 0
|
||||||
},
|
},
|
||||||
"smart_results": [{
|
'smart_results': [{
|
||||||
"date": "2021-10-24T23:20:44Z",
|
'date': '2021-10-24T23:20:44Z',
|
||||||
"device_wwn": "0x5002538e40a22954",
|
'device_wwn': '0x5002538e40a22954',
|
||||||
"device_protocol": "NVMe",
|
'device_protocol': 'NVMe',
|
||||||
"temp": 36,
|
'temp': 36,
|
||||||
"power_on_hours": 2401,
|
'power_on_hours': 2401,
|
||||||
"power_cycle_count": 266,
|
'power_cycle_count': 266,
|
||||||
"attrs": {
|
'attrs': {
|
||||||
"available_spare": {
|
'available_spare': {
|
||||||
"attribute_id": "available_spare",
|
'attribute_id': 'available_spare',
|
||||||
"value": 100,
|
'value': 100,
|
||||||
"thresh": 10,
|
'thresh': 10,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 0
|
'status': 0
|
||||||
},
|
},
|
||||||
"controller_busy_time": {
|
'controller_busy_time': {
|
||||||
"attribute_id": "controller_busy_time",
|
'attribute_id': 'controller_busy_time',
|
||||||
"value": 3060,
|
'value': 3060,
|
||||||
"thresh": -1,
|
'thresh': -1,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 0
|
'status': 0
|
||||||
},
|
},
|
||||||
"critical_comp_time": {
|
'critical_comp_time': {
|
||||||
"attribute_id": "critical_comp_time",
|
'attribute_id': 'critical_comp_time',
|
||||||
"value": 0,
|
'value': 0,
|
||||||
"thresh": -1,
|
'thresh': -1,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 0
|
'status': 0
|
||||||
},
|
},
|
||||||
"critical_warning": {
|
'critical_warning': {
|
||||||
"attribute_id": "critical_warning",
|
'attribute_id': 'critical_warning',
|
||||||
"value": 0,
|
'value': 0,
|
||||||
"thresh": 0,
|
'thresh': 0,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 0
|
'status': 0
|
||||||
},
|
},
|
||||||
"data_units_read": {
|
'data_units_read': {
|
||||||
"attribute_id": "data_units_read",
|
'attribute_id': 'data_units_read',
|
||||||
"value": 9511859,
|
'value': 9511859,
|
||||||
"thresh": -1,
|
'thresh': -1,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 0
|
'status': 0
|
||||||
},
|
},
|
||||||
"data_units_written": {
|
'data_units_written': {
|
||||||
"attribute_id": "data_units_written",
|
'attribute_id': 'data_units_written',
|
||||||
"value": 7773431,
|
'value': 7773431,
|
||||||
"thresh": -1,
|
'thresh': -1,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 0
|
'status': 0
|
||||||
},
|
},
|
||||||
"host_reads": {
|
'host_reads': {
|
||||||
"attribute_id": "host_reads",
|
'attribute_id': 'host_reads',
|
||||||
"value": 111303174,
|
'value': 111303174,
|
||||||
"thresh": -1,
|
'thresh': -1,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 0
|
'status': 0
|
||||||
},
|
},
|
||||||
"host_writes": {
|
'host_writes': {
|
||||||
"attribute_id": "host_writes",
|
'attribute_id': 'host_writes',
|
||||||
"value": 83170961,
|
'value': 83170961,
|
||||||
"thresh": -1,
|
'thresh': -1,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 0
|
'status': 0
|
||||||
},
|
},
|
||||||
"media_errors": {
|
'media_errors': {
|
||||||
"attribute_id": "media_errors",
|
'attribute_id': 'media_errors',
|
||||||
"value": 0,
|
'value': 0,
|
||||||
"thresh": 0,
|
'thresh': 0,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 0
|
'status': 0
|
||||||
},
|
},
|
||||||
"num_err_log_entries": {
|
'num_err_log_entries': {
|
||||||
"attribute_id": "num_err_log_entries",
|
'attribute_id': 'num_err_log_entries',
|
||||||
"value": 0,
|
'value': 0,
|
||||||
"thresh": 0,
|
'thresh': 0,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 0
|
'status': 0
|
||||||
},
|
},
|
||||||
"percentage_used": {
|
'percentage_used': {
|
||||||
"attribute_id": "percentage_used",
|
'attribute_id': 'percentage_used',
|
||||||
"value": 0,
|
'value': 0,
|
||||||
"thresh": 100,
|
'thresh': 100,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 0
|
'status': 0
|
||||||
},
|
},
|
||||||
"power_cycles": {
|
'power_cycles': {
|
||||||
"attribute_id": "power_cycles",
|
'attribute_id': 'power_cycles',
|
||||||
"value": 266,
|
'value': 266,
|
||||||
"thresh": -1,
|
'thresh': -1,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 0
|
'status': 0
|
||||||
},
|
},
|
||||||
"power_on_hours": {
|
'power_on_hours': {
|
||||||
"attribute_id": "power_on_hours",
|
'attribute_id': 'power_on_hours',
|
||||||
"value": 2401,
|
'value': 2401,
|
||||||
"thresh": -1,
|
'thresh': -1,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 0
|
'status': 0
|
||||||
},
|
},
|
||||||
"temperature": {
|
'temperature': {
|
||||||
"attribute_id": "temperature",
|
'attribute_id': 'temperature',
|
||||||
"value": 36,
|
'value': 36,
|
||||||
"thresh": -1,
|
'thresh': -1,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 0
|
'status': 0
|
||||||
},
|
},
|
||||||
"unsafe_shutdowns": {
|
'unsafe_shutdowns': {
|
||||||
"attribute_id": "unsafe_shutdowns",
|
'attribute_id': 'unsafe_shutdowns',
|
||||||
"value": 43,
|
'value': 43,
|
||||||
"thresh": -1,
|
'thresh': -1,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 0
|
'status': 0
|
||||||
},
|
},
|
||||||
"warning_temp_time": {
|
'warning_temp_time': {
|
||||||
"attribute_id": "warning_temp_time",
|
'attribute_id': 'warning_temp_time',
|
||||||
"value": 0,
|
'value': 0,
|
||||||
"thresh": -1,
|
'thresh': -1,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 0
|
'status': 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Status": 0
|
'Status': 0
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
"metadata": {
|
'metadata': {
|
||||||
"available_spare": {
|
'available_spare': {
|
||||||
"display_name": "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",
|
'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",
|
'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",
|
'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",
|
'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",
|
'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",
|
'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",
|
'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",
|
'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",
|
'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",
|
'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 manufacturer’s 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 manufacturer’s 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",
|
'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",
|
'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",
|
'display_name': 'Temperature',
|
||||||
"ideal": "",
|
'ideal': '',
|
||||||
"critical": false,
|
'critical': false,
|
||||||
"description": "",
|
'description': '',
|
||||||
"display_type": ""
|
'display_type': ''
|
||||||
},
|
},
|
||||||
"unsafe_shutdowns": {
|
'unsafe_shutdowns': {
|
||||||
"display_name": "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",
|
'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.',
|
||||||
"display_type": ""
|
'display_type': ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"success": true
|
'success': true
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,222 +1,222 @@
|
|||||||
export const sdd = {
|
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-10-24T16:37:57.013758-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',
|
||||||
"manufacturer": "ATA",
|
'manufacturer': 'ATA',
|
||||||
"model_name": "WDC_WD80EFAX-68LHPN0",
|
'model_name': 'WDC_WD80EFAX-68LHPN0',
|
||||||
"interface_type": "SCSI",
|
'interface_type': 'SCSI',
|
||||||
"interface_speed": "",
|
'interface_speed': '',
|
||||||
"serial_number": "7SGLXXXXX",
|
'serial_number': '7SGLXXXXX',
|
||||||
"firmware": "",
|
'firmware': '',
|
||||||
"rotational_speed": 0,
|
'rotational_speed': 0,
|
||||||
"capacity": 8001563222016,
|
'capacity': 8001563222016,
|
||||||
"form_factor": "",
|
'form_factor': '',
|
||||||
"smart_support": false,
|
'smart_support': false,
|
||||||
"device_protocol": "SCSI",
|
'device_protocol': 'SCSI',
|
||||||
"device_type": "",
|
'device_type': '',
|
||||||
"label": "",
|
'label': '',
|
||||||
"host_id": "",
|
'host_id': '',
|
||||||
"device_status": 0
|
'device_status': 0
|
||||||
},
|
},
|
||||||
"smart_results": [{
|
'smart_results': [{
|
||||||
"date": "2021-10-24T23:20:44Z",
|
'date': '2021-10-24T23:20:44Z',
|
||||||
"device_wwn": "0x5000cca252c859cc",
|
'device_wwn': '0x5000cca252c859cc',
|
||||||
"device_protocol": "SCSI",
|
'device_protocol': 'SCSI',
|
||||||
"temp": 34,
|
'temp': 34,
|
||||||
"power_on_hours": 43549,
|
'power_on_hours': 43549,
|
||||||
"power_cycle_count": 0,
|
'power_cycle_count': 0,
|
||||||
"attrs": {
|
'attrs': {
|
||||||
"read_correction_algorithm_invocations": {
|
'read_correction_algorithm_invocations': {
|
||||||
"attribute_id": "read_correction_algorithm_invocations",
|
'attribute_id': 'read_correction_algorithm_invocations',
|
||||||
"value": 0,
|
'value': 0,
|
||||||
"thresh": -1,
|
'thresh': -1,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 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',
|
||||||
"value": 0,
|
'value': 0,
|
||||||
"thresh": -1,
|
'thresh': -1,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 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',
|
||||||
"value": 300357663,
|
'value': 300357663,
|
||||||
"thresh": -1,
|
'thresh': -1,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 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',
|
||||||
"value": 0,
|
'value': 0,
|
||||||
"thresh": 0,
|
'thresh': 0,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 0
|
'status': 0
|
||||||
},
|
},
|
||||||
"read_total_errors_corrected": {
|
'read_total_errors_corrected': {
|
||||||
"attribute_id": "read_total_errors_corrected",
|
'attribute_id': 'read_total_errors_corrected',
|
||||||
"value": 300357663,
|
'value': 300357663,
|
||||||
"thresh": -1,
|
'thresh': -1,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 0
|
'status': 0
|
||||||
},
|
},
|
||||||
"read_total_uncorrected_errors": {
|
'read_total_uncorrected_errors': {
|
||||||
"attribute_id": "read_total_uncorrected_errors",
|
'attribute_id': 'read_total_uncorrected_errors',
|
||||||
"value": 0,
|
'value': 0,
|
||||||
"thresh": 0,
|
'thresh': 0,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 0
|
'status': 0
|
||||||
},
|
},
|
||||||
"scsi_grown_defect_list": {
|
'scsi_grown_defect_list': {
|
||||||
"attribute_id": "scsi_grown_defect_list",
|
'attribute_id': 'scsi_grown_defect_list',
|
||||||
"value": 56,
|
'value': 56,
|
||||||
"thresh": 0,
|
'thresh': 0,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 0
|
'status': 0
|
||||||
},
|
},
|
||||||
"write_correction_algorithm_invocations": {
|
'write_correction_algorithm_invocations': {
|
||||||
"attribute_id": "write_correction_algorithm_invocations",
|
'attribute_id': 'write_correction_algorithm_invocations',
|
||||||
"value": 0,
|
'value': 0,
|
||||||
"thresh": -1,
|
'thresh': -1,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 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',
|
||||||
"value": 0,
|
'value': 0,
|
||||||
"thresh": -1,
|
'thresh': -1,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 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',
|
||||||
"value": 0,
|
'value': 0,
|
||||||
"thresh": -1,
|
'thresh': -1,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 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',
|
||||||
"value": 0,
|
'value': 0,
|
||||||
"thresh": 0,
|
'thresh': 0,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 0
|
'status': 0
|
||||||
},
|
},
|
||||||
"write_total_errors_corrected": {
|
'write_total_errors_corrected': {
|
||||||
"attribute_id": "write_total_errors_corrected",
|
'attribute_id': 'write_total_errors_corrected',
|
||||||
"value": 0,
|
'value': 0,
|
||||||
"thresh": -1,
|
'thresh': -1,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 0
|
'status': 0
|
||||||
},
|
},
|
||||||
"write_total_uncorrected_errors": {
|
'write_total_uncorrected_errors': {
|
||||||
"attribute_id": "write_total_uncorrected_errors",
|
'attribute_id': 'write_total_uncorrected_errors',
|
||||||
"value": 0,
|
'value': 0,
|
||||||
"thresh": 0,
|
'thresh': 0,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 0
|
'status': 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Status": 0
|
'Status': 0
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
"metadata": {
|
'metadata': {
|
||||||
"read_correction_algorithm_invocations": {
|
'read_correction_algorithm_invocations': {
|
||||||
"display_name": "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",
|
'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",
|
'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",
|
'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",
|
'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",
|
'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",
|
'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",
|
'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",
|
'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",
|
'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",
|
'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",
|
'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",
|
'display_name': 'Write Total Uncorrected Errors',
|
||||||
"ideal": "low",
|
'ideal': 'low',
|
||||||
"critical": true,
|
'critical': true,
|
||||||
"description": "",
|
'description': '',
|
||||||
"display_type": ""
|
'display_type': ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"success": true
|
'success': true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,222 +1,222 @@
|
|||||||
export const sde = {
|
export const sde = {
|
||||||
"data": {
|
'data': {
|
||||||
"device": {
|
'device': {
|
||||||
"CreatedAt": "2021-06-24T21:17:31.304461-07:00",
|
'CreatedAt': '2021-06-24T21:17:31.304461-07:00',
|
||||||
"UpdatedAt": "2021-10-24T16:40:16.495248-07:00",
|
'UpdatedAt': '2021-10-24T16:40:16.495248-07:00',
|
||||||
"DeletedAt": null,
|
'DeletedAt': null,
|
||||||
"wwn": "0x5000cca264ebc248",
|
'wwn': '0x5000cca264ebc248',
|
||||||
"device_name": "sde",
|
'device_name': 'sde',
|
||||||
"manufacturer": "ATA",
|
'manufacturer': 'ATA',
|
||||||
"model_name": "WDC_WD140EDFZ-11A0VA0",
|
'model_name': 'WDC_WD140EDFZ-11A0VA0',
|
||||||
"interface_type": "SCSI",
|
'interface_type': 'SCSI',
|
||||||
"interface_speed": "",
|
'interface_speed': '',
|
||||||
"serial_number": "9RK3XXXXX",
|
'serial_number': '9RK3XXXXX',
|
||||||
"firmware": "",
|
'firmware': '',
|
||||||
"rotational_speed": 0,
|
'rotational_speed': 0,
|
||||||
"capacity": 14000519643136,
|
'capacity': 14000519643136,
|
||||||
"form_factor": "",
|
'form_factor': '',
|
||||||
"smart_support": false,
|
'smart_support': false,
|
||||||
"device_protocol": "SCSI",
|
'device_protocol': 'SCSI',
|
||||||
"device_type": "",
|
'device_type': '',
|
||||||
"label": "",
|
'label': '',
|
||||||
"host_id": "",
|
'host_id': '',
|
||||||
"device_status": 0
|
'device_status': 0
|
||||||
},
|
},
|
||||||
"smart_results": [{
|
'smart_results': [{
|
||||||
"date": "2021-10-24T23:20:44Z",
|
'date': '2021-10-24T23:20:44Z',
|
||||||
"device_wwn": "0x5000cca264ebc248",
|
'device_wwn': '0x5000cca264ebc248',
|
||||||
"device_protocol": "SCSI",
|
'device_protocol': 'SCSI',
|
||||||
"temp": 31,
|
'temp': 31,
|
||||||
"power_on_hours": 5675,
|
'power_on_hours': 5675,
|
||||||
"power_cycle_count": 0,
|
'power_cycle_count': 0,
|
||||||
"attrs": {
|
'attrs': {
|
||||||
"read_correction_algorithm_invocations": {
|
'read_correction_algorithm_invocations': {
|
||||||
"attribute_id": "read_correction_algorithm_invocations",
|
'attribute_id': 'read_correction_algorithm_invocations',
|
||||||
"value": 0,
|
'value': 0,
|
||||||
"thresh": -1,
|
'thresh': -1,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 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',
|
||||||
"value": 0,
|
'value': 0,
|
||||||
"thresh": -1,
|
'thresh': -1,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 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',
|
||||||
"value": 1410362924,
|
'value': 1410362924,
|
||||||
"thresh": -1,
|
'thresh': -1,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 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',
|
||||||
"value": 0,
|
'value': 0,
|
||||||
"thresh": 0,
|
'thresh': 0,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 0
|
'status': 0
|
||||||
},
|
},
|
||||||
"read_total_errors_corrected": {
|
'read_total_errors_corrected': {
|
||||||
"attribute_id": "read_total_errors_corrected",
|
'attribute_id': 'read_total_errors_corrected',
|
||||||
"value": 1410362924,
|
'value': 1410362924,
|
||||||
"thresh": -1,
|
'thresh': -1,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 0
|
'status': 0
|
||||||
},
|
},
|
||||||
"read_total_uncorrected_errors": {
|
'read_total_uncorrected_errors': {
|
||||||
"attribute_id": "read_total_uncorrected_errors",
|
'attribute_id': 'read_total_uncorrected_errors',
|
||||||
"value": 0,
|
'value': 0,
|
||||||
"thresh": 0,
|
'thresh': 0,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 0
|
'status': 0
|
||||||
},
|
},
|
||||||
"scsi_grown_defect_list": {
|
'scsi_grown_defect_list': {
|
||||||
"attribute_id": "scsi_grown_defect_list",
|
'attribute_id': 'scsi_grown_defect_list',
|
||||||
"value": 0,
|
'value': 0,
|
||||||
"thresh": 0,
|
'thresh': 0,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 0
|
'status': 0
|
||||||
},
|
},
|
||||||
"write_correction_algorithm_invocations": {
|
'write_correction_algorithm_invocations': {
|
||||||
"attribute_id": "write_correction_algorithm_invocations",
|
'attribute_id': 'write_correction_algorithm_invocations',
|
||||||
"value": 0,
|
'value': 0,
|
||||||
"thresh": -1,
|
'thresh': -1,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 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',
|
||||||
"value": 0,
|
'value': 0,
|
||||||
"thresh": -1,
|
'thresh': -1,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 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',
|
||||||
"value": 0,
|
'value': 0,
|
||||||
"thresh": -1,
|
'thresh': -1,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 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',
|
||||||
"value": 0,
|
'value': 0,
|
||||||
"thresh": 0,
|
'thresh': 0,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 0
|
'status': 0
|
||||||
},
|
},
|
||||||
"write_total_errors_corrected": {
|
'write_total_errors_corrected': {
|
||||||
"attribute_id": "write_total_errors_corrected",
|
'attribute_id': 'write_total_errors_corrected',
|
||||||
"value": 0,
|
'value': 0,
|
||||||
"thresh": -1,
|
'thresh': -1,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 0
|
'status': 0
|
||||||
},
|
},
|
||||||
"write_total_uncorrected_errors": {
|
'write_total_uncorrected_errors': {
|
||||||
"attribute_id": "write_total_uncorrected_errors",
|
'attribute_id': 'write_total_uncorrected_errors',
|
||||||
"value": 0,
|
'value': 0,
|
||||||
"thresh": 0,
|
'thresh': 0,
|
||||||
"transformed_value": 0,
|
'transformed_value': 0,
|
||||||
"status": 0
|
'status': 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Status": 0
|
'Status': 0
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
"metadata": {
|
'metadata': {
|
||||||
"read_correction_algorithm_invocations": {
|
'read_correction_algorithm_invocations': {
|
||||||
"display_name": "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",
|
'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",
|
'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",
|
'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",
|
'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",
|
'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",
|
'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",
|
'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",
|
'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",
|
'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",
|
'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",
|
'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",
|
'display_name': 'Write Total Uncorrected Errors',
|
||||||
"ideal": "low",
|
'ideal': 'low',
|
||||||
"critical": true,
|
'critical': true,
|
||||||
"description": "",
|
'description': '',
|
||||||
"display_type": ""
|
'display_type': ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"success": true
|
'success': true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,29 +1,29 @@
|
|||||||
export const sdf = {
|
export const sdf = {
|
||||||
"data": {
|
'data': {
|
||||||
"device": {
|
'device': {
|
||||||
"CreatedAt": "2021-06-24T21:17:31.305246-07:00",
|
'CreatedAt': '2021-06-24T21:17:31.305246-07:00',
|
||||||
"UpdatedAt": "2021-06-24T21:17:31.305246-07:00",
|
'UpdatedAt': '2021-06-24T21:17:31.305246-07:00',
|
||||||
"DeletedAt": null,
|
'DeletedAt': null,
|
||||||
"wwn": "0x50014ee20b2a72a9",
|
'wwn': '0x50014ee20b2a72a9',
|
||||||
"device_name": "sdf",
|
'device_name': 'sdf',
|
||||||
"manufacturer": "ATA",
|
'manufacturer': 'ATA',
|
||||||
"model_name": "WDC_WD60EFRX-68MYMN1",
|
'model_name': 'WDC_WD60EFRX-68MYMN1',
|
||||||
"interface_type": "SCSI",
|
'interface_type': 'SCSI',
|
||||||
"interface_speed": "",
|
'interface_speed': '',
|
||||||
"serial_number": "WD-WXL1HXXXXX",
|
'serial_number': 'WD-WXL1HXXXXX',
|
||||||
"firmware": "",
|
'firmware': '',
|
||||||
"rotational_speed": 0,
|
'rotational_speed': 0,
|
||||||
"capacity": 6001175126016,
|
'capacity': 6001175126016,
|
||||||
"form_factor": "",
|
'form_factor': '',
|
||||||
"smart_support": false,
|
'smart_support': false,
|
||||||
"device_protocol": "",
|
'device_protocol': '',
|
||||||
"device_type": "",
|
'device_type': '',
|
||||||
"label": "",
|
'label': '',
|
||||||
"host_id": "",
|
'host_id': '',
|
||||||
"device_status": 0
|
'device_status': 0
|
||||||
},
|
},
|
||||||
"smart_results": []
|
'smart_results': []
|
||||||
},
|
},
|
||||||
"metadata": null,
|
'metadata': null,
|
||||||
"success": true
|
'success': true
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
import { Component, OnInit, Inject } from '@angular/core';
|
import { Component, OnInit, Inject } from '@angular/core';
|
||||||
import {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';
|
import {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';
|
||||||
import {DashboardDeviceDeleteDialogService} from "./dashboard-device-delete-dialog.service";
|
import {DashboardDeviceDeleteDialogService} from 'app/layout/common/dashboard-device-delete-dialog/dashboard-device-delete-dialog.service';
|
||||||
import {Subject} from "rxjs";
|
import {Subject} from 'rxjs';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-dashboard-device-delete-dialog',
|
selector: 'app-dashboard-device-delete-dialog',
|
||||||
|
|||||||
+12
-12
@@ -9,18 +9,18 @@ import { MatIconModule } from '@angular/material/icon';
|
|||||||
import { MatInputModule } from '@angular/material/input';
|
import { MatInputModule } from '@angular/material/input';
|
||||||
import { SharedModule } from 'app/shared/shared.module';
|
import { SharedModule } from 'app/shared/shared.module';
|
||||||
import {DashboardDeviceDeleteDialogComponent} from 'app/layout/common/dashboard-device-delete-dialog/dashboard-device-delete-dialog.component'
|
import {DashboardDeviceDeleteDialogComponent} from 'app/layout/common/dashboard-device-delete-dialog/dashboard-device-delete-dialog.component'
|
||||||
import { MatButtonToggleModule} from "@angular/material/button-toggle";
|
import { MatButtonToggleModule} from '@angular/material/button-toggle';
|
||||||
import {MatTabsModule} from "@angular/material/tabs";
|
import {MatTabsModule} from '@angular/material/tabs';
|
||||||
import {MatSliderModule} from "@angular/material/slider";
|
import {MatSliderModule} from '@angular/material/slider';
|
||||||
import {MatSlideToggleModule} from "@angular/material/slide-toggle";
|
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
|
||||||
import {MatTooltipModule} from "@angular/material/tooltip";
|
import {MatTooltipModule} from '@angular/material/tooltip';
|
||||||
import {dashboardRoutes} from "../../../modules/dashboard/dashboard.routing";
|
import {dashboardRoutes} from 'app/modules/dashboard/dashboard.routing';
|
||||||
import {MatDividerModule} from "@angular/material/divider";
|
import {MatDividerModule} from '@angular/material/divider';
|
||||||
import {MatMenuModule} from "@angular/material/menu";
|
import {MatMenuModule} from '@angular/material/menu';
|
||||||
import {MatProgressBarModule} from "@angular/material/progress-bar";
|
import {MatProgressBarModule} from '@angular/material/progress-bar';
|
||||||
import {MatSortModule} from "@angular/material/sort";
|
import {MatSortModule} from '@angular/material/sort';
|
||||||
import {MatTableModule} from "@angular/material/table";
|
import {MatTableModule} from '@angular/material/table';
|
||||||
import {NgApexchartsModule} from "ng-apexcharts";
|
import {NgApexchartsModule} from 'ng-apexcharts';
|
||||||
import { MatDialogModule } from '@angular/material/dialog';
|
import { MatDialogModule } from '@angular/material/dialog';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|||||||
+21
-21
@@ -1,13 +1,13 @@
|
|||||||
import { Component, Input, Output, OnInit, EventEmitter} from '@angular/core';
|
import { Component, Input, Output, OnInit, EventEmitter} from '@angular/core';
|
||||||
import * as moment from "moment";
|
import * as moment from 'moment';
|
||||||
import {takeUntil} from "rxjs/operators";
|
import {takeUntil} from 'rxjs/operators';
|
||||||
import {AppConfig} from "app/core/config/app.config";
|
import {AppConfig} from 'app/core/config/app.config';
|
||||||
import {TreoConfigService} from "@treo/services/config";
|
import {TreoConfigService} from '@treo/services/config';
|
||||||
import {Subject} from "rxjs";
|
import {Subject} from 'rxjs';
|
||||||
import humanizeDuration from 'humanize-duration'
|
import humanizeDuration from 'humanize-duration'
|
||||||
import {MatDialog} from '@angular/material/dialog';
|
import {MatDialog} from '@angular/material/dialog';
|
||||||
import {DashboardDeviceDeleteDialogComponent} from "app/layout/common/dashboard-device-delete-dialog/dashboard-device-delete-dialog.component";
|
import {DashboardDeviceDeleteDialogComponent} from 'app/layout/common/dashboard-device-delete-dialog/dashboard-device-delete-dialog.component';
|
||||||
import {DeviceTitlePipe} from "app/shared/device-title.pipe";
|
import {DeviceTitlePipe} from 'app/shared/device-title.pipe';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-dashboard-device',
|
selector: 'app-dashboard-device',
|
||||||
@@ -15,13 +15,6 @@ import {DeviceTitlePipe} from "app/shared/device-title.pipe";
|
|||||||
styleUrls: ['./dashboard-device.component.scss']
|
styleUrls: ['./dashboard-device.component.scss']
|
||||||
})
|
})
|
||||||
export class DashboardDeviceComponent implements OnInit {
|
export class DashboardDeviceComponent implements OnInit {
|
||||||
@Input() deviceSummary: any;
|
|
||||||
@Input() deviceWWN: string;
|
|
||||||
@Output() deviceDeleted = new EventEmitter<string>();
|
|
||||||
|
|
||||||
config: AppConfig;
|
|
||||||
|
|
||||||
private _unsubscribeAll: Subject<any>;
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private _configService: TreoConfigService,
|
private _configService: TreoConfigService,
|
||||||
@@ -30,6 +23,15 @@ export class DashboardDeviceComponent implements OnInit {
|
|||||||
// Set the private defaults
|
// Set the private defaults
|
||||||
this._unsubscribeAll = new Subject();
|
this._unsubscribeAll = new Subject();
|
||||||
}
|
}
|
||||||
|
@Input() deviceSummary: any;
|
||||||
|
@Input() deviceWWN: string;
|
||||||
|
@Output() deviceDeleted = new EventEmitter<string>();
|
||||||
|
|
||||||
|
config: AppConfig;
|
||||||
|
|
||||||
|
private _unsubscribeAll: Subject<any>;
|
||||||
|
|
||||||
|
readonly humanizeDuration = humanizeDuration;
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
// Subscribe to config changes
|
// Subscribe to config changes
|
||||||
@@ -45,7 +47,7 @@ export class DashboardDeviceComponent implements OnInit {
|
|||||||
// @ Public methods
|
// @ Public methods
|
||||||
// -----------------------------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
classDeviceLastUpdatedOn(deviceSummary){
|
classDeviceLastUpdatedOn(deviceSummary): string {
|
||||||
if (deviceSummary.device.device_status !== 0) {
|
if (deviceSummary.device.device_status !== 0) {
|
||||||
return 'text-red' // if the device has failed, always highlight in red
|
return 'text-red' // if the device has failed, always highlight in red
|
||||||
} else if(deviceSummary.device.device_status === 0 && deviceSummary.smart){
|
} else if(deviceSummary.device.device_status === 0 && deviceSummary.smart){
|
||||||
@@ -65,16 +67,14 @@ export class DashboardDeviceComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
deviceStatusString(deviceStatus){
|
deviceStatusString(deviceStatus): string {
|
||||||
if(deviceStatus == 0){
|
if(deviceStatus === 0){
|
||||||
return "passed"
|
return 'passed'
|
||||||
} else {
|
} else {
|
||||||
return "failed"
|
return 'failed'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
readonly humanizeDuration = humanizeDuration;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
openDeleteDialog(): void {
|
openDeleteDialog(): void {
|
||||||
|
|||||||
@@ -9,20 +9,20 @@ import { MatIconModule } from '@angular/material/icon';
|
|||||||
import { MatInputModule } from '@angular/material/input';
|
import { MatInputModule } from '@angular/material/input';
|
||||||
import { SharedModule } from 'app/shared/shared.module';
|
import { SharedModule } from 'app/shared/shared.module';
|
||||||
import {DashboardDeviceComponent} from 'app/layout/common/dashboard-device/dashboard-device.component'
|
import {DashboardDeviceComponent} from 'app/layout/common/dashboard-device/dashboard-device.component'
|
||||||
import { MatDialogModule } from "@angular/material/dialog";
|
import { MatDialogModule } from '@angular/material/dialog';
|
||||||
import { MatButtonToggleModule} from "@angular/material/button-toggle";
|
import { MatButtonToggleModule} from '@angular/material/button-toggle';
|
||||||
import {MatTabsModule} from "@angular/material/tabs";
|
import {MatTabsModule} from '@angular/material/tabs';
|
||||||
import {MatSliderModule} from "@angular/material/slider";
|
import {MatSliderModule} from '@angular/material/slider';
|
||||||
import {MatSlideToggleModule} from "@angular/material/slide-toggle";
|
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
|
||||||
import {MatTooltipModule} from "@angular/material/tooltip";
|
import {MatTooltipModule} from '@angular/material/tooltip';
|
||||||
import {dashboardRoutes} from "../../../modules/dashboard/dashboard.routing";
|
import {dashboardRoutes} from '../../../modules/dashboard/dashboard.routing';
|
||||||
import {MatDividerModule} from "@angular/material/divider";
|
import {MatDividerModule} from '@angular/material/divider';
|
||||||
import {MatMenuModule} from "@angular/material/menu";
|
import {MatMenuModule} from '@angular/material/menu';
|
||||||
import {MatProgressBarModule} from "@angular/material/progress-bar";
|
import {MatProgressBarModule} from '@angular/material/progress-bar';
|
||||||
import {MatSortModule} from "@angular/material/sort";
|
import {MatSortModule} from '@angular/material/sort';
|
||||||
import {MatTableModule} from "@angular/material/table";
|
import {MatTableModule} from '@angular/material/table';
|
||||||
import {NgApexchartsModule} from "ng-apexcharts";
|
import {NgApexchartsModule} from 'ng-apexcharts';
|
||||||
import {DashboardDeviceDeleteDialogModule} from "../dashboard-device-delete-dialog/dashboard-device-delete-dialog.module";
|
import {DashboardDeviceDeleteDialogModule} from 'app/layout/common/dashboard-device-delete-dialog/dashboard-device-delete-dialog.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
|
|||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import {AppConfig} from 'app/core/config/app.config';
|
import {AppConfig} from 'app/core/config/app.config';
|
||||||
import { TreoConfigService } from '@treo/services/config';
|
import { TreoConfigService } from '@treo/services/config';
|
||||||
import {Subject} from "rxjs";
|
import {Subject} from 'rxjs';
|
||||||
import {takeUntil} from "rxjs/operators";
|
import {takeUntil} from 'rxjs/operators';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-dashboard-settings',
|
selector: 'app-dashboard-settings',
|
||||||
|
|||||||
+6
-6
@@ -9,12 +9,12 @@ import { MatIconModule } from '@angular/material/icon';
|
|||||||
import { MatInputModule } from '@angular/material/input';
|
import { MatInputModule } from '@angular/material/input';
|
||||||
import { SharedModule } from 'app/shared/shared.module';
|
import { SharedModule } from 'app/shared/shared.module';
|
||||||
import {DashboardSettingsComponent} from 'app/layout/common/dashboard-settings/dashboard-settings.component'
|
import {DashboardSettingsComponent} from 'app/layout/common/dashboard-settings/dashboard-settings.component'
|
||||||
import { MatDialogModule } from "@angular/material/dialog";
|
import { MatDialogModule } from '@angular/material/dialog';
|
||||||
import { MatButtonToggleModule} from "@angular/material/button-toggle";
|
import { MatButtonToggleModule} from '@angular/material/button-toggle';
|
||||||
import {MatTabsModule} from "@angular/material/tabs";
|
import {MatTabsModule} from '@angular/material/tabs';
|
||||||
import {MatSliderModule} from "@angular/material/slider";
|
import {MatSliderModule} from '@angular/material/slider';
|
||||||
import {MatSlideToggleModule} from "@angular/material/slide-toggle";
|
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
|
||||||
import {MatTooltipModule} from "@angular/material/tooltip";
|
import {MatTooltipModule} from '@angular/material/tooltip';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
|
|||||||
@@ -9,12 +9,12 @@ import { MatIconModule } from '@angular/material/icon';
|
|||||||
import { MatInputModule } from '@angular/material/input';
|
import { MatInputModule } from '@angular/material/input';
|
||||||
import { SharedModule } from 'app/shared/shared.module';
|
import { SharedModule } from 'app/shared/shared.module';
|
||||||
import {DetailSettingsComponent} from 'app/layout/common/detail-settings/detail-settings.component'
|
import {DetailSettingsComponent} from 'app/layout/common/detail-settings/detail-settings.component'
|
||||||
import { MatDialogModule } from "@angular/material/dialog";
|
import { MatDialogModule } from '@angular/material/dialog';
|
||||||
import { MatButtonToggleModule} from "@angular/material/button-toggle";
|
import { MatButtonToggleModule} from '@angular/material/button-toggle';
|
||||||
import {MatTabsModule} from "@angular/material/tabs";
|
import {MatTabsModule} from '@angular/material/tabs';
|
||||||
import {MatSliderModule} from "@angular/material/slider";
|
import {MatSliderModule} from '@angular/material/slider';
|
||||||
import {MatSlideToggleModule} from "@angular/material/slide-toggle";
|
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
|
||||||
import {MatTooltipModule} from "@angular/material/tooltip";
|
import {MatTooltipModule} from '@angular/material/tooltip';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export class LayoutComponent implements OnInit, OnDestroy
|
|||||||
// Set the private defaults
|
// Set the private defaults
|
||||||
this._unsubscribeAll = new Subject();
|
this._unsubscribeAll = new Subject();
|
||||||
|
|
||||||
this.systemPrefersDark = window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches;
|
this.systemPrefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,11 +7,11 @@ import {ApexOptions, ChartComponent} from 'ng-apexcharts';
|
|||||||
import { DashboardService } from 'app/modules/dashboard/dashboard.service';
|
import { DashboardService } from 'app/modules/dashboard/dashboard.service';
|
||||||
import {MatDialog} from '@angular/material/dialog';
|
import {MatDialog} from '@angular/material/dialog';
|
||||||
import { DashboardSettingsComponent } from 'app/layout/common/dashboard-settings/dashboard-settings.component';
|
import { DashboardSettingsComponent } from 'app/layout/common/dashboard-settings/dashboard-settings.component';
|
||||||
import {AppConfig} from "app/core/config/app.config";
|
import {AppConfig} from 'app/core/config/app.config';
|
||||||
import {TreoConfigService} from "@treo/services/config";
|
import {TreoConfigService} from '@treo/services/config';
|
||||||
import {Router} from "@angular/router";
|
import {Router} from '@angular/router';
|
||||||
import {TemperaturePipe} from "app/shared/temperature.pipe";
|
import {TemperaturePipe} from 'app/shared/temperature.pipe';
|
||||||
import {DeviceTitlePipe} from "app/shared/device-title.pipe";
|
import {DeviceTitlePipe} from 'app/shared/device-title.pipe';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector : 'example',
|
selector : 'example',
|
||||||
@@ -25,12 +25,12 @@ export class DashboardComponent implements OnInit, AfterViewInit, OnDestroy
|
|||||||
data: any;
|
data: any;
|
||||||
hostGroups: { [hostId: string]: string[] } = {}
|
hostGroups: { [hostId: string]: string[] } = {}
|
||||||
temperatureOptions: ApexOptions;
|
temperatureOptions: ApexOptions;
|
||||||
tempDurationKey: string = "forever"
|
tempDurationKey = 'forever'
|
||||||
config: AppConfig;
|
config: AppConfig;
|
||||||
|
|
||||||
// Private
|
// Private
|
||||||
private _unsubscribeAll: Subject<any>;
|
private _unsubscribeAll: Subject<any>;
|
||||||
@ViewChild("tempChart", { static: false }) tempChart: ChartComponent;
|
@ViewChild('tempChart', { static: false }) tempChart: ChartComponent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
@@ -64,17 +64,17 @@ export class DashboardComponent implements OnInit, AfterViewInit, OnDestroy
|
|||||||
.pipe(takeUntil(this._unsubscribeAll))
|
.pipe(takeUntil(this._unsubscribeAll))
|
||||||
.subscribe((config: AppConfig) => {
|
.subscribe((config: AppConfig) => {
|
||||||
|
|
||||||
//check if the old config and the new config do not match.
|
// check if the old config and the new config do not match.
|
||||||
let oldConfig = JSON.stringify(this.config)
|
const oldConfig = JSON.stringify(this.config)
|
||||||
let newConfig = JSON.stringify(config)
|
const newConfig = JSON.stringify(config)
|
||||||
|
|
||||||
if(oldConfig != newConfig){
|
if(oldConfig !== newConfig){
|
||||||
console.log(`Configuration updated: ${newConfig} vs ${oldConfig}`)
|
console.log(`Configuration updated: ${newConfig} vs ${oldConfig}`)
|
||||||
// Store the config
|
// Store the config
|
||||||
this.config = config;
|
this.config = config;
|
||||||
|
|
||||||
if(oldConfig){
|
if(oldConfig){
|
||||||
console.log("reloading component...")
|
console.log('reloading component...')
|
||||||
this.refreshComponent()
|
this.refreshComponent()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -88,10 +88,10 @@ export class DashboardComponent implements OnInit, AfterViewInit, OnDestroy
|
|||||||
// Store the data
|
// Store the data
|
||||||
this.data = data;
|
this.data = data;
|
||||||
|
|
||||||
//generate group data.
|
// generate group data.
|
||||||
for(let wwn in this.data.data.summary){
|
for(const wwn in this.data.data.summary){
|
||||||
let hostid = this.data.data.summary[wwn].device.host_id
|
const hostid = this.data.data.summary[wwn].device.host_id
|
||||||
let hostDeviceList = this.hostGroups[hostid] || []
|
const hostDeviceList = this.hostGroups[hostid] || []
|
||||||
hostDeviceList.push(wwn)
|
hostDeviceList.push(wwn)
|
||||||
this.hostGroups[hostid] = hostDeviceList
|
this.hostGroups[hostid] = hostDeviceList
|
||||||
}
|
}
|
||||||
@@ -121,34 +121,34 @@ export class DashboardComponent implements OnInit, AfterViewInit, OnDestroy
|
|||||||
// -----------------------------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------------------------
|
||||||
// @ Private methods
|
// @ Private methods
|
||||||
// -----------------------------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------------------------
|
||||||
private refreshComponent(){
|
private refreshComponent(): void {
|
||||||
|
|
||||||
let currentUrl = this.router.url;
|
const currentUrl = this.router.url;
|
||||||
this.router.routeReuseStrategy.shouldReuseRoute = () => false;
|
this.router.routeReuseStrategy.shouldReuseRoute = () => false;
|
||||||
this.router.onSameUrlNavigation = 'reload';
|
this.router.onSameUrlNavigation = 'reload';
|
||||||
this.router.navigate([currentUrl]);
|
this.router.navigate([currentUrl]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private _deviceDataTemperatureSeries() {
|
private _deviceDataTemperatureSeries(): any[] {
|
||||||
var deviceTemperatureSeries = []
|
const deviceTemperatureSeries = []
|
||||||
|
|
||||||
console.log("DEVICE DATA SUMMARY", this.data)
|
console.log('DEVICE DATA SUMMARY', this.data)
|
||||||
|
|
||||||
for(const wwn in this.data.data.summary){
|
for(const wwn in this.data.data.summary){
|
||||||
var deviceSummary = this.data.data.summary[wwn]
|
const deviceSummary = this.data.data.summary[wwn]
|
||||||
if (!deviceSummary.temp_history){
|
if (!deviceSummary.temp_history){
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
let deviceName = DeviceTitlePipe.deviceTitleWithFallback(deviceSummary.device, this.config.dashboardDisplay)
|
const deviceName = DeviceTitlePipe.deviceTitleWithFallback(deviceSummary.device, this.config.dashboardDisplay)
|
||||||
|
|
||||||
var deviceSeriesMetadata = {
|
const deviceSeriesMetadata = {
|
||||||
name: deviceName,
|
name: deviceName,
|
||||||
data: []
|
data: []
|
||||||
}
|
}
|
||||||
|
|
||||||
for(let tempHistory of deviceSummary.temp_history){
|
for(const tempHistory of deviceSummary.temp_history){
|
||||||
let newDate = new Date(tempHistory.date);
|
const newDate = new Date(tempHistory.date);
|
||||||
deviceSeriesMetadata.data.push({
|
deviceSeriesMetadata.data.push({
|
||||||
x: newDate,
|
x: newDate,
|
||||||
y: TemperaturePipe.formatTemperature(tempHistory.temp, this.config.temperatureUnit, false)
|
y: TemperaturePipe.formatTemperature(tempHistory.temp, this.config.temperatureUnit, false)
|
||||||
@@ -216,9 +216,9 @@ export class DashboardComponent implements OnInit, AfterViewInit, OnDestroy
|
|||||||
// @ Public methods
|
// @ Public methods
|
||||||
// -----------------------------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
deviceSummariesForHostGroup(hostGroupWWNs: string[]) {
|
deviceSummariesForHostGroup(hostGroupWWNs: string[]): any[] {
|
||||||
let deviceSummaries = []
|
const deviceSummaries = []
|
||||||
for(let wwn of hostGroupWWNs){
|
for(const wwn of hostGroupWWNs){
|
||||||
if(this.data.data.summary[wwn]){
|
if(this.data.data.summary[wwn]){
|
||||||
deviceSummaries.push(this.data.data.summary[wwn])
|
deviceSummaries.push(this.data.data.summary[wwn])
|
||||||
}
|
}
|
||||||
@@ -226,7 +226,7 @@ export class DashboardComponent implements OnInit, AfterViewInit, OnDestroy
|
|||||||
return deviceSummaries
|
return deviceSummaries
|
||||||
}
|
}
|
||||||
|
|
||||||
openDialog() {
|
openDialog(): void {
|
||||||
const dialogRef = this.dialog.open(DashboardSettingsComponent);
|
const dialogRef = this.dialog.open(DashboardSettingsComponent);
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
@@ -234,7 +234,7 @@ export class DashboardComponent implements OnInit, AfterViewInit, OnDestroy
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onDeviceDeleted(wwn: string) {
|
onDeviceDeleted(wwn: string): void {
|
||||||
delete this.data.data.summary[wwn] // remove the device from the summary list.
|
delete this.data.data.summary[wwn] // remove the device from the summary list.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ import { MatSortModule } from '@angular/material/sort';
|
|||||||
import { MatTableModule } from '@angular/material/table';
|
import { MatTableModule } from '@angular/material/table';
|
||||||
import { NgApexchartsModule } from 'ng-apexcharts';
|
import { NgApexchartsModule } from 'ng-apexcharts';
|
||||||
import { MatTooltipModule } from '@angular/material/tooltip'
|
import { MatTooltipModule } from '@angular/material/tooltip'
|
||||||
import { DashboardSettingsModule } from "app/layout/common/dashboard-settings/dashboard-settings.module";
|
import { DashboardSettingsModule } from 'app/layout/common/dashboard-settings/dashboard-settings.module';
|
||||||
import { DashboardDeviceModule } from "app/layout/common/dashboard-device/dashboard-device.module";
|
import { DashboardDeviceModule } from 'app/layout/common/dashboard-device/dashboard-device.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Route } from '@angular/router';
|
import { Route } from '@angular/router';
|
||||||
import { DashboardComponent } from 'app/modules/dashboard/dashboard.component';
|
import { DashboardComponent } from 'app/modules/dashboard/dashboard.component';
|
||||||
import {DashboardResolver} from "./dashboard.resolvers";
|
import {DashboardResolver} from 'app/modules/dashboard/dashboard.resolvers';
|
||||||
|
|
||||||
export const dashboardRoutes: Route[] = [
|
export const dashboardRoutes: Route[] = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -55,9 +55,9 @@ export class DashboardService
|
|||||||
|
|
||||||
getSummaryTempData(durationKey: string): Observable<any>
|
getSummaryTempData(durationKey: string): Observable<any>
|
||||||
{
|
{
|
||||||
let params = {}
|
const params = {}
|
||||||
if(durationKey){
|
if(durationKey){
|
||||||
params["duration_key"] = durationKey
|
params['duration_key'] = durationKey
|
||||||
}
|
}
|
||||||
|
|
||||||
return this._httpClient.get(getBasePath() + '/api/summary/temp', {params: params});
|
return this._httpClient.get(getBasePath() + '/api/summary/temp', {params: params});
|
||||||
|
|||||||
@@ -1,18 +1,17 @@
|
|||||||
import {AfterViewInit, Component, OnDestroy, OnInit, ViewChild} from '@angular/core';
|
import {AfterViewInit, Component, OnDestroy, OnInit, ViewChild} from '@angular/core';
|
||||||
import {ApexOptions} from "ng-apexcharts";
|
import {ApexOptions} from 'ng-apexcharts';
|
||||||
import {MatTableDataSource} from "@angular/material/table";
|
import {MatTableDataSource} from '@angular/material/table';
|
||||||
import {MatSort} from "@angular/material/sort";
|
import {MatSort} from '@angular/material/sort';
|
||||||
import {Subject} from "rxjs";
|
import {Subject} from 'rxjs';
|
||||||
import {DetailService} from "./detail.service";
|
import {DetailService} from './detail.service';
|
||||||
import {takeUntil} from "rxjs/operators";
|
import {takeUntil} from 'rxjs/operators';
|
||||||
import {fadeOut} from "../../../@treo/animations/fade";
|
import {DetailSettingsComponent} from 'app/layout/common/detail-settings/detail-settings.component';
|
||||||
import {DetailSettingsComponent} from "app/layout/common/detail-settings/detail-settings.component";
|
import {MatDialog} from '@angular/material/dialog';
|
||||||
import {MatDialog} from "@angular/material/dialog";
|
|
||||||
import humanizeDuration from 'humanize-duration';
|
import humanizeDuration from 'humanize-duration';
|
||||||
import {TreoConfigService} from "../../../@treo/services/config";
|
import {TreoConfigService} from '@treo/services/config';
|
||||||
import {AppConfig} from "../../core/config/app.config";
|
import {AppConfig} from 'app/core/config/app.config';
|
||||||
import {animate, state, style, transition, trigger} from '@angular/animations';
|
import {animate, state, style, transition, trigger} from '@angular/animations';
|
||||||
import {formatDate} from "@angular/common";
|
import {formatDate} from '@angular/common';
|
||||||
import { LOCALE_ID, Inject } from '@angular/core';
|
import { LOCALE_ID, Inject } from '@angular/core';
|
||||||
|
|
||||||
// from Constants.go - these must match
|
// from Constants.go - these must match
|
||||||
@@ -37,27 +36,6 @@ const AttributeStatusFailedScrutiny = 4
|
|||||||
|
|
||||||
export class DetailComponent implements OnInit, AfterViewInit, OnDestroy {
|
export class DetailComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
|
|
||||||
config: AppConfig;
|
|
||||||
|
|
||||||
onlyCritical: boolean = true;
|
|
||||||
// data: any;
|
|
||||||
expandedAttribute: any | null;
|
|
||||||
|
|
||||||
metadata: any;
|
|
||||||
device: any;
|
|
||||||
smart_results: any[];
|
|
||||||
|
|
||||||
commonSparklineOptions: Partial<ApexOptions>;
|
|
||||||
smartAttributeDataSource: MatTableDataSource<any>;
|
|
||||||
smartAttributeTableColumns: string[];
|
|
||||||
|
|
||||||
@ViewChild('smartAttributeTable', {read: MatSort})
|
|
||||||
smartAttributeTableMatSort: MatSort;
|
|
||||||
|
|
||||||
// Private
|
|
||||||
private _unsubscribeAll: Subject<any>;
|
|
||||||
private systemPrefersDark: boolean;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
@@ -79,10 +57,33 @@ export class DetailComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
// this.recentTransactionsTableColumns = ['status', 'id', 'name', 'value', 'worst', 'thresh'];
|
// this.recentTransactionsTableColumns = ['status', 'id', 'name', 'value', 'worst', 'thresh'];
|
||||||
this.smartAttributeTableColumns = ['status', 'id', 'name', 'value', 'worst', 'thresh','ideal', 'failure', 'history'];
|
this.smartAttributeTableColumns = ['status', 'id', 'name', 'value', 'worst', 'thresh','ideal', 'failure', 'history'];
|
||||||
|
|
||||||
this.systemPrefersDark = window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches;
|
this.systemPrefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
config: AppConfig;
|
||||||
|
|
||||||
|
onlyCritical = true;
|
||||||
|
// data: any;
|
||||||
|
expandedAttribute: any | null;
|
||||||
|
|
||||||
|
metadata: any;
|
||||||
|
device: any;
|
||||||
|
smart_results: any[];
|
||||||
|
|
||||||
|
commonSparklineOptions: Partial<ApexOptions>;
|
||||||
|
smartAttributeDataSource: MatTableDataSource<any>;
|
||||||
|
smartAttributeTableColumns: string[];
|
||||||
|
|
||||||
|
@ViewChild('smartAttributeTable', {read: MatSort})
|
||||||
|
smartAttributeTableMatSort: MatSort;
|
||||||
|
|
||||||
|
// Private
|
||||||
|
private _unsubscribeAll: Subject<any>;
|
||||||
|
private systemPrefersDark: boolean;
|
||||||
|
|
||||||
|
readonly humanizeDuration = humanizeDuration;
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------------------------
|
||||||
// @ Lifecycle hooks
|
// @ Lifecycle hooks
|
||||||
// -----------------------------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------------------------
|
||||||
@@ -181,7 +182,7 @@ export class DetailComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
|
|
||||||
|
|
||||||
getAttributeName(attribute_data): string {
|
getAttributeName(attribute_data): string {
|
||||||
let attribute_metadata = this.metadata[attribute_data.attribute_id]
|
const attribute_metadata = this.metadata[attribute_data.attribute_id]
|
||||||
if(!attribute_metadata){
|
if(!attribute_metadata){
|
||||||
return 'Unknown Attribute Name'
|
return 'Unknown Attribute Name'
|
||||||
} else {
|
} else {
|
||||||
@@ -189,7 +190,7 @@ export class DetailComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
getAttributeDescription(attribute_data){
|
getAttributeDescription(attribute_data){
|
||||||
let attribute_metadata = this.metadata[attribute_data.attribute_id]
|
const attribute_metadata = this.metadata[attribute_data.attribute_id]
|
||||||
if(!attribute_metadata){
|
if(!attribute_metadata){
|
||||||
return 'Unknown'
|
return 'Unknown'
|
||||||
} else {
|
} else {
|
||||||
@@ -200,12 +201,12 @@ export class DetailComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
|
|
||||||
getAttributeValue(attribute_data){
|
getAttributeValue(attribute_data){
|
||||||
if(this.isAta()) {
|
if(this.isAta()) {
|
||||||
let attribute_metadata = this.metadata[attribute_data.attribute_id]
|
const attribute_metadata = this.metadata[attribute_data.attribute_id]
|
||||||
if(!attribute_metadata){
|
if(!attribute_metadata){
|
||||||
return attribute_data.value
|
return attribute_data.value
|
||||||
} else if (attribute_metadata.display_type == "raw") {
|
} else if (attribute_metadata.display_type == 'raw') {
|
||||||
return attribute_data.raw_value
|
return attribute_data.raw_value
|
||||||
} else if (attribute_metadata.display_type == "transformed" && attribute_data.transformed_value) {
|
} else if (attribute_metadata.display_type == 'transformed' && attribute_data.transformed_value) {
|
||||||
return attribute_data.transformed_value
|
return attribute_data.transformed_value
|
||||||
} else {
|
} else {
|
||||||
return attribute_data.value
|
return attribute_data.value
|
||||||
@@ -218,7 +219,7 @@ export class DetailComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
|
|
||||||
getAttributeValueType(attribute_data){
|
getAttributeValueType(attribute_data){
|
||||||
if(this.isAta()) {
|
if(this.isAta()) {
|
||||||
let attribute_metadata = this.metadata[attribute_data.attribute_id]
|
const attribute_metadata = this.metadata[attribute_data.attribute_id]
|
||||||
if(!attribute_metadata){
|
if(!attribute_metadata){
|
||||||
return ''
|
return ''
|
||||||
} else {
|
} else {
|
||||||
@@ -231,25 +232,25 @@ export class DetailComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
|
|
||||||
getAttributeIdeal(attribute_data){
|
getAttributeIdeal(attribute_data){
|
||||||
if(this.isAta()){
|
if(this.isAta()){
|
||||||
return this.metadata[attribute_data.attribute_id]?.display_type == "raw" ? this.metadata[attribute_data.attribute_id]?.ideal : ''
|
return this.metadata[attribute_data.attribute_id]?.display_type == 'raw' ? this.metadata[attribute_data.attribute_id]?.ideal : ''
|
||||||
} else {
|
} else {
|
||||||
return this.metadata[attribute_data.attribute_id]?.ideal
|
return this.metadata[attribute_data.attribute_id]?.ideal
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getAttributeWorst(attribute_data){
|
getAttributeWorst(attribute_data){
|
||||||
let attribute_metadata = this.metadata[attribute_data.attribute_id]
|
const attribute_metadata = this.metadata[attribute_data.attribute_id]
|
||||||
if(!attribute_metadata){
|
if(!attribute_metadata){
|
||||||
return attribute_data.worst
|
return attribute_data.worst
|
||||||
} else {
|
} else {
|
||||||
return attribute_metadata?.display_type == "normalized" ? attribute_data.worst : ''
|
return attribute_metadata?.display_type == 'normalized' ? attribute_data.worst : ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getAttributeThreshold(attribute_data){
|
getAttributeThreshold(attribute_data){
|
||||||
if(this.isAta()){
|
if(this.isAta()){
|
||||||
let attribute_metadata = this.metadata[attribute_data.attribute_id]
|
const attribute_metadata = this.metadata[attribute_data.attribute_id]
|
||||||
if(!attribute_metadata || attribute_metadata.display_type == "normalized"){
|
if(!attribute_metadata || attribute_metadata.display_type == 'normalized'){
|
||||||
return attribute_data.thresh
|
return attribute_data.thresh
|
||||||
} else {
|
} else {
|
||||||
// if(this.data.metadata[attribute_data.attribute_id].observed_thresholds){
|
// if(this.data.metadata[attribute_data.attribute_id].observed_thresholds){
|
||||||
@@ -273,7 +274,7 @@ export class DetailComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let attributes_length = 0
|
let attributes_length = 0
|
||||||
let attributes = this.smart_results[0]?.attrs
|
const attributes = this.smart_results[0]?.attrs
|
||||||
if (attributes) {
|
if (attributes) {
|
||||||
attributes_length = Object.keys(attributes).length
|
attributes_length = Object.keys(attributes).length
|
||||||
}
|
}
|
||||||
@@ -292,12 +293,12 @@ export class DetailComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private _generateSmartAttributeTableDataSource(smart_results){
|
private _generateSmartAttributeTableDataSource(smart_results){
|
||||||
var smartAttributeDataSource = [];
|
const smartAttributeDataSource = [];
|
||||||
|
|
||||||
if(smart_results.length == 0){
|
if(smart_results.length == 0){
|
||||||
return smartAttributeDataSource
|
return smartAttributeDataSource
|
||||||
}
|
}
|
||||||
var latest_smart_result = smart_results[0];
|
const latest_smart_result = smart_results[0];
|
||||||
let attributes = {}
|
let attributes = {}
|
||||||
if(this.isScsi()) {
|
if(this.isScsi()) {
|
||||||
this.smartAttributeTableColumns = ['status', 'name', 'value', 'thresh', 'history'];
|
this.smartAttributeTableColumns = ['status', 'name', 'value', 'thresh', 'history'];
|
||||||
@@ -306,20 +307,20 @@ export class DetailComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
this.smartAttributeTableColumns = ['status', 'name', 'value', 'thresh', 'ideal', 'history'];
|
this.smartAttributeTableColumns = ['status', 'name', 'value', 'thresh', 'ideal', 'history'];
|
||||||
attributes = latest_smart_result.attrs
|
attributes = latest_smart_result.attrs
|
||||||
} else {
|
} else {
|
||||||
//ATA
|
// ATA
|
||||||
attributes = latest_smart_result.attrs
|
attributes = latest_smart_result.attrs
|
||||||
this.smartAttributeTableColumns = ['status', 'id', 'name', 'value', 'thresh','ideal', 'failure', 'history'];
|
this.smartAttributeTableColumns = ['status', 'id', 'name', 'value', 'thresh','ideal', 'failure', 'history'];
|
||||||
}
|
}
|
||||||
|
|
||||||
for(const attrId in attributes){
|
for(const attrId in attributes){
|
||||||
var attr = attributes[attrId]
|
const attr = attributes[attrId]
|
||||||
|
|
||||||
//chart history data
|
// chart history data
|
||||||
if (!attr.chartData) {
|
if (!attr.chartData) {
|
||||||
|
|
||||||
|
|
||||||
var attrHistory = []
|
const attrHistory = []
|
||||||
for (let smart_result of smart_results){
|
for (const smart_result of smart_results){
|
||||||
// attrHistory.push(this.getAttributeValue(smart_result.attrs[attrId]))
|
// attrHistory.push(this.getAttributeValue(smart_result.attrs[attrId]))
|
||||||
|
|
||||||
const chartDatapoint = {
|
const chartDatapoint = {
|
||||||
@@ -342,12 +343,12 @@ export class DetailComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
|
|
||||||
attributes[attrId].chartData = [
|
attributes[attrId].chartData = [
|
||||||
{
|
{
|
||||||
name: "chart-line-sparkline",
|
name: 'chart-line-sparkline',
|
||||||
data: attrHistory
|
data: attrHistory
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
//determine when to include the attributes in table.
|
// determine when to include the attributes in table.
|
||||||
|
|
||||||
if(!this.onlyCritical || this.onlyCritical && this.metadata[attr.attribute_id]?.critical || attr.value < attr.thresh){
|
if(!this.onlyCritical || this.onlyCritical && this.metadata[attr.attribute_id]?.critical || attr.value < attr.thresh){
|
||||||
smartAttributeDataSource.push(attr)
|
smartAttributeDataSource.push(attr)
|
||||||
@@ -367,7 +368,7 @@ export class DetailComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
// Account balance
|
// Account balance
|
||||||
this.commonSparklineOptions = {
|
this.commonSparklineOptions = {
|
||||||
chart: {
|
chart: {
|
||||||
type: "bar",
|
type: 'bar',
|
||||||
width: 100,
|
width: 100,
|
||||||
height: 25,
|
height: 25,
|
||||||
sparkline: {
|
sparkline: {
|
||||||
@@ -392,7 +393,7 @@ export class DetailComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
y: {
|
y: {
|
||||||
title: {
|
title: {
|
||||||
formatter: function(seriesName) {
|
formatter: function(seriesName) {
|
||||||
return "";
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -421,7 +422,7 @@ export class DetailComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
// -----------------------------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
toHex(decimalNumb){
|
toHex(decimalNumb){
|
||||||
return "0x" + Number(decimalNumb).toString(16).padStart(2, '0').toUpperCase()
|
return '0x' + Number(decimalNumb).toString(16).padStart(2, '0').toUpperCase()
|
||||||
}
|
}
|
||||||
toggleOnlyCritical(){
|
toggleOnlyCritical(){
|
||||||
this.onlyCritical = !this.onlyCritical
|
this.onlyCritical = !this.onlyCritical
|
||||||
@@ -449,6 +450,4 @@ export class DetailComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
// return item.id || index;
|
// return item.id || index;
|
||||||
}
|
}
|
||||||
|
|
||||||
readonly humanizeDuration = humanizeDuration;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import { MatTableModule } from '@angular/material/table';
|
|||||||
import { MatTooltipModule } from '@angular/material/tooltip'
|
import { MatTooltipModule } from '@angular/material/tooltip'
|
||||||
import { NgApexchartsModule } from 'ng-apexcharts';
|
import { NgApexchartsModule } from 'ng-apexcharts';
|
||||||
import { TreoCardModule } from '@treo/components/card';
|
import { TreoCardModule } from '@treo/components/card';
|
||||||
import {DetailSettingsModule} from "app/layout/common/detail-settings/detail-settings.module";
|
import {DetailSettingsModule} from 'app/layout/common/detail-settings/detail-settings.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Route } from '@angular/router';
|
import { Route } from '@angular/router';
|
||||||
import { DetailComponent } from 'app/modules/detail/detail.component';
|
import { DetailComponent } from 'app/modules/detail/detail.component';
|
||||||
import {DetailResolver} from "./detail.resolvers";
|
import {DetailResolver} from './detail.resolvers';
|
||||||
|
|
||||||
export const detailRoutes: Route[] = [
|
export const detailRoutes: Route[] = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,33 +1,33 @@
|
|||||||
import { Pipe, PipeTransform } from '@angular/core';
|
import { Pipe, PipeTransform } from '@angular/core';
|
||||||
import {DeviceTitlePipe} from "./device-title.pipe";
|
import {DeviceTitlePipe} from 'app/shared/device-title.pipe';
|
||||||
|
|
||||||
@Pipe({
|
@Pipe({
|
||||||
name: 'deviceSort'
|
name: 'deviceSort'
|
||||||
})
|
})
|
||||||
export class DeviceSortPipe implements PipeTransform {
|
export class DeviceSortPipe implements PipeTransform {
|
||||||
|
|
||||||
statusCompareFn(a: any, b: any) {
|
statusCompareFn(a: any, b: any): number {
|
||||||
function deviceStatus(deviceSummary): number {
|
function deviceStatus(deviceSummary): number {
|
||||||
if(!deviceSummary.smart){
|
if(!deviceSummary.smart){
|
||||||
return 0
|
return 0
|
||||||
} else if (deviceSummary.device.device_status == 0){
|
} else if (deviceSummary.device.device_status === 0){
|
||||||
return 1
|
return 1
|
||||||
} else {
|
} else {
|
||||||
return deviceSummary.device.device_status * -1 // will return range from -1, -2, -3
|
return deviceSummary.device.device_status * -1 // will return range from -1, -2, -3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let left = deviceStatus(a)
|
const left = deviceStatus(a)
|
||||||
let right = deviceStatus(b)
|
const right = deviceStatus(b)
|
||||||
|
|
||||||
return left - right;
|
return left - right;
|
||||||
}
|
}
|
||||||
|
|
||||||
titleCompareFn(dashboardDisplay: string) {
|
titleCompareFn(dashboardDisplay: string) {
|
||||||
return function (a: any, b: any){
|
return function (a: any, b: any){
|
||||||
let _dashboardDisplay = dashboardDisplay
|
const _dashboardDisplay = dashboardDisplay
|
||||||
let left = DeviceTitlePipe.deviceTitleForType(a.device, _dashboardDisplay) || DeviceTitlePipe.deviceTitleForType(a.device, 'name')
|
const left = DeviceTitlePipe.deviceTitleForType(a.device, _dashboardDisplay) || DeviceTitlePipe.deviceTitleForType(a.device, 'name')
|
||||||
let right = DeviceTitlePipe.deviceTitleForType(b.device, _dashboardDisplay) || DeviceTitlePipe.deviceTitleForType(b.device, 'name')
|
const right = DeviceTitlePipe.deviceTitleForType(b.device, _dashboardDisplay) || DeviceTitlePipe.deviceTitleForType(b.device, 'name')
|
||||||
|
|
||||||
if( left < right )
|
if( left < right )
|
||||||
return -1;
|
return -1;
|
||||||
@@ -39,7 +39,7 @@ export class DeviceSortPipe implements PipeTransform {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ageCompareFn(a: any, b: any) {
|
ageCompareFn(a: any, b: any): number {
|
||||||
const left = a.smart?.power_on_hours
|
const left = a.smart?.power_on_hours
|
||||||
const right = b.smart?.power_on_hours
|
const right = b.smart?.power_on_hours
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Pipe, PipeTransform } from '@angular/core';
|
import { Pipe, PipeTransform } from '@angular/core';
|
||||||
import {formatNumber} from "@angular/common";
|
import {formatNumber} from '@angular/common';
|
||||||
|
|
||||||
@Pipe({
|
@Pipe({
|
||||||
name: 'temperature'
|
name: 'temperature'
|
||||||
|
|||||||
Reference in New Issue
Block a user