[pve-devel] [PATCH manager 2/7] add render_duration

Dominik Csapak d.csapak at proxmox.com
Tue Jun 13 14:56:01 CEST 2017


for replica interval

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/Utils.js | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index 25d78f7b..a7574834 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -918,6 +918,13 @@ Ext.define('PVE.Utils', { utilities: {
 	return Ext.Date.format(new Date(value * 1000), 'l d F Y H:i:s');
     },
 
+    render_duration: function(value) {
+	if (value === undefined) {
+	    return '-';
+	}
+	return PVE.Utils.format_duration_short(value);
+    },
+
     calculate_mem_usage: function(data) {
 	if (!Ext.isNumeric(data.mem) ||
 	    data.maxmem === 0 ||
-- 
2.11.0





More information about the pve-devel mailing list