ui: datastore add: set default schedule

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2020-11-11 07:49:01 +01:00
parent be1d6cbcc6
commit 03e40aa4ee
2 changed files with 4 additions and 1 deletions

View File

@ -49,7 +49,6 @@ Ext.define('PBS.form.CalendarEvent', {
return data; return data;
}, },
store: { store: {
type: 'calendarEventExamples', type: 'calendarEventExamples',
}, },

View File

@ -100,6 +100,7 @@ Ext.define('PBS.DataStoreEdit', {
} }
me.url = name ? baseurl + '/' + name : baseurl; me.url = name ? baseurl + '/' + name : baseurl;
me.method = name ? 'PUT' : 'POST'; me.method = name ? 'PUT' : 'POST';
me.scheduleValue = name ? null : 'daily';
me.autoLoad = !!name; me.autoLoad = !!name;
return {}; return {};
}, },
@ -146,15 +147,18 @@ Ext.define('PBS.DataStoreEdit', {
emptyText: gettext('none'), emptyText: gettext('none'),
cbind: { cbind: {
deleteEmpty: '{!isCreate}', deleteEmpty: '{!isCreate}',
value: '{scheduleValue}',
}, },
}, },
{ {
xtype: 'pbsCalendarEvent', xtype: 'pbsCalendarEvent',
name: 'prune-schedule', name: 'prune-schedule',
fieldLabel: gettext("Prune Schedule"), fieldLabel: gettext("Prune Schedule"),
value: 'daily',
emptyText: gettext('none'), emptyText: gettext('none'),
cbind: { cbind: {
deleteEmpty: '{!isCreate}', deleteEmpty: '{!isCreate}',
value: '{scheduleValue}',
}, },
}, },
], ],