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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
1ea45f81
Commit
1ea45f81
authored
Mar 27, 2017
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement burndown chart hint message
parent
8825a65a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
0 deletions
+71
-0
app/assets/javascripts/burndown_chart/index.js
app/assets/javascripts/burndown_chart/index.js
+9
-0
app/assets/stylesheets/pages/milestone.scss
app/assets/stylesheets/pages/milestone.scss
+45
-0
app/views/shared/icons/_icon_burndown_chart_splash.svg
app/views/shared/icons/_icon_burndown_chart_splash.svg
+1
-0
app/views/shared/milestones/_burndown.html.haml
app/views/shared/milestones/_burndown.html.haml
+16
-0
No files found.
app/assets/javascripts/burndown_chart/index.js
View file @
1ea45f81
import
Cookies
from
'
js-cookie
'
;
$
(()
=>
{
const
hint
=
$
(
'
.burndown-hint
'
);
hint
.
on
(
'
click
'
,
'
.dismiss-icon
'
,
()
=>
{
hint
.
hide
();
Cookies
.
set
(
'
hide_burndown_message
'
,
'
true
'
);
});
});
app/assets/stylesheets/pages/milestone.scss
View file @
1ea45f81
...
...
@@ -200,3 +200,48 @@
cursor
:
-
webkit-grab
;
cursor
:
grab
;
}
// EE-only
.burndown-hint.container-fluid
{
border
:
1px
solid
$border-color
;
border-radius
:
$border-radius-default
;
position
:
relative
;
margin
:
$gl-padding
0
;
overflow
:
hidden
;
padding-top
:
15px
;
padding-bottom
:
15px
;
.dismiss-icon
{
position
:
absolute
;
right
:
$gl-padding
;
cursor
:
pointer
;
color
:
$cycle-analytics-dismiss-icon-color
;
z-index
:
1
;
}
.svg-container
{
text-align
:
center
;
svg
{
max-width
:
200px
;
}
}
.inner-content
{
@media
(
max-width
:
$screen-xs-max
)
{
padding
:
0
28px
;
text-align
:
center
;
}
h4
{
color
:
$gl-text-color
;
font-size
:
17px
;
}
p
{
color
:
$cycle-analytics-box-text-color
;
margin-bottom
:
$gl-padding
;
}
}
}
app/views/shared/icons/_icon_burndown_chart_splash.svg
0 → 100644
View file @
1ea45f81
<svg
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0 200 158"
><g
fill=
"none"
fill-rule=
"evenodd"
transform=
"translate(-48-26)"
><path
fill=
"#fff"
d=
"m25 28h240v158h-240z"
/><g
transform=
"translate(56 37)"
><g
transform=
"translate(0 21)"
><path
fill=
"#eee"
d=
"m13.591 92.21l3.03-3.979c.669-.879.499-2.134-.38-2.803-.879-.669-2.134-.499-2.803.38l-3.03 3.979c-.669.879-.499 2.134.38 2.803.879.669 2.134.499 2.803-.38m10.902-14.323l3.03-3.979c.669-.879.499-2.134-.38-2.803-.879-.669-2.134-.499-2.803.38l-3.03 3.979c-.669.879-.499 2.134.38 2.803.879.669 2.134.499 2.803-.38m10.902-14.323l3.03-3.979c.669-.879.499-2.134-.38-2.803-.879-.669-2.134-.499-2.803.38l-3.03 3.979c-.669.879-.499 2.134.38 2.803.879.669 2.134.499 2.803-.38m10.902-14.323l3.03-3.979c.669-.879.499-2.134-.38-2.803-.879-.669-2.134-.499-2.803.38l-3.03 3.979c-.669.879-.499 2.134.38 2.803.879.669 2.134.499 2.803-.38m10.902-14.323l3.03-3.979c.669-.879.499-2.134-.38-2.803-.879-.669-2.134-.499-2.803.38l-3.03 3.979c-.669.879-.499 2.134.38 2.803.879.669 2.134.499 2.803-.38m7.167-4.942l2.644 4.244c.584.938 1.818 1.224 2.755.64.938-.584 1.224-1.818.64-2.755l-2.644-4.244c-.584-.938-1.818-1.224-2.755-.64-.938.584-1.224 1.818-.64 2.755m9.517 15.278l2.644 4.244c.584.938 1.818 1.224 2.755.64.938-.584 1.224-1.818.64-2.755l-2.644-4.244c-.584-.938-1.818-1.224-2.755-.64-.938.584-1.224 1.818-.64 2.755m9.517 15.278l2.644 4.244c.584.938 1.818 1.224 2.755.64.938-.584 1.224-1.818.64-2.755l-2.644-4.244c-.584-.938-1.818-1.224-2.755-.64-.938.584-1.224 1.818-.64 2.755m9.517 15.278l2.644 4.244c.584.938 1.818 1.224 2.755.64.938-.584 1.224-1.818.64-2.755l-2.644-4.244c-.584-.938-1.818-1.224-2.755-.64-.938.584-1.224 1.818-.64 2.755m13.423 5.929l3.213-3.831c.71-.846.599-2.108-.247-2.818-.846-.71-2.108-.599-2.818.247l-3.213 3.831c-.71.846-.599 2.108.247 2.818.846.71 2.108.599 2.818-.247m11.567-13.791l3.213-3.831c.71-.846.599-2.108-.247-2.818-.846-.71-2.108-.599-2.818.247l-3.213 3.831c-.71.846-.599 2.108.247 2.818.846.71 2.108.599 2.818-.247m8.253-11.614l2.794 4.146c.617.916 1.86 1.158 2.776.541.916-.617 1.158-1.86.541-2.776l-2.794-4.146c-.617-.916-1.86-1.158-2.776-.541-.916.617-1.158 1.86-.541 2.776m10.06 14.927l2.794 4.146c.617.916 1.86 1.158 2.776.541.916-.617 1.158-1.86.541-2.776l-2.794-4.146c-.617-.916-1.86-1.158-2.776-.541-.916.617-1.158 1.86-.541 2.776m10.06 14.927l2.794 4.146c.617.916 1.86 1.158 2.776.541.916-.617 1.158-1.86.541-2.776l-2.794-4.146c-.617-.916-1.86-1.158-2.776-.541-.916.617-1.158 1.86-.541 2.776m10.06 14.927c.618.917 1.861 1.159 2.777.541.916-.617 1.158-1.86.541-2.776-.618-.917-1.861-1.159-2.777-.541-.916.617-1.158 1.86-.541 2.776"
/><g
transform=
"translate(61)"
><rect
width=
"3"
height=
"24"
fill=
"#fde5d8"
rx=
"1.5"
/><path
fill=
"#fc6d26"
d=
"m3 13v-11l11.533 3.105c1.387.373 1.478 1.207.192 1.868l-11.724 6.03"
/></g><path
fill=
"#b5a7dd"
d=
"m166.93 83.6l-13.994-7.365c-.287-.151-.607-.23-.931-.23h-20.485c-.491-.271-.816-.45-4.08-2.251l-24.469-13.5c-.694-.383-1.548-.32-2.178.16l-19.433 14.806-20.783-26.451c-.65-.827-1.83-1.01-2.699-.417l-20.604 14.05-20.904-21.708c-.614 1.222-1.633 2.206-2.881 2.775l22.08 22.924c.677.703 1.761.815 2.567.265l20.456-13.947 20.845 26.53c.675.859 1.915 1.018 2.785.355l19.963-15.21c-.005-.003.678.374 3.39 1.87l24.469 13.5c.296.163.628.249.966.249h20.506l13.556 7.135c.201-1.391.879-2.628 1.864-3.539"
/><path
fill=
"#6b4fbb"
d=
"m171 96c4.418 0 8-3.582 8-8 0-4.418-3.582-8-8-8-4.418 0-8 3.582-8 8 0 4.418 3.582 8 8 8m0-4c-2.209 0-4-1.791-4-4 0-2.209 1.791-4 4-4 2.209 0 4 1.791 4 4 0 2.209-1.791 4-4 4m-160-46c4.418 0 8-3.582 8-8 0-4.418-3.582-8-8-8-4.418 0-8 3.582-8 8 0 4.418 3.582 8 8 8m0-4c-2.209 0-4-1.791-4-4 0-2.209 1.791-4 4-4 2.209 0 4 1.791 4 4 0 2.209-1.791 4-4 4"
/></g><path
fill=
"#fde5d8"
d=
"m168.78 39.803l-2.908.646c-.542.12-.882-.228-.763-.763l.646-2.908-.646-2.908c-.12-.542.228-.882.763-.763l2.908.646 2.908-.646c.542-.12.882.228.763.763l-.646 2.908.646 2.908c.12.542-.228.882-.763.763l-2.908-.646"
transform=
"matrix(.70711.70711-.70711.70711 75.44-108.57)"
/><path
fill=
"#d4cde8"
d=
"m101.36 53.839l-2.21.491c-.537.119-.874-.226-.756-.756l.491-2.21-.491-2.21c-.119-.537.226-.874.756-.756l2.21.491 2.21-.491c.537-.119.874.226.756.756l-.491 2.21.491 2.21c.119.537-.226.874-.756.756l-2.21-.491"
transform=
"matrix(.70711.70711-.70711.70711 66.01-56.631)"
/><g
fill=
"#fde5d8"
><path
d=
"m125.36 8.839l-2.21.491c-.537.119-.874-.226-.756-.756l.491-2.21-.491-2.21c-.119-.537.226-.874.756-.756l2.21.491 2.21-.491c.537-.119.874.226.756.756l-.491 2.21.491 2.21c.119.537-.226.874-.756.756l-2.21-.491"
transform=
"matrix(.70711.70711-.70711.70711 41.22-86.78)"
/><path
d=
"m18.778 23.803l-2.908.646c-.542.12-.882-.228-.763-.763l.646-2.908-.646-2.908c-.12-.542.228-.882.763-.763l2.908.646 2.908-.646c.542-.12.882.228.763.763l-.646 2.908.646 2.908c.12.542-.228.882-.763.763l-2.908-.646"
transform=
"matrix(.70711.70711-.70711.70711 20.19-7.192)"
/></g></g></g></svg>
app/views/shared/milestones/_burndown.html.haml
View file @
1ea45f81
-
milestone
=
local_assigns
[
:milestone
]
-
project
=
local_assigns
[
:project
]
-
can_generate_chart
=
@milestone
.
start_date
&&
@milestone
.
due_date
-
content_for
:page_specific_javascripts
do
=
page_specific_javascript_bundle_tag
(
'common_d3'
)
=
page_specific_javascript_bundle_tag
(
'burndown_chart'
)
-
unless
can_generate_chart
||
!
can?
(
current_user
,
:admin_milestone
,
@project
)
||
cookies
[
'hide_burndown_message'
].
present?
.burndown-hint.content-block.container-fluid
=
icon
(
"times"
,
class:
"dismiss-icon"
)
.row
.col-sm-4.col-xs-12.svg-container
=
custom_icon
(
'icon_burndown_chart_splash'
)
.col-sm-8.col-xs-12.inner-content
%h4
Burndown Chart
%p
View your milestone's progress as a burndown chart. Add both a start and a due date to
this milestone and the chart will appear here, always up-to-date.
=
link_to
"Add start and due date"
,
edit_namespace_project_milestone_path
(
project
.
namespace
,
project
,
milestone
),
class:
'btn'
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