-
-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding typescript interfaces for type hinting and testing
some code reformatting adding tests for services and components. cleanup of unused dependencies in components. refactor dashboard service so that wrapper is removed before data is passed to component. (no more this.data.data...). refactored components so that variable names are consistent (dashboardService vs smartService). ensure argument and return types are specified everywhere. adding tests for pipes. adding ng test to ci steps. change dir before running npm install. trying to install nodejs in continer. test frontend separately. upload coverage for frontend and backend. upload coverage for frontend and backend. testing coverage file locations. retry file upload.
- Loading branch information
Showing
37 changed files
with
1,897 additions
and
449 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,3 +46,5 @@ testem.log | |
Thumbs.db | ||
|
||
/dist | ||
|
||
/coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
webapp/frontend/src/app/core/models/device-details-response-wrapper.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import {DeviceModel} from 'app/core/models/device-model'; | ||
import {SmartModel} from 'app/core/models/measurements/smart-model'; | ||
import {AttributeMetadataModel} from 'app/core/models/thresholds/attribute-metadata-model'; | ||
|
||
// maps to webapp/backend/pkg/models/device_summary.go | ||
export interface DeviceDetailsResponseWrapper { | ||
success: boolean; | ||
errors?: any[]; | ||
data: { | ||
device: DeviceModel; | ||
smart_results: SmartModel[]; | ||
}, | ||
metadata: { [key: string]: AttributeMetadataModel } | { [key: number]: AttributeMetadataModel }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
webapp/frontend/src/app/core/models/device-summary-model.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import {DeviceModel} from 'app/core/models/device-model'; | ||
import {SmartTemperatureModel} from 'app/core/models/measurements/smart-temperature-model'; | ||
|
||
// maps to webapp/backend/pkg/models/device_summary.go | ||
export interface DeviceSummaryModel { | ||
device: DeviceModel; | ||
smart?: SmartSummary; | ||
temp_history?: SmartTemperatureModel[]; | ||
} | ||
|
||
export interface SmartSummary { | ||
collector_date?: string, | ||
temp?: number | ||
power_on_hours?: number | ||
} | ||
|
10 changes: 10 additions & 0 deletions
10
webapp/frontend/src/app/core/models/device-summary-response-wrapper.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import {DeviceSummaryModel} from 'app/core/models/device-summary-model'; | ||
|
||
// maps to webapp/backend/pkg/models/device_summary.go | ||
export interface DeviceSummaryResponseWrapper { | ||
success: boolean; | ||
errors: any[]; | ||
data: { | ||
summary: { [key: string]: DeviceSummaryModel } | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
webapp/frontend/src/app/core/models/device-summary-temp-response-wrapper.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import {SmartTemperatureModel} from './measurements/smart-temperature-model'; | ||
|
||
export interface DeviceSummaryTempResponseWrapper { | ||
success: boolean; | ||
errors: any[]; | ||
data: { | ||
temp_history: { [key: string]: SmartTemperatureModel[]; } | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
webapp/frontend/src/app/core/models/measurements/smart-attribute-model.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// maps to webapp/backend/pkg/models/measurements/smart_ata_attribute.go | ||
// maps to webapp/backend/pkg/models/measurements/smart_nvme_attribute.go | ||
// maps to webapp/backend/pkg/models/measurements/smart_scsi_attribute.go | ||
export interface SmartAttributeModel { | ||
attribute_id: number | string | ||
value: number | ||
thresh: number | ||
worst?: number | ||
raw_value?: number | ||
raw_string?: string | ||
when_failed?: string | ||
|
||
transformed_value: number | ||
status: number | ||
status_reason?: string | ||
failure_rate?: number | ||
|
||
chartData?: any[] | ||
} |
13 changes: 13 additions & 0 deletions
13
webapp/frontend/src/app/core/models/measurements/smart-model.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// maps to webapp/backend/pkg/models/measurements/smart.go | ||
import {SmartAttributeModel} from './smart-attribute-model'; | ||
|
||
export interface SmartModel { | ||
date: string; | ||
device_wwn: string; | ||
device_protocol: string; | ||
|
||
temp: number; | ||
power_on_hours: number; | ||
power_cycle_count: number | ||
attrs: { [key: string]: SmartAttributeModel } | ||
} |
6 changes: 6 additions & 0 deletions
6
webapp/frontend/src/app/core/models/measurements/smart-temperature-model.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// maps to webapp/backend/pkg/models/measurements/smart_temperature.go | ||
export interface SmartTemperatureModel { | ||
date: string; | ||
temp: number; | ||
} | ||
|
13 changes: 13 additions & 0 deletions
13
webapp/frontend/src/app/core/models/thresholds/attribute-metadata-model.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// map to webapp/backend/pkg/thresholds/ata_attribute_metadata.go | ||
// map to webapp/backend/pkg/thresholds/nvme_attribute_metadata.go | ||
// map to webapp/backend/pkg/thresholds/scsi_attribute_metadata.go | ||
export interface AttributeMetadataModel { | ||
display_name: string | ||
ideal: string | ||
critical: boolean | ||
description: string | ||
|
||
transform_value_unit?: string | ||
observed_thresholds?: any[] | ||
display_type: string | ||
} |
Oops, something went wrong.