]>
git.proxmox.com Git - pve-manager.git/blob - www/manager6/storage/IScsiEdit.js
1 Ext
.define('PVE.storage.IScsiScan', {
2 extend
: 'Ext.form.field.ComboBox',
3 alias
: 'widget.pveIScsiScan',
7 displayField
: 'target',
8 matchFieldWidth
: false,
10 loadingText
: gettext('Scanning...'),
13 doRawQuery: function() {
16 onTriggerClick: function() {
19 if (!me
.queryCaching
|| me
.lastQuery
!== me
.portal
) {
23 me
.allQuery
= me
.portal
;
28 setPortal: function(portal
) {
34 initComponent: function() {
38 me
.nodename
= 'localhost';
41 var store
= Ext
.create('Ext.data.Store', {
42 fields
: ['target', 'portal'],
45 url
: '/api2/json/nodes/' + me
.nodename
+ '/scan/iscsi',
49 store
.sort('target', 'ASC');
59 Ext
.define('PVE.storage.IScsiInputPanel', {
60 extend
: 'PVE.panel.StorageBase',
62 onlineHelp
: 'storage_open_iscsi',
64 onGetValues: function(values
) {
67 values
.content
= values
.luns
? 'images' : 'none';
70 return me
.callParent([values
]);
73 setValues: function(values
) {
74 values
.luns
= (values
.content
.indexOf('images') !== -1);
75 this.callParent([values
]);
78 initComponent: function() {
83 xtype
: me
.isCreate
? 'textfield' : 'displayfield',
89 change: function(f
, value
) {
91 var exportField
= me
.down('field[name=target]');
92 exportField
.setPortal(value
);
93 exportField
.setValue('');
99 readOnly
: !me
.isCreate
,
100 xtype
: me
.isCreate
? 'pveIScsiScan' : 'displayfield',
103 fieldLabel
: 'Target',
113 fieldLabel
: gettext('Use LUNs directly'),