diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-11 21:08:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-11 21:08:58 +0300 |
commit | 1ca9950d5f890cd8f185e1eda158b969a7244fe2 (patch) | |
tree | 6f62715938a4b2b001705c51c697609a8e0850ae /app/controllers/admin | |
parent | bcc77054ee9aefd1e332e04a4189390fd5a3112e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/admin')
-rw-r--r-- | app/controllers/admin/services_controller.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/controllers/admin/services_controller.rb b/app/controllers/admin/services_controller.rb index 9cea25cc7fe..e31e0e09978 100644 --- a/app/controllers/admin/services_controller.rb +++ b/app/controllers/admin/services_controller.rb @@ -7,7 +7,7 @@ class Admin::ServicesController < Admin::ApplicationController before_action :service, only: [:edit, :update] def index - @services = instance_level_services + @services = services_templates end def edit @@ -19,7 +19,7 @@ class Admin::ServicesController < Admin::ApplicationController def update if service.update(service_params[:service]) - PropagateInstanceLevelServiceWorker.perform_async(service.id) if service.active? + PropagateServiceTemplateWorker.perform_async(service.id) if service.active? redirect_to admin_application_settings_services_path, notice: 'Application settings saved successfully' @@ -31,17 +31,17 @@ class Admin::ServicesController < Admin::ApplicationController private # rubocop: disable CodeReuse/ActiveRecord - def instance_level_services + def services_templates Service.available_services_names.map do |service_name| - service = "#{service_name}_service".camelize.constantize - service.where(instance: true).first_or_create + service_template = "#{service_name}_service".camelize.constantize + service_template.where(template: true).first_or_create end end # rubocop: enable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord def service - @service ||= Service.where(id: params[:id], instance: true).first + @service ||= Service.where(id: params[:id], template: true).first end # rubocop: enable CodeReuse/ActiveRecord |