[pve-devel] [PATCH manager v2 1/3] implement multiField renderer for infopanels

Dominik Csapak d.csapak at proxmox.com
Mon Apr 30 11:00:33 CEST 2018


we can use this for fields which use more than one value of the
guest status

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
changes from v1:
* getRecord instead of returnCompleteRecord
 www/manager6/panel/StatusView.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/www/manager6/panel/StatusView.js b/www/manager6/panel/StatusView.js
index 57dfac8b..9455a999 100644
--- a/www/manager6/panel/StatusView.js
+++ b/www/manager6/panel/StatusView.js
@@ -61,8 +61,10 @@ Ext.define('PVE.panel.StatusView', {
 	if (Ext.isFunction(field.renderer)) {
 	    renderer = field.renderer;
 	}
-	if (field.textField !== undefined) {
-	    field.updateValue(renderer(me.getRecordValue(field.textField)));
+	if (field.multiField === true) {
+	    field.updateValue(renderer.call(field, me.getStore().getRecord()));
+	} else if (field.textField !== undefined) {
+	    field.updateValue(renderer.call(field, me.getRecordValue(field.textField)));
 	} else if(field.valueField !== undefined) {
 	    var used = me.getRecordValue(field.valueField);
 	    /*jslint confusion: true*/
-- 
2.11.0




More information about the pve-devel mailing list