<commit_before>= render :partial => "layouts/dhtmlx_tags", :locals => {:control => "grid"}

%input{:type  => 'hidden',
       :name  => "miq_grid_checks#{options[:grid_num]}",
       :id    => "miq_grid_checks#{options[:grid_num]}",
       :value => ''}

- if options[:div_in_js]
  %div{:id    => options[:grid_id],
       :style => "width:#{options[:div_width]}; height:#{options[:div_height]}; cursor:#{options[:div_cursor]}; overflow:#{options[:div_overflow]}"}

%script{:type => "text/javascript"}
  - unless @parent.nil?
    ManageIQ.record.parentId = "#{@parent.id}";
    ManageIQ.record.parentClass = "#{@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 = "#{@layout}"; }
  - if options[:action_url]
    ManageIQ.actionUrl = "#{options[:action_url].html_safe}";
  ManageIQ.grids.grids['#{options[:grid_name].html_safe}'] = {g_id:'#{options[:grid_id].html_safe}', opts:#{options.to_json.html_safe}, xml:"#{escape_javascript(options[:grid_xml]).html_safe}", obj:null};
  - if request.xml_http_request?
    miqInitGrid('#{options[:grid_name]}');<commit_msg>use j and :javascript where possible<commit_after>= render :partial => "layouts/dhtmlx_tags", :locals => {:control => "grid"}

%input{:type  => 'hidden',
       :name  => "miq_grid_checks#{options[:grid_num]}",
       :id    => "miq_grid_checks#{options[:grid_num]}",
       :value => ''}

- if options[:div_in_js]
  %div{:id    => options[:grid_id],
       :style => "width:#{options[:div_width]}; height:#{options[:div_height]}; cursor:#{options[:div_cursor]}; overflow:#{options[:div_overflow]}"}

%script{:type => "text/javascript"}
  - unless @parent.nil?
    ManageIQ.record.parentId = "#{raw j(@parent.id)}";
    ManageIQ.record.parentClass = "#{raw 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 = "#{raw(j(@layout))}"; }
  - if options[:action_url]
    ManageIQ.actionUrl = "#{raw(j(options[:action_url]))}";
  ManageIQ.grids.grids["#{raw j(options[:grid_name])}"] = {g_id:"#{raw j(options[:grid_id])}",opts:#{raw options.to_json },xml:"#{raw j(options[:grid_xml])}",obj:null};
  - if request.xml_http_request?
    miqInitGrid("#{raw j(options[:grid_name])}");
{'fraction_non_alphanumeric': 0.2138314785373609, 'fraction_numerical': 0.0, 'mean_word_length': 5.623684210526315, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '658178', 'n_tokens_mistral': 921, 'n_tokens_neox': 907, 'n_words': 117}