]> git.proxmox.com Git - proxmox-backup.git/blob - www/datastore/PruneAndGC.js
33ca010872ecf0d92213aa11223fb6310e3af8f2
[proxmox-backup.git] / www / datastore / PruneAndGC.js
1 Ext.define('PBS.Datastore.PruneAndGC', {
2 extend: 'Ext.panel.Panel',
3 alias: 'widget.pbsDatastorePruneAndGC',
4 title: gettext('Prune & GC Jobs'),
5
6 mixins: ['Proxmox.Mixin.CBind'],
7
8 layout: {
9 type: 'vbox',
10 align: 'stretch',
11 multi: true,
12 },
13 defaults: {
14 collapsible: false,
15 margin: '7 10 3 10',
16 },
17 items: [
18 {
19 xtype: 'pbsGCJobView',
20 itemId: 'gcjobs',
21 nodename: 'localhost',
22 cbind: {
23 datastore: '{datastore}',
24 },
25 },
26 {
27 xtype: 'pbsPruneJobView',
28 nodename: 'localhost',
29 itemId: 'prunejobs',
30 cbind: {
31 datastore: '{datastore}',
32 },
33 },
34 ],
35 initComponent: function() {
36 let me = this;
37
38 let subPanelIds = me.items.map(el => el.itemId);
39
40 me.callParent();
41
42 for (const itemId of subPanelIds) {
43 let component = me.getComponent(itemId);
44 component.relayEvents(me, ['activate', 'deactivate', 'destroy']);
45 }
46 },
47
48 cbindData: function(initalConfig) {
49 let me = this;
50 me.datastore = initalConfig.datastore ? initalConfig.datastore : undefined;
51 },
52 });