diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-10-17 15:59:52 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-10-17 17:53:45 +0200 |
commit | 9a82702ac614b91870ab5c5d21d4b7104c1d7eec (patch) | |
tree | a6b2a39b900027529f737f1f91d15024007ba35e | |
parent | 49be57aed26477dbba0604237e55c4fc4ca4e6b3 (diff) | |
download | gitlab-ce-ci-polish.tar.gz |
Move commit/:sha/ci to commit/:sha/builds.ci-polish
-rw-r--r-- | app/controllers/projects/commit_controller.rb | 8 | ||||
-rw-r--r-- | app/helpers/ci_status_helper.rb | 2 | ||||
-rw-r--r-- | app/views/projects/commit/_ci_menu.html.haml | 4 | ||||
-rw-r--r-- | app/views/projects/commit/ci.html.haml | 4 | ||||
-rw-r--r-- | config/routes.rb | 2 |
5 files changed, 10 insertions, 10 deletions
diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb index 899fc99832c..99e404c661d 100644 --- a/app/controllers/projects/commit_controller.rb +++ b/app/controllers/projects/commit_controller.rb @@ -6,8 +6,8 @@ class Projects::CommitController < Projects::ApplicationController before_action :require_non_empty_project before_action :authorize_download_code! before_action :commit - before_action :define_show_vars, only: [:show, :ci] before_action :authorize_manage_builds!, only: [:cancel_builds, :retry_builds] + before_action :define_show_vars, only: [:show, :builds] def show return git_not_found! unless @commit @@ -29,7 +29,7 @@ class Projects::CommitController < Projects::ApplicationController end end - def ci + def builds @ci_project = @project.gitlab_ci_project end @@ -37,7 +37,7 @@ class Projects::CommitController < Projects::ApplicationController @ci_commit = @project.ci_commit(@commit.sha) @ci_commit.builds.running_or_pending.each(&:cancel) - redirect_to ci_namespace_project_commit_path(project.namespace, project, commit.sha) + redirect_to builds_namespace_project_commit_path(project.namespace, project, commit.sha) end def retry_builds @@ -48,7 +48,7 @@ class Projects::CommitController < Projects::ApplicationController end end - redirect_to ci_namespace_project_commit_path(project.namespace, project, commit.sha) + redirect_to builds_namespace_project_commit_path(project.namespace, project, commit.sha) end def branches diff --git a/app/helpers/ci_status_helper.rb b/app/helpers/ci_status_helper.rb index dbd1e26fa79..92dab5fa3ab 100644 --- a/app/helpers/ci_status_helper.rb +++ b/app/helpers/ci_status_helper.rb @@ -1,7 +1,7 @@ module CiStatusHelper def ci_status_path(ci_commit) project = ci_commit.gl_project - ci_namespace_project_commit_path(project.namespace, project, ci_commit.sha) + builds_namespace_project_commit_path(project.namespace, project, ci_commit.sha) end def ci_status_icon(ci_commit) diff --git a/app/views/projects/commit/_ci_menu.html.haml b/app/views/projects/commit/_ci_menu.html.haml index 4e6a8052b93..f70fc6b6b4a 100644 --- a/app/views/projects/commit/_ci_menu.html.haml +++ b/app/views/projects/commit/_ci_menu.html.haml @@ -3,7 +3,7 @@ = link_to namespace_project_commit_path(@project.namespace, @project, @commit.id) do Changes %span.badge= @diffs.count - = nav_link(path: 'commit#ci') do - = link_to ci_namespace_project_commit_path(@project.namespace, @project, @commit.id) do + = nav_link(path: 'commit#builds') do + = link_to builds_namespace_project_commit_path(@project.namespace, @project, @commit.id) do Builds %span.badge= @builds.count diff --git a/app/views/projects/commit/ci.html.haml b/app/views/projects/commit/ci.html.haml index 50ad1328568..ae4696488cc 100644 --- a/app/views/projects/commit/ci.html.haml +++ b/app/views/projects/commit/ci.html.haml @@ -27,10 +27,10 @@ - if @ci_project && current_user && can?(current_user, :manage_builds, @project) - if @ci_commit.builds.latest.failed.any?(&:retryable?) - = link_to "Retry failed", retry_ci_namespace_project_commit_path(@project.namespace, @project, @commit.sha), class: 'btn btn-xs btn-primary', method: :post + = link_to "Retry failed", retry_builds_namespace_project_commit_path(@project.namespace, @project, @commit.sha), class: 'btn btn-xs btn-primary', method: :post - if @ci_commit.builds.running_or_pending.any? - = link_to "Cancel running", cancel_ci_namespace_project_commit_path(@project.namespace, @project, @commit.sha), class: 'btn btn-xs btn-danger', method: :post + = link_to "Cancel running", cancel_builds_namespace_project_commit_path(@project.namespace, @project, @commit.sha), class: 'btn btn-xs btn-danger', method: :post %table.table.builds %thead diff --git a/config/routes.rb b/config/routes.rb index 4467165629c..f4ad5f17533 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -473,7 +473,7 @@ Gitlab::Application.routes.draw do resources :commit, only: [:show], constraints: { id: /[[:alnum:]]{6,40}/ } do member do get :branches - get :ci + get :builds post :cancel_builds post :retry_builds end |