Merge branch '4158-fix-compute-node-detail' closes #4158
[arvados.git] / apps / workbench / app / views / pipeline_instances / _running_component.html.erb
index f53285a029c8865d0bed40cbe6dca81a2623c2cd..018d49f5e4a10f5ed9ab81385d8a2416b0b3a0b1 100644 (file)
@@ -4,9 +4,9 @@
     <div class="container-fluid">
       <div class="row-fluid">
         <%# column offset 0 %>
-        <div class="col-md-3">
+        <div class="col-md-3" style="word-break:break-all;">
           <h4 class="panel-title">
-            <a data-toggle="collapse" href="#collapse<%= i %>" style="white-space: nowrap;">
+            <a data-toggle="collapse" href="#collapse<%= i %>">
               <%= pj[:name] %> <span class="caret"></span>
             </a>
           </h4>
           <% if current_job[:state] == "Queued" %>
             <%# column offset 5 %>
             <div class="col-md-6">
-              <% queuetime = Time.now - current_job[:created_at] %>
+              <% queuetime = Time.now - Time.parse(current_job[:created_at].to_s) %>
               Queued for <%= render_runtime(queuetime, true) %>.
               <% begin %>
                 <% if current_job[:queue_position] == 0 %>
                   This job is next in the queue to run.
                 <% elsif current_job[:queue_position] == 1 %>
                   There is 1 job in the queue ahead of this one.
-                <% else %>
+                <% elsif current_job[:queue_position] %>
                   There are <%= current_job[:queue_position] %> jobs in the queue ahead of this one.
                 <% end %>
               <% rescue %>
@@ -75,7 +75,7 @@
             </div>
           <% end %>
 
-          <% if current_job[:state].in? ["Queued", "Running"] %>
+          <% if current_job[:state].in? ["Queued", "Running"] and @object.editable? %>
             <%# column offset 11 %>
             <div class="col-md-1 pipeline-instance-spacing">
               <%= form_tag "/jobs/#{current_job[:uuid]}/cancel", remote: true, style: "display:inline; padding-left: 1em" do |f| %>