]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/empty.pipe.ts
import ceph quincy 17.2.1
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / pipes / empty.pipe.ts
index fb753e8d9ac48e3c66cffdc11dad185738359c44..2b4df2e3c4fc8b88543bd07613da9c98595a5635 100644 (file)
@@ -7,6 +7,11 @@ import _ from 'lodash';
 })
 export class EmptyPipe implements PipeTransform {
   transform(value: any): any {
-    return _.isUndefined(value) || _.isNull(value) ? '-' : value;
+    if (_.isUndefined(value) || _.isNull(value)) {
+      return '-';
+    } else if (_.isNaN(value)) {
+      return 'N/A';
+    }
+    return value;
   }
 }