diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2016-12-08 10:27:46 +0100 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2016-12-08 10:27:46 +0100 |
commit | e32724b8cb16b512a9564a9d67c5fca0e8ba66b2 (patch) | |
tree | 47872bc8ca37ca6dfbc4b638c54d846d6227bc6d /server/sonar-web/src/main/js | |
parent | 6d5fd08094fc87c6678f7f3f6420846f0db4abf6 (diff) | |
download | sonarqube-e32724b8cb16b512a9564a9d67c5fca0e8ba66b2.tar.gz sonarqube-e32724b8cb16b512a9564a9d67c5fca0e8ba66b2.zip |
redirect from /issues/search to /issues
Diffstat (limited to 'server/sonar-web/src/main/js')
-rw-r--r-- | server/sonar-web/src/main/js/apps/issues/routes.js | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/js/apps/issues/routes.js b/server/sonar-web/src/main/js/apps/issues/routes.js index a05f0ec92d2..a7fbd5d5c28 100644 --- a/server/sonar-web/src/main/js/apps/issues/routes.js +++ b/server/sonar-web/src/main/js/apps/issues/routes.js @@ -18,9 +18,14 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; -import { IndexRoute } from 'react-router'; +import { IndexRoute, Route } from 'react-router'; import IssuesAppContainer from './components/IssuesAppContainer'; -export default ( - <IndexRoute component={IssuesAppContainer}/> -); +const onSearchEnter = (nextState, replace) => { + replace('/issues' + window.location.hash); +}; + +export default [ + <IndexRoute key="index" component={IssuesAppContainer}/>, + <Route key="search" path="search" onEnter={onSearchEnter}/> +]; |