+ resp << "</p>"
+
+ resp << "<p>"
+ if state_label
+ resp << "It has runtime of "
+
+ cpu_time = cputime
+
+ resp << ApplicationController.helpers.render_time(running_time, false)
+ if (walltime - running_time) > 0
+ resp << "("
+ resp << ApplicationController.helpers.render_time(walltime - running_time, false)
+ resp << "queued)"
+ end
+ if cpu_time == 0
+ resp << "."
+ else
+ resp << " and used "
+ resp << ApplicationController.helpers.render_time(cpu_time, false)
+ resp << " of node allocation time ("
+ resp << (cpu_time/running_time).round(1).to_s
+ resp << "⨯ scaling)."
+ end
+ end
+ resp << "</p>"
+
+ resp
+ end
+
+ def log_object_uuids
+ [uuid]
+ end
+
+ def live_log_lines(limit)
+ Log.where(object_uuid: log_object_uuids).
+ order("created_at DESC").
+ limit(limit).
+ with_count('none').
+ select { |log| log.properties[:text].is_a? String }.
+ reverse.
+ flat_map { |log| log.properties[:text].split("\n") }