" output_line += CGI::unescapeHTML("#{elem['output_time']} #{invocation_link(elem['id'])}:") output_line += " #{elem['message']}" output_line end def invocation_link(id) "invocation(#{id})" end def sort_jsons # Sort log lines based on timestamp @jsons = jsons.sort { |x, y| Time.parse(x['output_time']) <=> Time.parse(y['output_time']) } end def parse_newest_log "#{newest_log.scan(/\d{4}.*\.\d{3}/).first} #{newest_log.scan(/Process.*/).first.try(:split, '