]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5209 Add issues limit
authorStas Vilchik <vilchiks@gmail.com>
Mon, 30 Jun 2014 12:33:39 +0000 (18:33 +0600)
committerStas Vilchik <vilchiks@gmail.com>
Mon, 30 Jun 2014 12:33:51 +0000 (18:33 +0600)
sonar-server/src/main/coffee/component-viewer/source.coffee

index 50aa37282d58d1ca8a6835bcc3ae0f642510475b..b13c89ecf567822b84ebffb995fcb257a21948a9 100644 (file)
@@ -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'