pve-manager/www/manager6/storage/CephFSEdit.js
Thomas Lamprecht 8058410f40 ui: eslint: fix various spacing related issues
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:39:15 +01:00

97 lines
1.9 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();
},
});