<commit_before>- notavail = _("Not Available")

#tab_div
  = render :partial => "layouts/flash_msg"

  %h3=_("Normal Operating Ranges (up to 30 days' data)")
  %table.table.table-bordered.table-striped
    %thead
      %tr
        %th
        %th
          = _("Max")
        %th
          = _("High")
        %th
          = _("Average")
    %tbody
      %tr
        %th=_('CPU')
        %td
          - if @record.cpu_usagemhz_rate_average_max_over_time_period
            = mhz_to_human_size(@record.cpu_usagemhz_rate_average_max_over_time_period, 2)
          - else
            = notavail
        %td
          - if @record.cpu_usagemhz_rate_average_high_over_time_period
            = mhz_to_human_size(@record.cpu_usagemhz_rate_average_high_over_time_period, 2)
          - else
            = notavail
        %td
          - if @record.cpu_usagemhz_rate_average_avg_over_time_period
            = mhz_to_human_size(@record.cpu_usagemhz_rate_average_avg_over_time_period, 2)
          - else
            = notavail
      %tr
        %th=_('CPU Usage')
        %td
          - if @record.max_cpu_usage_rate_average_max_over_time_period
            = number_to_percentage(@record.max_cpu_usage_rate_average_max_over_time_period, :precision => 2)
          - else
            = notavail
        %td
          - if @record.max_cpu_usage_rate_average_high_over_time_period
            = number_to_percentage(@record.max_cpu_usage_rate_average_high_over_time_period, :precision => 2)
          - else
            = notavail
        %td
          - if @record.max_cpu_usage_rate_average_avg_over_time_period
            = number_to_percentage(@record.max_cpu_usage_rate_average_avg_over_time_period, :precision => 2)
          - else
            = notavail
      %tr
        %th=_("Memory")
        %td
          - if @record.derived_memory_used_max_over_time_period
            = number_to_human_size(@record.derived_memory_used_max_over_time_period * 1024 * 1024, :precision => 2)
          - else
            = notavail
        %td
          - if @record.derived_memory_used_high_over_time_period
            = number_to_human_size(@record.derived_memory_used_high_over_time_period * 1024 * 1024, :precision => 2)
          - else
            = notavail
        %td
          - if @record.derived_memory_used_avg_over_time_period
            = number_to_human_size(@record.derived_memory_used_avg_over_time_period * 1024 * 1024, :precision => 2)
          - else
            = notavail
      %tr
        %th=_('Memory Usage')
        %td
          - if @record.max_mem_usage_absolute_average_max_over_time_period
            = number_to_percentage(@record.max_mem_usage_absolute_average_max_over_time_period, :precision => 2)
          - else
            = notavail
        %td
          - if @record.max_mem_usage_absolute_average_high_over_time_period
            = number_to_percentage(@record.max_mem_usage_absolute_average_high_over_time_period, :precision => 2)
          - else
            = notavail
        %td
          - if @record.max_mem_usage_absolute_average_avg_over_time_period
            = number_to_percentage(@record.max_mem_usage_absolute_average_avg_over_time_period, :precision => 2)
          - else
            = notavail

  %hr
  %h3=_('Right-Sizing (Conservative - derived from Absolute Maximum)')
  %table.table.table-bordered.table-striped
    %thead
      %tr
        %th
        %th=_("Current")
        %th=_("Recommended")
        %th=_("% Savings")
        %th=_("Savings")
    %tbody
      %tr
        %td
          =_("Processors")
        %td{:align => "right"}
          = @record.num_cpu ? @record.num_cpu : notavail
        %td{:align => "right"}
          = @record.conservative_recommended_vcpus ? @record.conservative_recommended_vcpus : notavail
        %td{:align => "right"}
          = @record.conservative_vcpus_recommended_change_pct ? "#{@record.conservative_vcpus_recommended_change_pct}%" : notavail
        %td{:align => "right"}
          = @record.conservative_vcpus_recommended_change ? @record.conservative_vcpus_recommended_change : notavail
      %tr{:class => cycle('row0 no-hover', 'row1 no-hover')}
        %td
          =_("Memory")
        %td{:align => "right"}
          = @record.mem_cpu ? "#{@record.mem_cpu} MB" : notavail
        %td{:align => "right"}
          = @record.conservative_recommended_mem ? "#{@record.conservative_recommended_mem} MB" : notavail
        %td{:align => "right"}
          = @record.conservative_mem_recommended_change_pct ? "#{@record.conservative_mem_recommended_change_pct}%" : notavail
        %td{:align => "right"}
          = @record.conservative_mem_recommended_change ? "#{@record.conservative_mem_recommended_change} MB" : notavail

  %hr

  %h3=_('Right-Sizing (Moderate - derived from High NORM)')
  %table.table.table-bordered.table-striped
    %thead
      %tr
        %th
        %th=_("Current")
        %th=_("Recommended")
        %th=_("% Savings")
        %th=_("Savings")
    %tbody
      %tr
        %td
          =_("Processors")
        %td{:align => "right"}
          = @record.num_cpu ? @record.num_cpu : notavail
        %td{:align => "right"}
          = @record.moderate_recommended_vcpus ? @record.moderate_recommended_vcpus : notavail
        %td{:align => "right"}
          = @record.moderate_vcpus_recommended_change_pct ? "#{@record.moderate_vcpus_recommended_change_pct}%" : notavail
        %td{:align => "right"}
          = @record.moderate_vcpus_recommended_change ? @record.moderate_vcpus_recommended_change : notavail
      %tr{:class => cycle('row0 no-hover', 'row1 no-hover')}
        %td
          =_("Memory")
        %td{:align => "right"}
          = @record.mem_cpu ? "#{@record.mem_cpu} MB" : notavail
        %td{:align => "right"}
          = @record.moderate_recommended_mem ? "#{@record.moderate_recommended_mem} MB" : notavail
        %td{:align => "right"}
          = @record.moderate_mem_recommended_change_pct ? "#{@record.moderate_mem_recommended_change_pct}%" : notavail
        %td{:align => "right"}
          = @record.moderate_mem_recommended_change ? "#{@record.moderate_mem_recommended_change} MB" : notavail

  %hr
  %h3=_('Right-Sizing (Aggressive - derived from Average NORM)')
  %table.table.table-bordered.table-striped
    %thead
      %tr
        %th
        %th=_("Current")
        %th=_("Recommended")
        %th=_("% Savings")
        %th=_("Savings")
    %tbody
      %tr
        %td
          =_("Processors")
        %td{:align => "right"}
          = @record.num_cpu ? @record.num_cpu : notavail
        %td{:align => "right"}
          = @record.aggressive_recommended_vcpus ? @record.aggressive_recommended_vcpus : notavail
        %td{:align => "right"}
          = @record.aggressive_vcpus_recommended_change_pct ? "#{@record.aggressive_vcpus_recommended_change_pct}%" : notavail
        %td{:align => "right"}
          = @record.aggressive_vcpus_recommended_change ? @record.aggressive_vcpus_recommended_change : notavail
      %tr{:class => cycle('row0 no-hover', 'row1 no-hover')}
        %td
          =_("Memory")
        %td{:align => "right"}
          = @record.mem_cpu ? "#{@record.mem_cpu} MB" : notavail
        %td{:align => "right"}
          = @record.aggressive_recommended_mem ? "#{@record.aggressive_recommended_mem} MB" : notavail
        %td{:align => "right"}
          = @record.aggressive_mem_recommended_change_pct ? "#{@record.aggressive_mem_recommended_change_pct}%" : notavail
        %td{:align => "right"}
          = @record.aggressive_mem_recommended_change ? "#{@record.aggressive_mem_recommended_change} MB" : notavail

  .note
    - arr = [Vm.cpu_recommendation_minimum, MiqReport.new.format_mbytes_to_human_size(Vm.mem_recommendation_minimum)]
    = _("* Recommendations are subject to minimum of CPU: %s and Memory: %s.") % arr

  - unless @explorer
    #buttons_on{:style => "float: right"}
      = button_tag((t = _('Back')),
        :class   => 'btn btn-default',
        :alt     => t,
        :title   => t,
        :onclick => "miqAjaxButton('#{url_for(:action => "right_size",
                                              :id     => @record_id,
                                              :button => "back")}');")<commit_msg>Fixed labels for right size recommendations<commit_after>- notavail = _("Not Available")

