Sha256: 1b1ca127cbfe674cc520836e87059b97e37a7dc674304e1d8cd67503dead45bd

Contents?: true

Size: 1022 Bytes

Versions: 4

Compression:

Stored size: 1022 Bytes

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?

  %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

4 entries across 4 versions & 1 rubygems

Version Path
my_nagios-0.0.12 app/views/my_nagios/checks/_check_row.haml
my_nagios-0.0.11 app/views/my_nagios/checks/_check_row.haml
my_nagios-0.0.10 app/views/my_nagios/checks/_check_row.haml
my_nagios-0.0.9 app/views/my_nagios/checks/_check_row.haml