diff --git a/apps/dashboard/app/models/launcher.rb b/apps/dashboard/app/models/launcher.rb index 9864896008..7b315c4b89 100644 --- a/apps/dashboard/app/models/launcher.rb +++ b/apps/dashboard/app/models/launcher.rb @@ -178,7 +178,13 @@ def update(params) end def submit(options) - adapter = adapter(options[:auto_batch_clusters]).job_adapter + cluster_id = if options.has_key?(:auto_batch_clusters) + options[:auto_batch_clusters] + else + smart_attributes.find { |sm| sm.id == 'auto_batch_clusters' }.value.to_sym + end + adapter = adapter(cluster_id).job_adapter + render_format = adapter.class.name.split('::').last.downcase job_script = OodCore::Job::Script.new(**submit_opts(options, render_format)) @@ -186,7 +192,7 @@ def submit(options) job_id = Dir.chdir(project_dir) do adapter.submit(job_script) end - update_job_log(job_id, options[:auto_batch_clusters].to_s) + update_job_log(job_id, cluster_id.to_s) write_job_options_to_cache(options) job_id @@ -345,7 +351,7 @@ def job_log_file def submit_opts(options, render_format) smart_attributes.map do |sm| - sm.value = options[sm.id.to_sym] + sm.value = options[sm.id.to_sym] unless sm.fixed? sm end.map do |sm| sm.submit(fmt: render_format) diff --git a/apps/dashboard/app/views/launchers/show.html.erb b/apps/dashboard/app/views/launchers/show.html.erb index c044865af3..72ea8b8a9a 100644 --- a/apps/dashboard/app/views/launchers/show.html.erb +++ b/apps/dashboard/app/views/launchers/show.html.erb @@ -8,7 +8,7 @@ <%= bootstrap_form_for(@script, url: submit_project_launcher_path) do |f| %> <% @script.smart_attributes.each do |attrib| %> <%# TODO generate render_format %> - <%= create_widget(f, attrib, format: nil, hide_fixed: false) %> + <%= create_widget(f, attrib, format: nil) %> <% end %>