mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-08-07 06:31:34 +00:00
InfoWidget: eslint fixes
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
9354dc13a2
commit
4b44709a83
@ -4,7 +4,7 @@ Ext.define('Proxmox.widget.Info', {
|
|||||||
|
|
||||||
layout: {
|
layout: {
|
||||||
type: 'vbox',
|
type: 'vbox',
|
||||||
align: 'stretch'
|
align: 'stretch',
|
||||||
},
|
},
|
||||||
|
|
||||||
value: 0,
|
value: 0,
|
||||||
@ -17,27 +17,27 @@ Ext.define('Proxmox.widget.Info', {
|
|||||||
data: {
|
data: {
|
||||||
title: '',
|
title: '',
|
||||||
usage: '',
|
usage: '',
|
||||||
iconCls: undefined
|
iconCls: undefined,
|
||||||
},
|
},
|
||||||
tpl: [
|
tpl: [
|
||||||
'<div class="left-aligned">',
|
'<div class="left-aligned">',
|
||||||
'<tpl if="iconCls">',
|
'<tpl if="iconCls">',
|
||||||
'<i class="{iconCls}"></i> ',
|
'<i class="{iconCls}"></i> ',
|
||||||
'</tpl>',
|
'</tpl>',
|
||||||
'{title}</div> <div class="right-aligned">{usage}</div>'
|
'{title}</div> <div class="right-aligned">{usage}</div>',
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
height: 2,
|
height: 2,
|
||||||
border: 0
|
border: 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'progressbar',
|
xtype: 'progressbar',
|
||||||
itemId: 'progress',
|
itemId: 'progress',
|
||||||
height: 5,
|
height: 5,
|
||||||
value: 0,
|
value: 0,
|
||||||
animate: true
|
animate: true,
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
warningThreshold: 0.6,
|
warningThreshold: 0.6,
|
||||||
@ -57,7 +57,7 @@ Ext.define('Proxmox.widget.Info', {
|
|||||||
updateValue: function(text, usage) {
|
updateValue: function(text, usage) {
|
||||||
var me = this;
|
var me = this;
|
||||||
var label = me.getComponent('label');
|
var label = me.getComponent('label');
|
||||||
label.update(Ext.apply(label.data, {title: me.title, usage:text}));
|
label.update(Ext.apply(label.data, { title: me.title, usage: text }));
|
||||||
|
|
||||||
if (usage !== undefined &&
|
if (usage !== undefined &&
|
||||||
me.printBar &&
|
me.printBar &&
|
||||||
@ -91,6 +91,6 @@ Ext.define('Proxmox.widget.Info', {
|
|||||||
|
|
||||||
me.updateValue(me.text, me.value);
|
me.updateValue(me.text, me.value);
|
||||||
me.setIconCls(me.iconCls);
|
me.setIconCls(me.iconCls);
|
||||||
}
|
},
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user