<commit_before>class AlertsListController < ApplicationController
  extend ActiveSupport::Concern

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

  def show
    if params[:id].nil?
      @breadcrumbs.clear
    end
  end

  def index
    redirect_to :action => 'show'
  end

  def class_icons
    res = {}
    [
      'ManageIQ::Providers::Kubernetes::ContainerManager::ContainerNode',
      'ManageIQ::Providers::Openshift::ContainerManager',
    ].each do |klass|
      fileicon = klass.constantize.decorate.fileicon
      res[klass] = ActionController::Base.helpers.image_path(fileicon)
    end
    render :json => res
  end

  private

  def session_data
    @layout = "monitor_alerts_list"
  end

  def set_session_data
    session[:layout] = @layout
  end

  menu_section :monitor
end<commit_msg>Add missing kubernetes icon to alert screens<commit_after>class AlertsListController < ApplicationController
  extend ActiveSupport::Concern

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

  def show
    if params[:id].nil?
      @breadcrumbs.clear
    end
  end

  def index
    redirect_to :action => 'show'
  end

  def class_icons
    res = {}
    [
      'ManageIQ::Providers::Kubernetes::ContainerManager',
      'ManageIQ::Providers::Kubernetes::ContainerManager::ContainerNode',
      'ManageIQ::Providers::Openshift::ContainerManager',
    ].each do |klass|
      fileicon = klass.constantize.decorate.fileicon
      res[klass] = ActionController::Base.helpers.image_path(fileicon)
    end
    render :json => res
  end

  private

  def session_data
    @layout = "monitor_alerts_list"
  end

  def set_session_data
    session[:layout] = @layout
  end

  menu_section :monitor
end
{'fraction_non_alphanumeric': 0.08674568965517242, 'fraction_numerical': 0.0, 'mean_word_length': 3.8108808290155443, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '7474521', 'n_tokens_mistral': 589, 'n_tokens_neox': 573, 'n_words': 120}