mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-05-28 17:55:42 +00:00
simplify TaskViewer refresh code
This commit is contained in:
parent
8c5bc535f9
commit
ee9fe4959f
@ -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');
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user