BranchGraph now loads async

Centralized keyboard and drag events for BranchGraph
This commit is contained in:
Koen Punt 2012-12-07 19:06:46 +01:00
parent 40576b8709
commit e1282d507f
6 changed files with 123 additions and 95 deletions

View file

@ -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

View file

@ -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
def to_json
{
days: @days.compact.map { |d| [d.day, d.strftime("%b")] },
commits: @commits.map(&:to_graph_hash)
}.to_json
end
def commits_json
@commits_json = @commits.map(&:to_graph_hash).to_json
end
protected
protected
# Get commits from repository
#