summaryrefslogtreecommitdiffstats
path: root/install/static/ipa.js
diff options
context:
space:
mode:
authorAdam Young <ayoung@redhat.com>2010-09-07 10:08:19 -0400
committerAdam Young <ayoung@redhat.com>2010-09-07 10:08:19 -0400
commitdde15772700da41ec931bb55087fbec6f30fab55 (patch)
tree890bd7ecd8bb4d906c4b670b772b2a960c50f3c1 /install/static/ipa.js
parente93932b3235fc27b31a59c0cb77250acf15d3f31 (diff)
downloadfreeipa.git-dde15772700da41ec931bb55087fbec6f30fab55.tar.gz
freeipa.git-dde15772700da41ec931bb55087fbec6f30fab55.tar.xz
freeipa.git-dde15772700da41ec931bb55087fbec6f30fab55.zip
associations
-Refactored the associations code into a set of objects that are configured by the entities -Added support for associations that can be done in a single rpc -hostgroup to host and group to user associations working -Restructed sampledata so that the file is matched automatically by the RPC method name -The new ipa_cmd/sampledata scheme insists on there being sample data for any commands or the ipa_command fails. -Added sampledata files for all the calls we make -renamed several of the sampledata files to match their rpc calls -Started a pattern of refactoring where all the forms for the entity fall under a single object
Diffstat (limited to 'install/static/ipa.js')
-rw-r--r--install/static/ipa.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/install/static/ipa.js b/install/static/ipa.js
index 63101a71..d5a2dbdd 100644
--- a/install/static/ipa.js
+++ b/install/static/ipa.js
@@ -38,10 +38,9 @@ var qs;
var useSampleData = (window.location.protocol == "file:");
-function ipa_init(url, on_win)
+function ipa_init(on_win)
{
- if (!url)
- url = '/ipa/json';
+ var url = '/ipa/json';
_ipa_init_on_win_callback = on_win;
@@ -55,7 +54,10 @@ function ipa_init(url, on_win)
$.ajaxSetup(options);
- ipa_cmd('json_metadata', [], {}, _ipa_load_objs);
+ ipa_cmd('json_metadata', [], {}, _ipa_load_objs,
+ function(response){
+ alert('init failed');
+ });
}
function _ipa_load_objs(data, textStatus, xhr)
@@ -79,7 +81,9 @@ function ipa_cmd(name, args, options, win_callback, fail_callback, objname,sampl
if (objname)
name = objname + '_' + name;
- if (useSampleData && sampleData){
+ if (useSampleData){
+ var sampleData ="sampledata/"+name+".json";
+
var ajax_options = {
url: sampleData,
type: 'POST',