<% end %>
</td>
<td>
- <%= raw(distance_of_time_in_words(c.created_at, Time.now).sub('about ','~').sub(' ',' ')) if c.created_at %>
+ <%= c.created_at.to_s if c.created_at %>
</td>
<td>
<% current_state = @collection_info[c.uuid][:wanted_by_me] ? 'persistent' : 'cache' %>
<th></th>
<th>uuid</th>
<th>contents</th>
- <th>age</th>
+ <th>created at</th>
<th>storage</th>
<th>tags</th>
</tr>
</th><th>
Owner
</th><th>
- Age
+ Created at
</th><th>
</th>
</tr>
</td><td>
<%= link_to_if_arvados_object ob.owner_uuid, friendly_name: true %>
</td><td>
- <%= distance_of_time_in_words(ob.created_at, Time.now) %>
+ <%= ob.created_at.to_s %>
</td><td>
<%= render partial: 'delete_object_button', locals: {object:ob} %>
</td>
<% content_for :tab_line_buttons do %>
- <%= form_tag '/pipeline_instances' do |f| %>
- <%= hidden_field :pipeline_instance, :pipeline_template_uuid, :value => @object.uuid %>
- <%= button_tag "Run this pipeline", {class: 'btn btn-primary pull-right', id: "run-pipeline-button"} %>
-<% end %>
+ <%= button_to(choose_projects_path(id: "run-pipeline-button",
+ title: 'Choose project',
+ editable: true,
+ action_name: 'Choose',
+ action_href: pipeline_instances_path,
+ action_method: 'post',
+ action_data: {selection_param: 'pipeline_instance[owner_uuid]',
+ 'pipeline_instance[pipeline_template_uuid]' => @object.uuid,
+ 'success' => 'redirect-to-created-object'
+ }.to_json),
+ { class: "btn btn-primary btn-sm", remote: true, method: 'get' }
+ ) do %>
+ <i class="fa fa-fw fa-folder"></i> Run this pipeline
+ <% end %>
<% end %>
<%= render partial: 'pipeline_instances/show_components_editable', locals: {editable: false} %>
<tr>
<td>
- <%= form_tag '/pipeline_instances' do |f| %>
- <%= hidden_field :pipeline_instance, :pipeline_template_uuid, :value => ob.uuid %>
- <%= button_tag nil, {class: "btn btn-default btn-xs", title: "Run #{ob.name}"} do %>
- Run <i class="fa fa-fw fa-play"></i>
- <% end %>
- <% end %>
+ <%= button_to(choose_projects_path(id: "run-pipeline-button",
+ title: 'Choose project',
+ editable: true,
+ action_name: 'Choose',
+ action_href: pipeline_instances_path,
+ action_method: 'post',
+ action_data: {selection_param: 'pipeline_instance[owner_uuid]',
+ 'pipeline_instance[pipeline_template_uuid]' => ob.uuid,
+ 'success' => 'redirect-to-created-object'
+ }.to_json),
+ { class: "btn btn-default btn-xs", title: "Run #{ob.name}", remote: true, method: 'get' }
+ ) do %>
+ Run <i class="fa fa-fw fa-play"></i>
+ <% end %>
</td>
<td>
<%= render :partial => "show_object_button", :locals => {object: ob, size: 'xs'} %>
<th>Script</th>
<th>Output</th>
<th>Log</th>
- <th>Age</th>
+ <th>Created at</th>
<th>Status</th>
<th>Progress</th>
</tr>
<td>
<small>
- <%= raw(distance_of_time_in_words(j.created_at, Time.now).sub('about ','~').sub(' ',' ')) if j.created_at %>
+ <%= j.created_at.to_s if j.created_at %>
</small>
</td>
<tr>
<th>Instance</th>
<th>Template</th>
- <th>Age</th>
+ <th>Created at</th>
<th>Status</th>
<th>Progress</th>
</tr>
<td>
<small>
- <%= raw(distance_of_time_in_words(p.created_at, Time.now).sub('about ','~').sub(' ',' ')) if p.created_at %>
+ <%= (p.created_at.to_s) if p.created_at %>
</small>
</td>
</td>
<td>
<small>
- <%= raw(distance_of_time_in_words(c.created_at, Time.now).sub('about ','~').sub(' ',' ')) if c.created_at %>
+ <%= c.created_at.to_s if c.created_at %>
</small>
</td>
<td>
find('a,button', text: 'Run').click
end
+ # project chooser
+ within('.modal-dialog') do
+ find('.selectable', text: 'A Project').click
+ find('button', text: 'Choose').click
+ end
+
# This pipeline needs input. So, Run should be disabled
page.assert_selector 'a.disabled,button.disabled', text: 'Run'
instance_page = current_path
- # put this pipeline instance in "A Project"
- find('button', text: 'Choose a project...').click
- within('.modal-dialog') do
- find('.selectable', text: 'A Project').click
- find('button', text: 'Move').click
- end
-
# Go over to the collections page and select something
visit '/collections'
within('tr', text: 'GNU_General_Public_License') do