summaryrefslogtreecommitdiffstats
path: root/install/ui/hbac.js
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2012-04-30 15:55:12 +0200
committerPetr Vobornik <pvoborni@redhat.com>2012-05-11 18:30:48 +0200
commit472f9fc5aad845afa335786599ba75603c006d31 (patch)
tree56709ff36de76571e4c6877fb044722bbef9ba39 /install/ui/hbac.js
parent719b09fb4edf990beb07ab72bcd4d5e102975637 (diff)
downloadfreeipa-472f9fc5aad845afa335786599ba75603c006d31.tar.gz
freeipa-472f9fc5aad845afa335786599ba75603c006d31.tar.xz
freeipa-472f9fc5aad845afa335786599ba75603c006d31.zip
Consistent change of entry status.
This patch adds action list and control buttons for consistent change of enty status for user, hbac rules, sudo rules, SELinux maps and dns zones. Action lists with 'enable' and 'disable' and 'delete' options were added to details facets. Two control buttons: 'enable' and 'disable' were added to search facets. https://fedorahosted.org/freeipa/ticket/2247
Diffstat (limited to 'install/ui/hbac.js')
-rw-r--r--install/ui/hbac.js61
1 files changed, 42 insertions, 19 deletions
diff --git a/install/ui/hbac.js b/install/ui/hbac.js
index 007654dca..a5bd008af 100644
--- a/install/ui/hbac.js
+++ b/install/ui/hbac.js
@@ -25,8 +25,7 @@
IPA.hbac = {
//priority of commands in details facet
- remove_method_priority: IPA.config.default_priority - 1,
- enable_priority: IPA.config.default_priority + 1
+ remove_method_priority: IPA.config.default_priority - 1
};
IPA.hbac.rule_entity = function(spec) {
@@ -47,12 +46,51 @@ IPA.hbac.rule_entity = function(spec) {
formatter: IPA.boolean_status_formatter()
},
'description'
- ]
+ ],
+ control_buttons: {
+ buttons: [
+ {
+ name: 'disable',
+ label: IPA.messages.buttons.disable,
+ icon: 'disabled-icon',
+ needs_confirm: true,
+ action: {
+ factory: IPA.batch_items_action,
+ method: 'disable',
+ enable_cond: ['item-selected']
+ }
+ },
+ {
+ name: 'enable',
+ label: IPA.messages.buttons.enable,
+ icon: 'enabled-icon',
+ needs_confirm: true,
+ action: {
+ factory: IPA.batch_items_action,
+ method: 'enable',
+ enable_cond: ['item-selected']
+ }
+ }
+ ]
+ }
}).
details_facet({
factory: IPA.hbacrule_details_facet,
entity: that,
- command_mode: 'info'
+ command_mode: 'info',
+ action_list: {
+ factory: IPA.action_list_widget,
+ name: 'action',
+ state_evaluator: {
+ factory: IPA.enable_state_evaluator,
+ field: 'ipaenabledflag'
+ },
+ actions: [
+ IPA.enable_action,
+ IPA.disable_action,
+ IPA.delete_action
+ ]
+ }
}).
adder_dialog({
fields: [ 'cn' ]
@@ -203,13 +241,6 @@ IPA.hbacrule_details_facet = function(spec) {
type: 'textarea',
name: 'description',
widget: 'general.description'
- },
- {
- type: 'enable',
- name: 'ipaenabledflag',
- label: IPA.messages.status.label,
- priority: IPA.hbac.enable_priority,
- widget: 'general.ipaenabledflag'
}
];
@@ -225,14 +256,6 @@ IPA.hbacrule_details_facet = function(spec) {
{
type: 'textarea',
name: 'description'
- },
- {
- type: 'enable',
- name: 'ipaenabledflag',
- options: [
- { value: 'TRUE', label: IPA.messages.status.enabled },
- { value: 'FALSE', label: IPA.messages.status.disabled }
- ]
}
]
}