]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/dimless.pipe.ts
update ceph source to reef 18.2.1
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / pipes / dimless.pipe.ts
index 1be11590dc4a7f980a78e03867301503c0fe3a53..a79942d6aaad49efc48281b2726af976dea10535 100644 (file)
@@ -8,7 +8,12 @@ import { FormatterService } from '../services/formatter.service';
 export class DimlessPipe implements PipeTransform {
   constructor(private formatter: FormatterService) {}
 
-  transform(value: any): any {
-    return this.formatter.format_number(value, 1000, ['', 'k', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y']);
+  transform(value: any, decimals: number = 1): any {
+    return this.formatter.format_number(
+      value,
+      1000,
+      ['', 'k', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y'],
+      decimals
+    );
   }
 }