[ARVADOS] updated: 3a1b569ab49c1e77bc9b3d7a9f38cf9de753ec47
git at public.curoverse.com
git at public.curoverse.com
Thu Feb 6 15:04:19 EST 2014
Summary of changes:
.../api_client_authorizations/_show_help.html.erb | 14 ++
.../app/views/application/_content.html.erb | 21 +++
.../app/views/application/_content_layout.html.erb | 3 +
.../.gitkeep => views/application/_index.html.erb} | 0
.../app/views/application/_show_metadata.html.erb | 58 +++++++++
.../app/views/application/_show_recent.html.erb | 61 +++++++++
.../app/views/authorized_keys/_show_help.html.erb | 10 ++
.../app/views/collections/_show_recent.html.erb | 44 +++++++
.../app/views/groups/_show_recent.html.erb | 42 ++++++
.../workbench/app/views/jobs/_show_recent.html.erb | 136 ++++++++++++++++++++
.../views/pipeline_instances/_show_recent.html.erb | 92 +++++++++++++
.../pipeline_instances/_show_text_compare.html.erb | 76 +++++++++++
.../pipeline_templates/_show_attributes.html.erb | 39 ++++++
.../views/pipeline_templates/_show_recent.html.erb | 34 +++++
.../app/views/repositories/_show_help.html.erb | 27 ++++
.../app/views/virtual_machines/_show_help.html.erb | 26 ++++
16 files changed, 683 insertions(+), 0 deletions(-)
create mode 100644 apps/workbench/app/views/api_client_authorizations/_show_help.html.erb
create mode 100644 apps/workbench/app/views/application/_content.html.erb
create mode 100644 apps/workbench/app/views/application/_content_layout.html.erb
copy apps/workbench/app/{mailers/.gitkeep => views/application/_index.html.erb} (100%)
create mode 100644 apps/workbench/app/views/application/_show_metadata.html.erb
create mode 100644 apps/workbench/app/views/application/_show_recent.html.erb
create mode 100644 apps/workbench/app/views/authorized_keys/_show_help.html.erb
create mode 100644 apps/workbench/app/views/collections/_show_recent.html.erb
create mode 100644 apps/workbench/app/views/groups/_show_recent.html.erb
create mode 100644 apps/workbench/app/views/jobs/_show_recent.html.erb
create mode 100644 apps/workbench/app/views/pipeline_instances/_show_recent.html.erb
create mode 100644 apps/workbench/app/views/pipeline_instances/_show_text_compare.html.erb
create mode 100644 apps/workbench/app/views/pipeline_templates/_show_attributes.html.erb
create mode 100644 apps/workbench/app/views/pipeline_templates/_show_recent.html.erb
create mode 100644 apps/workbench/app/views/repositories/_show_help.html.erb
create mode 100644 apps/workbench/app/views/virtual_machines/_show_help.html.erb
via 3a1b569ab49c1e77bc9b3d7a9f38cf9de753ec47 (commit)
from 928565a23bf5ff54fb524b6c38f8e2b0f4b27725 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 3a1b569ab49c1e77bc9b3d7a9f38cf9de753ec47
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Thu Feb 6 15:05:15 2014 -0500
Missing from previous commit
diff --git a/apps/workbench/app/views/api_client_authorizations/_show_help.html.erb b/apps/workbench/app/views/api_client_authorizations/_show_help.html.erb
new file mode 100644
index 0000000..1481721
--- /dev/null
+++ b/apps/workbench/app/views/api_client_authorizations/_show_help.html.erb
@@ -0,0 +1,14 @@
+<pre>
+### Pasting the following lines at a shell prompt will allow Arvados SDKs
+### to authenticate to your account, <%= current_user.email %>
+
+read ARVADOS_API_TOKEN <<EOF
+<%= Thread.current[:arvados_api_token] %>
+EOF
+export ARVADOS_API_TOKEN ARVADOS_API_HOST=<%= current_api_host %>
+<% if Rails.configuration.arvados_insecure_https %>
+export ARVADOS_API_HOST_INSECURE=true
+<% else %>
+unset ARVADOS_API_HOST_INSECURE
+<% end %>
+</pre>
diff --git a/apps/workbench/app/views/application/_content.html.erb b/apps/workbench/app/views/application/_content.html.erb
new file mode 100644
index 0000000..37250cc
--- /dev/null
+++ b/apps/workbench/app/views/application/_content.html.erb
@@ -0,0 +1,21 @@
+<% 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 %>
+
diff --git a/apps/workbench/app/views/application/_content_layout.html.erb b/apps/workbench/app/views/application/_content_layout.html.erb
new file mode 100644
index 0000000..c7ff33b
--- /dev/null
+++ b/apps/workbench/app/views/application/_content_layout.html.erb
@@ -0,0 +1,3 @@
+<%= content_for :content_top %>
+<%= content_for :tab_line_buttons %>
+<%= content_for :tab_panes %>
diff --git a/apps/workbench/app/views/application/_index.html.erb b/apps/workbench/app/views/application/_index.html.erb
new file mode 100644
index 0000000..e69de29
diff --git a/apps/workbench/app/views/application/_show_metadata.html.erb b/apps/workbench/app/views/application/_show_metadata.html.erb
new file mode 100644
index 0000000..3972da0
--- /dev/null
+++ b/apps/workbench/app/views/application/_show_metadata.html.erb
@@ -0,0 +1,58 @@
+<% 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 %>
diff --git a/apps/workbench/app/views/application/_show_recent.html.erb b/apps/workbench/app/views/application/_show_recent.html.erb
new file mode 100644
index 0000000..86b6b04
--- /dev/null
+++ b/apps/workbench/app/views/application/_show_recent.html.erb
@@ -0,0 +1,61 @@
+<% if @objects.empty? %>
+<br/>
+<p style="text-align: center">
+ No <%= controller.model_class.to_s.pluralize.underscore.gsub '_', ' ' %> to display.
+</p>
+
+<% else %>
+
+<% attr_blacklist = ' created_at modified_at modified_by_user_uuid modified_by_client_uuid updated_at' %>
+
+<table class="table arv-index">
+ <thead>
+ <tr>
+ <% @objects.first.attributes_for_display.each do |attr, attrvalue| %>
+ <% next if attr_blacklist.index(" "+attr) %>
+ <th class="arv-attr-<%= attr %>">
+ <%= controller.model_class.attribute_info[attr.to_sym].andand[:column_heading] or attr.sub /_uuid/, '' %>
+ </th>
+ <% end %>
+ <th>
+ <!-- a column for delete buttons -->
+ </th>
+ </tr>
+ </thead>
+
+ <tbody>
+ <% @objects.each do |object| %>
+ <tr data-object-uuid="<%= object.uuid %>">
+ <% object.attributes_for_display.each do |attr, attrvalue| %>
+ <% next if attr_blacklist.index(" "+attr) %>
+ <td class="arv-object-<%= object.class.to_s %> arv-attr-<%= attr %>">
+ <% if attr == 'uuid' %>
+ <%= link_to_if_arvados_object object %>
+ <%= link_to_if_arvados_object(object, { link_text: raw('<i class="icon-hand-right"></i>') }) %>
+ <% else %>
+ <% if object.attribute_editable? attr %>
+ <%= render_editable_attribute object, attr %>
+ <% else %>
+ <%= resource_class_for_uuid(attrvalue, referring_attr: attr, referring_object: @object).to_s %>
+ <%= attrvalue %>
+ <% end %>
+ <%= link_to_if_arvados_object(attrvalue, { referring_object: @object, link_text: raw('<i class="icon-hand-right"></i>') }) if resource_class_for_uuid(attrvalue, {referring_object: @object}) %>
+ <% end %>
+ </td>
+ <% 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="glyphicon glyphicon-trash"></i>
+ <% end %>
+ <% end %>
+ </td>
+ </tr>
+ <% end %>
+ </tbody>
+
+ <tfoot>
+ </tfoot>
+</table>
+
+<% end %>
diff --git a/apps/workbench/app/views/authorized_keys/_show_help.html.erb b/apps/workbench/app/views/authorized_keys/_show_help.html.erb
new file mode 100644
index 0000000..db4d4dc
--- /dev/null
+++ b/apps/workbench/app/views/authorized_keys/_show_help.html.erb
@@ -0,0 +1,10 @@
+<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>
diff --git a/apps/workbench/app/views/collections/_show_recent.html.erb b/apps/workbench/app/views/collections/_show_recent.html.erb
new file mode 100644
index 0000000..6194202
--- /dev/null
+++ b/apps/workbench/app/views/collections/_show_recent.html.erb
@@ -0,0 +1,44 @@
+<% 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">
+ <%= text_field_tag :search, params[:search], class: 'search-query' %>
+ <%= submit_tag "Search", name: nil, class: 'btn btn-info' %>
+ </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="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>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() {
+ $('table#collections-index tbody').fadeTo(200, 0.3);
+ return true;
+});
+<% end %>
diff --git a/apps/workbench/app/views/groups/_show_recent.html.erb b/apps/workbench/app/views/groups/_show_recent.html.erb
new file mode 100644
index 0000000..1e81518
--- /dev/null
+++ b/apps/workbench/app/views/groups/_show_recent.html.erb
@@ -0,0 +1,42 @@
+<table class="table table-hover">
+ <thead>
+ <tr class="contain-align-left">
+ <th>
+ id
+ </th><th>
+ name
+ </th><th>
+ owner
+ </th><th>
+ incoming permissions
+ </th><th>
+ outgoing permissions
+ </th><th>
+ owned
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+
+ <% @groups.sort_by { |g| g[:created_at] }.reverse.each do |g| %>
+
+ <tr>
+ <td>
+ <%= link_to_if_arvados_object g %>
+ </td><td>
+ <%= g.name %>
+ </td><td>
+ <%= g.owner_uuid %>
+ </td><td>
+ <%= @links_to.select { |x| x.head_uuid == g.uuid }.collect(&:tail_uuid).uniq.count %>
+ </td><td>
+ <%= @links_from.select { |x| x.tail_uuid == g.uuid }.collect(&:head_uuid).uniq.count %>
+ </td><td>
+ <%= @owned_users.select { |x| x.owner_uuid == g.uuid }.count %> users<br />
+ </td>
+ </tr>
+
+ <% end %>
+
+ </tbody>
+</table>
diff --git a/apps/workbench/app/views/jobs/_show_recent.html.erb b/apps/workbench/app/views/jobs/_show_recent.html.erb
new file mode 100644
index 0000000..85331f3
--- /dev/null
+++ b/apps/workbench/app/views/jobs/_show_recent.html.erb
@@ -0,0 +1,136 @@
+<% content_for :css do %>
+ table.topalign>tbody>tr>td {
+ vertical-align: top;
+ }
+ table.topalign>thead>tr>td {
+ vertical-align: bottom;
+ }
+<% end %>
+
+<table class="topalign table">
+ <thead>
+ <tr class="contain-align-left">
+ <th>
+ </th><th>
+ status
+ </th><th>
+ progress
+ </th><th>
+ uuid
+ </th><th>
+ script
+ </th><th>
+ version
+ </th><th>
+ output
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+
+ <% @jobs.sort_by { |j| j[:created_at] }.reverse.each do |j| %>
+
+ <tr class="cell-noborder">
+ <td>
+ <i class="icon-plus-sign expand-collapse-row" data-id="<%= j.uuid %>" style="cursor: pointer"></i>
+ </td>
+ <td>
+ <% if j.success == false %>
+ <span class="badge badge-warning" title="fail">✖</span>
+ <% elsif j.success %>
+ <span class="badge badge-success" title="success">✔</span>
+ <% elsif j.running %>
+ <span class="badge badge-info" title="running">✈</span>
+ <% else %>
+ <span class="badge" title="queued">✉</span>
+ <% end %>
+ </td>
+ <td>
+ <% if j.started_at and not j.finished_at %>
+ <% percent_total_tasks = 100 / (j.tasks_summary[:running] + j.tasks_summary[:done] + j.tasks_summary[:todo]) rescue 0 %>
+ <div class="progress" style="margin-bottom: 0">
+ <div class="bar bar-success" style="width: <%= j.tasks_summary[:done] * percent_total_tasks rescue 0 %>%;"></div>
+ <div class="bar" style="width: <%= j.tasks_summary[:running] * percent_total_tasks rescue 0 %>%; opacity: 0.3"></div>
+ </div>
+ <% end %>
+ </td>
+ <td>
+ <%= link_to_if_arvados_object j.uuid %>
+ </td>
+ <td>
+ <%= j.script %>
+ </td>
+ <td>
+ <%= j.script_version.andand[0..8] %>
+ </td>
+ <td>
+ <%= link_to_if_arvados_object j.output %>
+ </td>
+ </tr>
+ <tr class="cell-noborder" id="<%= j.uuid %>" style="display:none">
+ <td colspan="7"><table class="table table-justforlayout"><tr>
+ <td style="border-left: 1px solid black">
+ <table class="table table-condensed">
+ <tr>
+ <td>
+ queued
+ </td>
+ <td>
+ ✉ <span title="<%= j.created_at %>"><%= raw distance_of_time_in_words(Time.now, j.created_at).sub('about ','~').sub(' ',' ') + ' ago' if j.created_at %></span>
+ </td>
+ <td>
+ <%= raw('for ' + distance_of_time_in_words(j.started_at, j.created_at).sub('about ','~').sub(' ',' ')) if j.created_at and j.started_at %>
+ </td>
+ </tr>
+ <% if j.started_at.is_a? Time %>
+ <tr>
+ <td>
+ started
+ </td>
+ <td>
+ ✈ <span title="<%= j.created_at %>"><%= raw distance_of_time_in_words(j.started_at, Time.now).sub('about ','~').sub(' ',' ') + ' ago' if j.started_at %></span>
+ </td>
+ <td>
+ <% if j.finished_at.is_a? Time %>
+ <%= raw('ran ' + distance_of_time_in_words(j.finished_at, j.started_at).sub('about ','~').sub(' ',' ')) %>
+ <% elsif j.running %>
+ <span class="badge badge-success" title="tasks finished">✔ <%= j.tasks_summary[:done] %></span>
+ <span class="badge badge-info" title="tasks running">✈ <%= j.tasks_summary[:running] %></span>
+ <span class="badge" title="tasks todo">✉ <%= j.tasks_summary[:todo] %></span>
+ <% if j.tasks_summary[:failed] %>
+ <span class="badge badge-warning" title="task failures">✖ <%= j.tasks_summary[:failed] %></span>
+ <% end %>
+ <% end %>
+ </td>
+ </tr>
+ <% end %>
+ </table>
+ </td><td>
+ <table class="table table-condensed">
+ <tr><td colspan="2">
+ <%= j.script %> <%= j.script_version %>
+ </td></tr>
+ <% j.script_parameters.sort.each do |k,v| %>
+ <tr>
+ <td><%= k %></td><td><%= link_to_if_arvados_object v %></td>
+ </tr>
+ <% end %>
+ <tr>
+ <td>output</td><td><%= link_to_if_arvados_object j.output %></td>
+ </tr>
+ </table>
+ </td><td>
+ <table class="table table-condensed">
+ <% j.runtime_constraints.sort.each do |k,v| %>
+ <tr><td><%= v %></td><td><%= k %></td></tr>
+ <% end %>
+ </table>
+ </td>
+ </tr></table></td>
+ </tr>
+
+ <% end %>
+
+ </tbody>
+</table>
+
diff --git a/apps/workbench/app/views/pipeline_instances/_show_recent.html.erb b/apps/workbench/app/views/pipeline_instances/_show_recent.html.erb
new file mode 100644
index 0000000..e211112
--- /dev/null
+++ b/apps/workbench/app/views/pipeline_instances/_show_recent.html.erb
@@ -0,0 +1,92 @@
+<%= 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">
+ <thead>
+ <tr class="contain-align-left">
+ <th>
+ </th><th>
+ status
+ </th><th>
+ id
+ </th><th>
+ name
+ </th><th>
+ template
+ </th><th>
+ owner
+ </th><th>
+ components
+ </th><th>
+ dependencies
+ </th><th>
+ created
+ </th><th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+
+ <% @objects.sort_by { |ob| ob.created_at }.reverse.each do |ob| %>
+
+ <tr data-object-uuid="<%= ob.uuid %>">
+ <td>
+ <%= check_box_tag 'uuids[]', ob.uuid, false %>
+ </td><td>
+ <% if ob.success %>
+ <span class="label label-success">success</span>
+ <% elsif ob.active %>
+ <span class="label label-info">active</span>
+ <% end %>
+ </td><td>
+ <%= link_to_if_arvados_object ob %>
+ </td><td>
+ <%= ob.name %>
+ </td><td>
+ <%= link_to_if_arvados_object ob.pipeline_template_uuid %>
+ </td><td>
+ <%= link_to_if_arvados_object ob.owner_uuid %>
+ </td><td>
+ <% ob.components.each do |cname, c| %>
+ <% status = if !(c.is_a?(Hash) && c[:job].is_a?(Hash)) then nil elsif c[:job][:success] then 'success' elsif c[:job][:running] then 'info' else 'warning' end %>
+ <span class="label <%= "label-#{status}" if status %>"><%= cname.to_s %></span>
+ <% end %>
+ </td><td>
+ <small>
+ <% ob.dependencies.each do |d| %>
+ <%= d %><br />
+ <% end %>
+ </small>
+ </td><td>
+ <%= ob.created_at %>
+ </td>
+ </tr>
+
+ <% end %>
+
+ </tbody>
+</table>
+
+<% end %>
+
+<% content_for :footer_js do %>
+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[]"]').each(function(){
+ if(this.checked) {
+ $('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 %>
diff --git a/apps/workbench/app/views/pipeline_instances/_show_text_compare.html.erb b/apps/workbench/app/views/pipeline_instances/_show_text_compare.html.erb
new file mode 100644
index 0000000..dcc88b5
--- /dev/null
+++ b/apps/workbench/app/views/pipeline_instances/_show_text_compare.html.erb
@@ -0,0 +1,76 @@
+<% 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 %>
+
+
diff --git a/apps/workbench/app/views/pipeline_templates/_show_attributes.html.erb b/apps/workbench/app/views/pipeline_templates/_show_attributes.html.erb
new file mode 100644
index 0000000..c16229a
--- /dev/null
+++ b/apps/workbench/app/views/pipeline_templates/_show_attributes.html.erb
@@ -0,0 +1,39 @@
+<table class="table topalign">
+ <thead>
+ </thead>
+ <tbody>
+ <% @object.attributes_for_display.each do |attr, attrvalue| %>
+ <% if attr == 'components' and attrvalue.is_a? Hash and attrvalue[:steps].is_a? Array %>
+
+ <tr><td>components[steps]</td><td>
+ <table class="table">
+ <% attrvalue[:steps].each_with_index do |s, i| %>
+ <tr>
+ <td><%= i %></td>
+ <% %w(name function min_revision max_steps_per_node params).each do |key| %>
+ <td>
+ <% if key == 'params' %>
+ <% s[key.to_sym].each do |p| %>
+ <%= p[:name] %>
+ <% if p[:data_locator] || p[:value] %>
+ ← <%= p[:data_locator] || p[:value] %>
+ <% end %>
+ <%= '(optional)' if p[:optional] %>
+ <br />
+ <% end %>
+ <% else %>
+ <%= s[key.to_sym] %>
+ <% end %>
+ </td>
+ <% end %>
+ </tr>
+ <% end %>
+ </table>
+ </td></tr>
+
+ <% else %>
+ <%= render partial: 'application/arvados_object_attr', locals: { attr: attr, attrvalue: attrvalue } %>
+ <% end %>
+ <% end %>
+ </tbody>
+</table>
diff --git a/apps/workbench/app/views/pipeline_templates/_show_recent.html.erb b/apps/workbench/app/views/pipeline_templates/_show_recent.html.erb
new file mode 100644
index 0000000..dd8bad0
--- /dev/null
+++ b/apps/workbench/app/views/pipeline_templates/_show_recent.html.erb
@@ -0,0 +1,34 @@
+<table class="table table-hover">
+ <thead>
+ <tr class="contain-align-left">
+ <th>
+ id
+ </th><th>
+ name
+ </th><th>
+ owner
+ </th><th>
+ components
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+
+ <% @objects.sort_by { |ob| ob[:created_at] }.reverse.each do |ob| %>
+
+ <tr>
+ <td>
+ <%= link_to_if_arvados_object ob %>
+ </td><td>
+ <%= render_editable_attribute ob, 'name' %>
+ </td><td>
+ <%= link_to_if_arvados_object ob.owner_uuid %>
+ </td><td>
+ <%= ob.components.collect { |k,v| k.to_s }.join(", ") %>
+ </td>
+ </tr>
+
+ <% end %>
+
+ </tbody>
+</table>
diff --git a/apps/workbench/app/views/repositories/_show_help.html.erb b/apps/workbench/app/views/repositories/_show_help.html.erb
new file mode 100644
index 0000000..2830da5
--- /dev/null
+++ b/apps/workbench/app/views/repositories/_show_help.html.erb
@@ -0,0 +1,27 @@
+<% if (example = @objects.select(&:push_url).first) %>
+
+<p>
+Sample git quick start:
+</p>
+
+<pre>
+git clone <%= example.push_url %> <%= example.name unless example.push_url.match(/:(\S+)\.git$/).andand[1] == example.name %>
+cd <%= example.name %>
+# edit files
+git add the/files/you/changed
+git commit
+git push
+</pre>
+
+<% end %>
+
+<p>
+ See also:
+ <%= link_to raw('Arvados Docs → User Guide → SSH access'),
+ "#{Rails.configuration.arvados_docsite}/user/getting_started/ssh-access.html",
+ target: "_blank"%> and
+ <%= link_to raw('Arvados Docs → User Guide → Writing a Crunch
+ Script'),
+ "#{Rails.configuration.arvados_docsite}/user/tutorials/tutorial-firstscript.html",
+ target: "_blank"%>.
+</p>
diff --git a/apps/workbench/app/views/virtual_machines/_show_help.html.erb b/apps/workbench/app/views/virtual_machines/_show_help.html.erb
new file mode 100644
index 0000000..abf76b0
--- /dev/null
+++ b/apps/workbench/app/views/virtual_machines/_show_help.html.erb
@@ -0,0 +1,26 @@
+<p>
+Sample <code>~/.ssh/config</code> section:
+</p>
+
+<pre>
+Host *.arvados
+ ProxyCommand ssh -p2222 turnout at switchyard.<%= current_api_host || 'xyzzy.arvadosapi.com' %> -x -a $SSH_PROXY_FLAGS %h
+<% if @objects.first.andand.current_user_logins.andand.first %>
+ User <%= @objects.first.current_user_logins.andand.first %>
+<% end %>
+</pre>
+
+<p>
+Sample login command:
+</p>
+
+<pre>
+ssh <%= @objects.first.andand.hostname.andand.sub('.'+current_api_host,'') or 'vm-hostname' %>.arvados
+</pre>
+
+<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>
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list