app/models/logical/naf/log_parser/job.rb in naf-2.1.12 vs app/models/logical/naf/log_parser/job.rb in naf-2.1.13
- old
+ new
@@ -1,7 +1,5 @@
-require 'yajl'
-
module Logical::Naf
module LogParser
class Job < Base
def initialize(params)
@@ -13,10 +11,13 @@
end
private
def insert_log_line(elem)
- " <span>#{elem['line_number']} #{elem['output_time']}: #{elem['message']}</br></span>"
+ output_line = "<span><pre style='display: inline; word-wrap: break-word;'>"
+ output_line += "#{elem['line_number']} #{elem['output_time']}: #{elem['message']}"
+ output_line += "</pre></br></span>"
+ output_line
end
def sort_jsons
# Sort log lines based on timestamp
@jsons = jsons.sort { |x, y| x['line_number'] <=> y['line_number'] }