diff options
author | Stas Vilchik <stas.vilchik@sonarsource.com> | 2017-10-16 11:25:28 +0200 |
---|---|---|
committer | Stas Vilchik <stas.vilchik@sonarsource.com> | 2017-10-17 11:32:58 +0200 |
commit | ea05fdeff86b320bba6178d6f074f8d146692fcb (patch) | |
tree | e03cfec7500129c5e2458b1ea25f634596ca9d8b | |
parent | 87f55940473777bd4080595a8369a7cf958745c4 (diff) | |
download | sonarqube-ea05fdeff86b320bba6178d6f074f8d146692fcb.tar.gz sonarqube-ea05fdeff86b320bba6178d6f074f8d146692fcb.zip |
SONAR-9647 Issue box is not displayed for not file level issues
-rw-r--r-- | server/sonar-web/src/main/js/components/SourceViewer/SourceViewerBase.js | 10 | ||||
-rw-r--r-- | server/sonar-web/src/main/less/components/source.less | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerBase.js b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerBase.js index 508878f6d89..2cfee3e3c05 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerBase.js +++ b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerBase.js @@ -293,7 +293,9 @@ export default class SourceViewerBase extends React.PureComponent { const onResolve = component => { this.props.onReceiveComponent(component); - this.loadSources().then( + const sourcesRequest = + component.q === 'FIL' || component.q === 'UTS' ? this.loadSources() : Promise.resolve([]); + sourcesRequest.then( sources => loadIssues(component, sources), response => onFailLoadSources(response, component) ); @@ -331,7 +333,11 @@ export default class SourceViewerBase extends React.PureComponent { const firstSourceLine = this.state.sources[0]; const lastSourceLine = this.state.sources[this.state.sources.length - 1]; this.props - .loadIssues(this.props.component, firstSourceLine.line, lastSourceLine.line) + .loadIssues( + this.props.component, + firstSourceLine && firstSourceLine.line, + lastSourceLine && lastSourceLine.line + ) .then(issues => { if (this.mounted) { this.setState({ diff --git a/server/sonar-web/src/main/less/components/source.less b/server/sonar-web/src/main/less/components/source.less index ffee5c07c43..cceccae581e 100644 --- a/server/sonar-web/src/main/less/components/source.less +++ b/server/sonar-web/src/main/less/components/source.less @@ -87,7 +87,7 @@ } } -.source-line-last .source-line-code-inner { +.source-line-last .source-line-code { padding-bottom: 80px; } |