Create login page and add wiki/contact item
Create the login page for Clamp Ui; Add wiki/contact page which chould
be selected from the menu bar.
Issue-ID: CLAMP-416, CLAMP-417
Change-Id: Idddafd9c59a1e4d2897e962c831060e55083025c
Signed-off-by: xuegao <xg353y@intl.att.com>
diff --git a/ui-react/src/index.js b/ui-react/src/index.js
index b2fc3b0..8236eb1 100644
--- a/ui-react/src/index.js
+++ b/ui-react/src/index.js
@@ -22,10 +22,28 @@
*/
import React from 'react';
import ReactDOM from 'react-dom';
+
+import { Route, Switch, BrowserRouter } from 'react-router-dom'
import OnapClamp from './OnapClamp';
+import NotFound from './components/app/NotFound';
+import LoginPage from './components/app/login/LoginPage';
+import LoginFailedPage from './components/app/login/LoginFailedPage';
+import BasicAuthLogin from './components/app/login/BasicAuthLogin';
+import LoginRoute from './components/route/LoginRoute';
-ReactDOM.render(
- <OnapClamp/>,
- document.getElementById('root')
+const routing = (
+ <BrowserRouter>
+ <div>
+ <Switch>
+ <LoginRoute exact path="/" component={OnapClamp} />
+ <Route path="/basicAuthLogin" component={BasicAuthLogin} />
+ <Route path="/login" component={LoginPage} />
+ <Route path="/loginFailed" component={LoginFailedPage} />
+ <Route component={NotFound} />
+ </Switch>
+ </div>
+ </BrowserRouter>
)
+
+ReactDOM.render(routing, document.getElementById('root'))