summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2012-04-04 16:33:48 +0200
committerPetr Vobornik <pvoborni@redhat.com>2012-05-11 18:30:48 +0200
commit8c3eadf978dc14c4e22da5c32e51d407b9770a28 (patch)
treeb31e2bbba7503d0cf96e23643abc610619f7ea0b /ipalib/plugins
parent12401fe4da9620ce7dae3339f9928f9d2a770fbd (diff)
downloadfreeipa-8c3eadf978dc14c4e22da5c32e51d407b9770a28.tar.gz
freeipa-8c3eadf978dc14c4e22da5c32e51d407b9770a28.tar.xz
freeipa-8c3eadf978dc14c4e22da5c32e51d407b9770a28.zip
Action lists
This patch add support fo Action Lists. Action list is a select widget with actions as options located in facet header. Action can be selected and then executed by clickin on 'apply' button. Actions lists are defined on facet level. Facet header takes them from facet. Action list options actions: list of actions state_evaluator: a state evaluator which is needed for enabling/disabling options. Can encapsulate more evaluators. State evaluator object ---------------------- State evaluator is resposible for evaluating a state from result set. State is a array of strings. Each evaluator should inherit from IPA.state_evaluator and override evaluate method. Methods: evaluate(record): should return string array which represents the state get_description(): human readable representation of a state Action ------ Action is a object which can perform certain action on a facet. Action has enabling and disabling conditions. action options: name: string, required, name of the option label: string, required, human readable name of the option enable_cond: string array, states which need to be present in order to run this action disable_cond: string array, states which must not be present in order to run this action handler: function, contains action's logic needs_confirm: boolean, default false, indicates if action needs user confirmation confirm_msg: string, default generic message, human readable confirmation message. Action list should contain logic which enables/disables action based on facet state and action's enabling/disabling conditions. It should also enforce presence of confirmation. In this patch is also slightly modified facet header, mostly title part. It was revised to contain status icon, title and action list on single line. Facet header is using state evaluator's get_description method to properly set tooltip for state icon. https://fedorahosted.org/freeipa/ticket/2247
Diffstat (limited to 'ipalib/plugins')
-rw-r--r--ipalib/plugins/internal.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/ipalib/plugins/internal.py b/ipalib/plugins/internal.py
index 66507c887..e7fb6651b 100644
--- a/ipalib/plugins/internal.py
+++ b/ipalib/plugins/internal.py
@@ -148,6 +148,12 @@ class i18n_messages(Command):
"title": _("Kerberos ticket no longer valid."),
},
},
+ "actions": {
+ "confirm": _("Are you sure you want to proceed with the action."),
+ "delete_confirm": _("Are you sure you want to delete ${object}"),
+ "disable_confirm": _("Are you sure you want to disable ${object}"),
+ "enable_confirm": _("Are you sure you want to enable ${object}"),
+ },
"association": {
"add": {
"ipasudorunas": _("Add RunAs ${other_entity} into ${entity} ${primary_key}"),