]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7373 reduce number of displayed lines
authorStas Vilchik <vilchiks@gmail.com>
Wed, 20 Apr 2016 16:05:26 +0000 (18:05 +0200)
committerStas Vilchik <vilchiks@gmail.com>
Wed, 20 Apr 2016 16:05:26 +0000 (18:05 +0200)
server/sonar-web/src/main/js/components/source-viewer/main.js

index f1d4e9619e0d0a6c9151f3e6b66cf7b3eb46de65..672378ca6289ad81775e2b3f8678faae0b6050a3 100644 (file)
@@ -43,10 +43,13 @@ export default Marionette.LayoutView.extend({
   issueLocationTemplate: IssueLocationTemplate,
 
   ISSUES_LIMIT: 3000,
-  LINES_LIMIT: 1000,
-  TOTAL_LINES_LIMIT: 3000,
+
   LINES_AROUND: 500,
 
+  // keep it twice bigger than LINES_AROUND
+  LINES_LIMIT: 1000,
+  TOTAL_LINES_LIMIT: 1000,
+
   regions: {
     headerRegion: '.source-viewer-header'
   },
@@ -175,10 +178,10 @@ export default Marionette.LayoutView.extend({
     if (aroundLine) {
       return {
         from: Math.max(1, aroundLine - this.LINES_AROUND),
-        to: aroundLine + this.LINES_LIMIT
+        to: aroundLine + this.LINES_AROUND
       };
     }
-    return { from: 1, to: this.LINES_LIMIT };
+    return { from: 1, to: this.LINES_AROUND };
   },
 
   getUTCoverageStatus (row) {