[ARVADOS] created: 720512e987798e4135254e50d920d7ccd4cba6c2

git at public.curoverse.com git at public.curoverse.com
Wed Mar 5 17:01:22 EST 2014


        at  720512e987798e4135254e50d920d7ccd4cba6c2 (commit)


commit 720512e987798e4135254e50d920d7ccd4cba6c2
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Mar 5 16:56:39 2014 -0500

    Fixed progress bar alignment on Firefox.

diff --git a/apps/workbench/app/assets/stylesheets/application.css.scss b/apps/workbench/app/assets/stylesheets/application.css.scss
index 7a26c70..f917389 100644
--- a/apps/workbench/app/assets/stylesheets/application.css.scss
+++ b/apps/workbench/app/assets/stylesheets/application.css.scss
@@ -122,7 +122,7 @@ ul.arvados-nav li ul li {
 }
 
 .inline-progress-container {
-    width: 100px;
+    width: 100%;
     display:inline-block;
 }
 
diff --git a/apps/workbench/app/helpers/pipeline_instances_helper.rb b/apps/workbench/app/helpers/pipeline_instances_helper.rb
index 3a923e1..f3ac35d 100644
--- a/apps/workbench/app/helpers/pipeline_instances_helper.rb
+++ b/apps/workbench/app/helpers/pipeline_instances_helper.rb
@@ -44,14 +44,14 @@ module PipelineInstancesHelper
   def render_pipeline_job pj
     if pj[:percent_done]
       pj[:progress_bar] = raw <<EOF
-<div class="progress" style="width:100px">
+<div class="progress" style="width:100%">
   <span class="progress-bar progress-bar-success" style="width:#{pj[:percent_done]}%"></span>
   <span class="progress-bar" style="width:#{pj[:percent_running]}%"></span>
 </div>
 EOF
     elsif pj[:progress]
       raw <<EOF
-<div class="progress" style="width:100px">
+<div class="progress" style="width:100%">
 <span class="progress-bar" style="width:#{pj[:progress]*100}%">
 </span>
 </div>
diff --git a/apps/workbench/app/views/users/_tables.html.erb b/apps/workbench/app/views/users/_tables.html.erb
index 320f32c..f9e3b6c 100644
--- a/apps/workbench/app/views/users/_tables.html.erb
+++ b/apps/workbench/app/views/users/_tables.html.erb
@@ -12,7 +12,8 @@
           <col width="20%" />
           <col width="20%" />
           <col width="13%" />
-          <col width="27%" />
+          <col width="13%" />
+          <col width="20%" />
         </colgroup>
 
         <tr>
@@ -21,6 +22,7 @@
 	  <th>Log</th>
 	  <th>Age</th>
 	  <th>Status</th>
+	  <th>Progress</th>
 	</tr>
 
         <% @my_jobs[0..6].each do |j| %>
@@ -82,8 +84,10 @@
   <% else %>
     <span class="label">queued</span>
   <% end %>
+</td>
+<td>
   <% percent_total_tasks = 100 / (j.tasks_summary[:running] + j.tasks_summary[:done] + j.tasks_summary[:todo]) rescue 0 %>
-  <div class="inline-progress-container pull-right">
+  <div class="inline-progress-container">
     <div class="progress">
       <span class="progress-bar progress-bar-success" style="width: <%= j.tasks_summary[:done] * percent_total_tasks rescue 0 %>%;">
       </span>
@@ -115,7 +119,8 @@
         <col width="30%" />
         <col width="30%" />
         <col width="13%" />
-        <col width="27%" />
+        <col width="13%" />
+        <col width="20%" />
       </colgroup>
 
       <tr>
@@ -123,6 +128,7 @@
 	<th>Template</th>
 	<th>Age</th>
 	<th>Status</th>
+	<th>Progress</th>
       </tr>
 
       <% @my_pipelines[0..6].each do |p| %>
@@ -158,9 +164,10 @@
             <% else %>
               <span class="label">queued</span>
             <% end %>
-
+          </td>
+          <td>
             <% summary = pipeline_summary p %>
-            <div class="inline-progress-container pull-right">
+            <div class="inline-progress-container">
               <div class="progress">
                 <span class="progress-bar progress-bar-success" style="width: <%= summary[:percent_done] %>%;">
                 </span>

commit 19af0137f1bfa57bbb717e488ed5d9967b9cfbe8
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Mar 5 15:03:58 2014 -0500

    Running pipeline from workbench works!

diff --git a/sdk/cli/bin/arv-run-pipeline-instance b/sdk/cli/bin/arv-run-pipeline-instance
index 6e8a64a..fd29a6d 100755
--- a/sdk/cli/bin/arv-run-pipeline-instance
+++ b/sdk/cli/bin/arv-run-pipeline-instance
@@ -2,8 +2,8 @@
 
 # == Synopsis
 #
