Skip to content

Commit

Permalink
disable and re-enable bitwise operations
Browse files Browse the repository at this point in the history
  • Loading branch information
AnalogJ committed Jun 2, 2022
1 parent 965fbb0 commit 9c8498c
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions webapp/frontend/src/app/modules/detail/detail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,21 +121,25 @@ export class DetailComponent implements OnInit, AfterViewInit, OnDestroy {
// -----------------------------------------------------------------------------------------------------
// @ Private methods
// -----------------------------------------------------------------------------------------------------
getAttributeStatusName(attribute_status){
//from Constants.go
getAttributeStatusName(attributeStatus: number){
// tslint:disable:no-bitwise

// from Constants.go
// AttributeStatusPassed AttributeStatus = 0
// AttributeStatusFailedSmart AttributeStatus = 1
// AttributeStatusWarningScrutiny AttributeStatus = 2
// AttributeStatusFailedScrutiny AttributeStatus = 4

if(attribute_status === 0){
return "passed"
} else if (attribute_status & 1 != 0 || attribute_status & 4 != 0 ){
return "failed"
} else if (attribute_status & 2 != 0){
return "warn"
if(attributeStatus === 0){
return 'passed'

} else if ((attributeStatus & 1) !== 0 || (attributeStatus & 4) !== 0 ){
return 'failed'
} else if ((attributeStatus & 2) !== 0){
return 'warn'
}
return
// tslint:enable:no-bitwise
}

getAttributeName(attribute_data){
Expand Down

0 comments on commit 9c8498c

Please sign in to comment.