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
Jérome Perrin
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
app/models/ci/pipeline.rb
app/models/ci/pipeline.rb
+7
-0
app/views/projects/pipelines/_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
]
end
def
queued_duration
return
unless
started_at
seconds
=
(
started_at
-
created_at
).
to_i
seconds
unless
seconds
.
zero?
end
def
update_duration
return
unless
started_at
...
...
app/views/projects/pipelines/_info.html.haml
View file @
6e1a06d8
...
...
@@ -10,6 +10,9 @@
-
if
@pipeline
.
duration
in
=
time_interval_in_words
(
@pipeline
.
duration
)
-
if
@pipeline
.
queued_duration
(queued for
=
"
#{
time_interval_in_words
(
@pipeline
.
queued_duration
)
}
)"
.pull-right
=
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