[ARVADOS] updated: 004e528060e42b45c8207e43892289b14f5aa2e5

git at public.curoverse.com git at public.curoverse.com
Thu Sep 11 17:12:15 EDT 2014


Summary of changes:
 apps/workbench/Gemfile                             |  2 +-
 apps/workbench/Gemfile.lock                        |  4 +-
 apps/workbench/app/assets/javascripts/dates.js     | 11 +++
 apps/workbench/app/assets/javascripts/tab_panes.js |  2 +-
 .../app/controllers/collections_controller.rb      |  9 +--
 apps/workbench/app/models/collection.rb            | 14 ++--
 .../pipeline_instances/_show_components.html.erb   |  2 +-
 .../_show_components_running.html.erb              | 40 ++++++----
 .../pipeline_instances/_show_tab_buttons.html.erb  | 40 ++++++++++
 sdk/cli/bin/crunch-job                             | 26 ++++---
 sdk/python/arvados/collection.py                   |  3 +
 sdk/python/arvados/keep.py                         |  7 +-
 sdk/python/tests/test_keep_client.py               | 13 ++++
 sdk/ruby/lib/arvados/keep.rb                       | 77 ++++++++++++++++---
 sdk/ruby/test/test_keep_manifest.rb                | 87 +++++++++++++++++-----
 services/api/Gemfile                               |  2 +-
 services/api/Gemfile.lock                          |  4 +-
 services/api/app/models/collection.rb              |  9 +--
 18 files changed, 268 insertions(+), 84 deletions(-)
 create mode 100644 apps/workbench/app/assets/javascripts/dates.js
 create mode 100644 apps/workbench/app/views/pipeline_instances/_show_tab_buttons.html.erb

       via  004e528060e42b45c8207e43892289b14f5aa2e5 (commit)
       via  6386f2aca83b477210bda19a3284ea31463d2efc (commit)
       via  35bf7a16482b304908c5b6bf3cd772647158f593 (commit)
       via  e7973cab8f9fc9531e4d928e73928e6eab022f48 (commit)
       via  741bf44b15569a3a4b1a4705b62e4f50c8365bc9 (commit)
       via  4ef537243058616754efde56438a193626556bca (commit)
       via  bafb417c531d6094697a13a7465313d1cc7c0bc9 (commit)
       via  b0440160e64caecbff160a26f62301dd15d84c7f (commit)
      from  9be9761666fd091496bee885b37598db9a6ab38a (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 004e528060e42b45c8207e43892289b14f5aa2e5
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Thu Sep 11 17:12:10 2014 -0400

    3187: Setting dates to locale works.

diff --git a/apps/workbench/app/assets/javascripts/dates.js b/apps/workbench/app/assets/javascripts/dates.js
new file mode 100644
index 0000000..9e484ce
--- /dev/null
+++ b/apps/workbench/app/assets/javascripts/dates.js
@@ -0,0 +1,11 @@
+$(document).on('ajax:complete arv:pane:loaded ready', function() {
+    console.log("woble!");
+    $('[data-utc-date]').each(function(i, elm) {
+        var re = /(\d\d\d\d)-(\d\d)-(\d\d) (\d\d):(\d\d):(\d\d) UTC/;
+        var v = $(elm).attr('data-utc-date').match(re);
+        if (v) {
+            var ts = new Date(Date.UTC(v[1], v[2]-1, v[3], v[4], v[5], v[6]));
+            $(elm).text(ts.toLocaleTimeString() + " " + ts.toLocaleDateString());
+        }
+    });
+});
diff --git a/apps/workbench/app/assets/javascripts/tab_panes.js b/apps/workbench/app/assets/javascripts/tab_panes.js
index 846d680..2295cf6 100644
--- a/apps/workbench/app/assets/javascripts/tab_panes.js
+++ b/apps/workbench/app/assets/javascripts/tab_panes.js
@@ -31,7 +31,7 @@ $(document).on('arv:pane:reload', function(e) {
                     }
                 });
                 $pane.html(tmp);
