Sha256: 0f98739abeba3a4a2f235b758435616845f74e61fe2380bca9a19cb565b01750

Contents?: true

Size: 1.06 KB

Versions: 6

Compression:

Stored size: 1.06 KB

Contents

- run_now     ||= false
- show_group  ||= false

- tr_id = show_group ? nil : dom_id(check)

%tr{ id: tr_id, class: (check.enabled? ? 'enabled' : 'disabled') }
  - if show_group
    %td
      =link_to check.group.name, "##{dom_id(check)}", class: 'fail_check'
  - else
    %td
      =check.command
      ="(regexp: #{check.regexp})" unless check.regexp.blank?
      %p.check_interval= "run every: #{check.interval} min"

  %td
    %span.label{ class: "label-#{status_to_label(check.status)}"}= check.status
    =check.latest_state

    - if show_group
      %strong=check.command

  %td=human_time(check.latest_updated_at)

  - if run_now
    %td
      #check_now
        =link_to 'run now', run_now_check_path(check), class: 'check_now', method: :post, remote: true
        =image_tag 'my_nagios/chasing_arrows.gif', class: 'spinner'
      #actions
        %br
        =link_to 'edit', edit_check_path(check)
        =link_to (check.enabled? ? 'disable' : 'enable' ), toggle_check_path(check), class: 'disable_check', method: :post, data: { remote: true, confirm: 'Are you sure?' }

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
my_nagios-0.0.18 app/views/my_nagios/checks/_check_row.haml
my_nagios-0.0.17 app/views/my_nagios/checks/_check_row.haml
my_nagios-0.0.16 app/views/my_nagios/checks/_check_row.haml
my_nagios-0.0.15 app/views/my_nagios/checks/_check_row.haml
my_nagios-0.0.14 app/views/my_nagios/checks/_check_row.haml
my_nagios-0.0.13 app/views/my_nagios/checks/_check_row.haml