self.render_error status: 404
end
-
+ def helper
+ (self.class.to_s.sub(/Controller$/,'')+'Helper').constantize
+ end
def index
@objects ||= model_class.limit(1000).all
respond_to do |f|
class AuthorizedKeysController < ApplicationController
+ def index_pane_list
+ %w(recent setup)
+ end
+
def new
super
@object.authorized_user_uuid = current_user.uuid if current_user
module AuthorizedKeysHelper
+ def index_pane_list
+ %w(recent help)
+ end
end
module RepositoriesHelper
+ def index_pane_list
+ %w(recent help)
+ end
end
module VirtualMachinesHelper
+ def index_pane_list
+ %w(recent help)
+ end
end
false
end
+ def self.creatable?
+ false
+ end
+
def provenance
$arvados_api_client.api "collections/#{self.uuid}/", "provenance"
end
unset ARVADOS_API_HOST_INSECURE
<% end %>
</pre>
-
-<%= render partial: 'index' %>
-<% if controller.model_class.creatable? %>
-<%= button_to "Add a new #{controller.model_class.to_s.underscore.gsub '_', ' '}",
- { action: 'create', return_to: request.url },
- { class: 'btn btn-primary pull-right' } %>
-<% end %>
-
<% if @objects.empty? %>
<br/>
<p style="text-align: center">
</table>
<% end %>
-
-<%= render partial: 'index' %>
+<% if controller.model_class.creatable? %>
+<%= button_to "Add a new #{controller.model_class.to_s.underscore.gsub '_', ' '}",
+ { action: 'create', return_to: request.url },
+ { class: 'btn btn-primary pull-right' } %>
+<% end %>
+<%= form_tag({action: 'compare', controller: params[:controller], method: 'get'}, {method: 'get', id: 'compare', class: 'pull-right small-form-margin'}) do |f| %>
+<%= submit_tag 'Compare selected', {class: 'btn btn-primary', disabled: true, style: 'display: none'} %>
+
+<% end rescue nil %>
+
+<% pane_list = (controller.class.to_s.sub(/Controller$/,'')+'Helper').constantize.index_pane_list rescue %w(recent) %>
+
+<div class="tabbable">
+<ul class="nav nav-tabs">
+ <% pane_list.each_with_index do |pane, i| %>
+ <li class="<%= 'active' if i==0 %>"><a href="#<%= pane %>" data-toggle="tab"><%= pane.capitalize %></a></li>
+ <% end %>
+</ul>
+
+<div class="tab-content">
+ <% pane_list.each_with_index do |pane, i| %>
+ <div id="<%= pane %>" class="tab-pane fade in <%= 'active' if i==0 %>">
+ <%= render partial: pane %>
+ </div>
+ <% end %>
+</div>
--- /dev/null
+<p>
+ More information about how to log in to VMs:
+</p>
+<ul>
+ <li>
+ <%= link_to raw('Arvados Docs → User Guide → SSH access'),
+ "#{Rails.configuration.arvados_docsite}/user/getting_started/ssh-access.html",
+ target: "_blank"%>.
+ </li>
+</ul>
-<%= render partial: 'application/index' %>
-
-<hr />
-
-<p>
- See also:
- <%= link_to raw('Arvados Docs → User Guide → SSH access'),
- "#{Rails.configuration.arvados_docsite}/user/getting_started/ssh-access.html",
- target: "_blank"%>.
-</p>
+<%= render template: 'application/index' %>
+++ /dev/null
-<ul class="nav nav-pills">
- <% [['Table', collections_path],
- ['Graph', collections_graph_path],
- ['Inspect', @object ? collection_path(@object.uuid) : '#']].
- each do |name, path| %>
- <li class="<%= 'active' if request.fullpath == path %> <%= 'disabled' if path == '#' %>"><%= link_to name, path %></li>
- <% end %>
-</ul>
-<%#= render :partial => 'nav' %>
-
<div class="pull-right">
<%= form_tag collections_path, method: 'get', remote: true, class: 'form-search' do %>
<div class="input-append">
<% end %>
-<%#= render :partial => 'nav' %>
-
<div class="tabbable">
<ul class="nav nav-tabs">
<li class="active"><a href="#files" data-toggle="tab">Files (<%= @object.files ? @object.files.size : 0 %>)</a></li>
<%= yield :js %>
<% end %>
<style>
- .container {
+ body > div.container-fluid {
padding-top: 60px; /* 60px to make the container go all the way to the
bottom of the topbar */
}
</div>
</div>
- <div class="container">
+ <div class="container-fluid">
<div class="body-content">
<%= yield %>
-<%= form_tag({action: 'compare', controller: 'pipeline_instances', method: 'get'}, {method: 'get', id: 'compare'}) do |f| %>
+<%= form_tag do |f| %>
<table class="table table-hover">
<thead>
<tr class="contain-align-left">
<th>
- <%= submit_tag 'Compare', {class: 'btn btn-primary', disabled: true} %>
</th><th>
status
</th><th>
<% end %>
<% content_for :footer_js do %>
-$('form#compare input[name="uuids[]"]').on('click', function() {
- var form = $('form#compare')[0]
+var showhide_compare = function() {
+ var form = $('form#compare')[0];
+ $('input[type=hidden][name="uuids[]"]', form).remove();
$('input[type=submit]', form).prop('disabled',true);
- $('input[name="uuids[]"]', form).each(function(){
+ $('input[name="uuids[]"]').each(function(){
if(this.checked) {
- $('input[type=submit]', form).prop('disabled',false);
+ $('input[type=submit]', form).prop('disabled',false).show();
+ $(form).append($('<input type="hidden" name="uuids[]"/>').val(this.value));
}
});
-});
+};
+$('form input[name="uuids[]"]').on('click', showhide_compare);
+showhide_compare();
<% end %>
}
<% end %>
-<% pi_span = [(10.0/(@objects.count)).floor,1].max %>
+<% pi_span = [(10.0/[@objects.count,1].max).floor,1].max %>
<div>
<% [['Instance', :uuid], ['Template', :pipeline_template_uuid]].each do |label, attr| %>
<div class="row headrow">
-<%= render partial: 'application/index' %>
-
<% if (example = @objects.select(&:push_url).first) %>
<p>
-<%= render partial: 'application/index' %>
-
-<hr />
-
<p>
Sample <code>~/.ssh/config</code> section:
</p>