ui: tape: add form fields

this includes selectors for
* Allocation Policy
* Retention Policy
* Drives
* Changers
* Tape Device Paths
* Pools

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak
2021-01-28 12:59:45 +01:00
committed by Dietmar Maurer
parent b03ec281bf
commit c72fdb53ae
7 changed files with 295 additions and 0 deletions

View File

@ -0,0 +1,26 @@
Ext.define('PBS.TapeManagement.RetentionStore', {
extend: 'Ext.data.Store',
alias: 'store.retentionCalendarEventStore',
field: ['value', 'text'],
data: [
{ value: 'overwrite', text: gettext('Overwrite') },
{ value: 'keep', text: gettext('Keep') },
{ value: '120 minutes', text: Ext.String.format(gettext("{0} minutes"), 120) },
{ value: '12 hours', text: Ext.String.format(gettext("{0} hours"), 12) },
{ value: '7 days', text: Ext.String.format(gettext("{0} days"), 7) },
{ value: '4 weeks', text: Ext.String.format(gettext("{0} weeks"), 4) },
{ value: '6 months', text: Ext.String.format(gettext("{0} months"), 6) },
{ value: '2 years', text: Ext.String.format(gettext("{0} years"), 2) },
],
});
Ext.define('PBS.TapeManagement.RetentionSelector', {
extend: 'PBS.form.CalendarEvent',
alias: 'widget.pbsRetentionSelector',
store: {
type: 'retentionCalendarEventStore',
},
});