From 0a0cdc6c61007675f92ff474d605dcf7b617a6be Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Tue, 25 Jun 2013 17:34:50 +0300 Subject: [PATCH] Limit amount of contributors at graph to 100 persons --- app/assets/javascripts/stat_graph_contributors.js.coffee | 3 ++- app/views/projects/graphs/show.html.haml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/stat_graph_contributors.js.coffee b/app/assets/javascripts/stat_graph_contributors.js.coffee index 6cf6f1f02..5b4b3dae4 100644 --- a/app/assets/javascripts/stat_graph_contributors.js.coffee +++ b/app/assets/javascripts/stat_graph_contributors.js.coffee @@ -12,7 +12,8 @@ class window.ContributorsStatGraph @master_graph.draw() add_authors_graph: (author_data) -> @authors = [] - _.each(author_data, (d) => + limited_author_data = author_data.slice(0, 100) + _.each(limited_author_data, (d) => author_header = @create_author_header(d) $(".contributors-list").append(author_header) @authors[d.author] = author_graph = new ContributorsAuthorGraph(d.dates) diff --git a/app/views/projects/graphs/show.html.haml b/app/views/projects/graphs/show.html.haml index 05bc1436e..6593319af 100644 --- a/app/views/projects/graphs/show.html.haml +++ b/app/views/projects/graphs/show.html.haml @@ -24,8 +24,8 @@ type: "GET", url: location.href, complete: function() { + $(".stat-graph").fadeIn(); $(".loading-graph").hide(); - $(".stat-graph").show(); }, dataType: "script" }); -- 2.11.0