summaryrefslogtreecommitdiffstats
path: root/install/ui/src/freeipa/entity.js
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2013-07-18 16:17:40 +0200
committerMartin Kosek <mkosek@redhat.com>2013-07-23 13:14:02 +0200
commit881290b0109aa1f52a34d31505b9ebf73b991a00 (patch)
tree24d9eb886a3f2d80311b913c06456d6c34a24cd0 /install/ui/src/freeipa/entity.js
parentb7f10d9fe677e16bf669c8af2aeee2c0af86f14d (diff)
downloadfreeipa-881290b0109aa1f52a34d31505b9ebf73b991a00.tar.gz
freeipa-881290b0109aa1f52a34d31505b9ebf73b991a00.tar.xz
freeipa-881290b0109aa1f52a34d31505b9ebf73b991a00.zip
Web UI search optimization
This patch optimizes options used in commands executed by search pages. 1) Removed --all from _find and _show commands used by search pages. All displayed attributes should be already included in default attributes. 2) Removed search_all_attributes - Not needed since introduction of paging. 3) Added --no-members options to search _show commmands. Members are not displayed on search pages and such change drastically improves performance. It reduces computations on server and amount of data transferred to Web UI. https://fedorahosted.org/freeipa/ticket/3706
Diffstat (limited to 'install/ui/src/freeipa/entity.js')
-rw-r--r--install/ui/src/freeipa/entity.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/install/ui/src/freeipa/entity.js b/install/ui/src/freeipa/entity.js
index 22efd47af..eef58d1a4 100644
--- a/install/ui/src/freeipa/entity.js
+++ b/install/ui/src/freeipa/entity.js
@@ -217,6 +217,20 @@ exp.entity = IPA.entity = function(spec) {
return that;
};
+ that.has_members = function() {
+ var members = that.metadata.attribute_members;
+ var has = false;
+ if (members) {
+ for (var member in members) {
+ if (members.hasOwnProperty(member)) {
+ has = true;
+ break;
+ }
+ }
+ }
+ return has;
+ };
+
that.builder = spec.builder || IPA.entity_builder(that);
that.entity_init = that.init;