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
Tatuya Kamada
gitlab-ce
Commits
980009e6
Commit
980009e6
authored
8 years ago
by
Kamil Trzcinski
Committed by
Grzegorz Bizon
8 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix auto loading of constants for Ci Statuses
parent
f0cd73bf
No related merge requests found
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
21 additions
and
20 deletions
+21
-20
app/models/ci/build.rb
app/models/ci/build.rb
+3
-3
app/models/ci/pipeline.rb
app/models/ci/pipeline.rb
+2
-2
app/models/ci/stage.rb
app/models/ci/stage.rb
+2
-2
app/models/commit_status.rb
app/models/commit_status.rb
+2
-2
app/views/ci/status/_icon_with_label.html.haml
app/views/ci/status/_icon_with_label.html.haml
+7
-6
lib/gitlab/ci/status/build/cancelable.rb
lib/gitlab/ci/status/build/cancelable.rb
+1
-1
lib/gitlab/ci/status/build/play.rb
lib/gitlab/ci/status/build/play.rb
+1
-1
lib/gitlab/ci/status/build/retryable.rb
lib/gitlab/ci/status/build/retryable.rb
+1
-1
lib/gitlab/ci/status/build/stop.rb
lib/gitlab/ci/status/build/stop.rb
+2
-2
No files found.
app/models/ci/build.rb
View file @
980009e6
...
@@ -100,8 +100,8 @@ module Ci
...
@@ -100,8 +100,8 @@ module Ci
end
end
end
end
def
detailed_status
def
detailed_status
(
current_user
)
Gitlab
::
Ci
::
Status
::
Build
::
Factory
.
new
(
self
).
fabricate!
Gitlab
::
Ci
::
Status
::
Build
::
Factory
.
new
(
self
,
current_user
).
fabricate!
end
end
def
manual?
def
manual?
...
@@ -156,7 +156,7 @@ module Ci
...
@@ -156,7 +156,7 @@ module Ci
end
end
def
environment_action
def
environment_action
self
.
options
.
fetch
(
:environment
,
{}).
fetch
(
:action
,
'start'
)
self
.
options
.
fetch
(
:environment
,
{}).
fetch
(
:action
,
'start'
)
if
self
.
options
end
end
def
outdated_deployment?
def
outdated_deployment?
...
...
This diff is collapsed.
Click to expand it.
app/models/ci/pipeline.rb
View file @
980009e6
...
@@ -336,8 +336,8 @@ module Ci
...
@@ -336,8 +336,8 @@ module Ci
.
select
{
|
merge_request
|
merge_request
.
head_pipeline
.
try
(
:id
)
==
self
.
id
}
.
select
{
|
merge_request
|
merge_request
.
head_pipeline
.
try
(
:id
)
==
self
.
id
}
end
end
def
detailed_status
def
detailed_status
(
current_user
)
Gitlab
::
Ci
::
Status
::
Pipeline
::
Factory
.
new
(
self
).
fabricate!
Gitlab
::
Ci
::
Status
::
Pipeline
::
Factory
.
new
(
self
,
current_user
).
fabricate!
end
end
private
private
...
...
This diff is collapsed.
Click to expand it.
app/models/ci/stage.rb
View file @
980009e6
...
@@ -22,8 +22,8 @@ module Ci
...
@@ -22,8 +22,8 @@ module Ci
@status
||=
statuses
.
latest
.
status
@status
||=
statuses
.
latest
.
status
end
end
def
detailed_status
def
detailed_status
(
current_user
)
Gitlab
::
Ci
::
Status
::
Stage
::
Factory
.
new
(
self
).
fabricate!
Gitlab
::
Ci
::
Status
::
Stage
::
Factory
.
new
(
self
,
current_user
).
fabricate!
end
end
def
statuses
def
statuses
...
...
This diff is collapsed.
Click to expand it.
app/models/commit_status.rb
View file @
980009e6
...
@@ -132,7 +132,7 @@ class CommitStatus < ActiveRecord::Base
...
@@ -132,7 +132,7 @@ class CommitStatus < ActiveRecord::Base
false
false
end
end
def
detailed_status
def
detailed_status
(
current_user
)
Gitlab
::
Ci
::
Status
::
Factory
.
new
(
self
).
fabricate!
Gitlab
::
Ci
::
Status
::
Factory
.
new
(
self
,
current_user
).
fabricate!
end
end
end
end
This diff is collapsed.
Click to expand it.
app/views/ci/status/_icon_with_label.html.haml
View file @
980009e6
-
details_path
=
subject
.
details_path
if
subject
.
has_details?
(
current_user
)
-
detailed_status
=
subject
.
detailed_status
(
current_user
)
-
klass
=
"ci-status ci-
#{
subject
.
status
}
"
-
details_path
=
detailed_status
.
details_path
if
detailed_status
.
has_details?
-
klass
=
"ci-status ci-
#{
detailed_status
}
"
-
if
details_path
-
if
details_path
=
link_to
details_path
,
class:
klass
do
=
link_to
details_path
,
class:
klass
do
=
custom_icon
(
status
.
icon
)
=
custom_icon
(
detailed_
status
.
icon
)
=
status
.
text
=
detailed_
status
.
text
-
else
-
else
%span
{
class:
klass
}
%span
{
class:
klass
}
=
custom_icon
(
status
.
icon
)
=
custom_icon
(
detailed_
status
.
icon
)
=
status
.
text
=
detailed_
status
.
text
This diff is collapsed.
Click to expand it.
lib/gitlab/ci/status/build/cancelable.rb
View file @
980009e6
module
Gitlab
module
Gitlab
module
Ci
module
Ci
module
Status
module
Status
module
Status
module
Build
class
Cancelable
<
SimpleDelegator
class
Cancelable
<
SimpleDelegator
include
Status
::
Extended
include
Status
::
Extended
...
...
This diff is collapsed.
Click to expand it.
lib/gitlab/ci/status/build/play.rb
View file @
980009e6
module
Gitlab
module
Gitlab
module
Ci
module
Ci
module
Status
module
Status
module
Status
module
Build
class
Play
<
SimpleDelegator
class
Play
<
SimpleDelegator
include
Status
::
Extended
include
Status
::
Extended
...
...
This diff is collapsed.
Click to expand it.
lib/gitlab/ci/status/build/retryable.rb
View file @
980009e6
module
Gitlab
module
Gitlab
module
Ci
module
Ci
module
Status
module
Status
module
Status
module
Build
class
Retryable
<
SimpleDelegator
class
Retryable
<
SimpleDelegator
include
Status
::
Extended
include
Status
::
Extended
...
...
This diff is collapsed.
Click to expand it.
lib/gitlab/ci/status/build/stop.rb
View file @
980009e6
module
Gitlab
module
Gitlab
module
Ci
module
Ci
module
Status
module
Status
module
Status
module
Build
class
Play
<
SimpleDelegator
class
Stop
<
SimpleDelegator
include
Status
::
Extended
include
Status
::
Extended
def
text
def
text
...
...
This diff is collapsed.
Click to expand it.
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