storage/TemplateView.js \
storage/ZFSEdit.js \
storage/ZFSPoolEdit.js \
+ storage/ESXIEdit.js \
Workspace.js \
# end of JSSRC list
hideAdd: true,
backups: false,
},
+ esxi: {
+ name: 'ESXi',
+ ipanel: 'ESXIInputPanel',
+ faIcon: 'cloud-download',
+ backups: false,
+ },
},
sdnvnetSchema: {
// templates
objType = 'template';
status = type;
+ } else if (type === 'storage' && record.content.indexOf('import') !== -1) {
+ return 'fa fa-cloud-download';
} else {
// everything else
status = record.status + ' ha-' + record.hastate;
throw "no storage ID specified";
}
- me.items = [
+ let storageInfo = PVE.data.ResourceStore.findRecord(
+ 'id',
+ `storage/${nodename}/${storeid}`,
+ 0, // startIndex
+ false, // anyMatch
+ true, // caseSensitive
+ true, // exactMatch
+ );
+ let res = storageInfo.data;
+ let plugin = res.plugintype;
+
+ me.items = plugin !== 'esxi' ? [
{
title: gettext('Summary'),
xtype: 'pveStorageSummary',
iconCls: 'fa fa-book',
itemId: 'summary',
},
- ];
+ ] : [];
let caps = Ext.state.Manager.get('GuiCap');
caps.storage['Datastore.AllocateSpace'] ||
caps.storage['Datastore.Audit']
) {
- let storageInfo = PVE.data.ResourceStore.findRecord(
- 'id',
- `storage/${nodename}/${storeid}`,
- 0, // startIndex
- false, // anyMatch
- true, // caseSensitive
- true, // exactMatch
- );
- let res = storageInfo.data;
- let plugin = res.plugintype;
let contents = res.content.split(',');
let enableUpload = !!caps.storage['Datastore.AllocateTemplate'];
--- /dev/null
+Ext.define('PVE.storage.ESXIInputPanel', {
+ extend: 'PVE.panel.StorageBase',
+
+ onGetValues: function(values) {
+ let me = this;
+
+ if (values.password?.length === 0) {
+ delete values.password;
+ }
+ if (values.username?.length === 0) {
+ delete values.username;
+ }
+
+ return me.callParent([values]);
+ },
+
+ initComponent: function() {
+ var me = this;
+
+ me.column1 = [
+ {
+ xtype: 'pmxDisplayEditField',
+ editable: me.isCreate,
+ name: 'server',
+ fieldLabel: gettext('Server'),
+ allowBlank: false,
+ },
+ {
+ xtype: 'pmxDisplayEditField',
+ editable: me.isCreate,
+ name: 'username',
+ fieldLabel: gettext('Username'),
+ allowBlank: false,
+ },
+ {
+ xtype: 'pmxDisplayEditField',
+ editable: me.isCreate,
+ name: 'password',
+ value: me.isCreate ? '' : '********',
+ minLength: 1,
+ editConfig: {
+ inputType: 'password',
+ name: 'password',
+ },
+ fieldLabel: gettext('Password'),
+ allowBlank: false,
+ },
+ ];
+
+ me.callParent();
+ },
+});