mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-05-30 20:54:50 +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
|
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');
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user