diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 16:16:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 16:16:36 +0300 |
commit | 311b0269b4eb9839fa63f80c8d7a58f32b8138a0 (patch) | |
tree | 07e7870bca8aed6d61fdcc810731c50d2c40af47 /app/controllers/admin | |
parent | 27909cef6c4170ed9205afa7426b8d3de47cbb0c (diff) |
Add latest changes from gitlab-org/gitlab@14-5-stable-eev14.5.0-rc42
Diffstat (limited to 'app/controllers/admin')
-rw-r--r-- | app/controllers/admin/application_settings_controller.rb | 4 | ||||
-rw-r--r-- | app/controllers/admin/applications_controller.rb | 3 | ||||
-rw-r--r-- | app/controllers/admin/hook_logs_controller.rb | 3 | ||||
-rw-r--r-- | app/controllers/admin/hooks_controller.rb | 5 | ||||
-rw-r--r-- | app/controllers/admin/integrations_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/admin/labels_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/admin/runners_controller.rb | 10 |
7 files changed, 18 insertions, 11 deletions
diff --git a/app/controllers/admin/application_settings_controller.rb b/app/controllers/admin/application_settings_controller.rb index 8039fac02ec..8644d95b96c 100644 --- a/app/controllers/admin/application_settings_controller.rb +++ b/app/controllers/admin/application_settings_controller.rb @@ -98,7 +98,7 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController # Specs are in spec/requests/self_monitoring_project_spec.rb def create_self_monitoring_project - job_id = SelfMonitoringProjectCreateWorker.perform_async # rubocop:disable CodeReuse/Worker + job_id = SelfMonitoringProjectCreateWorker.with_status.perform_async # rubocop:disable CodeReuse/Worker render status: :accepted, json: { job_id: job_id, @@ -137,7 +137,7 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController # Specs are in spec/requests/self_monitoring_project_spec.rb def delete_self_monitoring_project - job_id = SelfMonitoringProjectDeleteWorker.perform_async # rubocop:disable CodeReuse/Worker + job_id = SelfMonitoringProjectDeleteWorker.with_status.perform_async # rubocop:disable CodeReuse/Worker render status: :accepted, json: { job_id: job_id, diff --git a/app/controllers/admin/applications_controller.rb b/app/controllers/admin/applications_controller.rb index ce7d64336c8..83413afb6b7 100644 --- a/app/controllers/admin/applications_controller.rb +++ b/app/controllers/admin/applications_controller.rb @@ -15,6 +15,7 @@ class Admin::ApplicationsController < Admin::ApplicationController end def show + @created = get_created_session end def new @@ -33,6 +34,8 @@ class Admin::ApplicationsController < Admin::ApplicationController if @application.persisted? flash[:notice] = I18n.t(:notice, scope: [:doorkeeper, :flash, :applications, :create]) + set_created_session + redirect_to admin_application_url(@application) else render :new diff --git a/app/controllers/admin/hook_logs_controller.rb b/app/controllers/admin/hook_logs_controller.rb index 444ad17f86d..aa13673095d 100644 --- a/app/controllers/admin/hook_logs_controller.rb +++ b/app/controllers/admin/hook_logs_controller.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class Admin::HookLogsController < Admin::ApplicationController - include HooksExecution + include ::Integrations::HooksExecution before_action :hook, only: [:show, :retry] before_action :hook_log, only: [:show, :retry] @@ -9,6 +9,7 @@ class Admin::HookLogsController < Admin::ApplicationController respond_to :html feature_category :integrations + urgency :low, [:retry] def show end diff --git a/app/controllers/admin/hooks_controller.rb b/app/controllers/admin/hooks_controller.rb index ca24f671b9d..6f5475a4a78 100644 --- a/app/controllers/admin/hooks_controller.rb +++ b/app/controllers/admin/hooks_controller.rb @@ -1,14 +1,15 @@ # frozen_string_literal: true class Admin::HooksController < Admin::ApplicationController - include HooksExecution + include ::Integrations::HooksExecution before_action :hook_logs, only: :edit feature_category :integrations + urgency :low, [:test] def index - @hooks = SystemHook.all + @hooks = SystemHook.all.load @hook = SystemHook.new end diff --git a/app/controllers/admin/integrations_controller.rb b/app/controllers/admin/integrations_controller.rb index a3eb24b9b6f..ad0ee0b2cef 100644 --- a/app/controllers/admin/integrations_controller.rb +++ b/app/controllers/admin/integrations_controller.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class Admin::IntegrationsController < Admin::ApplicationController - include IntegrationsActions + include ::Integrations::Actions before_action :not_found, unless: -> { instance_level_integrations? } diff --git a/app/controllers/admin/labels_controller.rb b/app/controllers/admin/labels_controller.rb index 6cc11b40de0..822b7a93c9c 100644 --- a/app/controllers/admin/labels_controller.rb +++ b/app/controllers/admin/labels_controller.rb @@ -3,7 +3,7 @@ class Admin::LabelsController < Admin::ApplicationController before_action :set_label, only: [:show, :edit, :update, :destroy] - feature_category :issue_tracking + feature_category :team_planning def index @labels = Label.templates.page(params[:page]) diff --git a/app/controllers/admin/runners_controller.rb b/app/controllers/admin/runners_controller.rb index 8c74352a179..9312651b8bf 100644 --- a/app/controllers/admin/runners_controller.rb +++ b/app/controllers/admin/runners_controller.rb @@ -8,7 +8,6 @@ class Admin::RunnersController < Admin::ApplicationController feature_category :runner def index - @active_runners_count = Ci::Runner.online.count end def show @@ -86,9 +85,12 @@ class Admin::RunnersController < Admin::ApplicationController Project.all end - @projects = @projects.where.not(id: runner.projects.select(:id)) if runner.projects.any? - @projects = @projects.inc_routes - @projects = @projects.page(params[:page]).per(30).without_count + ::Gitlab::Database.allow_cross_joins_across_databases(url: 'https://gitlab.com/gitlab-org/gitlab/-/issues/338659') do + @projects = @projects.where.not(id: runner.projects.select(:id)) if runner.projects.any? + @projects = @projects.allow_cross_joins_across_databases(url: 'https://gitlab.com/gitlab-org/gitlab/-/issues/338659') + @projects = @projects.inc_routes + @projects = @projects.page(params[:page]).per(30).without_count + end end # rubocop: enable CodeReuse/ActiveRecord end |