<commit_before>class Projects::ClustersController < Projects::ApplicationController
  before_action :cluster, except: [:login, :index, :new, :new_gcp, :create]
  before_action :authorize_read_cluster!
  before_action :authorize_create_cluster!, only: [:new, :new_gcp, :create]
  before_action :authorize_google_api, only: [:new_gcp, :create]
  before_action :authorize_update_cluster!, only: [:update]
  before_action :authorize_admin_cluster!, only: [:destroy]

  def index
    @scope = params[:scope]
    clusters = ClustersFinder.new(project, current_user, @scope).execute
    @clusters = clusters.page(params[:page]).per(20)
    @active_count = project.clusters.enabled.count
    @inactive_count = project.clusters.disabled.count
    @all_count = @active_count + @inactive_count
  end

  def login<commit_msg>Default to :all scope for ClustersController#index<commit_after>class Projects::ClustersController < Projects::ApplicationController
  before_action :cluster, except: [:login, :index, :new, :new_gcp, :create]
  before_action :authorize_read_cluster!
  before_action :authorize_create_cluster!, only: [:new, :new_gcp, :create]
  before_action :authorize_google_api, only: [:new_gcp, :create]
  before_action :authorize_update_cluster!, only: [:update]
  before_action :authorize_admin_cluster!, only: [:destroy]

  def index
    @scope = params[:scope] || :all
    clusters = ClustersFinder.new(project, current_user, @scope).execute
    @clusters = clusters.page(params[:page]).per(20)
    @active_count = project.clusters.enabled.count
    @inactive_count = project.clusters.disabled.count
    @all_count = @active_count + @inactive_count
  end

  def login
{'fraction_non_alphanumeric': 0.11789347695990425, 'fraction_numerical': 0.0023937761819269898, 'mean_word_length': 6.145299145299146, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '4640003', 'n_tokens_mistral': 546, 'n_tokens_neox': 533, 'n_words': 109}