mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-05-03 06:33:55 +00:00

findRecord does not match exactly, but only at the beginning and case insensitive, by default. Change all calls to be case sensitive and an exactmatch (we never want the default behaviour afaics). Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
44 lines
903 B
JavaScript
44 lines
903 B
JavaScript
Ext.define('pve-acme-challenges', {
|
|
extend: 'Ext.data.Model',
|
|
fields: ['id', 'type', 'schema'],
|
|
proxy: {
|
|
type: 'proxmox',
|
|
url: "/api2/json/cluster/acme/challenge-schema",
|
|
},
|
|
idProperty: 'id',
|
|
});
|
|
|
|
Ext.define('PVE.form.ACMEApiSelector', {
|
|
extend: 'Ext.form.field.ComboBox',
|
|
alias: 'widget.pveACMEApiSelector',
|
|
|
|
fieldLabel: gettext('DNS API'),
|
|
displayField: 'name',
|
|
valueField: 'id',
|
|
|
|
store: {
|
|
model: 'pve-acme-challenges',
|
|
autoLoad: true,
|
|
},
|
|
|
|
triggerAction: 'all',
|
|
queryMode: 'local',
|
|
allowBlank: false,
|
|
editable: true,
|
|
forceSelection: true,
|
|
anyMatch: true,
|
|
selectOnFocus: true,
|
|
|
|
getSchema: function() {
|
|
let me = this;
|
|
let val = me.getValue();
|
|
if (val) {
|
|
let record = me.getStore().findRecord('id', val, 0, false, true, true);
|
|
if (record) {
|
|
return record.data.schema;
|
|
}
|
|
}
|
|
return {};
|
|
},
|
|
});
|