summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-05-16 19:41:15 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-05-17 20:17:30 +0800
commit71777a4a184945d6b58170af55d9fd9fef821ac9 (patch)
treee3abb2579383d151ac4463b08a783ff9630e4b2c /app/controllers
parenta5f0656392699dad7677a368c315217ea99b3982 (diff)
downloadgitlab-ce-71777a4a184945d6b58170af55d9fd9fef821ac9.tar.gz
Rename BuildsController to JobsController
Rename other URL generators admin_builds_path -> admin_jobs_path Fix tests and more renaming Fix more tests Also change build_id to job_id in the controller
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/admin/jobs_controller.rb (renamed from app/controllers/admin/builds_controller.rb)4
-rw-r--r--app/controllers/projects/artifacts_controller.rb4
-rw-r--r--app/controllers/projects/jobs_controller.rb (renamed from app/controllers/projects/builds_controller.rb)8
3 files changed, 8 insertions, 8 deletions
diff --git a/app/controllers/admin/builds_controller.rb b/app/controllers/admin/jobs_controller.rb
index 88f3c0e2fd4..5162273ef8a 100644
--- a/app/controllers/admin/builds_controller.rb
+++ b/app/controllers/admin/jobs_controller.rb
@@ -1,4 +1,4 @@
-class Admin::BuildsController < Admin::ApplicationController
+class Admin::JobsController < Admin::ApplicationController
def index
@scope = params[:scope]
@all_builds = Ci::Build
@@ -20,6 +20,6 @@ class Admin::BuildsController < Admin::ApplicationController
def cancel_all
Ci::Build.running_or_pending.each(&:cancel)
- redirect_to admin_builds_path
+ redirect_to admin_jobs_path
end
end
diff --git a/app/controllers/projects/artifacts_controller.rb b/app/controllers/projects/artifacts_controller.rb
index 1224e9503c9..b46a33604ff 100644
--- a/app/controllers/projects/artifacts_controller.rb
+++ b/app/controllers/projects/artifacts_controller.rb
@@ -46,7 +46,7 @@ class Projects::ArtifactsController < Projects::ApplicationController
def keep
build.keep_artifacts!
- redirect_to namespace_project_build_path(project.namespace, project, build)
+ redirect_to namespace_project_job_path(project.namespace, project, build)
end
def latest_succeeded
@@ -79,7 +79,7 @@ class Projects::ArtifactsController < Projects::ApplicationController
end
def build_from_id
- project.builds.find_by(id: params[:build_id]) if params[:build_id]
+ project.builds.find_by(id: params[:job_id]) if params[:job_id]
end
def build_from_ref
diff --git a/app/controllers/projects/builds_controller.rb b/app/controllers/projects/jobs_controller.rb
index dfaaea71b9c..d2cd1cfdab8 100644
--- a/app/controllers/projects/builds_controller.rb
+++ b/app/controllers/projects/jobs_controller.rb
@@ -1,4 +1,4 @@
-class Projects::BuildsController < Projects::ApplicationController
+class Projects::JobsController < Projects::ApplicationController
before_action :build, except: [:index, :cancel_all]
before_action :authorize_read_build!,
@@ -38,7 +38,7 @@ class Projects::BuildsController < Projects::ApplicationController
build.cancel if can?(current_user, :update_build, build)
end
- redirect_to namespace_project_builds_path(project.namespace, project)
+ redirect_to namespace_project_jobs_path(project.namespace, project)
end
def show
@@ -97,7 +97,7 @@ class Projects::BuildsController < Projects::ApplicationController
def erase
if @build.erase(erased_by: current_user)
- redirect_to namespace_project_build_path(project.namespace, project, @build),
+ redirect_to namespace_project_job_path(project.namespace, project, @build),
notice: "Build has been successfully erased!"
else
respond_422
@@ -126,6 +126,6 @@ class Projects::BuildsController < Projects::ApplicationController
end
def build_path(build)
- namespace_project_build_path(build.project.namespace, build.project, build)
+ namespace_project_job_path(build.project.namespace, build.project, build)
end
end