aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/sonar-web/src/main/js/components/source-viewer/main.js1
-rw-r--r--server/sonar-web/src/main/js/components/source-viewer/partials.js16
2 files changed, 17 insertions, 0 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 c0e633e2fca..a189f61aff6 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
@@ -14,6 +14,7 @@ import LineActionsPopupView from './popups/line-actions-popup';
import highlightLocations from './helpers/code-with-issue-locations-helper';
import Template from './templates/source-viewer.hbs';
import IssueLocationTemplate from './templates/source-viewer-issue-location.hbs';
+import './partials';
var HIGHLIGHTED_ROW_CLASS = 'source-line-highlighted';
diff --git a/server/sonar-web/src/main/js/components/source-viewer/partials.js b/server/sonar-web/src/main/js/components/source-viewer/partials.js
new file mode 100644
index 00000000000..83597498a67
--- /dev/null
+++ b/server/sonar-web/src/main/js/components/source-viewer/partials.js
@@ -0,0 +1,16 @@
+import Handlebars from 'hbsfy/runtime';
+import AllMeasuresPartial from './templates/measures/_source-viewer-measures-all.hbs';
+import CoveragePartial from './templates/measures/_source-viewer-measures-coverage.hbs';
+import DuplicationsPartial from './templates/measures/_source-viewer-measures-duplications.hbs';
+import IssuesPartial from './templates/measures/_source-viewer-measures-issues.hbs';
+import LinesPartial from './templates/measures/_source-viewer-measures-lines.hbs';
+import TestCasesPartial from './templates/measures/_source-viewer-measures-test-cases.hbs';
+import TestsPartial from './templates/measures/_source-viewer-measures-tests.hbs';
+
+Handlebars.registerPartial('_source-viewer-measures-all', AllMeasuresPartial);
+Handlebars.registerPartial('_source-viewer-measures-coverage', CoveragePartial);
+Handlebars.registerPartial('_source-viewer-measures-duplications', DuplicationsPartial);
+Handlebars.registerPartial('_source-viewer-measures-issues', IssuesPartial);
+Handlebars.registerPartial('_source-viewer-measures-lines', LinesPartial);
+Handlebars.registerPartial('_source-viewer-measures-test-cases', TestCasesPartial);
+Handlebars.registerPartial('_source-viewer-measures-tests', TestsPartial);