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', {
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');
});
......
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