From 0f687dd7b5bf89a7eb7ba14ab83ebd47f141e0c8 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Fri, 23 Oct 2020 16:29:54 +0200 Subject: [PATCH] InfoWidget: add setData, so that we can bind it with a setData function that calls our updateValue, we can now use viewModel bind to update those widgets Signed-off-by: Dominik Csapak --- src/panel/InfoWidget.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/panel/InfoWidget.js b/src/panel/InfoWidget.js index 8005fa8..53c2ec7 100644 --- a/src/panel/InfoWidget.js +++ b/src/panel/InfoWidget.js @@ -54,6 +54,10 @@ Ext.define('Proxmox.widget.Info', { me.getComponent('label').data.iconCls = iconCls; }, + setData: function(data) { + this.updateValue(data.text, data.usage); + }, + updateValue: function(text, usage) { var me = this; var label = me.getComponent('label'); -- 2.39.2