Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
1a6a59d6
Commit
1a6a59d6
authored
Sep 18, 2018
by
Shinya Maeda
Committed by
Alessio Caiazza
Oct 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add unschedule endpont to job controller
parent
22e00b08
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
app/controllers/projects/jobs_controller.rb
app/controllers/projects/jobs_controller.rb
+7
-0
config/routes/project.rb
config/routes/project.rb
+1
-0
No files found.
app/controllers/projects/jobs_controller.rb
View file @
1a6a59d6
...
@@ -110,6 +110,13 @@ class Projects::JobsController < Projects::ApplicationController
...
@@ -110,6 +110,13 @@ class Projects::JobsController < Projects::ApplicationController
redirect_to
build_path
(
@build
)
redirect_to
build_path
(
@build
)
end
end
def
unschedule
return
respond_422
unless
@build
.
scheduled?
@build
.
unschedule
redirect_to
build_path
(
@build
)
end
def
status
def
status
render
json:
BuildSerializer
render
json:
BuildSerializer
.
new
(
project:
@project
,
current_user:
@current_user
)
.
new
(
project:
@project
,
current_user:
@current_user
)
...
...
config/routes/project.rb
View file @
1a6a59d6
...
@@ -275,6 +275,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
...
@@ -275,6 +275,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
member
do
member
do
get
:status
get
:status
post
:cancel
post
:cancel
post
:unschedule
post
:retry
post
:retry
post
:play
post
:play
post
:erase
post
:erase
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment