Merge pull request #3169 from hiroponz/refactor-network-graph
Refactor network graph
This commit is contained in:
commit
96c627edd8
10 changed files with 409 additions and 416 deletions
23
app/views/graph/show.json.erb
Normal file
23
app/views/graph/show.json.erb
Normal file
|
@ -0,0 +1,23 @@
|
|||
<% self.formats = ["html"] %>
|
||||
|
||||
<%= raw(
|
||||
{
|
||||
days: @graph.days.compact.map { |d| [d.day, d.strftime("%b")] },
|
||||
commits: @graph.commits.map do |c|
|
||||
{
|
||||
parents: parents_zip_spaces(c.parents(@graph.map), c.parent_spaces),
|
||||
author: {
|
||||
name: c.author.name,
|
||||
email: c.author.email,
|
||||
icon: gravatar_icon(c.author.email, 20)
|
||||
},
|
||||
time: c.time,
|
||||
space: c.spaces.first,
|
||||
refs: join_with_space(c.refs),
|
||||
id: c.sha,
|
||||
date: c.date,
|
||||
message: c.message,
|
||||
}
|
||||
end
|
||||
}.to_json
|
||||
) %>
|
Loading…
Add table
Add a link
Reference in a new issue