app/models/logical/naf/log_parser/runner.rb in naf-2.1.9 vs app/models/logical/naf/log_parser/runner.rb in naf-2.1.10

- old
+ new

@@ -20,11 +20,11 @@ def insert_log_line(elem) "&nbsp;&nbsp;<span>#{elem['output_time']} #{invocation_link(elem['id'])}: #{elem['message']}</br></span>" end def invocation_link(id) - "<a href=\"\/job_system\/machine_runner_invocations\/#{id}\" style=\"font-weight:bold; color: #333399\">invocation(#{id})</a>" + "<a href=\"machine_runner_invocations\/#{id}\" style=\"font-weight:bold; color: #333399\">invocation(#{id})</a>" 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']) } @@ -33,9 +33,11 @@ def parse_newest_log "#{newest_log.scan(/\d{4}.*\.\d{3}/).first} #{newest_log.scan(/Process.*/).first.try(:split, '<br>').try(:first)}" end def retrieve_log_files_from_s3 + return [] unless record_id.present? + uuids = ::Naf::MachineRunner. joins(:machine_runner_invocations). where("#{Naf.schema_name}.machine_runners.id = ?", record_id). pluck("#{Naf.schema_name}.machine_runner_invocations.uuid")