summaryrefslogtreecommitdiff
path: root/lib/oxidized/api/web/views/nodes.haml
blob: 336a4c242969009e6defafd61708225adb8ac1c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
%html
  !=haml :head
  %body
    %table{:id=>'nodesTable', :class=>'center tablesorter'}
      %thead
        %tr
          %th Name
          %th IP
          %th Group
          %th Last Status
          %th Last Time
          %th Config
          %th Update
      %tbody
        -trclass = %w(even odd)
        -@data.sort_by{|e|e[:name]}.each do |node|
          -klass = trclass.rotate!.first
          %tr{:class=>klass}
            %td
              %a(href="/node/show/#{node[:name]}") #{node[:name]}
            %td= node[:ip]
            %td= node[:group]
            %td= node[:status]
            %td= node[:time]
            %td
              %a(href="/node/fetch/#{node[:full_name]}") config
            %td
              %a(href="/node/next/#{node[:full_name]}") update
    %p{:class=>'center'}
      %a(href="/reload") reload list of nodes
    :javascript
      $(function(){
        $("#nodesTable").tablesorter();
      });