2024-04-18 12:16:59 +02:00
Ext . define ( 'PBS.config.PruneAndGC' , {
2022-05-30 10:44:58 +02:00
extend : 'Ext.panel.Panel' ,
2024-04-18 12:16:59 +02:00
alias : 'widget.pbsPruneAndGC' ,
2024-04-18 12:16:58 +02:00
title : gettext ( 'Prune & GC Jobs' ) ,
2022-05-30 10:44:58 +02:00
mixins : [ 'Proxmox.Mixin.CBind' ] ,
layout : {
type : 'vbox' ,
align : 'stretch' ,
multi : true ,
} ,
defaults : {
2022-05-30 15:02:05 +02:00
collapsible : false ,
margin : '7 10 3 10' ,
2022-05-30 10:44:58 +02:00
} ,
2024-04-22 13:05:04 +02:00
scrollable : true ,
2022-05-30 10:44:58 +02:00
items : [
{
2024-04-18 12:16:58 +02:00
xtype : 'pbsGCJobView' ,
itemId : 'gcjobs' ,
2022-05-30 10:44:58 +02:00
nodename : 'localhost' ,
cbind : {
datastore : '{datastore}' ,
2020-10-27 16:20:06 +01:00
} ,
2024-04-22 13:05:04 +02:00
minHeight : 125 , // shows at least one line of content
} ,
{
xtype : 'splitter' ,
performCollapse : false ,
2020-10-27 16:20:06 +01:00
} ,
2022-05-30 10:44:58 +02:00
{
xtype : 'pbsPruneJobView' ,
nodename : 'localhost' ,
2024-04-18 12:16:58 +02:00
itemId : 'prunejobs' ,
2022-05-30 10:44:58 +02:00
cbind : {
datastore : '{datastore}' ,
2020-10-27 16:20:06 +01:00
} ,
2024-04-22 13:05:04 +02:00
flex : 1 ,
minHeight : 160 , // shows at least one line of content
2020-10-27 16:20:06 +01:00
} ,
2022-05-30 10:44:58 +02:00
] ,
2022-05-31 10:02:10 +02:00
initComponent : function ( ) {
let me = this ;
2024-04-22 13:05:04 +02:00
let subPanelIds = me . items . map ( el => el . itemId ) . filter ( id => ! ! id ) ;
2022-05-31 10:02:10 +02:00
me . callParent ( ) ;
for ( const itemId of subPanelIds ) {
let component = me . getComponent ( itemId ) ;
component . relayEvents ( me , [ 'activate' , 'deactivate' , 'destroy' ] ) ;
}
} ,
2024-04-18 12:16:58 +02:00
2024-08-07 14:10:45 +02:00
cbindData : function ( initialConfig ) {
2024-04-18 12:16:58 +02:00
let me = this ;
2024-08-07 14:10:45 +02:00
me . datastore = initialConfig . datastore ? initialConfig . datastore : undefined ;
2024-04-18 12:16:58 +02:00
} ,
2020-10-27 16:20:06 +01:00
} ) ;