src/app/ceph/block/mirroring/mirror-health-color.pipe.ts
Name | mirrorHealthColor |
transform | ||||||
transform(value: any)
|
||||||
Parameters :
Returns :
any
|
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'mirrorHealthColor'
})
export class MirrorHealthColorPipe implements PipeTransform {
transform(value: any): any {
if (value === 'warning') {
return 'label label-warning';
} else if (value === 'error') {
return 'label label-danger';
} else if (value === 'success') {
return 'label label-success';
}
return 'label label-info';
}
}