+ resp << "failed after "
+ else
+ resp << "has been active for "
+ end
+
+ if walltime > runningtime
+ resp << ApplicationController.helpers.render_time(walltime, false)
+ else
+ resp << ApplicationController.helpers.render_time(runningtime, false)
+ end
+
+ if finished_at
+ resp << " at "
+ resp << ApplicationController.helpers.render_localized_date(finished_at)
+ end
+ resp << "."
+ else
+ if state_label
+ resp << "This #{title} is "
+ resp << if state_label == 'Running' then 'active' else state_label.downcase end
+ resp << "."
+ end
+ end
+
+ if is_failed?
+ resp << " Check the Log tab for more detail about why it failed."
+ end
+ resp << "</p>"
+
+ resp << "<p>"
+ if state_label
+ resp << "It "
+ if state_label == 'Running'
+ resp << "has run"