end
end
+ helper_method :recent_jobs_and_pipelines
+ def recent_jobs_and_pipelines
+ (Job.limit(10) | PipelineInstance.limit(10)).
+ sort_by do |x|
+ x.finished_at || x.started_at || x.created_at rescue x.created_at
+ end
+ end
+
helper_method :get_object
def get_object uuid
if @get_object.nil? and @objects
--- /dev/null
+<div class="container-fluid">
+ <% recent_jobs_and_pipelines[0..9].each do |object| %>
+ <% any = true %>
+ <div class="row">
+ <div class="col-sm-4">
+ <%= render :partial => "show_object_button", :locals => {object: object, size: 'xs'} %>
+ <%= render_editable_attribute object, 'name', nil %>
+ </div>
+ <div class="col-sm-8 arv-description-in-table">
+ <%= render_controller_partial(
+ 'show_object_description_cell.html',
+ controller_name: object.controller_name,
+ locals: {object: object})
+ %>
+ </div>
+ </div>
+ <% end %>
+ <% if not defined? any %>
+ <span class="deemphasize">No jobs or pipelines to display.</span>
+ <% end %>
+</div>
</div>
</div>
</div>
+ <div class="row">
+ <div class="col-sm-12">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <div class="pull-right">
+ <%= link_to jobs_path, class: 'btn btn-default btn-xs' do %>
+ All jobs <i class="fa fa-fw fa-arrow-circle-right"></i>
+ <% end %>
+ <%= link_to pipeline_instances_path, class: 'btn btn-default btn-xs' do %>
+ All pipelines <i class="fa fa-fw fa-arrow-circle-right"></i>
+ <% end %>
+ </div>
+ <h3 class="panel-title">
+ Recent jobs and pipelines
+ </h3>
+ </div>
+ <div class="panel-body">
+ <%= render partial: 'index_jobs_and_pipelines' %>
+ </div>
+ </div>
+ </div>
+ </div>
</div>
post 'actions' => 'actions#post'
get 'websockets' => 'websocket#index'
- root :to => 'users#welcome'
+ root :to => 'folders#index'
# Send unroutable requests to an arbitrary controller
# (ends up at ApplicationController#render_not_found)