-#  wh-run-pipeline-instance --template pipeline-template-uuid [options] [--] [parameters]
-#  wh-run-pipeline-instance --instance pipeline-instance-uuid [options]
+#  arv-run-pipeline-instance --template pipeline-template-uuid [options] [--] [parameters]
+#  arv-run-pipeline-instance --instance pipeline-instance-uuid [options]
 #
 # Satisfy a pipeline template by finding or submitting a mapreduce job
 # for each pipeline component.
@@ -21,7 +21,7 @@
 #                 to finish. Just find out whether jobs are finished,
 #                 queued, or running for each component
 #
-# [--create-instance-only] Do not try to satisfy any components. Just
+# [--submit] Do not try to satisfy any components. Just
 #                          create an instance, print its UUID to
 #                          stdout, and exit.
 #
@@ -175,10 +175,14 @@ p = Trollop::Parser.new do
       "UUID of pipeline instance.",
       :short => :none,
       :type => :string)
-  opt(:create_instance_only,
+  opt(:submit,
       "Do not try to satisfy any components. Just create a pipeline instance and output its UUID.",
       :short => :none,
       :type => :boolean)
+  opt(:run_here,
+      "Manage the pipeline in process.",
+      :short => :none,
+      :type => :boolean)
   stop_on [:'--']
 end
 $options = Trollop::with_standard_exception_handling p do
@@ -187,13 +191,17 @@ end
 $debuglevel = $options[:debug_level] || ($options[:debug] && 1) || 0
 
 if $options[:instance]
-  if $options[:template] or $options[:create_instance_only]
-    abort "#{$0}: syntax error: --instance cannot be combined with --template or --create-instance-only."
+  if $options[:template] or $options[:submit]
+    abort "#{$0}: syntax error: --instance cannot be combined with --template or --submit."
   end
 elsif not $options[:template]
   abort "#{$0}: syntax error: you must supply a --template or --instance."
 end
 
+if $options[:run_here] == $options[:submit]
+  abort "#{$0}: syntax error: you must supply either --run-here or --submit."
+end
+
 # Set up the API client.
 
 $client ||= Google::APIClient.
@@ -500,7 +508,7 @@ class WhRunPipelineInstance
             end
           elsif c[:job][:running] ||
               (!c[:job][:started_at] && !c[:job][:cancelled_at])
-            moretodo ||= !@options[:no_wait]
+            moretodo ||= true
           elsif c[:job][:cancelled_at]
             debuglog "component #{cname} job #{c[:job][:uuid]} cancelled."
           end
@@ -509,6 +517,11 @@ class WhRunPipelineInstance
       @instance[:components] = @components
       @instance[:active] = moretodo
       report_status
+
+      if @options[:no_wait]
+        moretodo = false
+      end
+
       if moretodo
         begin
           sleep 10
@@ -518,7 +531,26 @@ class WhRunPipelineInstance
         end
       end
     end
-    @instance[:success] = @components.reject { |cname,c| c[:job] and c[:job][:success] }.empty?
+
+    ended = 0
+    succeeded = 0
+    failed = 0
+    @components.each do |cname, c|
+      if c[:job]
+        if c[:job][:finished_at]
+          ended += 1
+          if c[:job][:success] == true
+            succeeded += 1
+          end
+        end
+      end
+    end
+    
+    if ended == @components.length
+      @instance[:active] = false
+      @instance[:success] = (succeeded == @components.length)
+    end
+
     @instance.save
   end
 
@@ -581,7 +613,7 @@ begin
   end
   runner.apply_parameters(p.leftovers)
   runner.setup_instance
-  if $options[:create_instance_only]
+  if $options[:submit]
     runner.instance.save
     puts runner.instance[:uuid]
   else
diff --git a/services/api/script/crunch-dispatch.rb b/services/api/script/crunch-dispatch.rb
index eeabc16..41fef38 100755
--- a/services/api/script/crunch-dispatch.rb
+++ b/services/api/script/crunch-dispatch.rb
@@ -315,14 +315,13 @@ class Dispatcher
   end
 
   def update_pipelines
-    puts @todo_pipelines
     @todo_pipelines.each do |p|
       pipe_auth = ApiClientAuthorization.
         new(user: User.where('uuid=?', p.modified_by_user_uuid).first,
             api_client_id: 0)
       pipe_auth.save
 
-      puts `export ARVADOS_API_TOKEN=#{pipe_auth.api_token} && arv-run-pipeline-instance --no-wait --instance #{p.uuid}`
+      puts `export ARVADOS_API_TOKEN=#{pipe_auth.api_token} && arv-run-pipeline-instance --run-here --no-wait --instance #{p.uuid}`
     end
   end
 

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list