Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/projects/network/show.json.erb')
-rw-r--r--app/views/projects/network/show.json.erb23
1 files changed, 23 insertions, 0 deletions
diff --git a/app/views/projects/network/show.json.erb b/app/views/projects/network/show.json.erb
new file mode 100644
index 00000000000..9a62cdb3dc9
--- /dev/null
+++ b/app/views/projects/network/show.json.erb
@@ -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: get_refs(c),
+ id: c.sha,
+ date: c.date,
+ message: c.message,
+ }
+ end
+ }.to_json
+) %>