]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/mirror-health-color.pipe.ts
import 15.2.0 Octopus source
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / ceph / block / mirroring / mirror-health-color.pipe.ts
1 import { Pipe, PipeTransform } from '@angular/core';
2
3 @Pipe({
4 name: 'mirrorHealthColor'
5 })
6 export class MirrorHealthColorPipe implements PipeTransform {
7 transform(value: any): any {
8 if (value === 'warning') {
9 return 'badge badge-warning';
10 } else if (value === 'error') {
11 return 'badge badge-danger';
12 } else if (value === 'success') {
13 return 'badge badge-success';
14 }
15 return 'badge badge-info';
16 }
17 }