<commit_before>.block#block-tables
  .content
    %h2.title Status
    .inner
      %table.table
        %thead
          %tr
            %th.first Node Name
            %th Platform
            %th FQDN
            %th IP Address
            %th Uptime
            %th Last Check-in
            %th.last Run List
        %tbody
          - if @status.empty?
            %tr
              %td{:colspan => 7}= "You appear to have no nodes - try connecting one, or creating or editing a #{link_to('client', url(:clients))}"
          - else
            - @status.sort.each_with_index do |node, index|
              %tr{:class => "#{index % 2 == 1 ? 'odd' : 'even'}"}
                %td= link_to(node[1].name, url(:node, node[1].name))
                %td= "#{node[1]["platform"]} #{node[1]["platform_version"]}"
                %td= node[1]["fqdn"]
                %td= node[1]["ipaddress"]
                %td
                  .accordion
                    -unless node[1]["uptime"].nil?
                      = link_to(node[1]["uptime"].split(" ")[0..1].join(" ") , "#", :class => 'tooltip')
                      .tooltip
                        %table.table.tooltip
                          %tbody
                            %tr
                              %td= node[1]["uptime"]
                            
                - unless node[1]["ohai_time"].nil?
                  - current_time = Time.now.to_f
                  - ohai_time = Time.at(node[1]["ohai_time"])
                  - hours, minutes, seconds = time_difference_in_hms(ohai_time)
                  - hours_text   = "#{hours} hour#{hours == 1 ? '' : 's'}"
                  - minutes_text = "#{minutes} minute#{minutes == 1 ? '' : 's'}"
                  %td.flash
                    - status_class = ""
                    - if hours > 24 
                      - status_class = "message error"
                    - elsif hours > 1
                      - status_class = "message warning"
                    %div{ :class => status_class }
                      .accordion
                        - if hours > 48
                          - status_msg = "&gt; #{hours/24} days ago"
                        - elsif hours > 0
                          - status_msg = "&gt; #{hours_text} ago"
                        - elsif minutes < 1
                          - status_msg = "&lt; 1 minute ago"
                        - else
                          - status_msg = "#{minutes_text} ago"
                        = link_to(status_msg, "#", :class=> 'tooltip')
                        .tooltip
                          %table.table.tooltip
                            %tbody
                              %tr
                                %td
                                  = ohai_time 
                                  %br/
                                  - if hours == 0
                                    = "#{minutes_text} ago" 
                                  - else
                                    = "#{hours_text}, #{minutes_text} ago"
                - else
                  %td Not Checked In
                - unless node[1].run_list.nil?
                  %td
                    .accordion
                      = link_to("Run List", "#", :class => 'tooltip')
                      .tooltip
                        %table.table.tooltip
                          %thead
                            %tr
                              %th.first Position
                              %th Name
                              %th.last Type
                          %tbody
                            - if node[1].run_list.empty?
                              %tr
                                %td{:colspan => 2} This node has no roles or recipes applied.
                            - else
                              -node[1].run_list.each_with_index do |run_list_item, i|
                                %tr
                                  %td.position= i
                                  %td= run_list_item.name
                                  %td= run_list_item.type
<commit_msg>show recipe version in status page<commit_after>.block#block-tables
  .content
    %h2.title Status
    .inner
      %table.table
        %thead
          %tr
            %th.first Node Name
            %th Platform
            %th FQDN
            %th IP Address
            %th Uptime
            %th Last Check-in
            %th.last Run List
        %tbody
          - if @status.empty?
            %tr
              %td{:colspan => 7}= "You appear to have no nodes - try connecting one, or creating or editing a #{link_to('client', url(:clients))}"
          - else
            - @status.sort.each_with_index do |node, index|
              %tr{:class => "#{index % 2 == 1 ? 'odd' : 'even'}"}
                %td= link_to(node[1].name, url(:node, node[1].name))
                %td= "#{node[1]["platform"]} #{node[1]["platform_version"]}"
                %td= node[1]["fqdn"]
                %td= node[1]["ipaddress"]
                %td
                  .accordion
                    -unless node[1]["uptime"].nil?
                      = link_to(node[1]["uptime"].split(" ")[0..1].join(" ") , "#", :class => 'tooltip')
                      .tooltip
                        %table.table.tooltip
                          %tbody
                            %tr
                              %td= node[1]["uptime"]
                            
                - unless node[1]["ohai_time"].nil?
                  - current_time = Time.now.to_f
                  - ohai_time = Time.at(node[1]["ohai_time"])
                  - hours, minutes, seconds = time_difference_in_hms(ohai_time)
                  - hours_text   = "#{hours} hour#{hours == 1 ? '' : 's'}"
                  - minutes_text = "#{minutes} minute#{minutes == 1 ? '' : 's'}"
                  %td.flash
                    - status_class = ""
                    - if hours > 24 
                      - status_class = "message error"
                    - elsif hours > 1
                      - status_class = "message warning"
                    %div{ :class => status_class }
                      .accordion
                        - if hours > 48
                          - status_msg = "&gt; #{hours/24} days ago"
                        - elsif hours > 0
                          - status_msg = "&gt; #{hours_text} ago"
                        - elsif minutes < 1
                          - status_msg = "&lt; 1 minute ago"
                        - else
                          - status_msg = "#{minutes_text} ago"
                        = link_to(status_msg, "#", :class=> 'tooltip')
                        .tooltip
                          %table.table.tooltip
                            %tbody
                              %tr
                                %td
                                  = ohai_time 
                                  %br/
                                  - if hours == 0
                                    = "#{minutes_text} ago" 
                                  - else
                                    = "#{hours_text}, #{minutes_text} ago"
                - else
                  %td Not Checked In
                - unless node[1].run_list.nil?
                  %td
                    .accordion
                      = link_to("Run List", "#", :class => 'tooltip')
                      .tooltip
                        %table.table.tooltip
                          %thead
                            %tr
                              %th.first Position
                              %th Name
                              %th Version
                              %th.last Type
                          %tbody
                            - if node[1].run_list.empty?
                              %tr
                                %td{:colspan => 2} This node has no roles or recipes applied.
                            - else
                              -node[1].run_list.each_with_index do |run_list_item, i|
                                %tr
                                  %td.position= i
                                  %td= run_list_item.name
                                  %td= run_list_item.version
                                  %td= run_list_item.type
{'fraction_non_alphanumeric': 0.10487071557426338, 'fraction_numerical': 0.008177991581479254, 'mean_word_length': 0.7581395348837209, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 22, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1341889', 'n_tokens_mistral': 2157, 'n_tokens_neox': 1991, 'n_words': 443}