---
src/app/controllers/application_controller.rb | 8 --------
src/app/util/condormatic.rb | 8 +++++---
src/app/views/deployables/_assemblies.haml | 4 ++--
.../provider_accounts/_provider_selection.haml | 3 ++-
src/public/javascripts/application.js | 5 +++--
5 files changed, 12 insertions(+), 16 deletions(-)
diff --git a/src/app/controllers/application_controller.rb
b/src/app/controllers/application_controller.rb
index 812cf2d..cb4a1d3 100644
--- a/src/app/controllers/application_controller.rb
+++ b/src/app/controllers/application_controller.rb
@@ -43,8 +43,6 @@ class ApplicationController < ActionController::Base
helper_method :check_privilege
- before_filter :js_for_xhr
-
protected
# permissions checking
@@ -255,10 +253,4 @@ class ApplicationController < ActionController::Base
session[:breadcrumbs] = breadcrumbs
end
- # XMLHTTPRequest in many browsers sends "Accept: */*", so the first
respond_to will match.
- # See
http://codetunes.com/2009/01/31/rails-222-ajax-and-respond_to/ and
- #
http://www.grauw.nl/blog/entry/470 for more.
- def js_for_xhr
- request.format = :js if request.xhr?
- end
end
diff --git a/src/app/util/condormatic.rb b/src/app/util/condormatic.rb
index 60fd2f0..2cd5172 100644
--- a/src/app/util/condormatic.rb
+++ b/src/app/util/condormatic.rb
@@ -88,8 +88,8 @@ def write_pw_file(job_name, pw)
# here we write out the password file
# FIXME: should this be configurable?
pwdir = '/var/lib/aeolus-conductor/jobs'
- FileUtils.mkdir_p(pwdir, options={:mode => 0700})
- FileUtils.chown('aeolus', 'aeolus', pwdir)
+# FileUtils.mkdir_p(pwdir, options={:mode => 0700})
+# FileUtils.chown('aeolus', 'aeolus', pwdir)
pwfilename = File.join(pwdir, job_name)
@@ -105,7 +105,9 @@ end
def condormatic_instance_create(task)
instance = task.instance
+ logger.debug("*** Instance: #{instance.inspect}")
found = match(instance)
+ logger.debug("*** found: #{found.inspect}")
begin
if found.nil?
@@ -163,7 +165,7 @@ def condormatic_instance_create(task)
rescue Exception => ex
Rails.logger.error ex.message
- Rails.logger.error ex.backtrace
+ Rails.logger.error ex.backtrace.join('\n')
task.state = Task::STATE_FAILED
instance.state = Instance::STATE_CREATE_FAILED
else
diff --git a/src/app/views/deployables/_assemblies.haml
b/src/app/views/deployables/_assemblies.haml
index 01bf09a..4deb2e1 100644
--- a/src/app/views/deployables/_assemblies.haml
+++ b/src/app/views/deployables/_assemblies.haml
@@ -21,10 +21,10 @@
$('#add_assembly').click(function(e) {
e.preventDefault();
var url = $(this).attr('href');
- $.get(url, function(data) {
+ $.get(url, {}, function(data) {
var selectedTabIndex = $("#details-view").tabs('option',
'selected');
var $selectedTab = $("#details-view
div.ui-tabs-panel").eq(selectedTabIndex);
$selectedTab.html(data);
- });
+ }, 'script');
});
});
diff --git a/src/app/views/provider_accounts/_provider_selection.haml
b/src/app/views/provider_accounts/_provider_selection.haml
index b96d6f9..3a3503a 100644
--- a/src/app/views/provider_accounts/_provider_selection.haml
+++ b/src/app/views/provider_accounts/_provider_selection.haml
@@ -18,7 +18,8 @@
$.get("#{set_selected_provider_provider_accounts_url}",
{'provider_account[provider_id]':selected_provider},
function(result) {
$("#provider_type").html(result);
- }
+ },
+ 'script'
);
});
diff --git a/src/public/javascripts/application.js
b/src/public/javascripts/application.js
index 33c2be5..1efb086 100644
--- a/src/public/javascripts/application.js
+++ b/src/public/javascripts/application.js
@@ -65,12 +65,12 @@ var Conductor = {
e.preventDefault();
var url = $(this).attr('href') + '?details_pane=true';
- $.get(url, function(data) {
+ $.get(url, {}, function(data) {
$('#list-view').removeClass('full').addClass('part');
$('#details-view').html(data)
.show();
Conductor.enhanceDetailsTabs();
- });
+ }, 'script');
});
},
@@ -186,4 +186,5 @@ $(document).ready(function () {
Conductor.enhanceListView();
Conductor.enhanceDetailsTabs();
Conductor.bind_pretty_toggle();
+ $.ajaxSetup({dataType: 'script'});
});
\ No newline at end of file
--
1.7.4.4