show.json.erb 585 Bytes
Newer Older
1
2
3
4
5
6
7
<% self.formats = ["html"] %>

<%= raw(
  {
    days: @graph.days.compact.map { |d| [d.day, d.strftime("%b")] },
    commits: @graph.commits.map do |c|
      {
8
        parents: parents_zip_spaces(c.parents(@graph.map), c.parent_spaces),
9
        author: {
10
11
          name: c.author_name,
          email: c.author_email,
12
          icon: image_path(avatar_icon(c.author_email, 20))
13
14
15
        },
        time: c.time,
        space: c.spaces.first,
16
        refs: get_refs(@graph.repo, c),
17
18
19
20
21
22
23
        id: c.sha,
        date: c.date,
        message: c.message,
      }
    end
  }.to_json
) %>