Merge remote-tracking branch 'origin/master' into 2049-run-job-from-workbench
authorPeter Amstutz <peter.amstutz@curoverse.com>
Tue, 25 Feb 2014 21:12:21 +0000 (16:12 -0500)
committerPeter Amstutz <peter.amstutz@curoverse.com>
Tue, 25 Feb 2014 21:12:21 +0000 (16:12 -0500)
1  2 
apps/workbench/app/assets/javascripts/application.js
apps/workbench/app/assets/stylesheets/application.css.scss
apps/workbench/app/controllers/application_controller.rb
apps/workbench/app/views/collections/_index_tbody.html.erb
apps/workbench/app/views/collections/_show_recent.html.erb
apps/workbench/app/views/pipeline_instances/_show_components.html.erb

index 162fd2870550df5b7dbdf1e2e6628a3d50262449,e94428e92dca51ad00e415f38dac8ff69c35c4ef..2817735fe83845b02d3ff6d9bdde68a502345b29
@@@ -107,10 -107,10 +107,11 @@@ class ApplicationController < ActionCon
    end
  
    def create
-     @object ||= model_class.new params[model_class.to_s.underscore.singularize.to_sym]
+     @object ||= model_class.new params[model_class.to_s.underscore.singularize]
      @object.save!
 +
      respond_to do |f|
+       f.json { render json: @object }
        f.html {
          redirect_to(params[:return_to] || @object)
        }
index 57f6eeba10eaa74f45716cd26b640831c8935c1b,eb9c93fbc375eded213e77f3b56eeefd1f44c255..96b73979eb60a645b69a9be0d67c4fa91d553617
@@@ -1,9 -1,6 +1,9 @@@
  <% @collections.each do |c| %>
  
- <tr class="collection">
+ <tr class="collection" data-object-uuid="<%= c.uuid %>">
 +  <td>
 +    <%= render :partial => "selection_checkbox", :locals => {:object => c} %>
 +  </td>
    <td>
      <%= link_to_if_arvados_object c.uuid %>
    </td>
index d94b169039aaa59205fe4a82bf7278421b341545,3cedb57e85c8a854efabad7bde2dc294a7d75746..a3b93d84e67aa9739b95592543bade636f4e0aaf
  
  <div style="padding-right: 1em">
  
 +<%= form_tag do |f| %>
 +
  <table id="collections-index" class="topalign table table-condensed table-fixedlayout table-fixed-header-row">
    <colgroup>
 +    <col width="4%" />
      <col width="10%" />
      <col width="36%" />
-     <col width="22%" />
+     <col width="15%" />
      <col width="8%" />
-     <col width="16%" />
      <col width="8%" />
+     <col width="23%" />
    </colgroup>
    <thead>
      <tr class="contain-align-left">
index 88bed699e18cb803ae13c4c37ffbe75173acbf48,9597964103c792bc2677771d9344e28fd05ba132..1785f6ac0b77929a6452ec94d71cb620459a9968
@@@ -3,27 -3,21 +3,33 @@@
      padding-left: 1em;
      padding-right: 1em;
    }
 +table.pipeline-components-table {
 +  width: 100%;
 +  table-layout: fixed;
++  overflow: hidden;
 +}
 +
  table.pipeline-components-table thead th {
    text-align: bottom;
  }
  table.pipeline-components-table div.progress {
    margin-bottom: 0;
  }
 +
++table.pipeline-components-table td {
++  overflow: hidden;
++  text-overflow: ellipsis;
++}
++
  <% end %>
 -<br />
  
 +<% if @object.active != nil %>
  <table class="table pipeline-components-table">
    <colgroup>
 -    <col width="15%" />
 -    <col width="15%" />
 -    <col width="35%" />
 -    <col width="35%" />
 +    <col style="width: 15%" />
-     <col style="width: 35%" />
-     <col style="width: 15%" />
-     <col style="width: 35%" />
++    <col style="width: 20%" />
++    <col style="width: 20%" />
++    <col style="width: 45%" />
    </colgroup>
    <thead>
      <tr>
@@@ -77,69 -71,4 +83,69 @@@ setInterval(function(){$('a.refresh').c
  <% end %>
  <% end %>
  
 -<pre><%= JSON.pretty_generate @object.attributes %></pre>
 +<% else %>
 +
 +  <%= form_tag @object, :method => :put do |f| %>
 +
 +  <%= hidden_field @object.class.to_s.underscore.singularize.to_sym, :active, :value => true %>
 +  <%= button_tag "Run pipeline", {class: 'btn btn-primary pull-right'} %>
 +  <% end %>
 +
 +<table class="table pipeline-components-table" style="margin-top: -.1em">
 +  <colgroup>
 +    <col style="width: 15%" />
-     <col style="width: 35%" />
-     <col style="width: 15%" />
-     <col style="width: 35%" />
++    <col style="width: 20%" />
++    <col style="width: 20%" />
++    <col style="width: 45%" />
 +  </colgroup>
 +
 +  <thead>
 +    <tr>
 +      <th>
 +        component
 +      </th><th>
 +        script, version
 +      </th><th>
 +        parameter
 +      </th><th>
 +        input
 +      </th>
 +    </tr>
 +  </thead>
 +  <tbody>
 +  <% @object.components.each do |k, v| %>
 +
 +    <% sp = v[:script_parameters].collect do |k, v| [k, v] end %>
 +
 +    <tr>
 +      <td><%= k %></td>
 +
 +      <td><%= v[:script] %>
 +        <br /><span class="deemphasize"> <%= v[:script_version] %></span>
 +      </td>
 +
 +      <td>
 +        <%= sp[0][0] %>
 +      </td>
 +
 +      <td>
 +        <%= sp[0][1] %>
 +      </td>
 +      </tr>
 +
 +    <% if sp.length > 1 %>
 +    <tr>
-       <td></td>
-       <td></td>
++      <td style="border-top: none"></td>
++      <td style="border-top: none"></td>
 +
 +      <% sp[1..-1].each do |p| %>
-         <%= p[0] %>
-         <%= p[1] %>
++        <td style="border-top: none"><%= p[0] %></td>
++        <td style="border-top: none"><%= p[1] %></td>
 +      <% end %>
 +    </tr>
 +  <% end %>
 +  <% end %>
 +  </tbody>
 +  </table>
 +  
 +<% end %>