From ea918c95cd59fff1d04b44a530c81599df131e1a Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Mon, 30 Jun 2014 18:33:39 +0600 Subject: [PATCH] SONAR-5209 Add issues limit --- sonar-server/src/main/coffee/component-viewer/source.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sonar-server/src/main/coffee/component-viewer/source.coffee b/sonar-server/src/main/coffee/component-viewer/source.coffee index 50aa37282d5..b13c89ecf56 100644 --- a/sonar-server/src/main/coffee/component-viewer/source.coffee +++ b/sonar-server/src/main/coffee/component-viewer/source.coffee @@ -22,6 +22,7 @@ define [ $ = jQuery API_COVERAGE_TESTS = "#{baseUrl}/api/tests/test_cases" + ISSUES_LIMIT = 50 class SourceView extends Marionette.ItemView @@ -100,6 +101,7 @@ define [ renderIssues: -> issues = @model.get 'activeIssues' + issues = _.sortBy(issues, 'line').slice 0, ISSUES_LIMIT issues.forEach (issue) => line = issue.line || 0 line = 0 if issue.resolution == 'FIXED' || issue.resolution == 'REMOVED' -- 2.39.5