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 <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2020-10-23 16:29:54 +02:00 committed by Thomas Lamprecht
parent 4b44709a83
commit 0f687dd7b5

View File

@ -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');