diff options
Diffstat (limited to 'src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/rbd-configuration-source.pipe.ts')
-rw-r--r-- | src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/rbd-configuration-source.pipe.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/rbd-configuration-source.pipe.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/rbd-configuration-source.pipe.ts new file mode 100644 index 000000000..bb42d3f1c --- /dev/null +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/rbd-configuration-source.pipe.ts @@ -0,0 +1,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]; + } +} |