-                e.target.addClass('loaded');
+                $(e.target).addClass('loaded');
                 $pane.trigger('arv:pane:loaded');
             }).fail(function(jqxhr, status, error) {
                 var errhtml;
diff --git a/apps/workbench/app/views/pipeline_instances/_show_components.html.erb b/apps/workbench/app/views/pipeline_instances/_show_components.html.erb
index 649a119..b7a5711 100644
--- a/apps/workbench/app/views/pipeline_instances/_show_components.html.erb
+++ b/apps/workbench/app/views/pipeline_instances/_show_components.html.erb
@@ -1,6 +1,6 @@
 <% if !@object.state.in? ['New', 'Ready'] %>
 
-  <div class="pull-right">
+  <div class="pull-right" style="padding-left: 2em">
     Current state: <span class="badge badge-info" data-pipeline-state="<%= @object.state %>">
       <% if @object.state == "RunningOnServer" %>
         Active
diff --git a/apps/workbench/app/views/pipeline_instances/_show_components_running.html.erb b/apps/workbench/app/views/pipeline_instances/_show_components_running.html.erb
index b9500f6..f5eb17b 100644
--- a/apps/workbench/app/views/pipeline_instances/_show_components_running.html.erb
+++ b/apps/workbench/app/views/pipeline_instances/_show_components_running.html.erb
@@ -9,13 +9,20 @@
 
 <p>
   This pipeline
+  <% if @object.started_at %>
+    started at <span data-utc-date="<%= @object.started_at %>"><%= @object.started_at %></span> and
+  <% else %>
+    has not started.
+  <% end %>
+
   <% if @object.state == 'Complete' %>
     completed in
   <% elsif @object.state == 'Failed' %>
     failed after
   <% else %>
-    has been active for
+    and has been active for
   <% end %>
+
   <% walltime = if @object.started_at
         if @object.finished_at
           @object.finished_at - @object.started_at
@@ -26,16 +33,23 @@
         0
       end
       %>
-  <%= runtime(walltime, true) %>, running for
 
-    <% tasks = JobTask.filter([['job_uuid', 'in', render_pipeline_jobs.map { |j| j[:job].andand[:uuid] }]]).results %>
+  <%= runtime(walltime, true) %><% if @object.finished_at %> at <span data-utc-date="<%= @object.finished_at %>"><%= @object.finished_at %></span><% end %>.
+</p>
 
-    <%# want to buy: algorithm that calculates wall clock runtime that takes into account
-        concurrent jobs.  %>
+<p>
+  This pipeline
+    <% tasks = JobTask.filter([['job_uuid', 'in', render_pipeline_jobs.map { |j| j[:job].andand[:uuid] }]]).results %>
     <% runningtime = determine_wallclock_runtime(render_pipeline_jobs.map {|j| j[:job]}) %>
 
-    <%= runtime(runningtime, true) %><% if tasks.size == 0 %>.<% else %>,
-      using
+    <% if @object.state.start_with? == 'Running' %>
+      has run
+      <% else %>
+      ran
+    <% end %>
+    for
+    <%= runtime(runningtime, true) %><% if tasks.size == 0 %>.<% else %> (<%= runtime(walltime - runningtime, true) %> queued),
+      and used
       <% cputime = tasks.map { |task|
            puts "started at #{task.started_at}"
                   if task.started_at
@@ -111,15 +125,13 @@
             <div class="col-md-5">
               <% queuetime = Time.now - current_job[:created_at] %>
               Queued for <%= runtime(queuetime, true) %>.
-                There
               <% if current_job.queue_position == 0 %>
-                are no jobs
+                This job is next in the queue to run.
               <% elsif current_job.queue_position == 1 %>
-                is 1 job
+                There is 1 job in the queue ahead of this one.
               <% else  %>
-                <%= current_job.queue_position %> jobs
+                There are <%= current_job.queue_position %> jobs in the queue ahead of this one.
               <% end %>
-                ahead of this one.
             </div>
           <% end %>
         <% else %>
@@ -131,7 +143,7 @@
 </div>
 </div>
 
-<div id="collapse<%= i %>" class="panel-collapse collapse in">
+<div id="collapse<%= i %>" class="panel-collapse collapse">
   <div class="panel-body">
     <div class="container">
         <% current_component = (if current_job then current_job else pj end) %>
@@ -187,6 +199,8 @@
                   <td>
                     <% if k.to_s.end_with? 'uuid' %>
                       <%= link_to_if_arvados_object current_component[k], friendly_name: true %>
+                    <% elsif k.to_s.end_with? '_at' %>
+                      <span data-utc-date="<%= current_component[k] %>"><%= current_component[k] %></span>
                     <% else %>
                       <%= current_component[k] %>
                     <% end %>
diff --git a/apps/workbench/app/views/pipeline_instances/_show_tab_buttons.html.erb b/apps/workbench/app/views/pipeline_instances/_show_tab_buttons.html.erb
new file mode 100644
index 0000000..9c0f28e
--- /dev/null
+++ b/apps/workbench/app/views/pipeline_instances/_show_tab_buttons.html.erb
@@ -0,0 +1,40 @@
+  <% if @object.state.in? ['Complete', 'Failed', 'Cancelled'] %>
+
+  <%= link_to(copy_pipeline_instance_path('id' => @object.uuid, 'script' => "use_latest", "components" => "use_latest", "pipeline_instance[state]" => "RunningOnServer"),
+      class: 'btn btn-primary',
+      #data: {toggle: :tooltip, placement: :top}, title: 'Re-run',
+      method: :post,
+      ) do %>
+    <i class="fa fa-fw fa-play"></i> Re-run with latest
+  <% end %>
+
+  <%= link_to raw('<i class="fa fa-fw fa-cogs"></i> Re-run options'),
+      "#",
+      {class: 'btn btn-primary', 'data-toggle' =>  "modal",
+        'data-target' => '#clone-and-edit-modal-window'}  %>
+  <% end %>
+
+  <% if @object.state.in? ['New', 'Ready'] %>
+    <%= link_to(url_for('pipeline_instance[state]' => 'RunningOnServer'),
+        class: 'btn btn-primary run-pipeline-button',
+        method: :patch
+        ) do %>
+      <i class="fa fa-fw fa-play"></i> Run
+    <% end %>
+  <% else %>
+    <% if @object.state.in? ['RunningOnClient', 'RunningOnServer'] %>
+      <%= link_to(url_for('pipeline_instance[state]' => 'Paused'),
+          class: 'btn btn-primary run-pipeline-button',
+          method: :patch
+          ) do %>
+        <i class="fa fa-fw fa-pause"></i> Pause
+      <% end %>
+    <% elsif @object.state == 'Paused' %>
+      <%= link_to(url_for('pipeline_instance[state]' => 'RunningOnServer'),
+          class: 'btn btn-primary run-pipeline-button',
+          method: :patch
+          ) do %>
+        <i class="fa fa-fw fa-play"></i> Resume
+      <% end %>
+    <% end %>
+  <% end %>

commit 6386f2aca83b477210bda19a3284ea31463d2efc
Merge: 9be9761 35bf7a1
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Thu Sep 11 15:55:10 2014 -0400

    Merge branch '3187-start-finish-timestamps-tasks-pipelines' into 3187-pipeline-instance-page


-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list