summaryrefslogtreecommitdiffstats
path: root/ui-react/src/index.js
diff options
context:
space:
mode:
authorxuegao <xg353y@intl.att.com>2019-07-09 11:52:20 +0200
committerxuegao <xg353y@intl.att.com>2019-07-10 11:58:56 +0200
commit7c7323d8ec54e65ac7a9a5e8c7cd8bdc755ea70a (patch)
tree7f77ec10c6f9bd3b13f6c94978477ee3323b9a41 /ui-react/src/index.js
parentc8d6130e6355a6f8f460c114ed7bac0221eb0020 (diff)
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>
Diffstat (limited to 'ui-react/src/index.js')
-rw-r--r--ui-react/src/index.js24
1 files changed, 21 insertions, 3 deletions
diff --git a/ui-react/src/index.js b/ui-react/src/index.js
index b2fc3b0f6..8236eb15c 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'))