]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
add autostart and alias to UpdateStore
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 10 Oct 2017 13:10:22 +0000 (15:10 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 11 Oct 2017 04:44:29 +0000 (06:44 +0200)
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>
data/UpdateStore.js

index 0fb3dadf12caa85e3ed06e61878781d7ba056e76..cc30bc36fd6bf8170a33d7967eab349066580981 100644 (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();
+       }
     }
 });