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
b49c1cb1
Commit
b49c1cb1
authored
Mar 26, 2013
by
Sato Hiroyuki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display note count on network graph.
parent
62ef763a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
app/helpers/graph_helper.rb
app/helpers/graph_helper.rb
+9
-2
app/views/graph/show.json.erb
app/views/graph/show.json.erb
+1
-1
No files found.
app/helpers/graph_helper.rb
View file @
b49c1cb1
module
GraphHelper
module
GraphHelper
def
join_with_space
(
ary
)
def
get_refs
(
commit
)
ary
.
collect
{
|
r
|
r
.
name
}.
join
(
" "
)
unless
ary
.
nil?
refs
=
""
refs
+=
commit
.
refs
.
collect
{
|
r
|
r
.
name
}.
join
(
" "
)
if
commit
.
refs
# append note count
notes
=
@project
.
notes
.
for_commit_id
(
commit
.
id
)
refs
+=
"[
#{
notes
.
count
}
]"
if
notes
.
any?
refs
end
end
def
parents_zip_spaces
(
parents
,
parent_spaces
)
def
parents_zip_spaces
(
parents
,
parent_spaces
)
...
...
app/views/graph/show.json.erb
View file @
b49c1cb1
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
},
},
time:
c
.
time
,
time:
c
.
time
,
space:
c
.
spaces
.
first
,
space:
c
.
spaces
.
first
,
refs:
join_with_space
(
c
.
refs
),
refs:
get_refs
(
c
),
id:
c
.
sha
,
id:
c
.
sha
,
date:
c
.
date
,
date:
c
.
date
,
message:
c
.
message
,
message:
c
.
message
,
...
...
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