<commit_before>- cap_type ||= "details"
- url = url_for(:action => 'util_chart_chooser', :id => @record.id)
%div{:id => "capacity_#{cap_type}_options_div", :onclick => "if (typeof miqMenu != 'undefined') miqMenu.hideContextMenu();"}
  %h3
    = _('Options')
  .form-horizontal
    .form-group
      %label.control-label.col-md-2
        = _('Trends for past')
      .col-md-10
        = select_tag("#{cap_type}_days",
          options_for_select(WEEK_CHOICES.invert.sort_by(&:last), @sb[:util][:options][:days].to_i),
          "class"               => "selectpicker",
          "data-miq_sparkle_on" => true)
        :javascript
          miqInitSelectPicker();
          miqSelectPickerEvent("#{cap_type}_days", "#{url}");

  .form-horizontal
    .form-group
      %label.control-label.col-md-2
        = _('Classification')
      .col-md-10
        - options = [["<#{_('None')}>", "<None>"]] + (@sb[:util][:tags] ? @sb[:util][:tags].invert.sort : [])
        = select_tag("#{cap_type}_tag",
          options_for_select(options, @sb[:util][:options][:tag]),
          "class"               => "selectpicker",
          "data-miq_sparkle_on" => true)
        :javascript
          miqInitSelectPicker();
          miqSelectPickerEvent("#{cap_type}_tag", "#{url}");

  .form-horizontal
    .form-group
      %label.control-label.col-md-2
        = _('Time Profile')
      .col-md-10
        - if session[:time_profiles].blank?
          = _('No Time Profiles found')
        - elsif session[:time_profiles].length == 1
          -# Only 1 choice, show the value
          = session[:time_profiles][@sb[:util][:options][:time_profile].to_i]
        - else
          = select_tag("#{cap_type}_time_profile",
            options_for_select(Array(session[:time_profiles].invert).sort_by(&:first),
            @sb[:util][:options][:time_profile]),
            "class"               => "selectpicker",
            "data-miq_sparkle_on" => true)
          :javascript
            miqInitSelectPicker();
            miqSelectPickerEvent("#{cap_type}_time_profile", "#{url}");
    - if %w(summ report).include?(cap_type)
      - date_id = cap_type == "summ" ? "1" : "2"
      .form-group
        %label.control-label.col-md-2
          = _('Selected Day')
        .col-md-10
          = datepicker_input_tag("miq_date_#{date_id}",
            @sb[:util][:options][:chart_date],
            :readonly               => "true",
            "data-miq_sparkle_on"   => true,
            "data-miq_observe_date" => {:url => url}.to_json)<commit_msg>Returned spinners lost during patternfly conversion<commit_after>- cap_type ||= "details"
- url = url_for(:action => 'util_chart_chooser', :id => @record.id)
%div{:id => "capacity_#{cap_type}_options_div", :onclick => "if (typeof miqMenu != 'undefined') miqMenu.hideContextMenu();"}
  %h3
    = _('Options')
  .form-horizontal
    .form-group
      %label.control-label.col-md-2
        = _('Trends for past')
      .col-md-10
        = select_tag("#{cap_type}_days",
          options_for_select(WEEK_CHOICES.invert.sort_by(&:last), @sb[:util][:options][:days].to_i),
          "class"               => "selectpicker")
        :javascript
          miqInitSelectPicker();
          miqSelectPickerEvent("#{cap_type}_days", "#{url}", {beforeSend: true});

  .form-horizontal
    .form-group
      %label.control-label.col-md-2
        = _('Classification')
      .col-md-10
        - options = [["<#{_('None')}>", "<None>"]] + (@sb[:util][:tags] ? @sb[:util][:tags].invert.sort : [])
        = select_tag("#{cap_type}_tag",
          options_for_select(options, @sb[:util][:options][:tag]),
          "class"               => "selectpicker")
        :javascript
          miqInitSelectPicker();
          miqSelectPickerEvent("#{cap_type}_tag", "#{url}", {beforeSend: true});

  .form-horizontal
    .form-group
      %label.control-label.col-md-2
        = _('Time Profile')
      .col-md-10
        - if session[:time_profiles].blank?
          = _('No Time Profiles found')
        - elsif session[:time_profiles].length == 1
          -# Only 1 choice, show the value
          = session[:time_profiles][@sb[:util][:options][:time_profile].to_i]
        - else
          = select_tag("#{cap_type}_time_profile",
            options_for_select(Array(session[:time_profiles].invert).sort_by(&:first),
            @sb[:util][:options][:time_profile]),
            "class"               => "selectpicker")
          :javascript
            miqInitSelectPicker();
            miqSelectPickerEvent("#{cap_type}_time_profile", "#{url}", {beforeSend: true});
    - if %w(summ report).include?(cap_type)
      - date_id = cap_type == "summ" ? "1" : "2"
      .form-group
        %label.control-label.col-md-2
          = _('Selected Day')
        .col-md-10
          = datepicker_input_tag("miq_date_#{date_id}",
            @sb[:util][:options][:chart_date],
            :readonly               => "true",
            "data-miq_sparkle_on"   => true,
            "data-miq_observe_date" => {:url => url}.to_json)
{'fraction_non_alphanumeric': 0.177601585728444, 'fraction_numerical': 0.006739345887016849, 'mean_word_length': 2.3820375335120643, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 32, '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': '7386869', 'n_tokens_mistral': 1681, 'n_tokens_neox': 1652, 'n_words': 230}