summaryrefslogtreecommitdiffstats
path: root/install/static/ipa.js
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2010-11-18 20:59:08 -0600
committerAdam Young <ayoung@redhat.com>2010-11-19 13:26:41 -0500
commit3e1dc6b74f999052d7023bf0804707f13b3004bd (patch)
tree5336b548fdc15448f878e879357926373e25784e /install/static/ipa.js
parent1b166c9e8b16a740442a913446fee9be5eda40de (diff)
downloadfreeipa-3e1dc6b74f999052d7023bf0804707f13b3004bd.tar.gz
freeipa-3e1dc6b74f999052d7023bf0804707f13b3004bd.tar.xz
freeipa-3e1dc6b74f999052d7023bf0804707f13b3004bd.zip
Host Enrollment via OTP
The support for host enrollment via one-time-password has been added. When submitted, the OTP will be used to set the host's userpassword. Previously each IPA command can only have one JSON test data file. The ipa_cmd() has been modifies to accept an optional command name. When used with static files, it will pull the test data whose name is the same as the command name. The batch.json has been renamed to ipa_init.json for UI initialization. Some test data have been added for operations against specific hosts.
Diffstat (limited to 'install/static/ipa.js')
-rw-r--r--install/static/ipa.js17
1 files changed, 13 insertions, 4 deletions
diff --git a/install/static/ipa.js b/install/static/ipa.js
index d3ee89b41..6167b9f42 100644
--- a/install/static/ipa.js
+++ b/install/static/ipa.js
@@ -96,7 +96,9 @@ var IPA = ( function () {
on_success(data, text_status, xhr);
}
},
- on_error
+ on_error,
+ null,
+ 'ipa_init'
);
};
@@ -144,6 +146,7 @@ function ipa_command(spec) {
var that = {};
+ that.name = spec.name;
that.method = spec.method;
that.args = $.merge([], spec.args || []);
@@ -170,7 +173,9 @@ function ipa_command(spec) {
that.args,
that.options,
that.on_success,
- that.on_error
+ that.on_error,
+ null,
+ that.name
);
};
@@ -277,7 +282,7 @@ function ipa_batch_command(spec) {
* win_callback - function to call if the JSON request succeeds
* fail_callback - function to call if the JSON request fails
* objname - name of an IPA object (optional) */
-function ipa_cmd(name, args, options, win_callback, fail_callback, objname)
+function ipa_cmd(name, args, options, win_callback, fail_callback, objname, command_name)
{
var default_json_url = '/ipa/json';
@@ -385,7 +390,11 @@ function ipa_cmd(name, args, options, win_callback, fail_callback, objname)
var url = IPA.json_url;
if (IPA.use_static_files){
- url += '/' + method_name + '.json';
+ if (command_name) {
+ url += '/' + command_name + '.json';
+ } else {
+ url += '/' + method_name + '.json';
+ }
}
var data = {
method: method_name,