<commit_before>- url = url_for(:action => 'form_field_changed', :id => "#{@edit[:rpt_id] || 'new'}")
%tr
  %td.key
    = _('Trending for')
  %td
    - opts = ["<#{_('Choose')}>"] + MiqExpression.reporting_available_fields(@edit[:new][:model], @edit[:new][:perf_interval]).sort
    = select_tag('chosen_trend_col',
      options_for_select(opts, @edit[:new][:perf_trend_db] ? @edit[:new][:perf_trend_db] + "-" + @edit[:new][:perf_trend_col] : ""),
      :multiple              => false,
      :class                 => "widthed",
      "data-miq_sparkle_on"  => true,
      "data-miq_sparkle_off" => true,
      "data-miq_observe"     => {:url => url}.to_json)
- if @edit[:new][:perf_trend_col]
  %tr
    %td.key
      = _('Trend Target Limit')
    %td
      - unless @edit[:limit_cols].empty?
        = _('Column:')
        = select_tag('chosen_limit_col',
          options_for_select(["<#{_('None')}>"] + @edit[:limit_cols].sort,  @edit[:new][:perf_limit_col]),
          :multiple              => false,
          :class                 => "widthed",
          "data-miq_sparkle_on"  => true,
          "data-miq_sparkle_off" => true,
          "data-miq_observe"     => {:url => url}.to_json)
      - unless @edit[:new][:perf_limit_col]
        = _('Value:')
        - if @edit[:percent_col]
          = "#{h(@edit[:new][:perf_limit_val])}%"
        - else
          = text_field_tag("chosen_limit_val", @edit[:new][:perf_limit_val],
            :maxlength         => 20,
            "data-miq_observe" => {:interval => '.5', :url => url}.to_json)
- if @edit[:new][:perf_trend_col]
  %tr
    %td.key
      = _('Trend Target Percents')
    %td
      = select_tag('percent1',
        options_for_select((0..100).step(5).to_a, @edit[:new][:perf_target_pct1]),
        :multiple              => false,
        :class                 => "widthed",
        "data-miq_sparkle_on"  => true,
        "data-miq_sparkle_off" => true,
        "data-miq_observe"     => {:url => url}.to_json)
      = select_tag('percent2',
        options_for_select(["<#{_('None')}>"] + (0..100).step(5).to_a, edit[:new][:perf_target_pct2]),
        :multiple              => false,
        :class                 => "widthed",
        "data-miq_sparkle_on"  => true,
        "data-miq_sparkle_off" => true,
        "data-miq_observe"     => {:url => url}.to_json)
      = select_tag('percent3',
        options_for_select(["<#{_('None')}>"] + (0..100).step(5).to_a, edit[:new][:perf_target_pct3]),
        :multiple              => false,
        :class                 => "widthed",
        "data-miq_sparkle_on"  => true,
        "data-miq_sparkle_off" => true,
        "data-miq_observe"     => {:url => url}.to_json)<commit_msg>Fixed bug introduced with haml conversion<commit_after>- url = url_for(:action => 'form_field_changed', :id => "#{@edit[:rpt_id] || 'new'}")
%tr
  %td.key
    = _('Trending for')
  %td
    - opts = ["<#{_('Choose')}>"] + MiqExpression.reporting_available_fields(@edit[:new][:model], @edit[:new][:perf_interval]).sort
    = select_tag('chosen_trend_col',
      options_for_select(opts, @edit[:new][:perf_trend_db] ? @edit[:new][:perf_trend_db] + "-" + @edit[:new][:perf_trend_col] : ""),
      :multiple              => false,
      :class                 => "widthed",
      "data-miq_sparkle_on"  => true,
      "data-miq_sparkle_off" => true,
      "data-miq_observe"     => {:url => url}.to_json)
- if @edit[:new][:perf_trend_col]
  %tr
    %td.key
      = _('Trend Target Limit')
    %td
      - unless @edit[:limit_cols].empty?
        = _('Column:')
        = select_tag('chosen_limit_col',
          options_for_select(["<#{_('None')}>"] + @edit[:limit_cols].sort,  @edit[:new][:perf_limit_col]),
          :multiple              => false,
          :class                 => "widthed",
          "data-miq_sparkle_on"  => true,
          "data-miq_sparkle_off" => true,
          "data-miq_observe"     => {:url => url}.to_json)
      - unless @edit[:new][:perf_limit_col]
        = _('Value:')
        - if @edit[:percent_col]
          = "#{h(@edit[:new][:perf_limit_val])}%"
        - else
          = text_field_tag("chosen_limit_val", @edit[:new][:perf_limit_val],
            :maxlength         => 20,
            "data-miq_observe" => {:interval => '.5', :url => url}.to_json)
- if @edit[:new][:perf_trend_col]
  %tr
    %td.key
      = _('Trend Target Percents')
    %td
      = select_tag('percent1',
        options_for_select((0..100).step(5).to_a, @edit[:new][:perf_target_pct1]),
        :multiple              => false,
        :class                 => "widthed",
        "data-miq_sparkle_on"  => true,
        "data-miq_sparkle_off" => true,
        "data-miq_observe"     => {:url => url}.to_json)
      = select_tag('percent2',
        options_for_select(["<#{_('None')}>"] + (0..100).step(5).to_a, @edit[:new][:perf_target_pct2]),
        :multiple              => false,
        :class                 => "widthed",
        "data-miq_sparkle_on"  => true,
        "data-miq_sparkle_off" => true,
        "data-miq_observe"     => {:url => url}.to_json)
      = select_tag('percent3',
        options_for_select(["<#{_('None')}>"] + (0..100).step(5).to_a, @edit[:new][:perf_target_pct3]),
        :multiple              => false,
        :class                 => "widthed",
        "data-miq_sparkle_on"  => true,
        "data-miq_sparkle_off" => true,
        "data-miq_observe"     => {:url => url}.to_json)
{'fraction_non_alphanumeric': 0.19640234948604993, 'fraction_numerical': 0.00881057268722467, 'mean_word_length': 2.2904589371980677, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 83, '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': '2008136', 'n_tokens_mistral': 2029, 'n_tokens_neox': 1985, 'n_words': 256}