diff options
Diffstat (limited to 'install/ui/src/freeipa')
-rwxr-xr-x | install/ui/src/freeipa/certificate.js | 7 | ||||
-rw-r--r-- | install/ui/src/freeipa/details.js | 25 | ||||
-rw-r--r-- | install/ui/src/freeipa/dns.js | 4 | ||||
-rw-r--r-- | install/ui/src/freeipa/facet.js | 52 | ||||
-rw-r--r-- | install/ui/src/freeipa/group.js | 27 | ||||
-rw-r--r-- | install/ui/src/freeipa/host.js | 8 | ||||
-rw-r--r-- | install/ui/src/freeipa/search.js | 26 | ||||
-rw-r--r-- | install/ui/src/freeipa/service.js | 2 | ||||
-rw-r--r-- | install/ui/src/freeipa/user.js | 21 |
9 files changed, 135 insertions, 37 deletions
diff --git a/install/ui/src/freeipa/certificate.js b/install/ui/src/freeipa/certificate.js index 6965509f6..712d82c91 100755 --- a/install/ui/src/freeipa/certificate.js +++ b/install/ui/src/freeipa/certificate.js @@ -1312,12 +1312,19 @@ IPA.register('cert', IPA.cert.entity); phases.on('registration', function() { var w = reg.widget; var f = reg.field; + var a = reg.action; w.register('certificate_status', IPA.cert.status_widget); f.register('certificate_status', IPA.cert.status_field); f.register('revocation_reason', IPA.revocation_reason_field); w.register('revocation_reason', IPA.text_widget); + + a.register('cert_view', IPA.cert.view_action); + a.register('cert_get', IPA.cert.get_action); + a.register('cert_request', IPA.cert.request_action); + a.register('cert_revoke', IPA.cert.revoke_action); + a.register('cert_restore', IPA.cert.restore_action); }); return {}; diff --git a/install/ui/src/freeipa/details.js b/install/ui/src/freeipa/details.js index 69c85d54e..7a7f49e4f 100644 --- a/install/ui/src/freeipa/details.js +++ b/install/ui/src/freeipa/details.js @@ -23,7 +23,15 @@ /* IPA Object Details - populating definiton lists from entry data */ -define(['./ipa', './jquery', './text', './facet', './add'], function(IPA, $, text) { +define([ + './ipa', + './jquery', + './phases', + './reg', + './text', + './facet', + './add'], + function(IPA, $, phases, reg, text) { var exp = {}; @@ -1200,5 +1208,20 @@ exp.disabled_summary_cond = IPA.disabled_summary_cond = function() { }; }; +exp.register = function() { + var a = reg.action; + + a.register('select', exp.select_action); + a.register('refresh', exp.refresh_action); + a.register('reset', exp.reset_action); + a.register('update', exp.update_action); + a.register('object', exp.object_action); + a.register('enable', exp.enable_action); + a.register('disable', exp.disable_action); + a.register('delete', exp.delete_action); +}; + +phases.on('registration', exp.register); + return exp; });
\ No newline at end of file diff --git a/install/ui/src/freeipa/dns.js b/install/ui/src/freeipa/dns.js index bccb52134..265251ad0 100644 --- a/install/ui/src/freeipa/dns.js +++ b/install/ui/src/freeipa/dns.js @@ -2536,6 +2536,7 @@ phases.on('registration', function() { var w = reg.widget; var f = reg.field; var v = reg.validator; + var a = reg.action; w.register('dnszone_name', IPA.dnszone_name_widget); w.register('force_dnszone_add_checkbox', IPA.force_dnszone_add_checkbox_widget); @@ -2554,6 +2555,9 @@ phases.on('registration', function() { v.register('ip_v6_address', IPA.ip_v6_address_validator); v.register('dnsforwarder', IPA.dnsforwarder_validator); v.register('network', IPA.network_validator); + + a.register('dns_add_permission', IPA.dns.add_permission_action); + a.register('dns_remove_permission', IPA.dns.remove_permission_action); }); return {}; diff --git a/install/ui/src/freeipa/facet.js b/install/ui/src/freeipa/facet.js index 899eca53f..06aa4a838 100644 --- a/install/ui/src/freeipa/facet.js +++ b/install/ui/src/freeipa/facet.js @@ -28,19 +28,20 @@ define([ 'dojo/on', 'dojo/Stateful', 'dojo/Evented', - './_base/Builder', + './builder', './facets', './ipa', './jquery', './navigation', './phases', + './reg', './spec_util', './text', './dialog', './field', './widget' ], function(declare, lang, construct, on, Stateful, Evented, - Builder, facets, IPA, $, navigation, phases, su, text) { + builder, facets, IPA, $, navigation, phases, reg, su, text) { /** * Facet represents the content of currently displayed page. @@ -121,8 +122,8 @@ exp.facet = IPA.facet = function(spec, no_init) { that.disable_breadcrumb = spec.disable_breadcrumb; that.disable_facet_tabs = spec.disable_facet_tabs; - that.action_state = IPA.build(spec.state || {}, {}, { $factory: exp.state }); - that.actions = exp.action_holder_builder.build({ actions: spec.actions }); + that.action_state = builder.build('', spec.state || {}, {}, { $factory: exp.state }); + that.actions = builder.build('', { actions: spec.actions }, {}, { $factory: exp.action_holder } ); that.header_actions = spec.header_actions; that.header = spec.header || IPA.facet_header({ facet: that }); @@ -1728,7 +1729,7 @@ exp.action_holder = IPA.action_holder = function(spec) { var i, action, actions; that.facet = facet; - actions = exp.action_builder.build(spec.actions) || []; + actions = builder.build('action', spec.actions) || []; for (i=0; i<actions.length; i++) { action = actions[i]; @@ -1783,8 +1784,8 @@ exp.state = IPA.state = function(spec) { //when state changes. Params: state, Context: this that.changed = IPA.observer(); - that.evaluators = exp.state_evaluator_builder.build(spec.evaluators) || []; - that.summary_evaluator = IPA.build(spec.summary_evaluator || IPA.summary_evaluator); + that.evaluators = builder.build('state_evaluator', spec.evaluators) || []; + that.summary_evaluator = builder.build('', spec.summary_evaluator || IPA.summary_evaluator); that.summary_conditions = spec.summary_conditions || []; @@ -2126,7 +2127,8 @@ exp.control_buttons_widget = IPA.control_buttons_widget = function(spec) { var that = IPA.widget(spec); - that.buttons = IPA.action_button_widget_builder.build(spec.buttons) || []; + that.buttons = builder.build('widget', spec.buttons, {}, + { $factory: exp.action_button_widget} ) || []; that.init = function(facet) { @@ -2180,7 +2182,6 @@ exp.eval_cond = IPA.eval_cond = function(enable_cond, disable_cond, state) { return true; }; - exp.action_list_widget = IPA.action_list_widget = function(spec) { spec = spec || {}; @@ -2379,7 +2380,7 @@ var FacetState = exp.FacetState = declare([Stateful, Evented], { return this; }, - /* + /** * Set a property * * Sets named properties on a stateful object and notifies any watchers of @@ -2422,25 +2423,26 @@ var FacetState = exp.FacetState = declare([Stateful, Evented], { } }); -exp.action_builder = IPA.action_builder = new Builder({ - factory: exp.action -}); -exp.action_holder_builder = new Builder({ - factory: exp.action_holder -}); +// Action builder and registry +exp.action_builder = builder.get('action'); +exp.action_builder.factory = exp.action; +reg.set('action', exp.action_builder.registry); -exp.state_builder = IPA.state_builder = new Builder({ - factory: exp.state -}); +// State Evaluator builder and registry +exp.state_evaluator_builder = builder.get('state_evaluator'); +exp.state_evaluator.factory = exp.action; +reg.set('state_evaluator', exp.state_evaluator.registry); -exp.state_evaluator_builder = IPA.state_evaluator_builder = new Builder({ - factory: exp.state -}); +exp.register = function() { + var w = reg.widget; -exp.action_button_widget_builder = IPA.action_button_widget_builder = new Builder({ - factory: exp.action_button_widget -}); + w.register('action_button', exp.action_button_widget); + w.register('control_buttons', exp.control_buttons_widget); + w.register('action_list', exp.action_list_widget); +}; + +phases.on('registration', exp.register); return exp; }); diff --git a/install/ui/src/freeipa/group.js b/install/ui/src/freeipa/group.js index b04c32d87..34aa02f33 100644 --- a/install/ui/src/freeipa/group.js +++ b/install/ui/src/freeipa/group.js @@ -20,10 +20,18 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -define(['./ipa', './jquery', './details', './search', './association', - './entity'], function(IPA, $) { - -IPA.group = {}; +define([ + './ipa', + './jquery', + './phases', + './reg', + './details', + './search', + './association', + './entity'], + function(IPA, $, phases, reg) { + +var exp = IPA.group = {}; IPA.group.entity = function(spec) { @@ -256,5 +264,14 @@ IPA.group.make_external_action = function(spec) { IPA.register('group', IPA.group.entity); -return {}; +exp.register = function() { + var a = reg.action; + + a.register('make_posix', exp.make_posix_action); + a.register('make_external', exp.make_external_action); +}; + +phases.on('registration', exp.register); + +return exp; });
\ No newline at end of file diff --git a/install/ui/src/freeipa/host.js b/install/ui/src/freeipa/host.js index 220cbcee5..9d0215590 100644 --- a/install/ui/src/freeipa/host.js +++ b/install/ui/src/freeipa/host.js @@ -31,7 +31,7 @@ define(['./ipa', './certificate'], function(IPA, $, phases, reg, text) { -IPA.host = {}; +var exp = IPA.host = {}; IPA.host.entity = function(spec) { @@ -965,6 +965,7 @@ IPA.register('host', IPA.host.entity); phases.on('registration', function() { var w = reg.widget; var f = reg.field; + var a = reg.action; f.register('host_fqdn', IPA.host_fqdn_field); w.register('host_fqdn', IPA.host_fqdn_widget); @@ -976,8 +977,11 @@ phases.on('registration', function() { w.register('force_host_add_checkbox', IPA.force_host_add_checkbox_widget); f.register('host_password', IPA.field); w.register('host_password', IPA.host_password_widget); + + a.register('host_unprovision', exp.unprovision_action); + a.register('set_otp', exp.set_otp_action); }); -return {}; +return exp; }); diff --git a/install/ui/src/freeipa/search.js b/install/ui/src/freeipa/search.js index d71b01273..fafbc3b21 100644 --- a/install/ui/src/freeipa/search.js +++ b/install/ui/src/freeipa/search.js @@ -21,7 +21,16 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -define(['./ipa', './jquery', './text', './facet'], function(IPA, $, text) { +define([ + './ipa', + './jquery', + './phases', + './reg', + './text', + './facet'], + function(IPA, $, phases, reg, text) { + +var exp = {}; IPA.search_facet = function(spec, no_init) { @@ -502,5 +511,18 @@ IPA.batch_enable_action = function(spec) { return IPA.batch_items_action(spec); }; -return {}; +exp.register = function() { + + var a = reg.action; + + a.register('batch_remove', IPA.batch_remove_action); + a.register('add', IPA.add_action); + a.register('batch_items', IPA.batch_items_action); + a.register('batch_disable', IPA.batch_disable_action); + a.register('batch_enable', IPA.batch_enable_action); +}; + +phases.on('registration', exp.register); + +return exp; }); diff --git a/install/ui/src/freeipa/service.js b/install/ui/src/freeipa/service.js index f5e942d64..f51b85532 100644 --- a/install/ui/src/freeipa/service.js +++ b/install/ui/src/freeipa/service.js @@ -512,6 +512,7 @@ IPA.register('service', IPA.service.entity); phases.on('registration', function() { var w = reg.widget; var f = reg.field; + var a = reg.action; f.register('service_name', IPA.service_name_field); w.register('service_name', IPA.text_widget); @@ -519,6 +520,7 @@ phases.on('registration', function() { w.register('service_host', IPA.text_widget); f.register('service_provisioning_status', IPA.field); w.register('service_provisioning_status', IPA.service_provisioning_status_widget); + a.register('service_unprovision', IPA.service.unprovision_action); }); diff --git a/install/ui/src/freeipa/user.js b/install/ui/src/freeipa/user.js index 04e589b77..bc608d8a8 100644 --- a/install/ui/src/freeipa/user.js +++ b/install/ui/src/freeipa/user.js @@ -21,8 +21,18 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -define(['./ipa', './jquery', './text', './details', './search', './association', - './entity', './certificate'], function(IPA, $, text) { +define([ + './ipa', + './jquery', + './phases', + './reg', + './text', + './details', + './search', + './association', + './entity', + './certificate'], + function(IPA, $, phases, reg, text) { var exp = IPA.user = {}; @@ -668,5 +678,12 @@ IPA.user.reset_password_acl_evaluator = function(spec) { IPA.register('user', IPA.user.entity); +exp.register = function() { + var a = reg.action; + a.register('reset_password', IPA.user.reset_password_action); +}; + +phases.on('registration', exp.register); + return exp; }); |