]> git.proxmox.com Git - proxmox-backup.git/commitdiff
ui: move prune and gc widget to config
authorStefan Lendl <s.lendl@proxmox.com>
Thu, 18 Apr 2024 10:16:59 +0000 (12:16 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Mon, 22 Apr 2024 11:58:08 +0000 (13:58 +0200)
* move datastore/PruneAndGC to config/PruneAndGC
* renaming the widgets to PBS.config.PruneAndGC

Signed-off-by: Stefan Lendl <s.lendl@proxmox.com>
Tested-by: Gabriel Goller <g.goller@proxmox.com>
Reviewd-by: Gabriel Goller <g.goller@proxmox.com>
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
www/Makefile
www/config/PruneAndGC.js [new file with mode: 0644]
www/datastore/DataStoreList.js
www/datastore/Panel.js
www/datastore/PruneAndGC.js [deleted file]

index 40111fd1906db539432dbb221b2babd6d740b9e4..b612a1166f0b6b38c6281944497cc7f2c88f3e4d 100644 (file)
@@ -68,6 +68,7 @@ JSSRC=                                                        \
        config/CertificateView.js                       \
        config/NodeOptionView.js                        \
        config/MetricServerView.js                      \
+       config/PruneAndGC.js                            \
        window/ACLEdit.js                               \
        window/BackupGroupChangeOwner.js                \
        window/CreateDirectory.js                       \
@@ -106,7 +107,6 @@ JSSRC=                                                      \
        Subscription.js                                 \
        datastore/Summary.js                            \
        datastore/Notes.js                              \
-       datastore/PruneAndGC.js                         \
        datastore/Prune.js                              \
        datastore/Content.js                            \
        datastore/OptionView.js                         \
diff --git a/www/config/PruneAndGC.js b/www/config/PruneAndGC.js
new file mode 100644 (file)
index 0000000..a116340
--- /dev/null
@@ -0,0 +1,52 @@
+Ext.define('PBS.config.PruneAndGC', {
+    extend: 'Ext.panel.Panel',
+    alias: 'widget.pbsPruneAndGC',
+    title: gettext('Prune & GC Jobs'),
+
+    mixins: ['Proxmox.Mixin.CBind'],
+
+    layout: {
+       type: 'vbox',
+       align: 'stretch',
+       multi: true,
+    },
+    defaults: {
+       collapsible: false,
+       margin: '7 10 3 10',
+    },
+    items: [
+       {
+           xtype: 'pbsGCJobView',
+           itemId: 'gcjobs',
+           nodename: 'localhost',
+           cbind: {
+               datastore: '{datastore}',
+           },
+       },
+       {
+           xtype: 'pbsPruneJobView',
+           nodename: 'localhost',
+           itemId: 'prunejobs',
+           cbind: {
+               datastore: '{datastore}',
+           },
+       },
+    ],
+    initComponent: function() {
+       let me = this;
+
+       let subPanelIds = me.items.map(el => el.itemId);
+
+       me.callParent();
+
+       for (const itemId of subPanelIds) {
+           let component = me.getComponent(itemId);
+           component.relayEvents(me, ['activate', 'deactivate', 'destroy']);
+       }
+    },
+
+    cbindData: function(initalConfig) {
+        let me = this;
+        me.datastore = initalConfig.datastore ? initalConfig.datastore : undefined;
+    },
+});
index a4b77dbf6608e596b8218b41620bd27cbb187e7f..a31a9b4b056a510f2cdc3ffa2e5746172d222e3b 100644 (file)
@@ -240,7 +240,7 @@ Ext.define('PBS.datastore.DataStores', {
        {
            iconCls: 'fa fa-trash-o',
            itemId: 'prunegc',
-           xtype: 'pbsDatastorePruneAndGC',
+           xtype: 'pbsPruneAndGC',
        },
        {
            iconCls: 'fa fa-check-circle',
index 0fc97d1497e0d2650b0ff4922ca9344d29e630b5..0ee38a1bcf6a65647bf37526d48f18f139a48642 100644 (file)
@@ -58,7 +58,7 @@ Ext.define('PBS.DataStorePanel', {
            },
        },
        {
-           xtype: 'pbsDatastorePruneAndGC',
+           xtype: 'pbsPruneAndGC',
            itemId: 'prunegc',
            iconCls: 'fa fa-trash-o',
            cbind: {
diff --git a/www/datastore/PruneAndGC.js b/www/datastore/PruneAndGC.js
deleted file mode 100644 (file)
index 33ca010..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-Ext.define('PBS.Datastore.PruneAndGC', {
-    extend: 'Ext.panel.Panel',
-    alias: 'widget.pbsDatastorePruneAndGC',
-    title: gettext('Prune & GC Jobs'),
-
-    mixins: ['Proxmox.Mixin.CBind'],
-
-    layout: {
-       type: 'vbox',
-       align: 'stretch',
-       multi: true,
-    },
-    defaults: {
-       collapsible: false,
-       margin: '7 10 3 10',
-    },
-    items: [
-       {
-           xtype: 'pbsGCJobView',
-           itemId: 'gcjobs',
-           nodename: 'localhost',
-           cbind: {
-               datastore: '{datastore}',
-           },
-       },
-       {
-           xtype: 'pbsPruneJobView',
-           nodename: 'localhost',
-           itemId: 'prunejobs',
-           cbind: {
-               datastore: '{datastore}',
-           },
-       },
-    ],
-    initComponent: function() {
-       let me = this;
-
-       let subPanelIds = me.items.map(el => el.itemId);
-
-       me.callParent();
-
-       for (const itemId of subPanelIds) {
-           let component = me.getComponent(itemId);
-           component.relayEvents(me, ['activate', 'deactivate', 'destroy']);
-       }
-    },
-
-    cbindData: function(initalConfig) {
-        let me = this;
-        me.datastore = initalConfig.datastore ? initalConfig.datastore : undefined;
-    },
-});