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
2f5095c2
Commit
2f5095c2
authored
Apr 07, 2017
by
Shinya Maeda
Committed by
Kamil Trzcinski
Apr 07, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add def trigger_schedule in Trigger. Use persisted? for checling existance
parent
4131ed2b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
3 deletions
+5
-3
app/controllers/projects/settings/ci_cd_controller.rb
app/controllers/projects/settings/ci_cd_controller.rb
+0
-1
app/controllers/projects/triggers_controller.rb
app/controllers/projects/triggers_controller.rb
+0
-1
app/models/ci/trigger.rb
app/models/ci/trigger.rb
+4
-0
app/views/projects/triggers/_trigger.html.haml
app/views/projects/triggers/_trigger.html.haml
+1
-1
No files found.
app/controllers/projects/settings/ci_cd_controller.rb
View file @
2f5095c2
...
...
@@ -27,7 +27,6 @@ module Projects
def
define_triggers_variables
@triggers
=
@project
.
triggers
@trigger
=
Ci
::
Trigger
.
new
@trigger
.
build_trigger_schedule
end
def
define_badges_variables
...
...
app/controllers/projects/triggers_controller.rb
View file @
2f5095c2
...
...
@@ -34,7 +34,6 @@ class Projects::TriggersController < Projects::ApplicationController
end
def
edit
@trigger
.
build_trigger_schedule
unless
@trigger
.
trigger_schedule
.
present?
end
def
update
...
...
app/models/ci/trigger.rb
View file @
2f5095c2
...
...
@@ -39,5 +39,9 @@ module Ci
def
can_access_project?
self
.
owner_id
.
blank?
||
Ability
.
allowed?
(
self
.
owner
,
:create_build
,
project
)
end
def
trigger_schedule
super
||
build_trigger_schedule
end
end
end
app/views/projects/triggers/_trigger.html.haml
View file @
2f5095c2
...
...
@@ -30,7 +30,7 @@
Never
%td
-
if
trigger
.
trigger_schedule
.
p
resent
?
-
if
trigger
.
trigger_schedule
.
p
ersisted
?
=
trigger
.
trigger_schedule
.
real_next_run
-
else
N/A (External trigger)
...
...
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