gitlabhq/app/views/graph/show.json.erb
2013-03-26 09:51:39 +09:00

24 lines
562 B
Plaintext

<% 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: get_refs(c),
id: c.sha,
date: c.date,
message: c.message,
}
end
}.to_json
) %>