[pve-devel] [PATCH 3/9] render_size_int added to force size values in int

Stefan Priebe s.priebe at profihost.ag
Wed Apr 24 11:53:01 CEST 2013


Signed-off-by: Stefan Priebe <s.priebe at profihost.ag>
---
 www/manager/Utils.js |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/www/manager/Utils.js b/www/manager/Utils.js
index 38d890f..902129d 100644
--- a/www/manager/Utils.js
+++ b/www/manager/Utils.js
@@ -725,6 +725,16 @@ Ext.define('PVE.Utils', { statics: {
 	return PVE.Utils.format_size(value);
     },
 
+    render_size_int: function(value, metaData, record, rowIndex, colIndex, store) {
+	/*jslint confusion: true */
+
+	if (!Ext.isNumeric(value)) {
+	    return '';
+	}
+
+	return PVE.Utils.format_size(value, 0);
+    },
+
     render_timestamp: function(value, metaData, record, rowIndex, colIndex, store) {
 	var servertime = new Date(value * 1000);
 	return Ext.Date.format(servertime, 'Y-m-d H:i:s');
-- 
1.7.10.4




More information about the pve-devel mailing list