pve-manager/www/manager6/storage/CephFSEdit.js
Thomas Lamprecht 370fc0c498 storage: drop max backup fields, replaced by pruning
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-23 19:33:02 +01:00

97 lines
1.8 KiB
JavaScript

Ext.define('PVE.storage.CephFSInputPanel', {
extend: 'PVE.panel.StorageBase',
controller: 'cephstorage',
onlineHelp: 'storage_cephfs',
viewModel: {
type: 'cephstorage'
},
setValues: function(values) {
if (values.monhost) {
this.viewModel.set('pveceph', false);
this.lookupReference('pvecephRef').setValue(false);
this.lookupReference('pvecephRef').resetOriginalValue();
}
this.callParent([values]);
},
initComponent : function() {
var me = this;
if (!me.nodename) {
me.nodename = 'localhost';
}
me.type = 'cephfs';
me.column1 = [];
me.column1.push(
{
xtype: 'textfield',
name: 'monhost',
vtype: 'HostList',
value: '',
bind: {
disabled: '{pveceph}',
submitValue: '{!pveceph}',
hidden: '{pveceph}'
},
fieldLabel: 'Monitor(s)',
allowBlank: false
},
{
xtype: 'displayfield',
reference: 'monhost',
bind: {
disabled: '{!pveceph}',
hidden: '{!pveceph}'
},
value: '',
fieldLabel: 'Monitor(s)'
},
{
xtype: me.isCreate ? 'textfield' : 'displayfield',
name: 'username',
value: 'admin',
bind: {
disabled: '{pveceph}',
submitValue: '{!pveceph}'
},
fieldLabel: gettext('User name'),
allowBlank: true
}
);
me.column2 = [
{
xtype: 'pveContentTypeSelector',
cts: ['backup', 'iso', 'vztmpl', 'snippets'],
fieldLabel: gettext('Content'),
name: 'content',
value: 'backup',
multiSelect: true,
allowBlank: false
},
];
me.columnB = [{
xtype: 'proxmoxcheckbox',
name: 'pveceph',
reference: 'pvecephRef',
bind : {
disabled: '{!pvecephPossible}',
value: '{pveceph}'
},
checked: true,
uncheckedValue: 0,
submitValue: false,
hidden: !me.isCreate,
boxLabel: gettext('Use Proxmox VE managed hyper-converged cephFS')
}];
me.callParent();
}
});