5
0
mirror of git://git.proxmox.com/git/proxmox-backup.git synced 2025-03-19 18:50:17 +03:00
proxmox-backup/www/config/PruneAndGC.js
Maximiliano Sandoval 42e5be0f87 fix typos in variables and function names
Variables, methods and functions in public API were not changed.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2024-08-07 16:49:31 +02:00

61 lines
1.3 KiB
JavaScript

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',
},
scrollable: true,
items: [
{
xtype: 'pbsGCJobView',
itemId: 'gcjobs',
nodename: 'localhost',
cbind: {
datastore: '{datastore}',
},
minHeight: 125, // shows at least one line of content
},
{
xtype: 'splitter',
performCollapse: false,
},
{
xtype: 'pbsPruneJobView',
nodename: 'localhost',
itemId: 'prunejobs',
cbind: {
datastore: '{datastore}',
},
flex: 1,
minHeight: 160, // shows at least one line of content
},
],
initComponent: function() {
let me = this;
let subPanelIds = me.items.map(el => el.itemId).filter(id => !!id);
me.callParent();
for (const itemId of subPanelIds) {
let component = me.getComponent(itemId);
component.relayEvents(me, ['activate', 'deactivate', 'destroy']);
}
},
cbindData: function(initialConfig) {
let me = this;
me.datastore = initialConfig.datastore ? initialConfig.datastore : undefined;
},
});