diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2015-03-31 15:54:37 +0200 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2015-04-14 19:05:20 +0200 |
commit | efcd48ad01a39a67f131a2cea9d54771642222fb (patch) | |
tree | daa0f2f27a123b2eca10d22a0454ff65eb89f440 /install/ui/src/freeipa | |
parent | f7eeaa4ce04883d4d8ffbd3305050fabfcd6deb4 (diff) | |
download | freeipa-efcd48ad01a39a67f131a2cea9d54771642222fb.tar.gz freeipa-efcd48ad01a39a67f131a2cea9d54771642222fb.tar.xz freeipa-efcd48ad01a39a67f131a2cea9d54771642222fb.zip |
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>
Diffstat (limited to 'install/ui/src/freeipa')
-rw-r--r-- | install/ui/src/freeipa/widget.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/install/ui/src/freeipa/widget.js b/install/ui/src/freeipa/widget.js index 6767b520e..29d320c07 100644 --- a/install/ui/src/freeipa/widget.js +++ b/install/ui/src/freeipa/widget.js @@ -37,6 +37,7 @@ define(['dojo/_base/array', './entity', './ipa', './jquery', + './metadata', './navigation', './phases', './reg', @@ -45,8 +46,9 @@ define(['dojo/_base/array', './util', 'exports' ], - function(array, lang, construct, Evented, has, keys, on, string, topic, builder, config, - datetime, entity_mod, IPA, $, navigation, phases, reg, rpc, text, util, exp) { + function(array, lang, construct, Evented, has, keys, on, string, + topic, builder, config, datetime, entity_mod, IPA, $, + metadata, navigation, phases, reg, rpc, text, util, exp) { /** * Widget module @@ -4051,12 +4053,17 @@ IPA.entity_select_widget = function(spec) { that.filter_options = spec.filter_options || {}; that.create_search_command = function(filter) { - return rpc.command({ + var cmd = rpc.command({ entity: that.other_entity.name, method: 'find', args: [filter], 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) { |