diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2015-10-22 10:18:58 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2015-10-22 10:18:58 +0200 |
commit | c37f61652aac74a307a61dd63bd8a9873edafe9b (patch) | |
tree | a185e5930a8c0a64f3d0964ee040330cc279913b /server/sonar-web/src/main/js/components | |
parent | ec68a62ae54508acc9686276cbf98a0bcf9c46da (diff) | |
parent | 0a17a11e7e08f39558d11cd3cc311cd44fbe8900 (diff) | |
download | sonarqube-c37f61652aac74a307a61dd63bd8a9873edafe9b.tar.gz sonarqube-c37f61652aac74a307a61dd63bd8a9873edafe9b.zip |
Merge remote-tracking branch 'origin/branch-5.2'
Diffstat (limited to 'server/sonar-web/src/main/js/components')
5 files changed, 13 insertions, 14 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 2a2fcf67525..c0e633e2fca 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 @@ -399,7 +399,7 @@ export default Marionette.LayoutView.extend({ row = _.findWhere(this.model.get('source'), { line: line }), url = baseUrl + '/api/tests/list', options = { - sourceFileUuid: this.model.id, + sourceFileId: this.model.id, sourceFileLineNumber: line, ps: 1000 }; diff --git a/server/sonar-web/src/main/js/components/source-viewer/measures-overlay.js b/server/sonar-web/src/main/js/components/source-viewer/measures-overlay.js index 9b071f6e1f9..723265766ad 100644 --- a/server/sonar-web/src/main/js/components/source-viewer/measures-overlay.js +++ b/server/sonar-web/src/main/js/components/source-viewer/measures-overlay.js @@ -147,7 +147,7 @@ export default ModalView.extend({ requestTests: function () { var that = this, url = baseUrl + '/api/tests/list', - options = { testFileUuid: this.model.id }; + options = { testFileId: this.model.id }; return $.get(url, options).done(function (data) { that.model.set({ tests: data.tests }); that.testSorting = 'status'; @@ -201,13 +201,13 @@ export default ModalView.extend({ showTest: function (e) { var that = this, - testUuid = $(e.currentTarget).data('id'), + testId = $(e.currentTarget).data('id'), url = baseUrl + '/api/tests/covered_files', - options = { testUuid: testUuid }; + options = { testId: testId }; this.testsScroll = $(e.currentTarget).scrollParent().scrollTop(); return $.get(url, options).done(function (data) { that.coveredFiles = data.files; - that.selectedTest = _.findWhere(that.model.get('tests'), { testUuid: testUuid }); + that.selectedTest = _.findWhere(that.model.get('tests'), { id: testId }); that.render(); }); }, diff --git a/server/sonar-web/src/main/js/components/source-viewer/popups/coverage-popup.js b/server/sonar-web/src/main/js/components/source-viewer/popups/coverage-popup.js index 1f712bdf4be..f731b6c0ab4 100644 --- a/server/sonar-web/src/main/js/components/source-viewer/popups/coverage-popup.js +++ b/server/sonar-web/src/main/js/components/source-viewer/popups/coverage-popup.js @@ -8,7 +8,7 @@ export default Popup.extend({ template: Template, events: { - 'click a[data-uuid]': 'goToFile' + 'click a[data-id]': 'goToFile' }, onRender: function () { @@ -18,18 +18,18 @@ export default Popup.extend({ goToFile: function (e) { e.stopPropagation(); - var uuid = $(e.currentTarget).data('uuid'); - Workspace.openComponent({ uuid: uuid }); + var id = $(e.currentTarget).data('id'); + Workspace.openComponent({ uuid: id }); }, serializeData: function () { var row = this.options.row || {}, - tests = _.groupBy(this.collection.toJSON(), 'fileUuid'), + tests = _.groupBy(this.collection.toJSON(), 'fileId'), testFiles = _.map(tests, function (testSet) { var test = testSet[0]; return { file: { - uuid: test.fileUuid, + id: test.fileId, longName: test.fileLongName }, tests: testSet diff --git a/server/sonar-web/src/main/js/components/source-viewer/templates/measures/_source-viewer-measures-test-cases.hbs b/server/sonar-web/src/main/js/components/source-viewer/templates/measures/_source-viewer-measures-test-cases.hbs index 26bf9818cc1..6b0d5a110a6 100644 --- a/server/sonar-web/src/main/js/components/source-viewer/templates/measures/_source-viewer-measures-test-cases.hbs +++ b/server/sonar-web/src/main/js/components/source-viewer/templates/measures/_source-viewer-measures-test-cases.hbs @@ -28,7 +28,7 @@ {{#ifTestData this}} <td class="source-viewer-test-status note">{{testStatusIcon status}}</td> <td class="source-viewer-test-duration note">{{durationInMs}}ms</td> - <td class="source-viewer-test-name"><a class="js-show-test" data-id="{{testUuid}}">{{name}}</a></td> + <td class="source-viewer-test-name"><a class="js-show-test" data-id="{{id}}">{{name}}</a></td> <td class="source-viewer-test-covered-lines note">{{coveredLines}}</td> {{else}} <td class="source-viewer-test-status note">{{testStatusIcon status}}</td> diff --git a/server/sonar-web/src/main/js/components/source-viewer/templates/source-viewer-coverage-popup.hbs b/server/sonar-web/src/main/js/components/source-viewer/templates/source-viewer-coverage-popup.hbs index 3c53b6c1867..d0ee94c797c 100644 --- a/server/sonar-web/src/main/js/components/source-viewer/templates/source-viewer-coverage-popup.hbs +++ b/server/sonar-web/src/main/js/components/source-viewer/templates/source-viewer-coverage-popup.hbs @@ -14,9 +14,8 @@ </div> {{#each testFiles}} - {{log this}} <div class="bubble-popup-section"> - <a class="component-viewer-popup-test-file link-action" data-uuid="{{file.uuid}}" title="{{file.longName}}"> + <a class="component-viewer-popup-test-file link-action" data-id="{{file.id}}" title="{{file.longName}}"> <span>{{collapsedDirFromPath file.longName}}</span><span class="component-name-file">{{fileFromPath file.longName}}</span> </a> <ul class="bubble-popup-list"> @@ -25,7 +24,7 @@ <i class="component-viewer-popup-test-status {{testStatusIconClass status}}"></i> <span class="component-viewer-popup-test-name"> <a class="component-viewer-popup-test-file link-action" title="{{name}}" - data-uuid="{{../file.uuid}}" data-method="{{name}}"> + data-id="{{../file.id}}" data-method="{{name}}"> {{name}} </a> </span> |