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
251a7802
Commit
251a7802
authored
Apr 13, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup changes
parent
4af0968c
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
307 additions
and
324 deletions
+307
-324
app/controllers/projects/pipelines_controller.rb
app/controllers/projects/pipelines_controller.rb
+0
-0
app/helpers/ci_status_helper.rb
app/helpers/ci_status_helper.rb
+9
-3
app/helpers/gitlab_routing_helper.rb
app/helpers/gitlab_routing_helper.rb
+0
-8
app/views/admin/runners/show.html.haml
app/views/admin/runners/show.html.haml
+1
-1
app/views/projects/_last_commit.html.haml
app/views/projects/_last_commit.html.haml
+1
-1
app/views/projects/builds/show.html.haml
app/views/projects/builds/show.html.haml
+3
-3
app/views/projects/ci/commits/_commit.html.haml
app/views/projects/ci/commits/_commit.html.haml
+0
-0
app/views/projects/ci_commits/_header_title.html.haml
app/views/projects/ci_commits/_header_title.html.haml
+0
-0
app/views/projects/ci_commits/index.html.haml
app/views/projects/ci_commits/index.html.haml
+0
-0
app/views/projects/ci_commits/new.html.haml
app/views/projects/ci_commits/new.html.haml
+0
-0
db/schema.rb
db/schema.rb
+292
-302
spec/features/commits_spec.rb
spec/features/commits_spec.rb
+0
-5
spec/helpers/ci_status_helper_spec.rb
spec/helpers/ci_status_helper_spec.rb
+1
-1
No files found.
app/controllers/projects/pipelines_controller.rb
deleted
100644 → 0
View file @
4af0968c
app/helpers/ci_status_helper.rb
View file @
251a7802
module
CiStatusHelper
def
ci_status_path
(
ci_commit
)
project
=
ci_commit
.
project
builds_namespace_project_commit_path
(
project
.
namespace
,
project
,
ci_commit
.
sha
)
end
def
ci_status_with_icon
(
status
,
target
=
nil
)
content
=
ci_icon_for_status
(
status
)
+
' '
.
html_safe
+
ci_label_for_status
(
status
)
klass
=
"ci-status ci-
#{
status
}
"
...
...
@@ -34,10 +39,11 @@ module CiStatusHelper
end
def
render_ci_status
(
ci_commit
,
tooltip_placement:
'auto left'
)
return
unless
ci_commit
.
is_a?
(
Commit
)
||
ci_commit
.
is_a?
(
Ci
::
Commit
)
# TODO: split this method into
# - render_commit_status
# - render_pipeline_status
link_to
ci_icon_for_status
(
ci_commit
.
status
),
project_ci_commit_path
(
ci_commit
.
project
,
ci_commit
),
ci_status_path
(
ci_commit
),
class:
"ci-status-link ci-status-icon-
#{
ci_commit
.
status
.
dasherize
}
"
,
title:
"Build
#{
ci_label_for_status
(
ci_commit
.
status
)
}
"
,
data:
{
toggle:
'tooltip'
,
placement:
tooltip_placement
}
...
...
app/helpers/gitlab_routing_helper.rb
View file @
251a7802
...
...
@@ -33,14 +33,6 @@ module GitlabRoutingHelper
namespace_project_builds_path
(
project
.
namespace
,
project
,
*
args
)
end
def
project_commit_path
(
project
,
commit
)
builds_namespace_project_commit_path
(
project
.
namespace
,
project
,
commit
.
id
)
end
def
project_ci_commit_path
(
project
,
ci_commit
)
builds_namespace_project_commit_path
(
project
.
namespace
,
project
,
ci_commit
.
sha
)
end
def
activity_project_path
(
project
,
*
args
)
activity_namespace_project_path
(
project
.
namespace
,
project
,
*
args
)
end
...
...
app/views/admin/runners/show.html.haml
View file @
251a7802
...
...
@@ -117,7 +117,7 @@
%td
.build-link
-
if
project
=
link_to
builds_namespace_project_commit_path
(
project
.
namespace
,
project
,
build
.
sha
)
do
=
link_to
ci_status_path
(
build
.
commit
)
do
%strong
#{
build
.
commit
.
short_sha
}
%td
.timestamp
...
...
app/views/projects/_last_commit.html.haml
View file @
251a7802
.project-last-commit
-
if
commit
.
status
=
link_to
project_commit_path
(
commit
.
project
,
commit
),
class:
"ci-status ci-
#{
commit
.
status
}
"
do
=
link_to
builds_namespace_project_commit_path
(
commit
.
project
.
namespace
,
commit
.
project
,
commit
),
class:
"ci-status ci-
#{
commit
.
status
}
"
do
=
ci_icon_for_status
(
commit
.
status
)
=
ci_label_for_status
(
commit
.
status
)
...
...
app/views/projects/builds/show.html.haml
View file @
251a7802
...
...
@@ -4,7 +4,7 @@
.build-page
.gray-content-block.top-block
Build ##{@build.id} for commit
%strong
.monospace
=
link_to
@build
.
commit
.
short_sha
,
builds_namespace_project_commit_path
(
@project
.
namespace
,
@project
,
@build
.
sha
)
%strong
.monospace
=
link_to
@build
.
commit
.
short_sha
,
ci_status_path
(
@build
.
commit
)
from
=
link_to
@build
.
ref
,
namespace_project_commits_path
(
@project
.
namespace
,
@project
,
@build
.
ref
)
-
merge_request
=
@build
.
merge_request
...
...
@@ -173,7 +173,7 @@
Commit
.pull-right
%small
=
link_to
@build
.
commit
.
short_sha
,
builds_namespace_project_commit_path
(
@project
.
namespace
,
@project
,
@build
.
sha
),
class:
"monospace"
=
link_to
@build
.
commit
.
short_sha
,
ci_status_path
(
@build
.
commit
),
class:
"monospace"
%p
%span
.attr-name
Branch:
=
link_to
@build
.
ref
,
namespace_project_commits_path
(
@project
.
namespace
,
@project
,
@build
.
ref
)
...
...
@@ -196,7 +196,7 @@
.build-widget
%h4
.title
#{
pluralize
(
@builds
.
count
(
:id
),
"other build"
)
}
for
=
succeed
":"
do
=
link_to
@build
.
commit
.
short_sha
,
builds_namespace_project_commit_path
(
@project
.
namespace
,
@project
,
@build
.
sha
),
class:
"monospace"
=
link_to
@build
.
commit
.
short_sha
,
ci_status_path
(
@build
.
commit
),
class:
"monospace"
%table
.table.builds
-
@builds
.
each_with_index
do
|
build
,
i
|
%tr
.build
...
...
app/views/projects/ci/commits/_commit.html.haml
deleted
100644 → 0
View file @
4af0968c
app/views/projects/ci_commits/_header_title.html.haml
deleted
100644 → 0
View file @
4af0968c
app/views/projects/ci_commits/index.html.haml
deleted
100644 → 0
View file @
4af0968c
app/views/projects/ci_commits/new.html.haml
deleted
100644 → 0
View file @
4af0968c
db/schema.rb
View file @
251a7802
This diff is collapsed.
Click to expand it.
spec/features/commits_spec.rb
View file @
251a7802
...
...
@@ -162,9 +162,4 @@ describe 'Commits' do
end
end
end
def
ci_status_path
(
ci_commit
)
project
=
ci_commit
.
project
builds_namespace_project_commit_path
(
project
.
namespace
,
project
,
ci_commit
.
sha
)
end
end
spec/helpers/ci_status_helper_spec.rb
View file @
251a7802
...
...
@@ -6,7 +6,7 @@ describe CiStatusHelper do
let
(
:success_commit
)
{
double
(
"Ci::Commit"
,
status:
'success'
)
}
let
(
:failed_commit
)
{
double
(
"Ci::Commit"
,
status:
'failed'
)
}
describe
'ci_
status_icon
'
do
describe
'ci_
icon_for_status
'
do
it
{
expect
(
helper
.
ci_icon_for_status
(
success_commit
.
status
)).
to
include
(
'fa-check'
)
}
it
{
expect
(
helper
.
ci_icon_for_status
(
failed_commit
.
status
)).
to
include
(
'fa-close'
)
}
end
...
...
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