]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/dimless.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.pipe.ts
1 import { Pipe, PipeTransform } from '@angular/core';
2
3 import { FormatterService } from '../services/formatter.service';
4
5 @Pipe({
6 name: 'dimless'
7 })
8 export class DimlessPipe implements PipeTransform {
9 constructor(private formatter: FormatterService) {}
10
11 transform(value: any): any {
12 return this.formatter.format_number(value, 1000, ['', 'k', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y']);
13 }
14 }