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

This commit is contained in:
Jason Kulatunga
2021-10-24 17:09:44 -07:00
parent deba21fe19
commit 5789c836db
16 changed files with 966 additions and 4452 deletions
@@ -107,6 +107,26 @@ export class DetailComponent implements OnInit, AfterViewInit, OnDestroy {
// -----------------------------------------------------------------------------------------------------
// @ Private methods
// -----------------------------------------------------------------------------------------------------
getAttributeStatusName(attribute_status){
if(attribute_status == 0){
return "passed"
} else if (attribute_status == 1){
return "warn"
} else if (attribute_status == 2){
return "failed"
}
return
}
getAttributeName(attribute_data){
let attribute_metadata = this.metadata[attribute_data.attribute_id]
if(!attribute_metadata){
return 'Unknown Attribute Name'
} else {
return attribute_metadata.display_name
}
return
}
getAttributeDescription(attribute_data){
let attribute_metadata = this.metadata[attribute_data.attribute_id]
if(!attribute_metadata){