Commit 0c3e3ca3 authored by Dietmar Maurer's avatar Dietmar Maurer

simplify TaskViewer refresh code

parent 6fb13d81
...@@ -103,21 +103,15 @@ Ext.define('PVE.window.TaskViewer', { ...@@ -103,21 +103,15 @@ Ext.define('PVE.window.TaskViewer', {
border: false border: false
}); });
var lastStatus = 'unknown';
me.mon(statstore, 'load', function() { me.mon(statstore, 'load', function() {
var status = statgrid.getObjectValue('status'); var status = statgrid.getObjectValue('status');
store.load();
if (status === 'stopped') { if (status === 'stopped') {
statstore.stopUpdate(); statstore.stopUpdate();
} }
if (status === 'running' || lastStatus === 'running') {
store.load();
}
lastStatus = status;
stop_btn1.setDisabled(status !== 'running'); stop_btn1.setDisabled(status !== 'running');
stop_btn2.setDisabled(status !== 'running'); stop_btn2.setDisabled(status !== 'running');
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment