.cargo
debian
docs
etc
examples
pbs-api-types
pbs-buildcfg
pbs-client
pbs-config
pbs-datastore
pbs-fuse-loop
pbs-tape
pbs-tools
proxmox-backup-banner
proxmox-backup-client
proxmox-file-restore
proxmox-rest-server
proxmox-restore-daemon
proxmox-rrd
pxar-bin
src
tests
www
button
config
css
dashboard
data
datastore
form
images
panel
tape
form
window
ChangerEdit.js
DriveEdit.js
EncryptionEdit.js
Erase.js
LabelMedia.js
PoolEdit.js
TapeBackup.js
TapeBackupJob.js
TapeRestore.js
BackupJobs.js
BackupOverview.js
ChangerConfig.js
ChangerStatus.js
DriveConfig.js
DriveStatus.js
EncryptionKeys.js
PoolConfig.js
TapeInventory.js
TapeManagement.js
window
Application.js
Dashboard.js
DirectoryList.js
LoginView.js
MainView.js
Makefile
NavigationTree.js
NodeNotes.js
OnlineHelpInfo.js
ServerAdministration.js
ServerStatus.js
Subscription.js
SystemConfiguration.js
Utils.js
VersionInfo.js
ZFSList.js
index.hbs
zsh-completions
.gitignore
Cargo.toml
Makefile
README.rst
TODO.rst
defines.mk
rustfmt.toml
To let users find the good explanation about allocation and retention policies from the docs easier. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
87 lines
1.6 KiB
JavaScript
87 lines
1.6 KiB
JavaScript
Ext.define('PBS.TapeManagement.PoolEditWindow', {
|
|
extend: 'Proxmox.window.Edit',
|
|
alias: 'widget.pbsPoolEditWindow',
|
|
mixins: ['Proxmox.Mixin.CBind'],
|
|
|
|
onlineHelp: 'tape_media_pool_config',
|
|
|
|
isCreate: true,
|
|
isAdd: true,
|
|
subject: gettext('Media Pool'),
|
|
cbindData: function(initialConfig) {
|
|
let me = this;
|
|
|
|
let poolid = initialConfig.poolid;
|
|
let baseurl = '/api2/extjs/config/media-pool';
|
|
|
|
me.isCreate = !poolid;
|
|
me.url = poolid ? `${baseurl}/${encodeURIComponent(poolid)}` : baseurl;
|
|
me.method = poolid ? 'PUT' : 'POST';
|
|
|
|
return { };
|
|
},
|
|
|
|
items: {
|
|
xtype: 'inputpanel',
|
|
column1: [
|
|
{
|
|
fieldLabel: gettext('Name'),
|
|
name: 'name',
|
|
xtype: 'pmxDisplayEditField',
|
|
renderer: Ext.htmlEncode,
|
|
allowBlank: false,
|
|
cbind: {
|
|
editable: '{isCreate}',
|
|
},
|
|
},
|
|
{
|
|
fieldLabel: gettext('Allocation Policy'),
|
|
xtype: 'pbsAllocationSelector',
|
|
name: 'allocation',
|
|
skipEmptyText: true,
|
|
allowBlank: true,
|
|
autoSelect: false,
|
|
cbind: {
|
|
deleteEmpty: '{!isCreate}',
|
|
},
|
|
},
|
|
{
|
|
fieldLabel: gettext('Retention Policy'),
|
|
xtype: 'pbsRetentionSelector',
|
|
name: 'retention',
|
|
skipEmptyText: true,
|
|
allowBlank: true,
|
|
autoSelect: false,
|
|
cbind: {
|
|
deleteEmpty: '{!isCreate}',
|
|
},
|
|
},
|
|
],
|
|
|
|
column2: [
|
|
{
|
|
fieldLabel: gettext('Encryption Key'),
|
|
xtype: 'pbsTapeKeySelector',
|
|
name: 'encrypt',
|
|
allowBlank: true,
|
|
skipEmptyText: true,
|
|
autoSelect: false,
|
|
cbind: {
|
|
deleteEmpty: '{!isCreate}',
|
|
},
|
|
},
|
|
],
|
|
|
|
columnB: [
|
|
{
|
|
fieldLabel: gettext('Comment'),
|
|
xtype: 'proxmoxtextfield',
|
|
name: 'comment',
|
|
cbind: {
|
|
deleteEmpty: '{!isCreate}',
|
|
},
|
|
},
|
|
],
|
|
},
|
|
});
|