diff options
author | Koen Punt <koen@koenpunt.nl> | 2012-12-07 19:06:46 +0100 |
---|---|---|
committer | Koen Punt <koen@koenpunt.nl> | 2012-12-07 19:06:46 +0100 |
commit | e1282d507f1a0321c4f25815470b0fa05265e6dd (patch) | |
tree | 2e6473670c03318730f84eda2c30fa1814c4d6c1 /lib | |
parent | 40576b87092598b28a11ba796bab6857d009702b (diff) | |
download | gitlab-ce-e1282d507f1a0321c4f25815470b0fa05265e6dd.tar.gz |
BranchGraph now loads async
Centralized keyboard and drag events for BranchGraph
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/graph/commit.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/graph/json_builder.rb | 17 |
2 files changed, 9 insertions, 10 deletions
diff --git a/lib/gitlab/graph/commit.rb b/lib/gitlab/graph/commit.rb index af8d7828ce9..3d82c34432f 100644 --- a/lib/gitlab/graph/commit.rb +++ b/lib/gitlab/graph/commit.rb @@ -28,7 +28,7 @@ module Gitlab h[:refs] = refs.collect{|r|r.name}.join(" ") unless refs.nil? h[:id] = sha h[:date] = date - h[:message] = escape_once(message) + h[:message] = message h[:login] = author.email h end diff --git a/lib/gitlab/graph/json_builder.rb b/lib/gitlab/graph/json_builder.rb index c2c3fa662a6..e6017644966 100644 --- a/lib/gitlab/graph/json_builder.rb +++ b/lib/gitlab/graph/json_builder.rb @@ -17,16 +17,15 @@ module Gitlab @commits = collect_commits @days = index_commits end - - def days_json - @days_json = @days.compact.map { |d| [d.day, d.strftime("%b")] }.to_json - end - - def commits_json - @commits_json = @commits.map(&:to_graph_hash).to_json + + def to_json + { + days: @days.compact.map { |d| [d.day, d.strftime("%b")] }, + commits: @commits.map(&:to_graph_hash) + }.to_json end - - protected + + protected # Get commits from repository # |