[pve-devel] [PATCH manager 1/3] implement multiField renderer for infopanels
Dominik Csapak
d.csapak at proxmox.com
Fri Apr 27 12:28: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>
---
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..906c12fe 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().returnCompleteRecord()));
+ } 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