]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
info widget: code cleanup
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 3 May 2021 07:33:08 +0000 (09:33 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 3 May 2021 07:39:47 +0000 (09:39 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/panel/InfoWidget.js

index 53c2ec733b5cb1c0c270212cbdaf5462b486aa01..c20eb74f5cfe0cfe5b93087cd4862fe56510169c 100644 (file)
@@ -63,11 +63,8 @@ Ext.define('Proxmox.widget.Info', {
        var label = me.getComponent('label');
        label.update(Ext.apply(label.data, { title: me.title, usage: text }));
 
-       if (usage !== undefined &&
-           me.printBar &&
-           Ext.isNumeric(usage) &&
-           usage >= 0) {
-           var progressBar = me.getComponent('progress');
+       if (usage !== undefined && me.printBar && Ext.isNumeric(usage) && usage >= 0) {
+           let progressBar = me.getComponent('progress');
            progressBar.updateProgress(usage, '');
            if (usage > me.criticalThreshold) {
                progressBar.removeCls('warning');