#tab_div
  = render :partial => "layouts/flash_msg"

  %h3=_("Normal Operating Ranges (up to 30 days' data)")
  %table.table.table-bordered.table-striped
    %thead
      %tr
        %th
        %th
          = _("Max")
        %th
          = _("High")
        %th
          = _("Average")
    %tbody
      %tr
        %td=_('CPU')
        %td
          - if @record.cpu_usagemhz_rate_average_max_over_time_period
            = mhz_to_human_size(@record.cpu_usagemhz_rate_average_max_over_time_period, 2)
          - else
            = notavail
        %td
          - if @record.cpu_usagemhz_rate_average_high_over_time_period
            = mhz_to_human_size(@record.cpu_usagemhz_rate_average_high_over_time_period, 2)
          - else
            = notavail
        %td
          - if @record.cpu_usagemhz_rate_average_avg_over_time_period
            = mhz_to_human_size(@record.cpu_usagemhz_rate_average_avg_over_time_period, 2)
          - else
            = notavail
      %tr
        %td=_('CPU Usage')
        %td
          - if @record.max_cpu_usage_rate_average_max_over_time_period
            = number_to_percentage(@record.max_cpu_usage_rate_average_max_over_time_period, :precision => 2)
          - else
            = notavail
        %td
          - if @record.max_cpu_usage_rate_average_high_over_time_period
            = number_to_percentage(@record.max_cpu_usage_rate_average_high_over_time_period, :precision => 2)
          - else
            = notavail
        %td
          - if @record.max_cpu_usage_rate_average_avg_over_time_period
            = number_to_percentage(@record.max_cpu_usage_rate_average_avg_over_time_period, :precision => 2)
          - else
            = notavail
      %tr
        %td=_("Memory")
        %td
          - if @record.derived_memory_used_max_over_time_period
            = number_to_human_size(@record.derived_memory_used_max_over_time_period * 1024 * 1024, :precision => 2)
          - else
            = notavail
        %td
          - if @record.derived_memory_used_high_over_time_period
            = number_to_human_size(@record.derived_memory_used_high_over_time_period * 1024 * 1024, :precision => 2)
          - else
            = notavail
        %td
          - if @record.derived_memory_used_avg_over_time_period
            = number_to_human_size(@record.derived_memory_used_avg_over_time_period * 1024 * 1024, :precision => 2)
          - else
            = notavail
      %tr
        %td=_('Memory Usage')
        %td
          - if @record.max_mem_usage_absolute_average_max_over_time_period
            = number_to_percentage(@record.max_mem_usage_absolute_average_max_over_time_period, :precision => 2)
          - else
            = notavail
        %td
          - if @record.max_mem_usage_absolute_average_high_over_time_period
            = number_to_percentage(@record.max_mem_usage_absolute_average_high_over_time_period, :precision => 2)
          - else
            = notavail
        %td
          - if @record.max_mem_usage_absolute_average_avg_over_time_period
            = number_to_percentage(@record.max_mem_usage_absolute_average_avg_over_time_period, :precision => 2)
          - else
            = notavail

  %hr
  %h3=_('Right-Sizing (Conservative - derived from Absolute Maximum)')
  %table.table.table-bordered.table-striped
    %thead
      %tr
        %th
        %th=_("Current")
        %th=_("Recommended")
        %th=_("% Savings")
        %th=_("Savings")
    %tbody
      %tr
        %td
          =_("Processors")
        %td{:align => "right"}
          = @record.num_cpu ? @record.num_cpu : notavail
        %td{:align => "right"}
          = @record.conservative_recommended_vcpus ? @record.conservative_recommended_vcpus : notavail
        %td{:align => "right"}
          = @record.conservative_vcpus_recommended_change_pct ? "#{@record.conservative_vcpus_recommended_change_pct}%" : notavail
        %td{:align => "right"}
          = @record.conservative_vcpus_recommended_change ? @record.conservative_vcpus_recommended_change : notavail
      %tr{:class => cycle('row0 no-hover', 'row1 no-hover')}
        %td
          =_("Memory")
        %td{:align => "right"}
          = @record.mem_cpu ? "#{@record.mem_cpu} MB" : notavail
        %td{:align => "right"}
          = @record.conservative_recommended_mem ? "#{@record.conservative_recommended_mem} MB" : notavail
        %td{:align => "right"}
          = @record.conservative_mem_recommended_change_pct ? "#{@record.conservative_mem_recommended_change_pct}%" : notavail
        %td{:align => "right"}
          = @record.conservative_mem_recommended_change ? "#{@record.conservative_mem_recommended_change} MB" : notavail

  %hr

  %h3=_('Right-Sizing (Moderate - derived from High NORM)')
  %table.table.table-bordered.table-striped
    %thead
      %tr
        %th
        %th=_("Current")
        %th=_("Recommended")
        %th=_("% Savings")
        %th=_("Savings")
    %tbody
      %tr
        %td
          =_("Processors")
        %td{:align => "right"}
          = @record.num_cpu ? @record.num_cpu : notavail
        %td{:align => "right"}
          = @record.moderate_recommended_vcpus ? @record.moderate_recommended_vcpus : notavail
        %td{:align => "right"}
          = @record.moderate_vcpus_recommended_change_pct ? "#{@record.moderate_vcpus_recommended_change_pct}%" : notavail
        %td{:align => "right"}
          = @record.moderate_vcpus_recommended_change ? @record.moderate_vcpus_recommended_change : notavail
      %tr{:class => cycle('row0 no-hover', 'row1 no-hover')}
        %td
          =_("Memory")
        %td{:align => "right"}
          = @record.mem_cpu ? "#{@record.mem_cpu} MB" : notavail
        %td{:align => "right"}
          = @record.moderate_recommended_mem ? "#{@record.moderate_recommended_mem} MB" : notavail
        %td{:align => "right"}
          = @record.moderate_mem_recommended_change_pct ? "#{@record.moderate_mem_recommended_change_pct}%" : notavail
        %td{:align => "right"}
          = @record.moderate_mem_recommended_change ? "#{@record.moderate_mem_recommended_change} MB" : notavail

  %hr
  %h3=_('Right-Sizing (Aggressive - derived from Average NORM)')
  %table.table.table-bordered.table-striped
    %thead
      %tr
        %th
        %th=_("Current")
        %th=_("Recommended")
        %th=_("% Savings")
        %th=_("Savings")
    %tbody
      %tr
        %td
          =_("Processors")
        %td{:align => "right"}
          = @record.num_cpu ? @record.num_cpu : notavail
        %td{:align => "right"}
          = @record.aggressive_recommended_vcpus ? @record.aggressive_recommended_vcpus : notavail
        %td{:align => "right"}
          = @record.aggressive_vcpus_recommended_change_pct ? "#{@record.aggressive_vcpus_recommended_change_pct}%" : notavail
        %td{:align => "right"}
          = @record.aggressive_vcpus_recommended_change ? @record.aggressive_vcpus_recommended_change : notavail
      %tr{:class => cycle('row0 no-hover', 'row1 no-hover')}
        %td
          =_("Memory")
        %td{:align => "right"}
          = @record.mem_cpu ? "#{@record.mem_cpu} MB" : notavail
        %td{:align => "right"}
          = @record.aggressive_recommended_mem ? "#{@record.aggressive_recommended_mem} MB" : notavail
        %td{:align => "right"}
          = @record.aggressive_mem_recommended_change_pct ? "#{@record.aggressive_mem_recommended_change_pct}%" : notavail
        %td{:align => "right"}
          = @record.aggressive_mem_recommended_change ? "#{@record.aggressive_mem_recommended_change} MB" : notavail

  .note
    - arr = [Vm.cpu_recommendation_minimum, MiqReport.new.format_mbytes_to_human_size(Vm.mem_recommendation_minimum)]
    = _("* Recommendations are subject to minimum of CPU: %s and Memory: %s.") % arr

  - unless @explorer
    #buttons_on{:style => "float: right"}
      = button_tag((t = _('Back')),
        :class   => 'btn btn-default',
        :alt     => t,
        :title   => t,
        :onclick => "miqAjaxButton('#{url_for(:action => "right_size",
                                              :id     => @record_id,
                                              :button => "back")}');")
{'fraction_non_alphanumeric': 0.12252295795070083, 'fraction_numerical': 0.005799903334944417, 'mean_word_length': 2.455741127348643, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 93, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4884106', 'n_tokens_mistral': 5846, 'n_tokens_neox': 5491, 'n_words': 770}