]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
node: repo: use more stati-schema like code style to configure store
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 3 Jul 2021 14:34:38 +0000 (16:34 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 3 Jul 2021 14:34:46 +0000 (16:34 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/node/APTRepositories.js

index ea9f83318c715604e6ddec6ecdbcc2687d185f91..97878b3fef1d3a95960169562d3a8f0994d7e290 100644 (file)
@@ -378,6 +378,18 @@ Ext.define('Proxmox.node.APTRepositoriesGrid', {
        },
     ],
 
+
+    store: {
+       model: 'apt-repolist',
+       groupField: 'Path',
+       sorters: [
+           {
+               property: 'Index',
+               direction: 'ASC',
+           },
+       ],
+    },
+
     initComponent: function() {
        let me = this;
 
@@ -385,20 +397,6 @@ Ext.define('Proxmox.node.APTRepositoriesGrid', {
            throw "no node name specified";
        }
 
-       let store = Ext.create('Ext.data.Store', {
-           model: 'apt-repolist',
-           groupField: 'Path',
-           sorters: [
-               {
-                   property: 'Index',
-                   direction: 'ASC',
-               },
-           ],
-       });
-       Ext.apply(me, {
-           store: store,
-       });
-
        me.callParent();
     },
 });