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
33f3c379
Commit
33f3c379
authored
Oct 07, 2016
by
Luke Bennett
Committed by
blackst0ne
Oct 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added dyanmic position adjustment
Added tooltips for dropdown items Reverted pretty much everything in favour of a DOM approach Simplified JS
parent
a2f64619
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
27 deletions
+23
-27
pipelines.js.es6
app/assets/javascripts/pipelines.js.es6
+0
-11
pipelines.scss
app/assets/stylesheets/pages/pipelines.scss
+10
-4
ci_status_helper.rb
app/helpers/ci_status_helper.rb
+2
-2
_build_pipeline.html.haml
app/views/projects/ci/builds/_build_pipeline.html.haml
+2
-2
_pipeline_stage.html.haml
app/views/projects/commit/_pipeline_stage.html.haml
+1
-1
_pipeline_status_group.html.haml
app/views/projects/commit/_pipeline_status_group.html.haml
+1
-1
_generic_commit_status_pipeline.html.haml
...commit_statuses/_generic_commit_status_pipeline.html.haml
+7
-6
No files found.
app/assets/javascripts/pipelines.js.es6
View file @
33f3c379
...
...
@@ -4,17 +4,6 @@
constructor() {
$(document).off('click', '.toggle-pipeline-btn').on('click', '.toggle-pipeline-btn', this.toggleGraph);
this.addMarginToBuildColumns();
this.initGroupedPipelineTooltips();
}
initGroupedPipelineTooltips() {
$('.dropdown-menu-toggle', $('.grouped-pipeline-dropdown').parent()).each(function() {
const $this = $(this);
$this.tooltip({
title: $this.data('tooltip-title'),
placement: 'bottom'
});
});
}
toggleGraph() {
...
...
app/assets/stylesheets/pages/pipelines.scss
View file @
33f3c379
...
...
@@ -369,10 +369,6 @@
&
:hover
{
background-color
:
$gray-lighter
;
.dropdown-menu-toggle
{
background-color
:
transparent
;
}
}
&
.playable
{
...
...
@@ -402,6 +398,15 @@
}
}
.tooltip
{
white-space
:
nowrap
;
.tooltip-inner
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
}
.ci-status-text
{
width
:
135px
;
white-space
:
nowrap
;
...
...
@@ -419,6 +424,7 @@
}
.dropdown-menu-toggle
{
background-color
:
transparent
;
border
:
none
;
width
:
auto
;
padding
:
0
;
...
...
app/helpers/ci_status_helper.rb
View file @
33f3c379
...
...
@@ -71,10 +71,10 @@ module CiStatusHelper
Ci
::
Runner
.
shared
.
blank?
end
def
render_status_with_link
(
type
,
status
,
path
=
nil
,
tooltip_placement:
'auto left'
,
cssclass:
''
,
container:
'body'
,
show_tooltip:
true
)
def
render_status_with_link
(
type
,
status
,
path
=
nil
,
tooltip_placement:
'auto left'
,
cssclass:
''
,
container:
'body'
)
klass
=
"ci-status-link ci-status-icon-
#{
status
.
dasherize
}
#{
cssclass
}
"
title
=
"
#{
type
.
titleize
}
:
#{
ci_label_for_status
(
status
)
}
"
data
=
{
toggle:
'tooltip'
,
placement:
tooltip_placement
,
container:
container
}
if
show_tooltip
data
=
{
toggle:
'tooltip'
,
placement:
tooltip_placement
,
container:
container
}
if
path
link_to
ci_icon_for_status
(
status
),
path
,
...
...
app/views/projects/ci/builds/_build_pipeline.html.haml
View file @
33f3c379
-
is_playable
=
subject
.
playable?
&&
can?
(
current_user
,
:update_build
,
@project
)
-
if
is_playable
=
link_to
play_namespace_project_build_path
(
subject
.
project
.
namespace
,
subject
.
project
,
subject
,
return_to:
request
.
original_url
),
method: :post
,
title:
'Play'
do
=
link_to
play_namespace_project_build_path
(
subject
.
project
.
namespace
,
subject
.
project
,
subject
,
return_to:
request
.
original_url
),
method: :post
,
data:
{
toggle:
'tooltip'
,
title:
"
#{
subject
.
name
}
- play"
,
container:
'.pipeline-graph'
,
placement:
'bottom'
}
do
=
render_status_with_link
(
'build'
,
'play'
)
.ci-status-text
=
subject
.
name
-
elsif
can?
(
current_user
,
:read_build
,
@project
)
=
link_to
namespace_project_build_path
(
subject
.
project
.
namespace
,
subject
.
project
,
subject
)
do
=
link_to
namespace_project_build_path
(
subject
.
project
.
namespace
,
subject
.
project
,
subject
)
,
data:
{
toggle:
'tooltip'
,
title:
"
#{
subject
.
name
}
-
#{
subject
.
status
}
"
,
container:
'.pipeline-graph'
,
placement:
'bottom'
}
do
%span
.ci-status-icon
=
render_status_with_link
(
'build'
,
subject
.
status
)
.ci-status-text
=
subject
.
name
...
...
app/views/projects/commit/_pipeline_stage.html.haml
View file @
33f3c379
...
...
@@ -5,7 +5,7 @@
-
is_playable
=
status
.
playable?
&&
can?
(
current_user
,
:update_build
,
@project
)
%li
.build
{
class:
(
"playable"
if
is_playable
)
}
.curve
.build-content
{
{
data:
{
toggle:
'tooltip'
,
title:
"#{group_name} - #{status.status}"
,
placement:
'bottom'
}
}
}
.build-content
=
render
"projects/
#{
status
.
to_partial_path
}
_pipeline"
,
subject:
status
-
else
%li
.build
...
...
app/views/projects/commit/_pipeline_status_group.html.haml
View file @
33f3c379
-
group_status
=
CommitStatus
.
where
(
id:
subject
).
status
%button
.dropdown-menu-toggle
{
type:
'button'
,
data:
{
toggle:
'dropdown'
}
}
%button
.dropdown-menu-toggle
.has-tooltip
{
type:
'button'
,
data:
{
toggle:
'dropdown'
,
title:
"#{name} - #{group_status}"
}
}
%span
.ci-status-icon
=
render_status_with_link
(
'build'
,
group_status
)
%span
.ci-status-text
...
...
app/views/projects/generic_commit_statuses/_generic_commit_status_pipeline.html.haml
View file @
33f3c379
-
if
subject
.
target_url
=
link_to
subject
.
target_url
do
%a
{
data:
{
toggle:
'tooltip'
,
title:
"#{subject.name} - #{subject.status}"
,
container:
'.pipeline-graph'
,
placement:
'bottom'
}
}
-
if
subject
.
target_url
=
link_to
subject
.
target_url
do
%span
.ci-status-icon
=
render_status_with_link
(
'commit status'
,
subject
.
status
)
%span
.ci-status-text
=
subject
.
name
-
else
%span
.ci-status-icon
=
render_status_with_link
(
'commit status'
,
subject
.
status
)
%span
.ci-status-text
=
subject
.
name
-
else
%span
.ci-status-icon
=
render_status_with_link
(
'commit status'
,
subject
.
status
)
%span
.ci-status-text
=
subject
.
name
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