summaryrefslogtreecommitdiffstats
path: root/install/ui/details.js
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-06-23 11:44:44 -0500
committerAdam Young <ayoung@redhat.com>2011-06-24 12:05:51 -0400
commit1717d638fc69d38ac5ed848847c7b01601c910dc (patch)
tree815e337b558d1cfe8723ad521780f1268016ea57 /install/ui/details.js
parent8a32bb3746802a29b2655e4ad2cbbba8481e1eaf (diff)
downloadfreeipa-1717d638fc69d38ac5ed848847c7b01601c910dc.tar.gz
freeipa-1717d638fc69d38ac5ed848847c7b01601c910dc.tar.xz
freeipa-1717d638fc69d38ac5ed848847c7b01601c910dc.zip
Added record count into association facet tabs.
The details and association facets have been modified to show the number of records in each association in the corresponding facet tab. Ticket #1386
Diffstat (limited to 'install/ui/details.js')
-rw-r--r--install/ui/details.js36
1 files changed, 16 insertions, 20 deletions
diff --git a/install/ui/details.js b/install/ui/details.js
index 2db80fbaa..3b73e5b49 100644
--- a/install/ui/details.js
+++ b/install/ui/details.js
@@ -321,14 +321,14 @@ IPA.details_facet = function(spec) {
var pkey = IPA.get_entity(that.entity_name).get_primary_key_prefix();
- if (from_url){
+ if (from_url) {
pkey.push(that.pkey);
- }else{
+ } else {
var pkey_name = IPA.metadata.objects[that.entity_name].primary_key;
- var pkey_val = that.record[pkey_name];
- if (pkey_val instanceof Array){
- pkey.push( pkey_val[0]);
- }else{
+ var pkey_val = that.data[pkey_name];
+ if (pkey_val instanceof Array) {
+ pkey.push(pkey_val[0]);
+ } else {
pkey.push(pkey_val);
}
}
@@ -528,12 +528,13 @@ IPA.details_facet = function(spec) {
return false;
};
- that.load = function(record) {
- that.record = record;
+ that.load = function(data) {
+ that.facet_load(data);
+
var sections = that.sections.values;
for (var i=0; i<sections.length; i++) {
var section = sections[i];
- section.load(record);
+ section.load(data);
}
};
@@ -640,20 +641,15 @@ IPA.details_facet = function(spec) {
options: { all: true, rights: true }
});
- if (IPA.details_refresh_devel_hook){
- IPA.details_refresh_devel_hook(that.entity_name,command,that.pkey);
+ if (IPA.details_refresh_devel_hook) {
+ IPA.details_refresh_devel_hook(that.entity_name, command, that.pkey);
}
- if (that.pkey){
+ if (that.pkey) {
command.args = that.get_primary_key(true);
- }else if (that.entity.redirect_facet) {
- var current_entity = that.entity;
- while (current_entity.containing_entity){
- current_entity = current_entity.containing_entity;
- }
- IPA.nav.show_page(
- current_entity.name,
- that.entity.redirect_facet);
+
+ } else if (that.entity.redirect_facet) {
+ that.redirect();
return;
}