Commit 68249f23dacbddf61ca296a7decf98ecf6fc16fb
1 parent
d701d586
Exists in
spb-stable
and in
3 other branches
Prevent Compare page timout for large amount of commits
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
3 changed files
with
15 additions
and
1 deletions
Show diff stats
CHANGELOG
app/assets/stylesheets/generic/lists.scss
app/views/projects/compare/show.html.haml
... | ... | @@ -15,7 +15,14 @@ |
15 | 15 | %div.ui-box |
16 | 16 | .title |
17 | 17 | Commits (#{@commits.count}) |
18 | - %ul.well-list= render Commit.decorate(@commits), project: @project | |
18 | + - if @commits.size > MergeRequestDiff::COMMITS_SAFE_SIZE | |
19 | + %ul.well-list | |
20 | + - Commit.decorate(@commits.first(MergeRequestDiff::COMMITS_SAFE_SIZE)).each do |commit| | |
21 | + = render "projects/commits/inline_commit", commit: commit, project: @project | |
22 | + %li.warning-row.unstyled | |
23 | + other #{@commits.size - MergeRequestDiff::COMMITS_SAFE_SIZE} commits hidden to prevent performance issues. | |
24 | + - else | |
25 | + %ul.well-list= render Commit.decorate(@commits), project: @project | |
19 | 26 | |
20 | 27 | - unless @diffs.empty? |
21 | 28 | %h4 Diff | ... | ... |