]>
git.proxmox.com Git - proxmox-backup.git/blob - www/tape/window/PoolEdit.js
1 Ext
.define('PBS.TapeManagement.PoolEditWindow', {
2 extend
: 'Proxmox.window.Edit',
3 alias
: 'widget.pbsPoolEditWindow',
4 mixins
: ['Proxmox.Mixin.CBind'],
8 subject
: gettext('Media Pool'),
9 cbindData: function(initialConfig
) {
12 let poolid
= initialConfig
.poolid
;
13 let baseurl
= '/api2/extjs/config/media-pool';
15 me
.isCreate
= !poolid
;
16 me
.url
= poolid
? `${baseurl}/${encodeURIComponent(poolid)}` : baseurl
;
17 me
.method
= poolid
? 'PUT' : 'POST';
24 fieldLabel
: gettext('Name'),
26 xtype
: 'pmxDisplayEditField',
27 renderer
: Ext
.htmlEncode
,
30 editable
: '{isCreate}',
34 fieldLabel
: gettext('Allocation'),
35 xtype
: 'pbsAllocationSelector',
41 deleteEmpty
: '{!isCreate}',
45 fieldLabel
: gettext('Retention'),
46 xtype
: 'pbsRetentionSelector',
52 deleteEmpty
: '{!isCreate}',