diff options
Diffstat (limited to 'app/controllers/projects/settings')
3 files changed, 19 insertions, 6 deletions
diff --git a/app/controllers/projects/settings/ci_cd_controller.rb b/app/controllers/projects/settings/ci_cd_controller.rb index 8aef1c3d24d..cf07de4dc29 100644 --- a/app/controllers/projects/settings/ci_cd_controller.rb +++ b/app/controllers/projects/settings/ci_cd_controller.rb @@ -18,6 +18,9 @@ module Projects urgency :low def show + @entity = :project + @variable_limit = ::Plan.default.actual_limits.project_ci_variables + if Feature.enabled?(:ci_pipeline_triggers_settings_vue_ui, @project) triggers = ::Ci::TriggerSerializer.new.represent( @project.triggers, current_user: current_user, project: @project @@ -122,11 +125,13 @@ module Projects .page(params[:specific_page]).per(NUMBER_OF_RUNNERS_PER_PAGE) .with_tags - @shared_runners = ::Ci::Runner.instance_type.active.with_tags - - @shared_runners_count = @shared_runners.count(:all) + active_shared_runners = ::Ci::Runner.instance_type.active + @shared_runners_count = active_shared_runners.count + @shared_runners = active_shared_runners.page(params[:shared_runners_page]).per(NUMBER_OF_RUNNERS_PER_PAGE).with_tags - @group_runners = ::Ci::Runner.belonging_to_parent_group_of_project(@project.id).with_tags + parent_group_runners = ::Ci::Runner.belonging_to_parent_group_of_project(@project.id) + @group_runners_count = parent_group_runners.count + @group_runners = parent_group_runners.page(params[:group_runners_page]).per(NUMBER_OF_RUNNERS_PER_PAGE).with_tags end def define_ci_variables diff --git a/app/controllers/projects/settings/integrations_controller.rb b/app/controllers/projects/settings/integrations_controller.rb index 2bbcd9fe20c..16c1373df2b 100644 --- a/app/controllers/projects/settings/integrations_controller.rb +++ b/app/controllers/projects/settings/integrations_controller.rb @@ -79,7 +79,7 @@ module Projects return { error: true, message: _('Validations failed.'), - service_response: integration.errors.full_messages.join(','), + service_response: integration.errors.full_messages.join(', '), test_failed: false } end @@ -90,7 +90,7 @@ module Projects return { error: true, message: s_('Integrations|Connection failed. Check your integration settings.'), - service_response: result[:message].to_s, + service_response: result[:result].to_s, test_failed: true } end diff --git a/app/controllers/projects/settings/repository_controller.rb b/app/controllers/projects/settings/repository_controller.rb index 90988645d3a..6d099aa8b3d 100644 --- a/app/controllers/projects/settings/repository_controller.rb +++ b/app/controllers/projects/settings/repository_controller.rb @@ -95,6 +95,14 @@ module Projects @protected_tags_count = @protected_tags.reduce(0) { |sum, tag| sum + tag.matching(@project.repository.tag_names).size } + if Feature.enabled?(:group_protected_branches) + @protected_group_branches = if @project.root_namespace.is_a?(Group) + @project.root_namespace.protected_branches.order(:name).page(params[:page]) + else + [] + end + end + load_gon_index end # rubocop: enable CodeReuse/ActiveRecord |