]> git.proxmox.com Git - pmg-gui.git/commitdiff
pbs: small cleanups and store field name fixes
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 18 Nov 2020 13:06:27 +0000 (14:06 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 18 Nov 2020 13:06:27 +0000 (14:06 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
js/PBSConfig.js
js/PBSSnapshotView.js

index 63d43b7553b87aca0dd4360c029298e2f895a1e9..c0d5b42dbe3fd9adce080cb0f0d86090abf9b5af 100644 (file)
@@ -104,7 +104,6 @@ Ext.define('PMG.PBSConfigGrid', {
            let me = this;
            Proxmox.Utils.monStoreErrors(view, view.getStore(), true);
        },
-
     },
 
     store: {
index a1fadb30191453358d8f43fbec3d8403db12330e..630777a4868eb1f11c2bcbcd01c36ab38bbf4d14 100644 (file)
@@ -60,7 +60,9 @@ Ext.define('PMG.PBSConfig', {
 
                // set grid stores and load them
                let remstore = me.lookup('pbsremotegrid').getStore();
-               remstore.getProxy().setUrl(`/api2/json/nodes/${Proxmox.NodeName}/pbs/${remote}/snapshot`);
+               remstore
+                   .getProxy()
+                   .setUrl(`/api2/json/nodes/${Proxmox.NodeName}/pbs/${remote}/snapshot`);
                remstore.load();
            } else {
                viewModel.set('selected', false);
@@ -118,10 +120,8 @@ Ext.define('PMG.PBSConfig', {
            emptyText: gettext('No backups on remote'),
            tbar: [
                {
-                   xtype: 'proxmoxButton',
                    text: gettext('Backup'),
                    handler: 'runBackup',
-                   selModel: false,
                },
                {
                    xtype: 'proxmoxButton',
@@ -151,18 +151,20 @@ Ext.define('PMG.PBSConfig', {
                },
            ],
            store: {
-               fields: ['time', 'size', 'ctime', 'encrypted'],
+               fields: ['backup-id', 'backup-time', 'size', 'ctime', 'encrypted'],
                proxy: { type: 'proxmox' },
                sorters: [
                    {
-                       property: 'time',
+                       property: 'backup-time',
                        direction: 'DESC',
                    },
                ],
            },
            bind: {
-               title: Ext.String.format(gettext("Backup snapshots on '{0}'"), '{remote}'),
-               hidden: '{!selected}',
+               title: Ext.String.format(
+                   gettext("Backup snapshots on '{0}'"),
+                   '{remote}',
+               ),
            },
            columns: [
                {