File

src/app/shared/pipes/rbd-configuration-source.pipe.ts

Metadata

Name rbdConfigurationSource

Methods

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

result-matching ""

    No results matching ""