summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-08-03 17:15:05 -0500
committerAdam Young <ayoung@redhat.com>2011-08-04 11:46:41 -0400
commit966fbd6485f3e2a1bc7fa4c3f96fcb435daa553d (patch)
tree6abce3a311ff75c6a73202045f98c5c717a5944e
parent8495af1a50faca496fe2ce425b9b3a7f21ba1ea6 (diff)
downloadfreeipa-966fbd6485f3e2a1bc7fa4c3f96fcb435daa553d.tar.gz
freeipa-966fbd6485f3e2a1bc7fa4c3f96fcb435daa553d.tar.xz
freeipa-966fbd6485f3e2a1bc7fa4c3f96fcb435daa553d.zip
Linked entries in HBAC/sudo details page.
The association tables in HBAC/sudo details page have been modified to link the entries to the appropriate details page. Ticket #1535
-rw-r--r--install/ui/association.js3
-rw-r--r--install/ui/hbac.js24
-rw-r--r--install/ui/rule.js5
-rw-r--r--install/ui/sudo.js16
4 files changed, 14 insertions, 34 deletions
diff --git a/install/ui/association.js b/install/ui/association.js
index 3c924549f..2c6a1d200 100644
--- a/install/ui/association.js
+++ b/install/ui/association.js
@@ -320,7 +320,8 @@ IPA.association_table_widget = function (spec) {
name: that.name,
label: IPA.metadata.objects[that.other_entity].label,
entity_name: that.other_entity,
- primary_key: true
+ primary_key: true,
+ link: true
});
}
diff --git a/install/ui/hbac.js b/install/ui/hbac.js
index 4e25123e4..0e775aa0b 100644
--- a/install/ui/hbac.js
+++ b/install/ui/hbac.js
@@ -203,14 +203,10 @@ IPA.hbacrule_details_facet = function(spec) {
function user_category_section(){
- var param_info = IPA.get_entity_param('hbacrule', 'usercategory');
-
var section = IPA.rule_details_section({
name: 'user',
- entity:that.entity,
-
+ entity: that.entity,
label: IPA.messages.objects.hbacrule.user,
- text: param_info.doc+':',
field_name: 'usercategory',
options: [
{ value: 'all', label: IPA.messages.objects.hbacrule.anyone },
@@ -242,13 +238,10 @@ IPA.hbacrule_details_facet = function(spec) {
}
function hostcategory_section(){
- var param_info = IPA.get_entity_param('hbacrule', 'hostcategory');
-
var section = IPA.rule_details_section({
name: 'host',
label: IPA.messages.objects.hbacrule.host,
- entity:that.entity,
- text: param_info.doc+':',
+ entity: that.entity,
field_name: 'hostcategory',
options: [
{ value: 'all', label: IPA.messages.objects.hbacrule.any_host },
@@ -280,13 +273,10 @@ IPA.hbacrule_details_facet = function(spec) {
}
function servicecategory_section(){
- var param_info = IPA.get_entity_param('hbacrule', 'servicecategory');
-
var section = IPA.rule_details_section({
name: 'service',
- entity:that.entity,
+ entity: that.entity,
label: IPA.messages.objects.hbacrule.service,
- text: param_info.doc+':',
field_name: 'servicecategory',
options: [
{ value: 'all',
@@ -294,7 +284,7 @@ IPA.hbacrule_details_facet = function(spec) {
{ value: '',
label: IPA.messages.objects.hbacrule.specified_services }
],
- 'tables': [
+ tables: [
{ field_name: 'memberservice_hbacsvc' },
{ field_name: 'memberservice_hbacsvcgroup' }
]
@@ -319,14 +309,10 @@ IPA.hbacrule_details_facet = function(spec) {
}
function sourcehostcategory_section(){
-
- var param_info = IPA.get_entity_param('hbacrule', 'sourcehostcategory');
-
var section = IPA.rule_details_section({
name: 'sourcehost',
- entity:that.entity,
+ entity: that.entity,
label: IPA.messages.objects.hbacrule.sourcehost,
- text: param_info.doc+':',
field_name: 'sourcehostcategory',
options: [
{ value: 'all', label: IPA.messages.objects.hbacrule.any_host },
diff --git a/install/ui/rule.js b/install/ui/rule.js
index 3398f245d..44f037f16 100644
--- a/install/ui/rule.js
+++ b/install/ui/rule.js
@@ -28,7 +28,6 @@ IPA.rule_details_section = function(spec) {
var that = IPA.details_section(spec);
- that.text = spec.text;
that.field_name = spec.field_name;
that.options = spec.options || [];
that.tables = spec.tables || [];
@@ -38,11 +37,11 @@ IPA.rule_details_section = function(spec) {
that.container = container;
- if (that.text) container.append(that.text);
-
var field = that.get_field(that.field_name);
var param_info = IPA.get_entity_param(that.entity.name, that.field_name);
+ container.append(param_info.doc+':');
+
var span = $('<span/>', {
name: that.field_name,
title: param_info.doc,
diff --git a/install/ui/sudo.js b/install/ui/sudo.js
index d8d633142..280bec474 100644
--- a/install/ui/sudo.js
+++ b/install/ui/sudo.js
@@ -272,12 +272,9 @@ IPA.sudorule_details_facet = function(spec) {
function user_section(){
- var param_info = IPA.get_entity_param('sudorule', 'usercategory');
-
var section = IPA.rule_details_section({
name: 'user',
label: IPA.messages.objects.sudorule.user,
- text: param_info.doc+':',
field_name: 'usercategory',
entity: that.entity,
options: [
@@ -317,19 +314,16 @@ IPA.sudorule_details_facet = function(spec) {
}
function host_section(){
- var param_info = IPA.get_entity_param('sudorule', 'hostcategory');
-
var section = IPA.rule_details_section({
- 'name': 'host',
+ name: 'host',
entity: that.entity,
- 'label': IPA.messages.objects.sudorule.host,
- text: param_info.doc+':',
- 'field_name': 'hostcategory',
- 'options': [
+ label: IPA.messages.objects.sudorule.host,
+ field_name: 'hostcategory',
+ options: [
{ 'value': 'all', 'label': IPA.messages.objects.sudorule.any_host },
{ 'value': '', 'label': IPA.messages.objects.sudorule.specified_hosts }
],
- 'tables': [
+ tables: [
{ 'field_name': 'memberhost_host' },
{ 'field_name': 'memberhost_hostgroup' }
]