valueField: 'ref',
displayField: 'ref',
+ notFoundIsValid: true,
initComponent: function() {
var me = this;
var store = Ext.create('Ext.data.Store', {
autoLoad: true,
- fields: [ 'type', 'name', 'ref', 'comment' ],
+ fields: ['type', 'name', 'ref', 'comment'],
idProperty: 'ref',
proxy: {
- type: 'pve',
- url: url
+ type: 'proxmox',
+ url: url,
},
sorters: {
property: 'ref',
- order: 'DESC'
- }
+ order: 'DESC',
+ },
});
var disable_query_for_ips = function(f, value) {
- if (value === null ||
+ if (value === null ||
value.match(/^\d/)) { // IP address starts with \d
- f.queryDelay = 9999999999; // hack: disbale with long delay
+ f.queryDelay = 9999999999; // hack: disable with long delay
} else {
f.queryDelay = 10;
}
header: gettext('Type'),
dataIndex: 'type',
hideable: false,
- width: 60
+ width: 60,
});
}
header: gettext('Name'),
dataIndex: 'ref',
hideable: false,
- width: 140
+ width: 140,
},
{
- header: gettext('Comment'),
+ header: gettext('Comment'),
dataIndex: 'comment',
renderer: Ext.String.htmlEncode,
- flex: 1
- }
+ flex: 1,
+ },
);
Ext.apply(me, {
store: store,
- listConfig: { columns: columns }
+ listConfig: { columns: columns },
});
me.on('change', disable_query_for_ips);
me.callParent();
- }
+ },
});