BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
6e1a06d8
Commit
6e1a06d8
authored
Sep 05, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show how long this pipeline was queued
Closes #19804
parent
d071f61b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
pipeline.rb
app/models/ci/pipeline.rb
+7
-0
_info.html.haml
app/views/projects/pipelines/_info.html.haml
+3
-0
No files found.
app/models/ci/pipeline.rb
View file @
6e1a06d8
...
@@ -257,6 +257,13 @@ module Ci
...
@@ -257,6 +257,13 @@ module Ci
]
]
end
end
def
queued_duration
return
unless
started_at
seconds
=
(
started_at
-
created_at
).
to_i
seconds
unless
seconds
.
zero?
end
def
update_duration
def
update_duration
return
unless
started_at
return
unless
started_at
...
...
app/views/projects/pipelines/_info.html.haml
View file @
6e1a06d8
...
@@ -10,6 +10,9 @@
...
@@ -10,6 +10,9 @@
-
if
@pipeline
.
duration
-
if
@pipeline
.
duration
in
in
=
time_interval_in_words
(
@pipeline
.
duration
)
=
time_interval_in_words
(
@pipeline
.
duration
)
-
if
@pipeline
.
queued_duration
(queued for
=
"
#{
time_interval_in_words
(
@pipeline
.
queued_duration
)
}
)"
.pull-right
.pull-right
=
link_to
namespace_project_pipeline_path
(
@project
.
namespace
,
@project
,
@pipeline
),
class:
"ci-status ci-
#{
@pipeline
.
status
}
"
do
=
link_to
namespace_project_pipeline_path
(
@project
.
namespace
,
@project
,
@pipeline
),
class:
"ci-status ci-
#{
@pipeline
.
status
}
"
do
...
...
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