<commit_before>#prov_host_div{:style => "height: 150px; overflow: auto;"}
  %table.style3
    %thead
      %tr
        - # need to set options from @edit/@option based upon calling screen: show/edit
        - options = @edit ? @edit : @options
        - id = @edit && @edit[:req_id] || "new"
        - options[:host_columns].each_with_index do |h, i|
          %th{:nowrap => 1}
            - #  Replaced to exclude non-view table fields from sorting
            - # dont show sort on show screen, need @edit variables for sort to work
            - if @edit
              = link_to(h(options[:host_headers][h]),
                {:action => "sort_host_grid", :sort_choice => h, :field_id => field_id, :id => id.to_s},
                "data-miq_sparkle_on"  => true,
                "data-miq_sparkle_off" => true,
                :remote                => true)
              - if options[:host_columns][i] == options[:host_sortcol]
                %img{:src => "/images/icons/16/sort_#{@edit[:host_sortdir] == 'ASC' ? 'up' : 'down'}.png"}
            - else
              = h(options[:host_headers][h])
    %tbody
      - if options[:wf].class.to_s != "MiqHostProvisionWorkflow"
        - cls = @edit[:new][:placement_host_name] && @edit[:new][:placement_host_name][0].nil? ? "row3" : cycle('row0', 'row1')
        %tr{:class => cls, :onclick => "miqAjax('/miq_request/prov_field_changed/?#{field_id}=__HOST__NONE__&id=#{id}');", :nowrap => 1}
          %td{:onmouseover => "ChangeColor(this, true);", :onmouseout => "ChangeColor(this, false);"}
            = "<#{_('None')}>"
          %td
          %td
          %td
          %td
      - @temp[:hosts].each do |row|
        - @id = row.id
        - if options[:wf].class.to_s == "MiqHostProvisionWorkflow"
          %tr{:class => cycle('row0', 'row1'), :nowrap => 1}
        - else
          - cls = @edit[:new][:placement_host_name] && @edit[:new][:placement_host_name][0] == @id ? "row3" : cycle('row0', 'row1')
          %tr{:class => cls, :onclick => "miqAjax('/miq_request/prov_field_changed/?#{field_id}=#{@id}&id=#{id}');", :nowrap => 1}
        - options[:host_columns].each do |col|
          %td{:align => "left", :onmouseover => "ChangeColor(this, true);", :onmouseout => "ChangeColor(this, false);"}
            = h(row.send(col))
    %tfoot
      %tr
        %td{:colspan => "40"}<commit_msg>Fixed Haml code in host grid.<commit_after>#prov_host_div{:style => "height: 150px; overflow: auto;"}
  %table.style3
    %thead
      %tr
        - # need to set options from @edit/@option based upon calling screen: show/edit
        - options = @edit ? @edit : @options
        - id = @edit && @edit[:req_id] || "new"
        - options[:host_columns].each_with_index do |h, i|
          %th{:nowrap => 1}
            - #  Replaced to exclude non-view table fields from sorting
            - # dont show sort on show screen, need @edit variables for sort to work
            - if @edit
              = link_to(h(options[:host_headers][h]),
                {:action => "sort_host_grid", :sort_choice => h, :field_id => field_id, :id => id.to_s},
                "data-miq_sparkle_on"  => true,
                "data-miq_sparkle_off" => true,
                :remote                => true)
              - if options[:host_columns][i] == options[:host_sortcol]
                %img{:src => "/images/icons/16/sort_#{@edit[:host_sortdir] == 'ASC' ? 'up' : 'down'}.png"}
            - else
              = h(options[:host_headers][h])
    %tbody
      - if options[:wf].class.to_s != "MiqHostProvisionWorkflow"
        - cls = @edit[:new][:placement_host_name] && @edit[:new][:placement_host_name][0].nil? ? "row3" : cycle('row0', 'row1')
        %tr{:class => cls, :onclick => "miqAjax('/miq_request/prov_field_changed/?#{field_id}=__HOST__NONE__&id=#{id}');", :nowrap => 1}
          %td{:onmouseover => "ChangeColor(this, true);", :onmouseout => "ChangeColor(this, false);"}
            = "<#{_('None')}>"
          %td
          %td
          %td
          %td
      - @temp[:hosts].each do |row|
        - @id = row.id
        - if options[:wf].class.to_s == "MiqHostProvisionWorkflow"
          %tr{:class => cycle('row0', 'row1'), :nowrap => 1}
            - options[:host_columns].each do |col|
              %td{:align => "left", :onmouseover => "ChangeColor(this, true);", :onmouseout => "ChangeColor(this, false);"}
                = h(row.send(col))
        - else
          - cls = @edit[:new][:placement_host_name] && @edit[:new][:placement_host_name][0] == @id ? "row3" : cycle('row0', 'row1')
          %tr{:class => cls, :onclick => "miqAjax('/miq_request/prov_field_changed/?#{field_id}=#{@id}&id=#{id}');", :nowrap => 1}
            - options[:host_columns].each do |col|
              %td{:align => "left", :onmouseover => "ChangeColor(this, true);", :onmouseout => "ChangeColor(this, false);"}
                = h(row.send(col))
    %tfoot
      %tr
        %td{:colspan => "40"}
{'fraction_non_alphanumeric': 0.1880548829701372, 'fraction_numerical': 0.00887812752219532, 'mean_word_length': 2.338047138047138, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 56, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3866562', 'n_tokens_mistral': 1713, 'n_tokens_neox': 1676, 'n_words': 318}