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
be60cca9
Commit
be60cca9
authored
Nov 24, 2017
by
Jose Ivan Vargas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed specs and the non-rendering stat_graph_contributors_graph
parent
49bc458a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
8 deletions
+7
-8
index.js
app/assets/javascripts/common_d3/index.js
+1
-1
stat_graph_contributors_graph.js
...ssets/javascripts/graphs/stat_graph_contributors_graph.js
+5
-6
calendar_spec.rb
spec/features/calendar_spec.rb
+1
-1
No files found.
app/assets/javascripts/common_d3/index.js
View file @
be60cca9
...
@@ -36,5 +36,5 @@ export {
...
@@ -36,5 +36,5 @@ export {
}
from
'd3-axis'
;
}
from
'd3-axis'
;
export
{
export
{
brush
,
brush
X
,
}
from
'd3-brush'
;
}
from
'd3-brush'
;
app/assets/javascripts/graphs/stat_graph_contributors_graph.js
View file @
be60cca9
...
@@ -5,13 +5,12 @@ import {
...
@@ -5,13 +5,12 @@ import {
extent
as
d3Extent
,
extent
as
d3Extent
,
max
as
d3Max
,
max
as
d3Max
,
select
as
d3Select
,
select
as
d3Select
,
selectAll
as
d3SelectAll
,
scaleTime
as
d3ScaleTime
,
scaleTime
as
d3ScaleTime
,
scaleLinear
as
d3ScaleLinear
,
scaleLinear
as
d3ScaleLinear
,
axisLeft
as
d3AxisLeft
,
axisLeft
as
d3AxisLeft
,
axisBottom
as
d3AxisBottom
,
axisBottom
as
d3AxisBottom
,
area
as
d3Area
,
area
as
d3Area
,
brush
as
d3Brush
,
brush
X
as
d3BrushX
,
timeParse
as
d3TimeParse
,
timeParse
as
d3TimeParse
,
}
from
'../common_d3/index'
;
}
from
'../common_d3/index'
;
...
@@ -163,11 +162,11 @@ export const ContributorsMasterGraph = (function(superClass) {
...
@@ -163,11 +162,11 @@ export const ContributorsMasterGraph = (function(superClass) {
}).
y0
(
this
.
height
).
y1
(
function
(
d
)
{
}).
y0
(
this
.
height
).
y1
(
function
(
d
)
{
d
.
commits
=
d
.
commits
||
d
.
additions
||
d
.
deletions
;
d
.
commits
=
d
.
commits
||
d
.
additions
||
d
.
deletions
;
return
y
(
d
.
commits
);
return
y
(
d
.
commits
);
})
.
interpolate
(
"basis"
)
;
});
};
};
ContributorsMasterGraph
.
prototype
.
create_brush
=
function
()
{
ContributorsMasterGraph
.
prototype
.
create_brush
=
function
()
{
return
this
.
brush
=
d3Brush
().
x
(
this
.
x
).
on
(
"brush
end"
,
this
.
update_content
);
return
this
.
brush
=
d3Brush
X
(
this
.
x
).
on
(
"
end"
,
this
.
update_content
);
};
};
ContributorsMasterGraph
.
prototype
.
draw_path
=
function
(
data
)
{
ContributorsMasterGraph
.
prototype
.
draw_path
=
function
(
data
)
{
...
@@ -257,11 +256,11 @@ export const ContributorsAuthorGraph = (function(superClass) {
...
@@ -257,11 +256,11 @@ export const ContributorsAuthorGraph = (function(superClass) {
return
y
(
0
);
return
y
(
0
);
}
}
};
};
})(
this
))
.
interpolate
(
"basis"
)
;
})(
this
));
};
};
ContributorsAuthorGraph
.
prototype
.
create_svg
=
function
()
{
ContributorsAuthorGraph
.
prototype
.
create_svg
=
function
()
{
this
.
list_item
=
d
3SelectAll
(
".person"
)[
0
].
pop
()
;
this
.
list_item
=
d
ocument
.
querySelectorAll
(
'.person'
)[
0
]
;
return
this
.
svg
=
d3Select
(
this
.
list_item
).
append
(
"svg"
).
attr
(
"width"
,
this
.
width
+
this
.
MARGIN
.
left
+
this
.
MARGIN
.
right
).
attr
(
"height"
,
this
.
height
+
this
.
MARGIN
.
top
+
this
.
MARGIN
.
bottom
).
attr
(
"class"
,
"spark"
).
append
(
"g"
).
attr
(
"transform"
,
"translate("
+
this
.
MARGIN
.
left
+
","
+
this
.
MARGIN
.
top
+
")"
);
return
this
.
svg
=
d3Select
(
this
.
list_item
).
append
(
"svg"
).
attr
(
"width"
,
this
.
width
+
this
.
MARGIN
.
left
+
this
.
MARGIN
.
right
).
attr
(
"height"
,
this
.
height
+
this
.
MARGIN
.
top
+
this
.
MARGIN
.
bottom
).
attr
(
"class"
,
"spark"
).
append
(
"g"
).
attr
(
"transform"
,
"translate("
+
this
.
MARGIN
.
left
+
","
+
this
.
MARGIN
.
top
+
")"
);
};
};
...
...
spec/features/calendar_spec.rb
View file @
be60cca9
...
@@ -12,7 +12,7 @@ feature 'Contributions Calendar', :js do
...
@@ -12,7 +12,7 @@ feature 'Contributions Calendar', :js do
issue_params
=
{
title:
issue_title
}
issue_params
=
{
title:
issue_title
}
def
get_cell_color_selector
(
contributions
)
def
get_cell_color_selector
(
contributions
)
activity_colors
=
%w[#ededed #acd5f2 #7fa8c9 #527ba0 #254e77
]
activity_colors
=
[
"#ededed"
,
"rgb(172, 213, 242)"
,
"rgb(127, 168, 201)"
,
"rgb(82, 123, 160)"
,
"rgb(37, 78, 119)"
]
# We currently don't actually test the cases with contributions >= 20
# We currently don't actually test the cases with contributions >= 20
activity_colors_index
=
activity_colors_index
=
if
contributions
>
0
&&
contributions
<
10
if
contributions
>
0
&&
contributions
<
10
...
...
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