mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
webui: use no_members option in entity select search
Obtaining member information for entity selects is not needed and it causes unwanted performance hit, especially with larger groups. This patch removes it. https://fedorahosted.org/freeipa/ticket/4948 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
This commit is contained in:
@@ -37,6 +37,7 @@ define(['dojo/_base/array',
|
|||||||
'./entity',
|
'./entity',
|
||||||
'./ipa',
|
'./ipa',
|
||||||
'./jquery',
|
'./jquery',
|
||||||
|
'./metadata',
|
||||||
'./navigation',
|
'./navigation',
|
||||||
'./phases',
|
'./phases',
|
||||||
'./reg',
|
'./reg',
|
||||||
@@ -45,8 +46,9 @@ define(['dojo/_base/array',
|
|||||||
'./util',
|
'./util',
|
||||||
'exports'
|
'exports'
|
||||||
],
|
],
|
||||||
function(array, lang, construct, Evented, has, keys, on, string, topic, builder, config,
|
function(array, lang, construct, Evented, has, keys, on, string,
|
||||||
datetime, entity_mod, IPA, $, navigation, phases, reg, rpc, text, util, exp) {
|
topic, builder, config, datetime, entity_mod, IPA, $,
|
||||||
|
metadata, navigation, phases, reg, rpc, text, util, exp) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Widget module
|
* Widget module
|
||||||
@@ -4051,12 +4053,17 @@ IPA.entity_select_widget = function(spec) {
|
|||||||
that.filter_options = spec.filter_options || {};
|
that.filter_options = spec.filter_options || {};
|
||||||
|
|
||||||
that.create_search_command = function(filter) {
|
that.create_search_command = function(filter) {
|
||||||
return rpc.command({
|
var cmd = rpc.command({
|
||||||
entity: that.other_entity.name,
|
entity: that.other_entity.name,
|
||||||
method: 'find',
|
method: 'find',
|
||||||
args: [filter],
|
args: [filter],
|
||||||
options: that.filter_options
|
options: that.filter_options
|
||||||
});
|
});
|
||||||
|
var no_members = metadata.get('@mc-opt:' + cmd.get_command() + ':no_members');
|
||||||
|
if (no_members) {
|
||||||
|
cmd.set_option('no_members', true);
|
||||||
|
}
|
||||||
|
return cmd;
|
||||||
};
|
};
|
||||||
|
|
||||||
that.search = function(filter, on_success, on_error) {
|
that.search = function(filter, on_success, on_error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user