add autostart and alias to UpdateStore

the alias is to use it in a declarative syntax,
the autostart parameter automatically starts the update

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2017-10-10 15:10:22 +02:00 committed by Dietmar Maurer
parent b91c7ce210
commit b07f375602

View File

@ -9,9 +9,12 @@
*/
Ext.define('Proxmox.data.UpdateStore', {
extend: 'Ext.data.Store',
alias: 'store.update',
isStopped: true,
autoStart: false,
constructor: function(config) {
var me = this;
@ -60,5 +63,9 @@ Ext.define('Proxmox.data.UpdateStore', {
load_task.cancel();
Proxmox.data.UpdateQueue.unqueue(me);
});
if (me.autoStart) {
me.startUpdate();
}
}
});