<commit_before>class PhysicalServerController < ApplicationController
  include Mixins::GenericListMixin
  include Mixins::GenericShowMixin
  include Mixins::GenericSessionMixin
  include Mixins::MoreShowActions

  before_action :check_privileges
  before_action :session_data
  after_action :cleanup_action
  after_action :set_session_data

  def self.display_methods
    %w(guest_devices)
  end

  def display_guest_devices
    nested_list(GuestDevice, :named_scope => :with_ethernet_type)
  end

  def self.table_name
    @table_name ||= "physical_servers"
  end

  def session_data
    @title  = _("Physical Servers")
    @layout = "physical_server"
    @lastaction = session[:physical_server_lastaction]
  end

  def set_session_data
    session[:layout] = @layout
    session[:physical_server_lastaction] = @lastaction
  end

  def show_list
    # Disable the cache to prevent a caching problem that occurs when
    # pressing the browser's back arrow button to return to the show_list
    # page while on the Physical Server's show page. Disabling the cache
    # causes the page and its session variables to actually be reloaded.
    disable_client_cache

    process_show_list
  end

  def textual_group_list
    [
      %i(properties networks relationships power_management assets firmware_details smart_management),
    ]
  end
  helper_method(:textual_group_list)

  def button
    assign_policies(PhysicalServer) if params[:pressed] == "physical_server_protect"
    tag(PhysicalServer) if params[:pressed] == "physical_server_tag"

    return if %w(physical_server_protect physical_server_tag).include?(params[:pressed]) &&
              @flash_array.nil? # Some other screen is showing, so return
    if params[:pressed] == "physical_server_timeline"
      @record = find_record_with_rbac(ManageIQ::Providers::PhysicalInfraManager::PhysicalServer, params[:id])
      show_timeline
      javascript_redirect(:action => 'show', :id => @record.id, :display => 'timeline')
    end
  end

  def provision
    provisioning_ids = find_checked_ids_with_rbac(PhysicalServer)
    provisioning_ids.push(find_id_with_rbac(PhysicalServer, params[:id])) if provisioning_ids.empty?

    javascript_redirect(:controller     => "miq_request",
                        :action         => "prov_edit",
                        :prov_id        => provisioning_ids,
                        :org_controller => "physical_server",
                        :escape         => false)
  end
end<commit_msg>Physical server details now has two columns<commit_after>class PhysicalServerController < ApplicationController
  include Mixins::GenericListMixin
  include Mixins::GenericShowMixin
  include Mixins::GenericSessionMixin
  include Mixins::MoreShowActions

  before_action :check_privileges
  before_action :session_data
  after_action :cleanup_action
  after_action :set_session_data

  def self.display_methods
    %w(guest_devices)
  end

  def display_guest_devices
    nested_list(GuestDevice, :named_scope => :with_ethernet_type)
  end

  def self.table_name
    @table_name ||= "physical_servers"
  end

  def session_data
    @title  = _("Physical Servers")
    @layout = "physical_server"
    @lastaction = session[:physical_server_lastaction]
  end

  def set_session_data
    session[:layout] = @layout
    session[:physical_server_lastaction] = @lastaction
  end

  def show_list
    # Disable the cache to prevent a caching problem that occurs when
    # pressing the browser's back arrow button to return to the show_list
    # page while on the Physical Server's show page. Disabling the cache
    # causes the page and its session variables to actually be reloaded.
    disable_client_cache

    process_show_list
  end

  def textual_group_list
    [
      %i(properties networks relationships),
      %i(power_management assets firmware_details smart_management),
    ]
  end
  helper_method(:textual_group_list)

  def button
    assign_policies(PhysicalServer) if params[:pressed] == "physical_server_protect"
    tag(PhysicalServer) if params[:pressed] == "physical_server_tag"

    return if %w(physical_server_protect physical_server_tag).include?(params[:pressed]) &&
              @flash_array.nil? # Some other screen is showing, so return
    if params[:pressed] == "physical_server_timeline"
      @record = find_record_with_rbac(ManageIQ::Providers::PhysicalInfraManager::PhysicalServer, params[:id])
      show_timeline
      javascript_redirect(:action => 'show', :id => @record.id, :display => 'timeline')
    end
  end

  def provision
    provisioning_ids = find_checked_ids_with_rbac(PhysicalServer)
    provisioning_ids.push(find_id_with_rbac(PhysicalServer, params[:id])) if provisioning_ids.empty?

    javascript_redirect(:controller     => "miq_request",
                        :action         => "prov_edit",
                        :prov_id        => provisioning_ids,
                        :org_controller => "physical_server",
                        :escape         => false)
  end
end
{'fraction_non_alphanumeric': 0.07727544313881697, 'fraction_numerical': 0.0, 'mean_word_length': 3.680335507921715, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, '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': '5441777', 'n_tokens_mistral': 1486, 'n_tokens_neox': 1402, 'n_words': 341}