diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2014-06-30 18:33:39 +0600 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2014-06-30 18:33:51 +0600 |
commit | ea918c95cd59fff1d04b44a530c81599df131e1a (patch) | |
tree | 2a6423ef9d98227b6278c52496fc5366906e5b85 | |
parent | 909de7ac11cf0cf53b77f56809f0a7e8830175de (diff) | |
download | sonarqube-ea918c95cd59fff1d04b44a530c81599df131e1a.tar.gz sonarqube-ea918c95cd59fff1d04b44a530c81599df131e1a.zip |
SONAR-5209 Add issues limit
-rw-r--r-- | sonar-server/src/main/coffee/component-viewer/source.coffee | 2 |
1 files changed, 2 insertions, 0 deletions
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' |