]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/dimless-binary-per-second.pipe.ts
add stop-gap to fix compat with CPUs not supporting SSE 4.1
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / pipes / dimless-binary-per-second.pipe.ts
1 import { Pipe, PipeTransform } from '@angular/core';
2
3 import { FormatterService } from '../services/formatter.service';
4
5 @Pipe({
6 name: 'dimlessBinaryPerSecond'
7 })
8 export 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',
14 'KiB/s',
15 'MiB/s',
16 'GiB/s',
17 'TiB/s',
18 'PiB/s',
19 'EiB/s',
20 'ZiB/s',
21 'YiB/s'
22 ]);
23 }
24 }