end
gem 'jquery-rails'
-gem 'twitter-bootstrap-rails'
-gem 'anjlab-bootstrap-rails', '~> 2.3', :require => 'bootstrap-rails'
-gem 'bootstrap-editable-rails'
+gem 'bootstrap-sass', '~> 3.1.0'
+gem 'bootstrap-x-editable-rails'
+
gem 'less'
gem 'less-rails'
i18n (~> 0.6, >= 0.6.4)
multi_json (~> 1.0)
andand (1.3.3)
- anjlab-bootstrap-rails (2.3.1.2)
- railties (>= 3.0)
- sass (>= 3.2)
arel (3.0.2)
- bootstrap-editable-rails (0.0.5)
- railties (>= 3.1)
+ bootstrap-sass (3.1.0.1)
+ sass (~> 3.2)
+ bootstrap-x-editable-rails (1.5.1.1)
+ railties (>= 3.0)
builder (3.0.4)
capistrano (2.15.5)
highline
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
- twitter-bootstrap-rails (2.2.8)
- actionpack (>= 3.1)
- execjs
- rails (>= 3.1)
- railties (>= 3.1)
tzinfo (0.3.38)
uglifier (2.3.1)
execjs (>= 0.3.0)
DEPENDENCIES
RedCloth
andand
- anjlab-bootstrap-rails (~> 2.3)
- bootstrap-editable-rails
+ bootstrap-sass (~> 3.1.0)
+ bootstrap-x-editable-rails
coffee-rails (~> 3.2.0)
httpclient
jquery-rails
sqlite3
themes_for_rails
therubyracer
- twitter-bootstrap-rails
uglifier (>= 1.0.3)
//
//= require jquery
//= require jquery_ujs
-//= require twitter/bootstrap
-//= require bootstrap-editable
-//= require bootstrap-editable-rails
+//= require bootstrap
+//= require bootstrap/dropdown
+//= require bootstrap/tab
+//= require bootstrap/tooltip
+//= require bootstrap/popover
+//= require bootstrap3-editable/bootstrap-editable
//= require_tree .
jQuery(function($){
$('.loading').hide();
});
})(jQuery);
+
+
+
--- /dev/null
+$.fn.editable.defaults.ajaxOptions = {type: 'put', dataType: 'json'};
+$.fn.editable.defaults.send = 'always';
+$.fn.editable.defaults.params = function (params) {
+ var a = {};
+ var key = params.pk.key;
+ a.id = params.pk.id;
+ a[key] = {};
+ a[key][params.name] = params.value;
+ return a;
+};
\ No newline at end of file
b.style.paddingTop = String(max) + "px";
}
+ /*
w = window.innerWidth - 25;
a.style.width = String(w) + "px";
gw = parseFloat(g.getAttribute("width"));
}
else {
c.style.paddingLeft = "0px";
- }
+ }*/
}
function graph_zoom(divId, svgId, scale) {
pg.scrollLeft = (hcenter * pg.scrollWidth) - (pg.scrollWidth - pg.scrollLeftMax)/2.0;
provenance_sizing_fixup(divId, svgId);
}
+
+$(window).on('load resize', function () {
+ var s = document.getElementsByClassName("smart-scroll");
+ for (var i = 0; i < s.length; i++) {
+ a = s[i];
+ var h = window.innerHeight - a.getBoundingClientRect().top - 20;
+ height = String(h) + "px";
+ a.style.height = height;
+ }
+});
* compiled file, but it's generally better to create a new file per style scope.
*
*= require_self
- *= require bootstrap_and_overrides
- *= require bootstrap-editable
+ *= require bootstrap
+ *= require bootstrap3-editable/bootstrap-editable
*= require_tree .
*/
.nowrap {
white-space: nowrap;
}
+
.navbar .nav li.nav-separator > span {
display: block;
float: none;
text-decoration: none;
text-shadow: 0 1px 0 #ffffff;
}
-.navbar .nav .dropdown .dropdown-menu li a {
+/*.navbar .nav .dropdown .dropdown-menu li a {
padding: 2px 20px;
+}*/
+
+ul.arvados-nav {
+ list-style: none;
+ padding-left: 0em;
+ margin-left: 0em;
+}
+
+ul.arvados-nav li ul {
+ list-style: none;
+ padding-left: 0;
+}
+
+ul.arvados-nav li ul li {
+ list-style: none;
+ padding-left: 1em;
}
+
+.badge {
+ background: red;
+}
+
+.dax {
+ max-width: 10%;
+ margin-right: 1em;
+ float: left
+}
+
+.smart-scroll {
+ overflow: auto;
+}
\ No newline at end of file
--- /dev/null
+/* Colors
+ * Contextual variations of badges
+ * Bootstrap 3.0 removed contexts for badges, we re-introduce them, based on what is done for labels
+ */
+
+.badge-error {
+ background-color: #b94a48;
+}
+.badge-warning {
+ background-color: #f89406;
+}
+.badge-success {
+ background-color: #468847;
+}
+.badge-info {
+ background-color: #3a87ad;
+}
+.badge-inverse {
+ background-color: #333333;
+}
+++ /dev/null
-@import "twitter/bootstrap/bootstrap";
-@import "twitter/bootstrap/responsive";
-
-// Set the correct sprite paths
-@iconSpritePath: asset-path("twitter/bootstrap/glyphicons-halflings");
-@iconWhiteSpritePath: asset-path("twitter/bootstrap/glyphicons-halflings-white");
-
-// Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines)
-@fontAwesomeEotPath: asset-url("fontawesome-webfont.eot");
-@fontAwesomeEotPath_iefix: asset-url("fontawesome-webfont.eot#iefix");
-@fontAwesomeWoffPath: asset-url("fontawesome-webfont.woff");
-@fontAwesomeTtfPath: asset-url("fontawesome-webfont.ttf");
-@fontAwesomeSvgPath: asset-url("fontawesome-webfont.svg#fontawesomeregular");
-
-// Font Awesome
-@import "fontawesome/font-awesome";
-
-// Glyphicons
-//@import "twitter/bootstrap/sprites.less";
-
-// Your custom LESS stylesheets goes here
-//
-// Since bootstrap was imported above you have access to its mixins which
-// you may use and inherit here
-//
-// If you'd like to override bootstrap's own variables, you can do so here as well
-// See http://twitter.github.com/bootstrap/customize.html#variables for their names and documentation
-//
-// Example:
-// @linkColor: #ff0000;
-// http://codepen.io/alucard11/pen/IxLDJ
+/* http://codepen.io/alucard11/pen/IxLDJ */
.loading {
background: #1b1b1b;
end
super
end
+
+ def index_pane_list
+ %w(recent help)
+ end
+
end
around_filter :thread_with_api_token, :except => [:render_exception, :render_not_found]
before_filter :find_object_by_uuid, :except => [:index, :render_exception, :render_not_found]
before_filter :check_user_agreements, :except => [:render_exception, :render_not_found]
+ before_filter :check_user_notifications, :except => [:render_exception, :render_not_found]
theme :select_theme
begin
(@object.friendly_link_name if @object.respond_to? :friendly_link_name))
end
+ def index_pane_list
+ %w(recent)
+ end
+
+ def show_pane_list
+ %w(attributes metadata json api)
+ end
+
protected
def find_object_by_uuid
def select_theme
return Rails.configuration.arvados_theme
end
+
+ @@notification_tests = []
+
+ @@notification_tests.push lambda { |controller, current_user|
+ AuthorizedKey.limit(1).where(authorized_user_uuid: current_user.uuid).each do
+ return nil
+ end
+ return lambda { |view|
+ view.render partial: 'notifications/ssh_key_notification'
+ }
+ }
+
+ @@notification_tests.push lambda { |controller, current_user|
+ AuthorizedKey.limit(1).where(authorized_user_uuid: current_user.uuid).each do
+ return nil
+ end
+ return lambda { |view|
+ view.render partial: 'notifications/jobs_notification'
+ }
+ }
+
+ @@notification_tests.push lambda { |controller, current_user|
+ Job.limit(1).where(created_by: current_user.uuid).each do
+ return nil
+ end
+ return lambda { |view|
+ view.render partial: 'notifications/jobs_notification'
+ }
+ }
+
+ @@notification_tests.push lambda { |controller, current_user|
+ Collection.limit(1).where(created_by: current_user.uuid).each do
+ return nil
+ end
+ return lambda { |view|
+ view.render partial: 'notifications/collections_notification'
+ }
+ }
+
+ @@notification_tests.push lambda { |controller, current_user|
+ PipelineInstance.limit(1).where(created_by: current_user.uuid).each do
+ return nil
+ end
+ return lambda { |view|
+ view.render partial: 'notifications/pipelines_notification'
+ }
+ }
+
+ def check_user_notifications
+ @notification_count = 0
+ @notifications = []
+
+ if current_user
+ @showallalerts = false
+ @@notification_tests.each do |t|
+ a = t.call(self, current_user)
+ if a
+ @notification_count += 1
+ @notifications.push a
+ end
+ end
+ end
+
+ if @notification_count == 0
+ @notification_count = ''
+ end
+ end
end
skip_before_filter :check_user_agreements, :only => [:show_file]
def show_pane_list
- %w(files attributes provenance provenance_graph used_by)
+ %w(files attributes metadata provenance_graph used_by json api)
end
def index
if params[:search].andand.length.andand > 0
end
Collection.where(uuid: @object.uuid).each do |u|
- @prov_svg = ProvenanceHelper::create_provenance_graph u.provenance, "provenance_svg", {:direction => :bottom_up, :combine_jobs => :script_only}
- @used_by_svg = ProvenanceHelper::create_provenance_graph u.used_by, "used_by_svg", {:direction => :top_down, :combine_jobs => :script_only, :pdata_only => true}
+ @prov_svg = ProvenanceHelper::create_provenance_graph u.provenance, "provenance_svg", {:direction => :bottom_up, :combine_jobs => :script_only} rescue nil
+ @used_by_svg = ProvenanceHelper::create_provenance_graph u.used_by, "used_by_svg", {:direction => :top_down, :combine_jobs => :script_only, :pdata_only => true} rescue nil
end
end
def show
generate_provenance([@object])
end
+
+ def index_pane_list
+ if params[:uuid]
+ %w(recent provenance)
+ else
+ %w(recent)
+ end
+ end
+
+ def show_pane_list
+ %w(attributes provenance metadata json api)
+ end
end
provenance, pips = graph(@objects)
+ @pipelines = @objects
+
@prov_svg = ProvenanceHelper::create_provenance_graph provenance, "provenance_svg", {
:all_script_parameters => true,
:combine_jobs => :script_and_version,
:pips => pips }
end
+ def show_pane_list
+ %w(components graph attributes metadata json api)
+ end
+
+ def compare_pane_list
+ %w(text_compare graph)
+ end
+
protected
def for_comparison v
if v.is_a? Hash or v.is_a? Array
"data-emptytext" => "none",
"data-placement" => "bottom",
"data-type" => input_type,
- "data-resource" => object.class.to_s.underscore,
- "data-name" => attr,
"data-url" => url_for(action: "update", id: object.uuid, controller: object.class.to_s.pluralize.underscore),
- "data-original-title" => "Update #{attr.gsub '_', ' '}",
+ "data-title" => "Update #{attr.gsub '_', ' '}",
+ "data-name" => attr,
+ "data-pk" => "{id: \"#{object.uuid}\", key: \"#{object.class.to_s.underscore}\"}",
:class => "editable"
}.merge(htmloptions)
end
#"\"#{uuid}\" [label=\"#{rsc}\\n#{uuid}\",href=\"#{href}\"];\n"
if rsc == Collection
- puts uuid
+ #puts uuid
if uuid == :"d41d8cd98f00b204e9800998ecf8427e+0"
# special case
- puts "empty!"
+ #puts "empty!"
return "\"#{uuid}\" [label=\"(empty collection)\"];\n"
end
if @pdata[uuid]
<% end %>
<!--
<% if resource_class_for_uuid(attrvalue, {referring_object: obj, referring_attr: attr}) %>
- <%= link_to_if_arvados_object(attrvalue, { referring_object: obj, link_text: raw('<span class="icon-hand-right"></span>'), referring_attr: attr }) %>
+ <%= link_to_if_arvados_object(attrvalue, { referring_object: obj, link_text: raw('<span class="glyphicon glyphicon-hand-right"></span>'), referring_attr: attr }) %>
<% end %>
-->
<% end %>
<% content_for :arvados_object_table do %>
-<%= form_for @object do |f| %>
-<table class="table topalign">
- <thead>
- </thead>
- <tbody>
- <% @object.attributes_for_display.each do |attr, attrvalue| %>
- <%= render partial: 'application/arvados_object_attr', locals: { attr: attr, attrvalue: attrvalue } %>
- <% end %>
- </tbody>
-</table>
-
-<% incoming = Link.where(tail_uuid: @object.uuid) %>
-<% if incoming.items_available > 0 %>
-<h3>Incoming Links</h3>
-<table class="table topalign">
- <thead>
- </thead>
- <tbody>
- <% incoming.each do |link| %>
- <tr>
- <td><%= render partial: 'application/arvados_attr_value', locals: { obj: link, attr: "uuid", attrvalue: link.uuid } %></td>
- <td><%= render partial: 'application/arvados_attr_value', locals: { obj: link, attr: "link_class", attrvalue: link.link_class } %></td>
- <td><%= render partial: 'application/arvados_attr_value', locals: { obj: link, attr: "name", attrvalue: link.name } %></td>
- <td><%= render partial: 'application/arvados_attr_value', locals: { obj: link, attr: "head_uuid", attrvalue: link.head_uuid } %></td>
- <td><%= render partial: 'application/arvados_attr_value', locals: { obj: link, attr: "properties", attrvalue: link.properties } %></td>
- </tr>
- <% end %>
- </tbody>
-</table>
-<% end %>
-
-<% outgoing = Link.where(head_uuid: @object.uuid) %>
-<% if outgoing.items_available > 0 %>
-<h3>Outgoing Links</h3>
-<table class="table topalign">
- <thead>
- </thead>
- <tbody>
- <% outgoing.each do |link| %>
- <tr>
- <td><%= render partial: 'application/arvados_attr_value', locals: { obj: link, attr: "uuid", attrvalue: link.uuid } %></td>
- <td><%= render partial: 'application/arvados_attr_value', locals: { obj: link, attr: "link_class", attrvalue: link.link_class } %></td>
- <td><%= render partial: 'application/arvados_attr_value', locals: { obj: link, attr: "name", attrvalue: link.name } %></td>
- <td><%= render partial: 'application/arvados_attr_value', locals: { obj: link, attr: "tail_uuid", attrvalue: link.tail_uuid } %></td>
- <td><%= render partial: 'application/arvados_attr_value', locals: { obj: link, attr: "properties", attrvalue: link.properties } %></td>
- </tr>
- <% end %>
- </tbody>
-</table>
-<% end %>
-
-<% end %>
<% end %>
<% if content_for? :page_content %>
</div>
<% end %>
<div id="arvados-object-json" class="tab-pane fade in active">
- <pre>
-<%= JSON.pretty_generate(@object.attributes.reject { |k,v| k == 'id' }) rescue nil %>
- </pre>
- </div>
- <% if @object.andand.uuid %>
-
- <div id="arvados-object-curl" class="tab-pane fade">
- <pre>
-curl -X PUT \
- -H "Authorization: OAuth2 $ARVADOS_API_TOKEN" \
- --data-urlencode <%= @object.class.to_s.underscore %>@/dev/stdin \
- https://$ARVADOS_API_HOST/arvados/v1/<%= @object.class.to_s.pluralize.underscore %>/<%= @object.uuid %> \
- <<EOF
-<%= JSON.pretty_generate({@object.attributes.keys[-3] => @object.attributes.values[-3]}) %>
-EOF
- </pre>
- </div>
-
- <div id="arvados-object-arv" class="tab-pane fade">
- <pre>
-arv --pretty <%= @object.class.to_s.underscore %> get \
- --uuid <%= @object.uuid %>
-
-arv <%= @object.class.to_s.underscore %> update \
- --uuid <%= @object.uuid %> \
- --<%= @object.class.to_s.underscore.gsub '_', '-' %> '<%= JSON.generate({@object.attributes.keys[-3] => @object.attributes.values[-3]}).gsub("'","'\''") %>'
- </pre>
</div>
- <div id="arvados-object-python" class="tab-pane fade">
- <pre>
-import arvados
-
-x = arvados.api().<%= @object.class.to_s.pluralize.underscore %>().get(uuid='<%= @object.uuid %>').execute()
- </pre>
- </div>
-
- <% end %>
</div>
</div>
-<%= link_to controller.breadcrumb_page_name, request.fullpath %>
+
-<ul class="nav">
- <li class="nav-separator">
- <span><i class="icon-arrow-right"></i></span>
- </li>
- <li>
- <%= link_to(
- controller.model_class.to_s.pluralize.underscore.gsub('_', ' '),
- url_for({controller: params[:controller]})) %>
- </li>
- <% if params[:action] != 'index' %>
- <li class="nav-separator">
- <span><i class="icon-arrow-right"></i></span>
- </li>
- <li>
- <%= render partial: 'breadcrumb_page_name' %>
- </li>
- <% end %>
-</ul>
--- /dev/null
+<% content_for :tab_panes do %>
+
+<% pane_list ||= %w(recent) %>
+
+<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" id="<%= pane %>-tab"> <%= pane.capitalize.gsub('_', ' ') %></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 %>">
+ <div class="smart-scroll">
+ <%= render partial: 'show_' + pane %>
+ </div>
+ </div>
+<% end %>
+</div>
+
+<% end %>
+
--- /dev/null
+<%= content_for :content_top %>
+<%= content_for :tab_line_buttons %>
+<%= content_for :tab_panes %>
--- /dev/null
+<% if @object.andand.uuid %>
+
+ <pre>
+curl -X PUT \
+ -H "Authorization: OAuth2 $ARVADOS_API_TOKEN" \
+ --data-urlencode <%= @object.class.to_s.underscore %>@/dev/stdin \
+ https://$ARVADOS_API_HOST/arvados/v1/<%= @object.class.to_s.pluralize.underscore %>/<%= @object.uuid %> \
+ <<EOF
+<%= JSON.pretty_generate({@object.attributes.keys[-3] => @object.attributes.values[-3]}) %>
+EOF
+ </pre>
+
+ <pre>
+arv --pretty <%= @object.class.to_s.underscore %> get \
+ --uuid <%= @object.uuid %>
+
+arv <%= @object.class.to_s.underscore %> update \
+ --uuid <%= @object.uuid %> \
+ --<%= @object.class.to_s.underscore.gsub '_', '-' %> '<%= JSON.generate({@object.attributes.keys[-3] => @object.attributes.values[-3]}).gsub("'","'\''") %>'
+ </pre>
+
+ <pre>
+import arvados
+
+x = arvados.api().<%= @object.class.to_s.pluralize.underscore %>().get(uuid='<%= @object.uuid %>').execute()
+ </pre>
+<% end %>
-<%= render partial: 'arvados_object' %>
+<%= form_for @object do |f| %>
+<table class="table topalign">
+ <thead>
+ </thead>
+ <tbody>
+ <% @object.attributes_for_display.each do |attr, attrvalue| %>
+ <%= render partial: 'application/arvados_object_attr', locals: { attr: attr, attrvalue: attrvalue } %>
+ <% end %>
+ </tbody>
+</table>
+
+<% end %>
+
--- /dev/null
+<pre>
+<%= JSON.pretty_generate(@object.attributes.reject { |k,v| k == 'id' }) rescue nil %>
+</pre>
--- /dev/null
+<% outgoing = Link.where(tail_uuid: @object.uuid) %>
+<% incoming = Link.where(head_uuid: @object.uuid) %>
+
+<h3>Metadata about this object</h3>
+<% if outgoing.items_available > 0 %>
+<table class="table topalign">
+ <thead>
+ <tr>
+ <th>metadata uuid</th>
+ <th>class</th>
+ <th>name</th>
+ <th>properties</th>
+ <th>object</th>
+ </tr>
+ </thead>
+ <tbody>
+ <% outgoing.each do |link| %>
+ <tr>
+ <td><%= render partial: 'application/arvados_attr_value', locals: { obj: link, attr: "uuid", attrvalue: link.uuid } %></td>
+ <td><%= render partial: 'application/arvados_attr_value', locals: { obj: link, attr: "link_class", attrvalue: link.link_class } %></td>
+ <td><%= render partial: 'application/arvados_attr_value', locals: { obj: link, attr: "name", attrvalue: link.name } %></td>
+ <td><%= render partial: 'application/arvados_attr_value', locals: { obj: link, attr: "properties", attrvalue: link.properties } %></td>
+ <td><%= render partial: 'application/arvados_attr_value', locals: { obj: link, attr: "head_uuid", attrvalue: link.head_uuid } %></td>
+ </tr>
+ <% end %>
+ </tbody>
+</table>
+<% else %>
+No metadata.
+<% end %>
+
+<h3>Metadata that refers to this object</h3>
+<% if outgoing.items_available > 0 %>
+<table class="table topalign">
+ <thead>
+ <tr>
+ <th>metadata uuid</th>
+ <th>subject</th>
+ <th>class</th>
+ <th>name</th>
+ <th>properties</th>
+ </tr>
+ </thead>
+ <tbody>
+ <% incoming.each do |link| %>
+ <tr>
+ <td><%= render partial: 'application/arvados_attr_value', locals: { obj: link, attr: "uuid", attrvalue: link.uuid } %></td>
+ <td><%= render partial: 'application/arvados_attr_value', locals: { obj: link, attr: "tail_uuid", attrvalue: link.tail_uuid } %></td>
+ <td><%= render partial: 'application/arvados_attr_value', locals: { obj: link, attr: "link_class", attrvalue: link.link_class } %></td>
+ <td><%= render partial: 'application/arvados_attr_value', locals: { obj: link, attr: "name", attrvalue: link.name } %></td>
+ <td><%= render partial: 'application/arvados_attr_value', locals: { obj: link, attr: "properties", attrvalue: link.properties } %></td>
+ </tr>
+ <% end %>
+ </tbody>
+</table>
+<% else %>
+No metadata.
+<% end %>
<td>
<% if object.editable? %>
<%= link_to({action: 'destroy', id: object.uuid}, method: :delete, remote: true, data: {confirm: "You are about to delete #{controller.model_class} #{object.uuid}.\n\nAre you sure?"}) do %>
- <i class="icon-trash"></i>
+ <i class="glyphicon glyphicon-trash"></i>
<% end %>
<% end %>
</td>
<div id="_<%= divId %>_container" style="padding-top: 41px; margin-top: -41px">
<div style="text-align: right">
- <a style="cursor: pointer"><span class="icon-zoom-out" onclick="graph_zoom('<%= divId %>', '<%= svgId %>', .9)"></span></a>
- <a style="cursor: pointer"><span class="icon-zoom-in" onclick="graph_zoom('<%= divId %>', '<%= svgId %>', 1./.9)"></span></a>
+ <a style="cursor: pointer"><span class="glyphicon glyphicon-zoom-out" onclick="graph_zoom('<%= divId %>', '<%= svgId %>', .9)"></span></a>
+ <a style="cursor: pointer"><span class="glyphicon glyphicon-zoom-in" onclick="graph_zoom('<%= divId %>', '<%= svgId %>', 1./.9)"></span></a>
</div>
<div id="<%= divId %>">
<% content_for :page_title do %>
-<%= controller.model_class.to_s.pluralize.underscore.capitalize.gsub '_', ' ' %>
+<%= controller.model_class.to_s.pluralize.underscore.capitalize.gsub('_', ' ') %>
<% end %>
+<% content_for :tab_line_buttons do %>
+
<% 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.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" id="<%= pane %>-tab"> <%= pane.capitalize %></a></li>
- <% end %>
-</ul>
+<% end %>
-<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>
+<%= render partial: 'content', layout: 'content_layout', locals: {pane_list: controller.index_pane_list }%>
<% content_for :page_title do %>
-<%= (@object.respond_to?(:properties) ? @object.properties[:page_title] : nil) ||
- @object.friendly_link_name %>
+ <%= (@object.respond_to?(:properties) ? @object.properties[:page_title] : nil) ||
+ @object.friendly_link_name %>
<% end %>
+<% content_for :content_top do %>
+
<% if @object.respond_to? :properties %>
-<% if @object.properties[:page_content] %>
-<% content_for :page_content do %>
-<h1>
-<%= render_content_from_database(@object.properties[:page_title] || @object.uuid) %>
-</h1>
+ <% if @object.properties[:page_content] %>
+ <% content_for :page_content do %>
+ <h1>
+ <%= render_content_from_database(@object.properties[:page_title] || @object.uuid) %>
+ </h1>
+
+ <% if @object.properties[:page_subtitle] %>
+ <h4>
+ <%= render_content_from_database @object.properties[:page_subtitle] %>
+ </h4>
+ <% end %>
-<% if @object.properties[:page_subtitle] %>
-<h4>
-<%= render_content_from_database @object.properties[:page_subtitle] %>
-</h4>
+ <%= render_content_from_database @object.properties[:page_content] %>
+ <% end %>
+ <% end %>
<% end %>
-<%= render_content_from_database @object.properties[:page_content] %>
-<% end %>
-<% end %>
<% end %>
-<% pane_list = controller.show_pane_list rescue %w(attributes) %>
+<%= render partial: 'content', layout: 'content_layout', locals: {pane_list: controller.show_pane_list }%>
-<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" id="<%= pane %>-tab"><%= pane.capitalize.gsub '_', ' ' %></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: 'show_' + pane %>
- </div>
- <% end %>
-</div>
+++ /dev/null
-<%= render template: 'application/index' %>
<tr class="collection">
<td>
<%= link_to_if_arvados_object c.uuid %>
- </td><td>
- <% c.files.each do |file| %>
- <%= file[0] == '.' ? file[1] : "#{file[0]}/#{file[1]}" %>
+ </td>
+ <td>
+ <% i = 0 %>
+ <% while i < 3 and i < c.files.length %>
+ <% file = c.files[i] %>
+ <% file_path = "#{file[0]}/#{file[1]}" %>
+ <%= link_to file[1], {controller: 'collections', action: 'show_file', uuid: c.uuid, file: file_path, size: file[2], disposition: 'inline'}, {title: 'View in browser'} %><br />
+ <% i += 1 %>
+ <% end %>
+ <% if i < c.files.length %>
+ ⋮
<% end %>
- </td><td>
+ </td>
+ <td><%= render partial: 'application/arvados_attr_value', locals: { obj: c, attr: "owner_uuid", attrvalue: c.owner_uuid } %></td>
+ <td>
<%= raw(distance_of_time_in_words(c.created_at, Time.now).sub('about ','~').sub(' ',' ')) if c.created_at %>
- </td><td>
+ </td>
+ <td>
<% if @collection_info[c.uuid] %>
<%= @collection_info[c.uuid][:tags].uniq.join ', ' %>
<% end %>
- </td><td>
+ </td>
+ <td>
<% if @collection_info[c.uuid][:wanted_by_me] %>
<span class="label label-info">2×</span>
<% elsif @collection_info[c.uuid][:wanted] %>
<tr>
<th>path</th>
<th>file</th>
- <th style="width:1.5em">d/l</th>
+ <th style="width: 3em">d/l</th>
<th style="width: 7em; text-align:right">size</th>
</tr>
</thead><tbody>
<td>
<div style="display:inline-block">
- <%= link_to raw('<i class="icon-download"></i>'), {controller: 'collections', action: 'show_file', uuid: @object.uuid, file: file_path, size: file[2], disposition: 'attachment'}, {class: 'label label-info', title: 'Download'} %>
+ <%= link_to raw('<i class="glyphicon glyphicon-download"></i>'), {controller: 'collections', action: 'show_file', uuid: @object.uuid, file: file_path, size: file[2], disposition: 'attachment'}, {class: 'label label-info', title: 'Download'} %>
</div>
</td>
+<% content_for :tab_line_buttons do %>
<div class="pull-right">
<%= form_tag collections_path, method: 'get', remote: true, class: 'form-search' do %>
<div class="input-append">
</div>
<% end %>
</div>
+<% end %>
+
+<div style="padding-right: 1em">
<table id="collections-index" class="topalign table table-bordered table-condensed table-fixedlayout table-smallcontent">
<colgroup>
<col width="10%" />
- <col width="50%" />
- <col width="16%" />
+ <col width="36%" />
+ <col width="22%" />
+ <col width="8%" />
<col width="16%" />
<col width="8%" />
</colgroup>
<thead>
<tr class="contain-align-left">
- <th>
- uuid
- </th><th>
- contents
- </th><th>
- age
- </th><th>
- tags
- </th><th>
- storage
- </th>
+ <th>uuid</th>
+ <th>contents</th>
+ <th>owner</th>
+ <th>age</th>
+ <th>tags</th>
+ <th>storage</th>
</tr>
</thead>
<tbody>
<%= render partial: 'index_tbody' %>
</tbody>
</table>
+</div>
<% content_for :js do %>
$(document).on('click', 'form[data-remote] input[type=submit]', function() {
-<%= render partial: 'arvados_object' %>
-
<%= render partial: 'application/svg_div', locals: {
divId: "provenance_graph",
svgId: "provenance_svg",
</tbody>
</table>
-<%= render partial: 'application/svg_div', locals: {
- divId: "provenance_graph",
- svgId: "provenance_svg",
- svg: @svg } %>
-
<meta charset="utf-8">
<title>
<% if content_for? :page_title %>
- <%= yield :page_title %> @<%= Rails.configuration.site_name %>
+ <%= yield :page_title %> / <%= Rails.configuration.site_name %>
<% else %>
<%= Rails.configuration.site_name %>
<% end %>
<%= yield :js %>
<% end %>
<style>
+ <%= yield :css %>
+ body {
+ min-height: 100%;
+ height: 100%;
+ }
+
body > div.container-fluid {
- padding-top: 60px; /* 60px to make the container go all the way to the
- bottom of the topbar */
+ padding-top: 70px; /* 70px to make the container go all the way to the bottom of the navbar */
}
+
+ body > div.container-fluid > div.col-sm-9.col-sm-offset-3 {
+ overflow: auto;
+ }
+
@media (max-width: 979px) { body { padding-top: 0; } }
- <%= yield :css %>
+
+ .navbar .nav li.nav-separator > span.glyphicon.glyphicon-arrow-right {
+ padding-top: 1.25em;
+ }
+
+ /* Setting the height needs to be fixed with javascript. */
+ .dropdown-menu {
+ padding-right: 20px;
+ max-height: 440px;
+ width: 400px;
+ overflow-y: auto;
+ }
+
+ .arvados-nav-container {
+ position: fixed;
+ top: 70px;
+ height: calc(100% - 70px);
+ overflow: auto;
+ z-index: 2;
+ }
+ .arvados-nav-active {
+ background: rgb(66, 139, 202);
+ }
+ .arvados-nav-active a {
+ color: white;
+ }
</style>
</head>
<body>
- <div class="navbar navbar-fixed-top">
- <div class="navbar-inner">
- <ul class="nav">
- <li class="dropdown">
- <a href="#" class="dropdown-toggle" data-toggle="dropdown" href="/">
- <b><%= Rails.configuration.site_name rescue Rails.application.class.parent_name %></b>
- </a>
- <ul class="dropdown-menu">
- <li><%= link_to 'Home', root_url %></li>
- <li class="divider"></li>
- <li><%= link_to 'Keys', authorized_keys_path %></li>
- <li><%= link_to 'VMs', virtual_machines_path %></li>
- <li><%= link_to 'Repositories', repositories_path %></li>
- <li><%= link_to 'API Tokens', api_client_authorizations_path %></li>
- <li class="divider"></li>
- <li><%= link_to 'Jobs', jobs_path %></li>
- <li><%= link_to 'Pipeline instances', pipeline_instances_path %></li>
- <li><%= link_to 'Pipeline templates', pipeline_templates_path %></li>
- <li class="divider"></li>
- <li><%= link_to 'Collections', collections_path %></li>
- <li><%= link_to 'Links', links_path %></li>
- <li><%= link_to 'Humans', humans_path %></li>
- <li><%= link_to 'Specimens', specimens_path %></li>
- <li><%= link_to 'Traits', traits_path %></li>
- <li class="divider"></li>
- <% if current_user.andand.is_admin %>
- <li><%= link_to 'Users', users_path %></li>
- <% end %>
- <li><%= link_to 'Groups', groups_path %></li>
- <li><%= link_to 'Compute nodes', nodes_path %></li>
- <li><%= link_to 'Keep disks', keep_disks_path %></li>
- </ul>
- </li>
+ <div class="navbar navbar-default navbar-fixed-top">
+ <div class="container-fluid">
+ <ul class="nav navbar-nav navbar-left">
+ <li><a class="navbar-brand" href="/"><%= Rails.configuration.site_name rescue Rails.application.class.parent_name %></a></li>
+ <% if current_user %>
+ <li class="nav-separator"><span class="glyphicon glyphicon-arrow-right"></span></li>
+ <% if content_for?(:breadcrumbs) %>
+ <%= yield(:breadcrumbs) %>
+ <% else %>
+ <li>
+ <%= link_to(
+ controller.model_class.to_s.pluralize.underscore.gsub('_', ' '),
+ url_for({controller: params[:controller]})) %>
+ </li>
+ <% if params[:action] != 'index' %>
+ <li class="nav-separator">
+ <span class="glyphicon glyphicon-arrow-right"></span>
+ </li>
+ <li>
+<%= link_to controller.breadcrumb_page_name, request.fullpath %>
+ </li>
+ <% end %>
+ <% end %>
+ <% end %>
</ul>
- <%= content_for?(:breadcrumbs) ? yield(:breadcrumbs) : render(partial: 'breadcrumbs') %>
+
+ <ul class="nav navbar-nav navbar-right">
- <ul class="nav pull-right">
+ <% if current_user %>
<li>
<div class="loading" style="transform: translate(-20px,20px) scale(0.1,0.1); -ms-transform: translate(-20px,20px) scale(0.1,0.1); -webkit-transform: translate(-20px,20px) scale(0.1,0.1); display: none">
<%= render partial: 'loading' %>
</div>
</li>
+
+ <!-- XXX placeholder for this when search is implemented
+ <li>
+ <form class="navbar-form" role="search">
+ <div class="input-group" style="width: 220px">
+ <input type="text" class="form-control" placeholder="search">
+ <span class="input-group-addon"><span class="glyphicon glyphicon-search"></span></span>
+ </div>
+ </form>
+ </li>
+ -->
+
+ <!-- XXX placeholder for this when persistent selection is implemented
<li class="dropdown">
- <a href="#" class="dropdown-toggle" data-toggle="dropdown" href="/">
- Help <span class="caret"></span>
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">
+ <span class="glyphicon glyphicon-paperclip"></span>
+ <span class="badge"><%= @selection_count %></span>
+ <span class="caret"></span>
</a>
- <ul class="dropdown-menu">
- <li><%= link_to 'Tutorials and User guide', "#{Rails.configuration.arvados_docsite}/user", target: "_blank" %></li>
- <li><%= link_to 'API Reference', "#{Rails.configuration.arvados_docsite}/api", target: "_blank" %></li>
- <li><%= link_to 'SDK Reference', "#{Rails.configuration.arvados_docsite}/sdk", target: "_blank" %></li>
- <li><%= link_to 'Admin guide', "#{Rails.configuration.arvados_docsite}/admin", target: "_blank" %></li>
+ <ul class="dropdown-menu" role="menu">
+ <li style="padding: 10px">No selections.</li>
+ </ul>
+ </li>
+ -->
+
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">
+ <span class="glyphicon glyphicon-envelope"></span>
+ <span class="badge"><%= @notification_count %></span>
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <% if @notifications.length > 0 %>
+ <% @notifications.each do |n| %>
+ <li style="padding: 10px"><%= n.call(self) %></li>
+ <li class="divider"></li>
+ <% end %>
+ <% else %>
+ <li style="padding: 10px">No notifications.</li>
+ <% end %>
+ </ul>
+ </li>
+
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">
+ <span class="glyphicon glyphicon-user"></span><span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li role="presentation" class="dropdown-header"><%= current_user.email %></li>
+ <li role="presentation" class="divider"></li>
+ <li role="presentation"><a href="/authorized_keys" role="menuitem">Manage ssh keys</a></li>
+ <li role="presentation"><a href="/api_client_authorizations" role="menuitem">Manage API tokens</a></li>
+ <li role="presentation" class="divider"></li>
+ <li role="presentation"><a href="<%= logout_path %>" role="menuitem">Log out</a></li>
</ul>
</li>
- <% if current_user -%>
- <li><span class="badge badge-info" style="margin: 10px auto 10px; padding-top: 4px; padding-bottom: 4px"><%= current_user.email %></span></li>
- <li><a href="<%= logout_path %>">Log out</a></li>
<% else -%>
<li><a href="<%= $arvados_api_client.arvados_login_url(return_to: root_url) %>">Log in</a></li>
<% end -%>
</div>
<div class="container-fluid">
+ <div class="col-sm-3">
+ <div class="left-nav arvados-nav-container">
+ <% if current_user %>
+ <div class="well">
+ <ul class="arvados-nav">
+ <li><a href="/">Dashboard</a></li>
+
+ <% [['Data', [['humans'],
+ ['traits'],
+ ['specimens'],
+ ['collections', 'Files'],
+ ['links', 'Metadata']]],
+ ['Compute', [['pipeline_templates', 'Pipelines'],
+ ['repositories', 'Code repositories'],
+ ['virtual_machines']]],
+ ['Activity', [['pipeline_instances', 'Recent pipelines'],
+ ['jobs', 'Recent jobs']]]].each do |j| %>
+ <li><%= j[0] %>
+ <ul>
+ <% j[1].each do |k| %>
+ <li class="<%= 'arvados-nav-active' if params[:controller] == k[0] %>">
+ <a href="/<%= k[0] %>">
+ <%= if k[1] then k[1] else k[0].capitalize.gsub('_', ' ') end %>
+ </a>
+ </li>
+ <% end %>
+ </ul>
+ </li>
+ <% end %>
- <div class="body-content">
- <%= yield %>
- </div>
+ <li>Help
+ <ul>
+ <li><%= link_to 'Tutorials and User guide', "#{Rails.configuration.arvados_docsite}/user", target: "_blank" %></li>
+ <li><%= link_to 'API Reference', "#{Rails.configuration.arvados_docsite}/api", target: "_blank" %></li>
+ <li><%= link_to 'SDK Reference', "#{Rails.configuration.arvados_docsite}/sdk", target: "_blank" %></li>
+ <li><%= link_to 'Admin guide', "#{Rails.configuration.arvados_docsite}/admin", target: "_blank" %></li>
+ </ul>
+ </li>
+ <% if current_user.andand.is_admin %>
- </div> <!-- /container -->
+ <% [['Admin', [['users'],
+ ['groups'],
+ ['nodes', 'Compute nodes'],
+ ['keep_disks']]]].each do |j| %>
+ <li><%= j[0] %>
+ <ul>
+ <% j[1].each do |k| %>
+ <li class="<%= "arvados-nav-active" if params[:controller] == k[0] %>">
+ <a href="/<%= k[0] %>">
+ <%= if k[1] then k[1] else k[0].capitalize.gsub('_', ' ') end %>
+ </a>
+ </li>
+ <% end %>
+ </ul>
+ </li>
+ <% end %>
+ <% end %>
+ </ul>
+ </div>
+ <% end %>
+ </div>
+ </div>
+ <div class="col-sm-9 col-sm-offset-3">
+ <div id="content">
+ <%= yield %>
+ </div>
+ </div>
+ </div>
<%= piwik_tracking_tag %>
<%= javascript_tag do %>
<td>
<% if current_user and (current_user.is_admin or current_user.uuid == link.owner_uuid) %>
- <%= link_to raw('<i class="icon-trash"></i>'), { action: 'destroy', id: link.uuid }, { confirm: 'Delete this link?', method: 'delete' } %>
+ <%= link_to raw('<i class="glyphicon glyphicon-trash"></i>'), { action: 'destroy', id: link.uuid }, { confirm: 'Delete this link?', method: 'delete' } %>
<% end %>
</td>
--- /dev/null
+ <%= image_tag "dax.png", class: "dax" %>
+ <p>
+ Hi, I noticed you haven't uploaded a new collection yet.
+ <%= link_to "Click here to learn how to upload data to Arvados Keep.",
+ "#{Rails.configuration.arvados_docsite}/user/tutorials/tutorial-keep.html",
+ style: "font-weight: bold", target: "_blank" %>
+ </p>
--- /dev/null
+ <p><%= image_tag "dax.png", class: "dax" %>
+ Hi, I noticed you haven't run a job yet.
+ <%= link_to "Click here to learn how to run an Arvados Crunch job.",
+ "#{Rails.configuration.arvados_docsite}/user/tutorials/tutorial-job1.html",
+ style: "font-weight: bold",
+ target: "_blank" %>
+ </p>
+
--- /dev/null
+ <p><%= image_tag "dax.png", class: "dax" %>
+ Hi, I noticed you haven't run a pipeline yet.
+ <%= link_to "Click here to learn how to run an Arvados Crunch pipeline.",
+ "#{Rails.configuration.arvados_docsite}/user/tutorials/tutorial-new-pipeline.html",
+ style: "font-weight: bold",
+ target: "_blank" %>
+ </p>
--- /dev/null
+ <%= image_tag "dax.png", class: "dax" %>
+ <div>
+ Hi, I noticed that you have not yet set up an SSH public key for use with Arvados.
+ <%= link_to "Click here to learn about SSH keys in Arvados.",
+ "#{Rails.configuration.arvados_docsite}/user/getting_started/ssh-access.html",
+ style: "font-weight: bold",
+ target: "_blank" %>
+ When you have an SSH key you would like to use, paste the SSH public key
+ in the text box.
+ </div>
+ <%= form_for AuthorizedKey.new, remote: true do |f| %>
+ <div class="row-fluid">
+ <%= hidden_field_tag :return_to, request.original_url %>
+ <%= hidden_field_tag :disable_element, 'input[type=submit]' %>
+ <%= f.text_area :public_key, rows: 4, placeholder: "Paste your public key here", style: "width: 100%" %>
+ </div>
+ <div class="row-fluid" style="padding-top: 0; padding-bottom: 15px">
+ <%= f.submit :Save, value: raw("✓"), class: "btn btn-primary pull-right" %>
+ </div>
+<% end %>
</tfoot>
</table>
-<% if @pipelines.count > 1 %>
- <div style="text-align: center">
- <span class="pipeline_color_legend" style="background: #88ff88">This pipeline</span>
- <span class="pipeline_color_legend" style="background: #8888ff">Comparison pipeline</span>
- <span class="pipeline_color_legend" style="background: #88ffff">Shared by both pipelines</span>
- </div>
-<% end %>
-
- <%= render partial: 'application/svg_div', locals: {
- divId: "provenance_graph",
- svgId: "provenance_svg",
- svg: @prov_svg } %>
-
-<div style="height: 1em"></div>
-
-<%= render partial: 'arvados_object' %>
-
<% if @object.active %>
<% content_for :js do %>
setInterval(function(){$('a.refresh').click()}, 30000);
--- /dev/null
+<% content_for :css do %>
+ .pipeline_color_legend {
+ padding-left: 1em;
+ padding-right: 1em;
+ }
+<% end %>
+
+<% if @pipelines.count > 1 %>
+ <div style="text-align: center">
+ <span class="pipeline_color_legend" style="background: #88ff88">This pipeline</span>
+ <span class="pipeline_color_legend" style="background: #8888ff">Comparison pipeline</span>
+ <span class="pipeline_color_legend" style="background: #88ffff">Shared by both pipelines</span>
+ </div>
+<% end %>
+
+<%= render partial: 'application/svg_div', locals: {
+ divId: "provenance_graph",
+ svgId: "provenance_svg",
+ svg: @prov_svg } %>
+<%= content_for :tab_line_buttons do %>
+<%= 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 %>
+<% end %>
+
<%= form_tag do |f| %>
<table class="table table-hover">
</small>
</td><td>
<%= ob.created_at %>
- </td><td>
- <% if ob.editable? %>
- <%= link_to({action: 'destroy', id: ob.uuid}, method: :delete, remote: true, data: {confirm: "You are about to delete #{controller.model_class} #{ob.uuid}.\n\nAre you sure?"}) do %>
- <i class="icon-trash"></i>
- <% end %>
- <% end %>
</td>
</tr>
--- /dev/null
+<% content_for :css do %>
+.notnormal {
+ background: #ffffaa;
+}
+.headrow div {
+ padding-top: .5em;
+ padding-bottom: .5em;
+}
+.headrow:first-child {
+ border-bottom: 1px solid black;
+}
+<% end %>
+
+<%# pi_span = [(10.0/[@objects.count,1].max).floor,1].max %>
+<% pi_span = 4 %>
+
+<div class="headrow">
+ <div class="row">
+ <div class="col-sm-2">
+ <%# label %>
+ </div>
+ <% @objects.each do |object| %>
+ <div class="col-sm-<%= pi_span %>">
+ <%= render partial: 'application/arvados_attr_value', locals: { obj: object, attr: 'uuid', attrvalue: object.uuid } %>
+ <%= render partial: 'application/arvados_attr_value', locals: { obj: object, attr: 'pipeline_template_uuid', attrvalue: object.pipeline_template_uuid } %>
+ </div>
+ <% end %>
+ </div>
+</div>
+
+<% @rows.each do |row| %>
+<div class="row">
+ <div class="col-sm-2">
+ <%= row[:name] %>
+ </div>
+ <% @objects.each_with_index do |_, x| %>
+ <div class="col-sm-<%= pi_span %>">
+ <div class="row">
+
+ <% if row[:components][x] %>
+ <% pj = render_pipeline_job row[:components][x] %>
+
+ <%= link_to_if_arvados_object pj[:job_id], {friendly_name: true, with_class_name: true}, {class: 'deemphasize'} %>
+ <br />
+
+ <% %w(script script_version script_parameters output).each do |key| %>
+ <% unless key=='output' and pj[:result] != 'complete' %>
+ <% val = pj[key.to_sym] || pj[:job].andand[key.to_sym] %>
+ <% link_name = case
+ when !val
+ val = ''
+ when key == 'script_version' && val.match(/^[0-9a-f]{7,}$/)
+ val = val[0..7] # TODO: leave val alone, make link_to handle git commits
+ when key == 'output'
+ val.sub! /\+K.*$/, ''
+ val[0..12]
+ when key == 'script_parameters'
+ val = val.keys.sort.join(', ')
+ end
+ %>
+ <span class="deemphasize"><%= key %>:</span> <span class="<%= 'notnormal' if !pj[:is_normal][key.to_sym] %>"><%= link_to_if_arvados_object val, {friendly_name: true, link_text: link_name} %></span>
+ <% end %>
+ <br />
+ <% end %>
+ <% else %>
+ None
+ <% end %>
+ </div>
+ </div>
+ <% end %>
+</div>
+<div class="row" style="padding: .5em">
+</div>
+<% end %>
+
+
-<% content_for :css do %>
-.notnormal {
- background: #ffffaa;
-}
-.headrow div {
- padding-top: .5em;
- padding-bottom: .5em;
-}
-.headrow:first-child {
- border-bottom: 1px solid black;
-}
-<% end %>
-
-<% 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">
- <div class="span2">
- <%# label %>
- </div>
- <% @objects.each do |object| %>
- <div class="span<%= pi_span %>">
- <%= render partial: 'application/arvados_attr_value', locals: { obj: object, attr: attr, attrvalue: object.send(attr.to_sym) } %>
- </div>
- <% end %>
-</div>
-<% end %>
-</div>
-
-<% @rows.each do |row| %>
-<div class="row">
- <div class="span2">
- <%= row[:name] %>
- </div>
- <% @objects.each_with_index do |_, x| %>
- <div class="span<%= pi_span %>">
- <div class="row">
-
- <% if row[:components][x] %>
- <% pj = render_pipeline_job row[:components][x] %>
-
- <div class="span3">
- <%= link_to_if_arvados_object pj[:job_id], {friendly_name: true, with_class_name: true}, {class: 'deemphasize'} %>
- </div>
-
- <% %w(script script_version script_parameters output).each do |key| %>
- <div class="span3">
- <% unless key=='output' and pj[:result] != 'complete' %>
- <% val = pj[key.to_sym] || pj[:job].andand[key.to_sym] %>
- <% link_name = case
- when !val
- val = ''
- when key == 'script_version' && val.match(/^[0-9a-f]{7,}$/)
- val = val[0..7] # TODO: leave val alone, make link_to handle git commits
- when key == 'output'
- val.sub! /\+K.*$/, ''
- val[0..12]
- when key == 'script_parameters'
- val = val.keys.sort.join(', ')
- end
- %>
- <span class="deemphasize"><%= key %>:</span> <span class="<%= 'notnormal' if !pj[:is_normal][key.to_sym] %>"><%= link_to_if_arvados_object val, {friendly_name: true, link_text: link_name} %></span>
- <% end %>
- </div>
- <% end %>
- <% else %>
- None
- <% end %>
- </div>
- </div>
- <% end %>
-</div>
-<div class="row" style="padding: .5em">
-</div>
-<% end %>
-
-
- <div style="text-align: center">
- <span class="pipeline_color_legend" style="background: #88ff88">This pipeline</span>
- <span class="pipeline_color_legend" style="background: #8888ff">Comparison pipeline</span>
- <span class="pipeline_color_legend" style="background: #88ffff">Shared by both pipelines</span>
- </div>
-
- <%= render partial: 'application/svg_div', locals: {
- divId: "provenance_graph",
- svgId: "provenance_svg",
- svg: @prov_svg } %>
+<%= render partial: 'content', layout: 'content_layout', locals: {pane_list: controller.compare_pane_list } %>
<% end %>
</tbody>
</table>
-<pre>
-<%= JSON.pretty_generate(@object.attributes) rescue nil %>
-</pre>
<div class="container-fluid">
- <div class="span3 pull-right">
- <br/>
-
- <div class="well">
-<% if current_user.andand.is_active %>
- <p>Your account status:<br/>
- <strong>Active</strong></p>
-<% elsif current_user %>
- <p>Your account status:<br/>
- <strong>New / inactive</strong></p>
- <p>
- Your account must be activated by an Arvados administrator. If this
- is your first time accessing Arvados and would like to request
- access, or you believe you are seeing the page in error, please
- <%= link_to "contact us", Rails.configuration.activation_contact_link %>.
- You should receive an email at the address you used to log in when
- your account is activated.
- </p>
- <p>
- <%= link_to raw('Contact us ✉'),
- Rails.configuration.activation_contact_link, class: "btn btn-primary" %></p>
-<% end %>
- </div>
-
- <%= render :partial => 'notifications' %>
- </div>
-
- <div class="span8" id="home-tables">
<%= render :partial => 'tables' %>
- </div>
</div>
<% if @my_pipelines.count == 0 || @showallalerts %>
<div class="alert alert-info daxalert">
<button type="button" class="close" data-dismiss="alert">×</button>
- <p><%= image_tag "dax.png", class: "dax" %>
- Hi, I noticed you haven't run a pipeline yet.
- <%= link_to "Click here to learn how to run an Arvados Crunch pipeline.",
- "#{Rails.configuration.arvados_docsite}/user/tutorials/tutorial-new-pipeline.html",
- style: "font-weight: bold",
- target: "_blank" %>
- </p>
+
</div>
<% end %>
<% end %>
-<div class="well">
- <p><strong>Useful links</strong></p>
- <p><ul>
- <li><%= link_to "Arvados project page", "http://arvados.org", target: "_blank" %></li>
- <li><%= link_to "Tutorials and user guide",
- "#{Rails.configuration.arvados_docsite}/user/", target: "_blank" %></li>
- </ul>
- </p>
-</div>
-
+<!--
<% if current_user.andand.is_active %>
<div class="well">
<p><strong>System status</strong></p>
</table>
</div>
<% end %>
+-->