Use history API
Change-Id: Ieb16218cf6d24fd00e890fd353218918bd5fe782
This commit is contained in:
parent
b714cda789
commit
aa1ba61969
|
@ -1,7 +1,7 @@
|
|||
[app]
|
||||
# keystone_url = http://192.0.2.1:5000/v2.0
|
||||
# validations_url = http://192.0.2.1:8585/v1
|
||||
# tripleo_api_url = http://192.0.2.1:5001/v1
|
||||
# tripleo_api_url = http://192.0.2.1:8585/v1
|
||||
# validations_url = http://192.0.2.1:5001/v1
|
||||
|
||||
[service]
|
||||
# debug = False
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>RDO Manager</title>
|
||||
<link rel="stylesheet" href="css/base.css" />
|
||||
<link rel="stylesheet" href="/css/base.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="react-app-index"></div>
|
||||
<script src="js/rdo_director_ui_config.js"></script>
|
||||
<script src="js/rdo_director_ui.js"></script>
|
||||
<script src="/js/rdo_director_ui_config.js"></script>
|
||||
<script src="/js/rdo_director_ui.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -2,6 +2,7 @@ var fs = require('fs');
|
|||
var gulp = require('gulp');
|
||||
|
||||
var browserSync = require('browser-sync');
|
||||
var historyApiFallback = require('connect-history-api-fallback');
|
||||
var ini = require('ini');
|
||||
var less = require('gulp-less');
|
||||
// var rename = require('gulp-rename');
|
||||
|
@ -21,7 +22,10 @@ gulp.task('webpack-app', ['webpack-tempstorage-worker'], function() {
|
|||
gulp.task('serve', ['config-create', 'webpack-app', 'less', 'fonts', 'images'], function(){
|
||||
browserSync.init({
|
||||
open: false,
|
||||
server: './dist'
|
||||
server: {
|
||||
baseDir: './dist',
|
||||
middleware: [ historyApiFallback() ]
|
||||
}
|
||||
});
|
||||
|
||||
gulp.watch('src/less/**/*.less', ['less']);
|
||||
|
|
|
@ -23,7 +23,8 @@
|
|||
"patternfly": "~2.5.0",
|
||||
"formatjs": "^0.1.1",
|
||||
"keymirror": "~0.1.1",
|
||||
"react-modal": "~0.6.1"
|
||||
"react-modal": "~0.6.1",
|
||||
"connect-history-api-fallback": "~1.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"gulp": "~3.9.0",
|
||||
|
|
|
@ -4,6 +4,7 @@ import React from 'react';
|
|||
import ReactDOM from 'react-dom';
|
||||
import { IntlProvider } from 'react-intl';
|
||||
import { Router, Route, IndexRoute, Redirect } from 'react-router';
|
||||
import createBrowserHistory from 'history/lib/createBrowserHistory';
|
||||
|
||||
import App from './components/App';
|
||||
import AuthenticatedContent from './components/AuthenticatedContent';
|
||||
|
@ -83,6 +84,6 @@ TempStorage.initialized.then(() => {
|
|||
|
||||
ReactDOM.render(
|
||||
<IntlProvider locale="en">
|
||||
<Router>{routes}</Router>
|
||||
<Router history={createBrowserHistory()}>{routes}</Router>
|
||||
</IntlProvider>,
|
||||
document.getElementById('react-app-index'));
|
||||
|
|
Loading…
Reference in New Issue