disable and re-enable bitwise operations

pull/276/head^2
Jason Kulatunga 3 years ago
parent 965fbb08da
commit 9c8498cea7

@ -121,21 +121,25 @@ export class DetailComponent implements OnInit, AfterViewInit, OnDestroy {
// ----------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------
// @ Private methods // @ Private methods
// ----------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------
getAttributeStatusName(attribute_status){ getAttributeStatusName(attributeStatus: number){
//from Constants.go // tslint:disable:no-bitwise
// from Constants.go
// AttributeStatusPassed AttributeStatus = 0 // AttributeStatusPassed AttributeStatus = 0
// AttributeStatusFailedSmart AttributeStatus = 1 // AttributeStatusFailedSmart AttributeStatus = 1
// AttributeStatusWarningScrutiny AttributeStatus = 2 // AttributeStatusWarningScrutiny AttributeStatus = 2
// AttributeStatusFailedScrutiny AttributeStatus = 4 // AttributeStatusFailedScrutiny AttributeStatus = 4
if(attribute_status === 0){ if(attributeStatus === 0){
return "passed" return 'passed'
} else if (attribute_status & 1 != 0 || attribute_status & 4 != 0 ){
return "failed" } else if ((attributeStatus & 1) !== 0 || (attributeStatus & 4) !== 0 ){
} else if (attribute_status & 2 != 0){ return 'failed'
return "warn" } else if ((attributeStatus & 2) !== 0){
return 'warn'
} }
return return
// tslint:enable:no-bitwise
} }
getAttributeName(attribute_data){ getAttributeName(attribute_data){

Loading…
Cancel
Save