summaryrefslogtreecommitdiff
path: root/app/views/projects/network/show.json.erb
blob: 7491b37310d72dd48e3510950a52de73e867c432 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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: image_path(avatar_icon(c.author_email, 20))
        },
        time: c.time,
        space: c.spaces.first,
        refs: refs(@graph.repo, c),
        id: c.sha,
        date: c.date,
        message: c.message,
      }
    end
  }.to_json
) %>