Merge branch 'master' into 4878-rerun-job
[arvados.git] / apps / workbench / app / views / jobs / _rerun_job_with_options_popup.html.erb
1 <%
2   job_info = {}
3   job_info['script'] = params[:script]
4   job_info['script_version'] = params[:script_version]
5   job_info['repository'] = params[:repository]
6   job_info['supplied_script_version'] = params[:supplied_script_version]
7   job_info['nondeterministic'] = params[:nondeterministic]
8   job_info['script_parameters'] = params[:script_parameters]
9   job_info['runtime_constraints'] = params[:runtime_constraints]
10 %>
11
12 <div class="modal fade" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
13   <div class="modal-dialog">
14     <div class="modal-content">
15       <%= form_tag rerun_job_with_options_path do |f| %>
16         <div class="modal-header">
17           <button type="button" class="close" onClick="reset_form()" data-dismiss="modal" aria-hidden="true">&times;</button>
18           <div>
19             <div class="col-sm-6"> <h4 class="modal-title">Re-run job</h4> </div>
20           </div>
21           <br/>
22         </div>
23
24         <div class="modal-body">
25           <p> If this job is part of a pipeline, that pipeline would not know about the new job you are running.
26               If you want to update your pipeline results, please re-run the pipeline instead.
27           <p> The inputs and parameters will be the same as the current job.
28               Thus, the new job will not reflect any changes made to the pipeline that initiated this job. </p>
29           <div style="padding-left: 1em">
30             <%= radio_button_tag(:script, "use_same", true) %>
31             <%= label_tag(:script_use_same, "Use same script version as this run") %>
32             <p style="padding-left: 1em"> Use the same script version as the current job.</p>
33             <% if !job_info['supplied_script_version'].nil? and
34                   !job_info['supplied_script_version'].empty? and
35                    job_info['supplied_script_version'] != job_info['script_version'] %>
36               <%= radio_button_tag(:script, "use_latest") %>
37               <%= label_tag(:script_use_latest, "Use latest script version") %>
38               <p style="padding-left: 1em"> Use the current commit indicated by '<%=job_info['supplied_script_version']%>' in the '<%=job_info['repository']%>' repository.</p>
39             <% end %>
40
41             <input type="hidden" name="job_info" value="<%=job_info.to_json%>">
42           </div>
43         </div>
44
45         <div class="modal-footer">
46           <button type="submit" class="btn btn-primary" name="rerun-with-options" value="RunningOnServer">Run now</button>
47           <button class="btn btn-default" onClick="reset_form()" data-dismiss="modal" aria-hidden="true">Cancel</button>
48         </div>
49       <% end %>
50     </div>
51   </div>
52 </div>