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
Léo-Paul Géneau
gitlab-ce
Commits
09daff61
Commit
09daff61
authored
Jun 22, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Colors for author additions/develtions in graph
parent
8d70ac00
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
9 deletions
+42
-9
app/assets/javascripts/stat_graph_contributors.js.coffee
app/assets/javascripts/stat_graph_contributors.js.coffee
+26
-6
app/assets/stylesheets/sections/graph.scss
app/assets/stylesheets/sections/graph.scss
+16
-3
No files found.
app/assets/javascripts/stat_graph_contributors.js.coffee
View file @
09daff61
...
@@ -19,7 +19,27 @@ class window.ContributorsStatGraph
...
@@ -19,7 +19,27 @@ class window.ContributorsStatGraph
author_graph
.
draw
()
author_graph
.
draw
()
)
)
format_author_commit_info
:
(
author
)
->
format_author_commit_info
:
(
author
)
->
author
.
commits
+
" commits "
+
author
.
additions
+
" ++ / "
+
author
.
deletions
+
" --"
commits
=
$
(
'<span/>'
,
{
class
:
'graph-author-commits-count'
})
commits
.
text
(
author
.
commits
+
" commits"
)
additions
=
$
(
'<span/>'
,
{
class
:
'graph-additions'
})
additions
.
text
(
author
.
additions
+
" ++"
)
deletions
=
$
(
'<span/>'
,
{
class
:
'graph-deletions'
})
deletions
.
text
(
author
.
deletions
+
" --"
)
$
(
'<span/>'
).
append
(
commits
)
.
append
(
" / "
)
.
append
(
additions
)
.
append
(
" / "
)
.
append
(
deletions
)
create_author_header
:
(
author
)
->
create_author_header
:
(
author
)
->
list_item
=
$
(
'<li/>'
,
{
list_item
=
$
(
'<li/>'
,
{
class
:
'person'
class
:
'person'
...
@@ -30,7 +50,7 @@ class window.ContributorsStatGraph
...
@@ -30,7 +50,7 @@ class window.ContributorsStatGraph
class
:
'commits'
class
:
'commits'
})
})
author_commit_info
=
@
format_author_commit_info
(
author
)
author_commit_info
=
@
format_author_commit_info
(
author
)
author_commit_info_span
.
text
(
author_commit_info
)
author_commit_info_span
.
html
(
author_commit_info
)
list_item
.
append
(
author_name
)
list_item
.
append
(
author_name
)
list_item
.
append
(
author_commit_info_span
)
list_item
.
append
(
author_commit_info_span
)
list_item
list_item
...
@@ -52,10 +72,10 @@ class window.ContributorsStatGraph
...
@@ -52,10 +72,10 @@ class window.ContributorsStatGraph
@
field
=
field
@
field
=
field
change_date_header
:
->
change_date_header
:
->
x_domain
=
ContributorsGraph
.
prototype
.
x_domain
x_domain
=
ContributorsGraph
.
prototype
.
x_domain
print_date_format
=
d3
.
time
.
format
(
"%B %e %Y"
)
;
print_date_format
=
d3
.
time
.
format
(
"%B %e %Y"
)
print
=
print_date_format
(
x_domain
[
0
])
+
" - "
+
print_date_format
(
x_domain
[
1
])
;
print
=
print_date_format
(
x_domain
[
0
])
+
" - "
+
print_date_format
(
x_domain
[
1
])
$
(
"#date_header"
).
text
(
print
)
;
$
(
"#date_header"
).
text
(
print
)
redraw_author_commit_info
:
(
author
)
->
redraw_author_commit_info
:
(
author
)
->
author_list_item
=
$
(
@
authors
[
author
.
author
].
list_item
)
author_list_item
=
$
(
@
authors
[
author
.
author
].
list_item
)
author_commit_info
=
@
format_author_commit_info
(
author
)
author_commit_info
=
@
format_author_commit_info
(
author
)
author_list_item
.
find
(
"span"
).
text
(
author_commit_info
)
author_list_item
.
find
(
"span"
).
html
(
author_commit_info
)
\ No newline at end of file
app/assets/stylesheets/sections/graph.scss
View file @
09daff61
...
@@ -17,3 +17,16 @@
...
@@ -17,3 +17,16 @@
}
}
}
}
.graphs
{
.graph-author-commits-count
{
}
.graph-additions
{
color
:
#4a2
;
}
.graph-deletions
{
color
:
#d12f19
;
}
}
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