File

src/app/ceph/block/mirroring/mirror-health-color.pipe.ts

Metadata

Name mirrorHealthColor

Methods

transform
transform(value: any)
Parameters :
Name Type Optional
value any No
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';
  }
}

result-matching ""

    No results matching ""