20846: Merge branch '19213-ubuntu2204-support' into 20846-ubuntu2204
[arvados.git] / apps / workbench / app / models / proxy_work_unit.rb
index f570563b751ee66ec074733a548b41e6fc4a98fe..adf0bd7d671db15203b1ba26e2a6188c71cd5815 100644 (file)
@@ -255,7 +255,9 @@ class ProxyWorkUnit < WorkUnit
       if state_label == 'Complete'
         resp << "completed in "
       elsif state_label == 'Failed'
-         resp << "failed after "
+        resp << "failed after "
+      elsif state_label == 'Cancelled'
+        resp << "was cancelled after "
       else
         resp << "has been active for "
       end
@@ -276,7 +278,11 @@ class ProxyWorkUnit < WorkUnit
     end
 
     if is_failed?
-      resp << " Check the Log tab for more detail about why it failed."
+      if runtime_status.andand[:error]
+        resp << " Check the error information below."
+      else
+        resp << " Check the Log tab for more detail about why it failed."
+      end
     end
     resp << "</p>"