]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/boolean-text.pipe.ts
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / pipes / boolean-text.pipe.ts
1 import { Pipe, PipeTransform } from '@angular/core';
2
3 @Pipe({
4 name: 'booleanText'
5 })
6 export class BooleanTextPipe implements PipeTransform {
7 transform(
8 value: any,
9 truthyText: string = $localize`Yes`,
10 falsyText: string = $localize`No`
11 ): string {
12 return Boolean(value) ? truthyText : falsyText;
13 }
14 }