]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/dimless-binary-per-second.pipe.ts
update ceph source to reef 18.2.1
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / pipes / dimless-binary-per-second.pipe.ts
index cbd57fd2643a7b92126d2cee2efe2ccc82306eed..7fdb304717bd557d1066a1576c1143a169e37de2 100644 (file)
@@ -8,17 +8,12 @@ import { FormatterService } from '../services/formatter.service';
 export class DimlessBinaryPerSecondPipe implements PipeTransform {
   constructor(private formatter: FormatterService) {}
 
-  transform(value: any): any {
-    return this.formatter.format_number(value, 1024, [
-      'B/s',
-      'KiB/s',
-      'MiB/s',
-      'GiB/s',
-      'TiB/s',
-      'PiB/s',
-      'EiB/s',
-      'ZiB/s',
-      'YiB/s'
-    ]);
+  transform(value: any, decimals: number = 1): any {
+    return this.formatter.format_number(
+      value,
+      1024,
+      ['B/s', 'KiB/s', 'MiB/s', 'GiB/s', 'TiB/s', 'PiB/s', 'EiB/s', 'ZiB/s', 'YiB/s'],
+      decimals
+    );
   }
 }