summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/rbd-configuration-source.pipe.ts
blob: bb42d3f1c022381f130e495ee97dc5b0a0e72413 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
  name: 'rbdConfigurationSource'
})
export class RbdConfigurationSourcePipe implements PipeTransform {
  transform(value: any): any {
    const sourceMap = {
      0: 'global',
      1: 'pool',
      2: 'image'
    };
    return sourceMap[value];
  }
}