[ARVADOS] created: be3b98a52ae6773913696955e2d9c6585fc89441

git at public.curoverse.com git at public.curoverse.com
Thu Sep 25 14:11:10 EDT 2014


        at  be3b98a52ae6773913696955e2d9c6585fc89441 (commit)


commit be3b98a52ae6773913696955e2d9c6585fc89441
Author: Tim Pierce <twp at curoverse.com>
Date:   Thu Sep 25 14:09:02 2014 -0400

    3901: improve component rendering error reports
    
    The "Components" tab on the /pipeline_instances page now includes the
    error that was encountered, and a collapsed panel with the full backtrace.

diff --git a/apps/workbench/app/helpers/pipeline_components_helper.rb b/apps/workbench/app/helpers/pipeline_components_helper.rb
index 28adfa9..9fead2c 100644
--- a/apps/workbench/app/helpers/pipeline_components_helper.rb
+++ b/apps/workbench/app/helpers/pipeline_components_helper.rb
@@ -8,7 +8,8 @@ module PipelineComponentsHelper
       logger.error "#{e.backtrace.join("\n\t")}"
       case fallback
       when :json
-        render(partial: "pipeline_instances/show_components_json")
+        render(partial: "pipeline_instances/show_components_json",
+               locals: {error_name: e.inspect, backtrace: e.backtrace.join("\n\t")})
       end
     end
   end
diff --git a/apps/workbench/app/views/pipeline_instances/_show_components_json.html.erb b/apps/workbench/app/views/pipeline_instances/_show_components_json.html.erb
index 3cdd5ae..9d1edbf 100644
--- a/apps/workbench/app/views/pipeline_instances/_show_components_json.html.erb
+++ b/apps/workbench/app/views/pipeline_instances/_show_components_json.html.erb
@@ -1,5 +1,7 @@
 <p>The components of this pipeline are in a format that Workbench does not recognize.</p>
 
+<p>Error encountered: <b><%= error_name %></b></p>
+
     <div id="components-accordion" class="panel panel-default">
       <div class="panel-heading">
         <h4 class="panel-title">
@@ -13,4 +15,16 @@
           <pre><%= Oj.dump(@object.components, indent: 2) %></pre>
         </div>
       </div>
+      <div class="panel-heading">
+        <h4 class="panel-title">
+          <a data-toggle="collapse" data-parent="#components-accordion" href="#components-backtrace">
+            Show backtrace
+          </a>
+        </h4>
+      </div>
+      <div id="components-backtrace" class="panel-collapse collapse">
+        <div class="panel-body">
+          <pre><%= backtrace %></pre>
+        </div>
+      </div>
     </div>

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list