diff --git a/app/assets/javascripts/dispatcher.js.es6 b/app/assets/javascripts/dispatcher.js.es6 index edec21e3b63..a023ae30954 100644 --- a/app/assets/javascripts/dispatcher.js.es6 +++ b/app/assets/javascripts/dispatcher.js.es6 @@ -259,7 +259,7 @@ new gl.ProtectedBranchCreate(); new gl.ProtectedBranchEditList(); break; - case 'projects:variables:index': + case 'projects:ci_cd_pipelines:show': new gl.ProjectVariables(); break; case 'ci:lints:create': diff --git a/app/controllers/projects/pipelines_settings_controller.rb b/app/controllers/projects/pipelines_settings_controller.rb index a8dfe90c3e3..e571394a677 100644 --- a/app/controllers/projects/pipelines_settings_controller.rb +++ b/app/controllers/projects/pipelines_settings_controller.rb @@ -2,13 +2,13 @@ class Projects::PipelinesSettingsController < Projects::ApplicationController before_action :authorize_admin_pipeline! def show - redirect_to namespace_project_settings_pipelines_path(@project.namespace, @project) + redirect_to namespace_project_settings_ci_cd_pipelines_path(@project.namespace, @project) end def update if @project.update_attributes(update_params) flash[:notice] = "CI/CD Pipelines settings for '#{@project.name}' were successfully updated." - redirect_to namespace_project_settings_pipelines_path(@project.namespace, @project) + redirect_to namespace_project_settings_ci_cd_pipelines_path(@project.namespace, @project) else render 'show' end diff --git a/app/controllers/projects/runners_controller.rb b/app/controllers/projects/runners_controller.rb index db69abe0337..97009135fa1 100644 --- a/app/controllers/projects/runners_controller.rb +++ b/app/controllers/projects/runners_controller.rb @@ -5,7 +5,7 @@ class Projects::RunnersController < Projects::ApplicationController layout 'project_settings' def index - redirect_to namespace_project_settings_pipelines_path(@project.namespace, @project) + redirect_to namespace_project_settings_ci_cd_pipelines_path(@project.namespace, @project) end def edit @@ -49,7 +49,7 @@ class Projects::RunnersController < Projects::ApplicationController def toggle_shared_runners project.toggle!(:shared_runners_enabled) - redirect_to namespace_project_settings_pipelines_path(@project.namespace, @project) + redirect_to namespace_project_settings_ci_cd_pipelines_path(@project.namespace, @project) end protected diff --git a/app/controllers/projects/settings/pipelines_controller.rb b/app/controllers/projects/settings/ci_cd_pipelines_controller.rb similarity index 92% rename from app/controllers/projects/settings/pipelines_controller.rb rename to app/controllers/projects/settings/ci_cd_pipelines_controller.rb index f728ce86977..f570215af04 100644 --- a/app/controllers/projects/settings/pipelines_controller.rb +++ b/app/controllers/projects/settings/ci_cd_pipelines_controller.rb @@ -1,8 +1,8 @@ module Projects module Settings - class PipelinesController < Projects::ApplicationController + class CiCdPipelinesController < Projects::ApplicationController before_action :authorize_admin_pipeline! - + def show # runners @project_runners = @project.runners.ordered diff --git a/app/controllers/projects/variables_controller.rb b/app/controllers/projects/variables_controller.rb index 6e627224059..eeb5b607be5 100644 --- a/app/controllers/projects/variables_controller.rb +++ b/app/controllers/projects/variables_controller.rb @@ -4,7 +4,7 @@ class Projects::VariablesController < Projects::ApplicationController layout 'project_settings' def index - redirect_to namespace_project_settings_pipelines_path(project.namespace, project) + redirect_to namespace_project_settings_ci_cd_pipelines_path(project.namespace, project) end def show @@ -15,7 +15,7 @@ class Projects::VariablesController < Projects::ApplicationController @variable = @project.variables.find(params[:id]) if @variable.update_attributes(project_params) - redirect_to namespace_project_settings_pipelines_path(project.namespace, project), notice: 'Variable was successfully updated.' + redirect_to namespace_project_settings_ci_cd_pipelines_path(project.namespace, project), notice: 'Variable was successfully updated.' else render action: "show" end @@ -25,7 +25,7 @@ class Projects::VariablesController < Projects::ApplicationController @variable = Ci::Variable.new(project_params) if @variable.valid? && @project.variables << @variable - redirect_to namespace_project_settings_pipelines_path(project.namespace, project), notice: 'Variables were successfully updated.' + redirect_to namespace_project_settings_ci_cd_pipelines_path(project.namespace, project), notice: 'Variables were successfully updated.' else render action: "index" end @@ -35,7 +35,7 @@ class Projects::VariablesController < Projects::ApplicationController @key = @project.variables.find(params[:id]) @key.destroy - redirect_to namespace_project_settings_pipelines_path(project.namespace, project), notice: 'Variable was successfully removed.' + redirect_to namespace_project_settings_ci_cd_pipelines_path(project.namespace, project), notice: 'Variable was successfully removed.' end private diff --git a/app/views/projects/runners/_shared_runners.html.haml b/app/views/projects/runners/_shared_runners.html.haml index 5afa193357e..0671dd66e78 100644 --- a/app/views/projects/runners/_shared_runners.html.haml +++ b/app/views/projects/runners/_shared_runners.html.haml @@ -22,7 +22,7 @@ - else %h4.underlined-title Available shared Runners : #{@shared_runners_count} %ul.bordered-list.available-shared-runners - = render partial: 'runner', collection: @shared_runners, as: :runner + = render partial: 'projects/runners/runner', collection: @shared_runners, as: :runner - if @shared_runners_count > 10 .light and #{@shared_runners_count - 10} more... diff --git a/app/views/projects/settings/pipelines/show.html.haml b/app/views/projects/settings/ci_cd_pipelines/show.html.haml similarity index 100% rename from app/views/projects/settings/pipelines/show.html.haml rename to app/views/projects/settings/ci_cd_pipelines/show.html.haml diff --git a/config/routes/project.rb b/config/routes/project.rb index 8b17e28de3a..c028af30263 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -315,8 +315,8 @@ constraints(ProjectUrlConstrainer.new) do end namespace :settings do resource :members, only: [:show] + resource :ci_cd_pipelines, only: [:show] resource :integrations, only: [:show] - resource :pipelines, only: [:show] end # Since both wiki and repository routing contains wildcard characters