diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2016-12-09 15:13:04 +0100 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2016-12-09 16:19:11 +0100 |
commit | 7dea0e7e33f3a6072b3ac9ae9984399089160b4e (patch) | |
tree | f05599c3d9e4bfd3d799b4aa8609505899511be1 /server/sonar-web/src/main/js/apps/component | |
parent | aed4140165da7195ebf82f6149603be31a3ac198 (diff) | |
download | sonarqube-7dea0e7e33f3a6072b3ac9ae9984399089160b4e.tar.gz sonarqube-7dea0e7e33f3a6072b3ac9ae9984399089160b4e.zip |
fix line permalink in source viewer
Diffstat (limited to 'server/sonar-web/src/main/js/apps/component')
-rw-r--r-- | server/sonar-web/src/main/js/apps/component/components/App.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/apps/component/components/App.js b/server/sonar-web/src/main/js/apps/component/components/App.js index 139838f7342..05058cdc793 100644 --- a/server/sonar-web/src/main/js/apps/component/components/App.js +++ b/server/sonar-web/src/main/js/apps/component/components/App.js @@ -23,6 +23,10 @@ import SourceViewer from '../../../components/source-viewer/SourceViewer'; import { getComponentNavigation } from '../../../api/nav'; export default class App extends React.Component { + static propTypes = { + location: React.PropTypes.object.isRequired + }; + state = {}; componentDidMount () { @@ -36,9 +40,11 @@ export default class App extends React.Component { return null; } + const { line } = this.props.location.query; + return ( <div className="page"> - <SourceViewer component={{ id: this.state.component.id }}/> + <SourceViewer component={{ id: this.state.component.id }} line={line}/> </div> ); } |