<commit_before>%input{:type  => 'hidden',
       :name  => "miq_grid_checks",
       :id    => "miq_grid_checks",
       :value => ''}

- grid_name  = options[:grid_name]
- grid_id    = options[:grid_id]
- grid_hash  = options[:grid_hash]
- button_div = options[:button_div]

- unless @parent.nil?
  - layout = @layout
  :javascript
    ManageIQ.record.parentId    = "#{@parent.id}";
    ManageIQ.record.parentClass = "#{j @parent.class.base_class.to_s.underscore}";

    if (ManageIQ.record.parentClass == "policy_set") {
      ManageIQ.record.parentClass = "policy";
    } else if (ManageIQ.record.parentClass == "ext_management_system") {
      ManageIQ.record.parentClass = "#{j layout}";
    }

- if options[:action_url]
  - action_url = options[:action_url]
  :javascript
    ManageIQ.actionUrl = "#{j action_url}";

:javascript
  ManageIQ.grids.grids["#{j grid_name}"] = {
    g_id: "#{j grid_id}",
    opts: #{raw js_options.to_json},
    hash: #{raw grid_hash.to_json},
    obj:  null,
  };  // TODO who touches grids[*].xml?


%table.table.table-striped.table-bordered.table-hover.table-selectable
  %thead
    %tr
      - grid_hash[:head].each do |h|
        %th{:class => h[:is_narrow] ? 'narrow' : ''}
          = h[:text]
  %tbody
    - grid_hash[:rows].each do |row|
      %tr
      - row[:cells].each do |cell|
        %td
          - if cell[:is_checkbox]
            = check_box_tag("check_#{row[:id]}", 1, cell[:checked],
              :onclick => "miqUpdateButtons(this, '#{button_div}');")
          - elsif cell[:is_button]
            %button.btn.btn-primary{:onclick => cell[:onclick],
                                    :title   => cell[:title],
                                    :alt     => cell[:title]}
              = cell[:text]
          - else
            = image_tag(cell[:image], :alt => cell[:title], :title => cell[:title]) if cell[:image]
            = cell[:text]<commit_msg>Fix cells not under tr (transferred from ManageIQ/manageiq@9<PASSWORD>2ead<PASSWORD>9<PASSWORD>f45a799e)<commit_after>%input{:type  => 'hidden',
       :name  => "miq_grid_checks",
       :id    => "miq_grid_checks",
       :value => ''}

- grid_name  = options[:grid_name]
- grid_id    = options[:grid_id]
- grid_hash  = options[:grid_hash]
- button_div = options[:button_div]

- unless @parent.nil?
  - layout = @layout
  :javascript
    ManageIQ.record.parentId    = "#{@parent.id}";
    ManageIQ.record.parentClass = "#{j @parent.class.base_class.to_s.underscore}";

    if (ManageIQ.record.parentClass == "policy_set") {
      ManageIQ.record.parentClass = "policy";
    } else if (ManageIQ.record.parentClass == "ext_management_system") {
      ManageIQ.record.parentClass = "#{j layout}";
    }

- if options[:action_url]
  - action_url = options[:action_url]
  :javascript
    ManageIQ.actionUrl = "#{j action_url}";

:javascript
  ManageIQ.grids.grids["#{j grid_name}"] = {
    g_id: "#{j grid_id}",
    opts: #{raw js_options.to_json},
    hash: #{raw grid_hash.to_json},
    obj:  null,
  };  // TODO who touches grids[*].xml?


%table.table.table-striped.table-bordered.table-hover.table-selectable
  %thead
    %tr
      - grid_hash[:head].each do |h|
        %th{:class => h[:is_narrow] ? 'narrow' : ''}
          = h[:text]
  %tbody
    - grid_hash[:rows].each do |row|
      %tr
        - row[:cells].each do |cell|
          %td
            - if cell[:is_checkbox]
              = check_box_tag("check_#{row[:id]}", 1, cell[:checked],
                :onclick => "miqUpdateButtons(this, '#{button_div}');")
            - elsif cell[:is_button]
              %button.btn.btn-primary{:onclick => cell[:onclick],
                                      :title   => cell[:title],
                                      :alt     => cell[:title]}
                = cell[:text]
            - else
              = image_tag(cell[:image], :alt => cell[:title], :title => cell[:title]) if cell[:image]
              = cell[:text]
{'fraction_non_alphanumeric': 0.16915674854393517, 'fraction_numerical': 0.0025322866548493288, 'mean_word_length': 2.3963886500429923, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5093622', 'n_tokens_mistral': 1388, 'n_tokens_neox': 1350, 'n_words': 222}