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
5e7d99d3
Commit
5e7d99d3
authored
Aug 15, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename to total_duration and we're not using CommitStatus.duration
parent
7d9bdac6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
8 deletions
+2
-8
pipeline.rb
app/models/ci/pipeline.rb
+1
-1
commit_status.rb
app/models/commit_status.rb
+0
-5
_commit_box.html.haml
app/views/projects/commit/_commit_box.html.haml
+1
-2
No files found.
app/models/ci/pipeline.rb
View file @
5e7d99d3
...
...
@@ -78,7 +78,7 @@ module Ci
CommitStatus
.
where
(
pipeline:
pluck
(
:id
)).
stages
end
def
self
.
duration
def
self
.
total_
duration
where
.
not
(
duration:
nil
).
sum
(
:duration
)
end
...
...
app/models/commit_status.rb
View file @
5e7d99d3
...
...
@@ -103,11 +103,6 @@ class CommitStatus < ActiveRecord::Base
end
end
def
self
.
duration
select
(
:started_at
,
:finished_at
).
all
.
map
(
&
:duration
).
compact
.
inject
(
0
,
&
:
+
)
end
def
ignored?
allow_failure?
&&
(
failed?
||
canceled?
)
end
...
...
app/views/projects/commit/_commit_box.html.haml
View file @
5e7d99d3
...
...
@@ -57,9 +57,8 @@
=
link_to
builds_namespace_project_commit_path
(
@project
.
namespace
,
@project
,
@commit
.
id
),
class:
"ci-status-link ci-status-icon-
#{
@commit
.
status
}
"
do
=
ci_icon_for_status
(
@commit
.
status
)
=
ci_label_for_status
(
@commit
.
status
)
-
if
@commit
.
pipelines
.
duration
in
=
time_interval_in_words
@commit
.
pipelines
.
duration
=
time_interval_in_words
@commit
.
pipelines
.
total_
duration
.commit-box.content-block
%h3
.commit-title
...
...
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