Sha256: 50ec3dc171274da7d3edd1e3095f30fe64f4d50e220684e08761d69c74061559

Contents?: true

Size: 1.82 KB

Versions: 14

Compression:

Stored size: 1.82 KB

Contents

 <%
  rows = @machines.each do |machine|
    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"),
                                    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('machine_runner.png',
                                      class: 'action',
                                      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"),
                                        "#", { class: "terminate", id: machine[0] })
    end
    machine.delete_at(12)
    machine.delete_at(10)
  end
%>
<%= raw rows %>

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
naf-2.1.9 app/views/naf/machines/index.json.erb
naf-2.1.8 app/views/naf/machines/index.json.erb
naf-2.1.6 app/views/naf/machines/index.json.erb
naf-2.1.5 app/views/naf/machines/index.json.erb
naf-2.1.4 app/views/naf/machines/index.json.erb
naf-2.1.3 app/views/naf/machines/index.json.erb
naf-2.1.2 app/views/naf/machines/index.json.erb
naf-2.1.1 app/views/naf/machines/index.json.erb
naf-2.1.0 app/views/naf/machines/index.json.erb
naf-2.0.4 app/views/naf/machines/index.json.erb
naf-2.0.3 app/views/naf/machines/index.json.erb
naf-2.0.2 app/views/naf/machines/index.json.erb
naf-2.0.1 app/views/naf/machines/index.json.erb
naf-2.0.0 app/views/naf/machines/index.json.erb