From 51cd0c916b7f97a249abe17a2987b5ec849bf723 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Thu, 28 Jul 2011 17:23:41 -0500 Subject: Added association facets for HBAC and sudo. The HBAC service, HBAC service group, sudo command and sudo command group have been modified to show the associations as facets. Ticket #1536 --- install/ui/hbac.js | 58 ++++++++++++++++++++++----- install/ui/sudo.js | 116 ++++++++++++++++++++++------------------------------- 2 files changed, 94 insertions(+), 80 deletions(-) (limited to 'install') diff --git a/install/ui/hbac.js b/install/ui/hbac.js index 2cdb710ab..4e25123e4 100644 --- a/install/ui/hbac.js +++ b/install/ui/hbac.js @@ -63,6 +63,30 @@ IPA.entity_factories.hbacsvc = function() { name: 'general', label: IPA.messages.details.general, fields:[ 'cn', 'description']}]}). + association_facet({ + name: 'memberof_hbacsvcgroup', + associator: IPA.serial_associator, + columns:[ + { + name: 'cn', + primary_key: true, + link: true + }, + { name: 'description' } + ], + adder_columns: [ + { + name: 'cn', + primary_key: true, + width: '100px' + }, + { + name: 'description', + width: '100px' + } + ] + }). + standard_association_facets(). adder_dialog({ fields:['cn','description'] }). @@ -80,18 +104,30 @@ IPA.entity_factories.hbacsvcgroup = function() { name: 'general', label: IPA.messages.details.general, fields:['cn','description'] - }, - { - name: 'services', - label: IPA.messages.objects.hbacsvcgroup.services, - fields:[{ - factory: IPA.hbacsvcgroup_member_hbacsvc_table_widget, - name: 'member_hbacsvc', - label: IPA.messages.objects.hbacsvcgroup.services, - other_entity: 'hbacsvc', - save_values: false - }] }]}). + association_facet({ + name: 'member_hbacsvc', + columns:[ + { + name: 'cn', + primary_key: true, + link: true + }, + { name: 'description' } + ], + adder_columns: [ + { + name: 'cn', + primary_key: true, + width: '100px' + }, + { + name: 'description', + width: '100px' + } + ] + }). + standard_association_facets(). adder_dialog({ fields:['cn', 'description'] }). diff --git a/install/ui/sudo.js b/install/ui/sudo.js index d725f214c..d8d633142 100644 --- a/install/ui/sudo.js +++ b/install/ui/sudo.js @@ -50,42 +50,31 @@ IPA.entity_factories.sudocmd = function() { name: 'general', label: IPA.messages.details.general, fields:['sudocmd','description'] - }, - { - name: 'groups', - label: IPA.messages.objects.sudocmd.groups, - factory: IPA.details_section, - fields:[{ - factory: IPA.sudocmd_member_sudocmdgroup_table_widget, - name: 'memberof_sudocmdgroup', - label: '',//IPA.messages.objects.sudocmd.groups, - other_entity: 'sudocmdgroup', - save_values: false, - columns:[ - { - name: 'cn', - primary_key: true, - width: '150px', - link: true - }, - { - name: 'description', - width: '150px' - } - ], - adder_columns:[ - { - name: 'cn', - primary_key: true, - width: '100px' - }, - { - name: 'description', - width: '100px' - } - ] - }] }]}). + association_facet({ + name: 'memberof_sudocmdgroup', + associator: IPA.serial_associator, + columns:[ + { + name: 'cn', + primary_key: true, + link: true + }, + { name: 'description' } + ], + adder_columns:[ + { + name: 'cn', + primary_key: true, + width: '100px' + }, + { + name: 'description', + width: '100px' + } + ] + }). + standard_association_facets(). adder_dialog({ fields:['sudocmd','description'] }). @@ -105,41 +94,30 @@ IPA.entity_factories.sudocmdgroup = function() { name: 'general', label: IPA.messages.details.general, fields:['cn','description'] - }, - { - name: 'commands', - factory: IPA.details_section, - fields: [{ - factory: IPA.association_table_widget, - name: 'member_sudocmd', - label: IPA.messages.objects.sudocmdgroup.commands, - other_entity: 'sudocmd', - save_values: false, - columns:[ - { - name: 'sudocmd', - primary_key: true, - width: '150px', - link: true - }, - { - name: 'description', - width: '150px' - } - ], - adder_columns: [ - { - name: 'sudocmd', - primary_key: true, - width: '100px' - }, - { - name: 'description', - width: '100px' - } - ] - }] }]}). + association_facet({ + name: 'member_sudocmd', + columns:[ + { + name: 'sudocmd', + primary_key: true, + link: true + }, + { name: 'description' } + ], + adder_columns: [ + { + name: 'sudocmd', + primary_key: true, + width: '100px' + }, + { + name: 'description', + width: '100px' + } + ] + }). + standard_association_facets(). adder_dialog({ fields:['cn','description'] }). -- cgit