From 6c65ff90687ebe7d184864b0d665f8a51aecfc7a Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Wed, 20 Apr 2016 18:05:26 +0200 Subject: [PATCH] SONAR-7373 reduce number of displayed lines --- .../src/main/js/components/source-viewer/main.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/server/sonar-web/src/main/js/components/source-viewer/main.js b/server/sonar-web/src/main/js/components/source-viewer/main.js index f1d4e9619e0..672378ca628 100644 --- a/server/sonar-web/src/main/js/components/source-viewer/main.js +++ b/server/sonar-web/src/main/js/components/source-viewer/main.js @@ -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) { -- 2.39.5