app/views/naf/machines/index.json.erb in naf-1.1.4 vs app/views/naf/machines/index.json.erb in naf-2.0.0

- old
+ new

@@ -1,15 +1,23 @@ <% rows = @machines.each do |machine| - machine[11] = link_to image_tag('papertrail_machine.png', + machine[11] = link_to image_tag('machine.png', class: 'action', - title: "View machine(id: #{machine[0]}, server:#{machine[1].blank? ? machine[2] : machine[1]}) log in Papertrail"), - machine[11], { target: '_blank', class: "papertrail", id: machine[0] } + title: "View machine(id: #{machine[0]}, server:#{machine[1].blank? ? machine[2] : machine[1]}) log"), + url_for({ controller: 'log_viewer', + action: 'index', + record_id: machine[0], + record_type: 'machine' }), + { target: '_blank', id: machine[0] } machine[11] << "&nbsp;&nbsp;".html_safe - machine[11] << (link_to image_tag('papertrail_machine_runner.png', + machine[11] << (link_to image_tag('machine_runner.png', class: 'action', - title: "View machine(id: #{machine[0]}, server:#{machine[1].blank? ? machine[2] : machine[1]}) runner log in Papertrail"), - machine[12], { target: '_blank', class: "papertrail", id: machine[0] }) + title: "View machine(id: #{machine[0]}, server:#{machine[1].blank? ? machine[2] : machine[1]}) runner log"), + url_for({ controller: 'log_viewer', + action: 'index', + record_id: ::Naf::Machine.find_by_id(machine[0]).machine_runners.order(:id).last.try(:id), + record_type: 'runner' }), + { target: '_blank', id: machine[0] }) machine[11] << "&nbsp;&nbsp;".html_safe unless machine[10] machine[11] << (link_to image_tag('terminate.png', class: 'action', title: "Mark machine(id: #{machine[0]}, server:#{machine[1].blank? ? machine[2] : machine[1]}) down"),