]> git.proxmox.com Git - ceph.git/blame - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/dimless-binary-per-second.pipe.ts
update ceph source to reef 18.2.0
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / pipes / dimless-binary-per-second.pipe.ts
CommitLineData
11fdf7f2 1import { Pipe, PipeTransform } from '@angular/core';
f67539c2 2
11fdf7f2
TL
3import { FormatterService } from '../services/formatter.service';
4
5@Pipe({
6 name: 'dimlessBinaryPerSecond'
7})
8export class DimlessBinaryPerSecondPipe implements PipeTransform {
9 constructor(private formatter: FormatterService) {}
10
11 transform(value: any): any {
12 return this.formatter.format_number(value, 1024, [
13 'B/s',
05a536ef
TL
14 'KiB/s',
15 'MiB/s',
16 'GiB/s',
17 'TiB/s',
18 'PiB/s',
19 'EiB/s',
20 'ZiB/s',
21 'YiB/s'
11fdf7f2
TL
22 ]);
23 }
24}