summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--install/ui/aci.js11
-rw-r--r--install/ui/automount.js6
-rw-r--r--install/ui/dns.js3
-rw-r--r--install/ui/entitle.js5
-rw-r--r--install/ui/entity.js27
-rw-r--r--install/ui/test/data/ipa_init.json9
-rw-r--r--ipalib/plugins/internal.py9
7 files changed, 35 insertions, 35 deletions
diff --git a/install/ui/aci.js b/install/ui/aci.js
index 9c1188afb..112bff233 100644
--- a/install/ui/aci.js
+++ b/install/ui/aci.js
@@ -27,6 +27,7 @@ IPA.entity_factories.permission = function() {
return IPA.entity_builder().
entity('permission').
+ facet_groups([ 'privilege' , 'settings' ]).
search_facet({
columns:['cn']
}).
@@ -48,7 +49,10 @@ IPA.entity_factories.permission = function() {
factory:IPA.target_section,
label: IPA.messages.objects.permission.target
}]}).
- standard_association_facets().
+ association_facet({
+ name: 'member_privilege',
+ facet_group: 'privilege'
+ }).
adder_dialog({
width: 500,
height: 400,
@@ -73,6 +77,7 @@ IPA.entity_factories.permission = function() {
IPA.entity_factories.privilege = function() {
return IPA.entity_builder().
entity('privilege').
+ facet_groups([ 'role', 'settings', 'permission' ]).
search_facet({
columns:['cn','description']}).
details_facet({
@@ -84,12 +89,14 @@ IPA.entity_factories.privilege = function() {
}]}).
association_facet({
name: 'member_role',
+ facet_group: 'role',
add_method: 'add_privilege',
remove_method: 'remove_privilege',
associator: IPA.serial_associator
}).
association_facet({
name: 'memberof_permission',
+ facet_group: 'permission',
add_method: 'add_permission',
remove_method: 'remove_permission'
}).
@@ -105,6 +112,7 @@ IPA.entity_factories.privilege = function() {
IPA.entity_factories.role = function() {
return IPA.entity_builder().
entity('role').
+ facet_groups([ 'member', 'settings', 'privilege' ]).
search_facet({
columns:['cn','description']}).
details_facet({sections:[
@@ -114,6 +122,7 @@ IPA.entity_factories.role = function() {
fields:['cn','description']}]}).
association_facet({
name: 'memberof_privilege',
+ facet_group: 'privilege',
add_method: 'add_privilege',
remove_method: 'remove_privilege'
}).
diff --git a/install/ui/automount.js b/install/ui/automount.js
index 56c6c9cee..dc0ca4e67 100644
--- a/install/ui/automount.js
+++ b/install/ui/automount.js
@@ -29,12 +29,13 @@
IPA.entity_factories.automountlocation = function() {
return IPA.entity_builder().
entity({ name: 'automountlocation' }).
+ facet_groups([ 'automountmap', 'settings' ]).
search_facet({
title: IPA.metadata.objects.automountlocation.label,
columns:['cn']
}).
nested_search_facet({
- facet_group: 'member',
+ facet_group: 'automountmap',
nested_entity : 'automountmap',
label : IPA.metadata.objects.automountmap.label,
name: 'maps',
@@ -58,8 +59,9 @@ IPA.entity_factories.automountmap = function() {
return IPA.entity_builder().
entity({ name: 'automountmap' }).
containing_entity('automountlocation').
+ facet_groups([ 'automountkey', 'settings' ]).
nested_search_facet({
- facet_group: 'member',
+ facet_group: 'automountkey',
nested_entity : 'automountkey',
label : IPA.metadata.objects.automountkey.label,
name: 'keys',
diff --git a/install/ui/dns.js b/install/ui/dns.js
index 12c5ff69b..a5ebc2c4e 100644
--- a/install/ui/dns.js
+++ b/install/ui/dns.js
@@ -35,6 +35,7 @@ IPA.entity_factories.dnszone = function() {
return IPA.entity_builder().
entity('dnszone').
+ facet_groups([ 'dnsrecord', 'settings' ]).
search_facet({
title: IPA.metadata.objects.dnszone.label,
columns:['idnsname']
@@ -58,7 +59,7 @@ IPA.entity_factories.dnszone = function() {
'idnsupdatepolicy']}]
}).
nested_search_facet({
- facet_group: 'member',
+ facet_group: 'dnsrecord',
nested_entity : 'dnsrecord',
name: 'records',
title: IPA.metadata.objects.dnszone.label_singular,
diff --git a/install/ui/entitle.js b/install/ui/entitle.js
index 15fbf2358..2687f6f95 100644
--- a/install/ui/entitle.js
+++ b/install/ui/entitle.js
@@ -38,10 +38,7 @@ IPA.entity_factories.entitle = function() {
factory: IPA.entitle.entity,
name: 'entitle'
}).
- facet_groups([
- { name: 'account', label: IPA.messages.objects.entitle.account },
- { name: 'certificates', label: IPA.messages.objects.entitle.certificates }
- ]).
+ facet_groups([ 'account', 'certificates' ]).
details_facet({
factory: IPA.entitle.details_facet,
label: IPA.messages.objects.entitle.account,
diff --git a/install/ui/entity.js b/install/ui/entity.js
index 599cde65b..6317eebf5 100644
--- a/install/ui/entity.js
+++ b/install/ui/entity.js
@@ -265,8 +265,7 @@ IPA.facet_header = function(spec) {
}).appendTo(container);
$('<div/>', {
- 'class': 'facet-group-label',
- text: facet_group.label
+ 'class': 'facet-group-label'
}).appendTo(section);
var ul = $('<ul/>', {
@@ -336,7 +335,17 @@ IPA.facet_header = function(spec) {
var facet_groups = that.facet.entity.facet_groups.values;
for (var i=0; i<facet_groups.length; i++) {
var facet_group = facet_groups[i];
+
var span = $('.facet-group[name='+facet_group.name+']', that.facet_tabs);
+ if (!span.length) continue;
+
+ var label = facet_group.label;
+ if (label) {
+ label = label.replace('${primary_key}', that.facet.pkey);
+
+ var label_container = $('.facet-group-label', span);
+ label_container.text(label);
+ }
var facets = facet_group.facets.values;
for (var j=0; j<facets.length; j++) {
@@ -684,10 +693,8 @@ IPA.entity_builder = function(){
that.facet_groups([
'member',
- 'memberindirect',
'settings',
'memberof',
- 'memberofindirect',
'managedby'
]);
@@ -703,17 +710,7 @@ IPA.entity_builder = function(){
facet_group = IPA.facet_group({ name: spec });
}
- if (!facet_group.label) {
- var relationships = entity.metadata.relationships;
- if (relationships) {
- var relationship = relationships[facet_group.name];
- if (relationship) {
- facet_group.label = relationship[0];
- }
- }
- }
-
- if (!facet_group.label) {
+ if (facet_group.label == undefined) {
facet_group.label = IPA.messages.facet_groups[facet_group.name];
}
diff --git a/install/ui/test/data/ipa_init.json b/install/ui/test/data/ipa_init.json
index 5c0fb8fc8..659ddfc61 100644
--- a/install/ui/test/data/ipa_init.json
+++ b/install/ui/test/data/ipa_init.json
@@ -15889,12 +15889,9 @@
"remove_title": "Remove ${entity}"
},
"facet_groups": {
- "managedby": "Managed by",
- "member": "Member",
- "memberindirect": "Indirect Member",
- "memberof": "Member Of",
- "memberofindirect": "Indirect Member Of",
- "settings": "Settings"
+ "managedby": "${primary_key} is managed by:",
+ "member": "Entities enrolled in ${primary_key}:",
+ "memberof": "${primary_key} is a member of these:"
},
"facets": {
"details": "Settings",
diff --git a/ipalib/plugins/internal.py b/ipalib/plugins/internal.py
index 798d98da8..0c16841b9 100644
--- a/ipalib/plugins/internal.py
+++ b/ipalib/plugins/internal.py
@@ -360,12 +360,9 @@ class i18n_messages(Command):
"prospective":_("Prospective"),
},
"facet_groups": {
- "managedby":_("Managed by"),
- "member":_("Member"),
- "memberindirect":_("Indirect Member"),
- "memberof":_("Member Of"),
- "memberofindirect":_("Indirect Member Of"),
- "settings": _("Settings"),
+ "managedby":_("${primary_key} is managed by:"),
+ "member":_("Entities enrolled in ${primary_key}:"),
+ "memberof":_("${primary_key} is a member of these:"),
},
"facets": {
"search":_("Search"),