]> git.proxmox.com Git - pve-manager-legacy.git/commitdiff
simplify TaskViewer refresh code
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 11 Oct 2011 10:48:28 +0000 (12:48 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 11 Oct 2011 10:48:28 +0000 (12:48 +0200)
www/manager/window/TaskViewer.js

index ee45d8fcb8b5deacd0fc01fd9bffa6876bd27033..275bf538a184dc137de0b6beedb0c50fb6234111 100644 (file)
@@ -103,21 +103,15 @@ Ext.define('PVE.window.TaskViewer', {
            border: false
        });
 
-       var lastStatus = 'unknown';
-
        me.mon(statstore, 'load', function() {
            var status = statgrid.getObjectValue('status');
            
+           store.load();
+
            if (status === 'stopped') {
                statstore.stopUpdate();
            }
 
-           if (status === 'running' || lastStatus === 'running') {
-               store.load();
-           }
-
-           lastStatus = status;
-
            stop_btn1.setDisabled(status !== 'running');
            stop_btn2.setDisabled(status !== 'running');
        });