Add SDN-R odlux performance

A UI displaying performance monitoring data

Change-Id: I2a9c28549aee1bcac366354c343a63f884bf09e0
Issue-ID: SDNC-585
Signed-off-by: Herbert Eiselt <herbert.eiselt@highstreet-technologies.com>
diff --git a/sdnr/wt/odlux/apps/helpApp/pom.xml b/sdnr/wt/odlux/apps/helpApp/pom.xml
index 3e1d4e0..9115d89 100644
--- a/sdnr/wt/odlux/apps/helpApp/pom.xml
+++ b/sdnr/wt/odlux/apps/helpApp/pom.xml
@@ -1,11 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>odlparent</artifactId>
         <version>1.2.2-SNAPSHOT</version>
-        <relativePath/>
+        <relativePath />
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
@@ -125,7 +127,7 @@
                 <configuration>
                     <instructions>
                         <Import-Package>org.onap.ccsdk.features.sdnr.wt.odlux.model.*,com.opensymphony.*</Import-Package>
-                        <Private-Package/>
+                        <Private-Package></Private-Package>
                     </instructions>
                 </configuration>
             </plugin>
diff --git a/sdnr/wt/odlux/apps/helpApp/src/components/subMenuEntry.tsx b/sdnr/wt/odlux/apps/helpApp/src/components/subMenuEntry.tsx
index 72bb39e..2328b12 100644
--- a/sdnr/wt/odlux/apps/helpApp/src/components/subMenuEntry.tsx
+++ b/sdnr/wt/odlux/apps/helpApp/src/components/subMenuEntry.tsx
@@ -13,23 +13,23 @@
 const TocTree = TreeView as any as TreeViewCtorType<TocTreeNode>;
 
 const mapProps = (state: IApplicationStoreState) => ({
-  helpToc: state.helpApp.toc,
-  helpBusy: state.helpApp.busy
+  helpToc: state.help.toc,
+  helpBusy: state.help.busy
 });
 
 const mapDisp = (dispatcher: IDispatcher) => ({
-  requestDocument: (node: TocTreeNode) => dispatcher.dispatch(new NavigateToApplication("helpApp", node.uri))
+  requestDocument: (node: TocTreeNode) => dispatcher.dispatch(new NavigateToApplication("help", node.uri))
 });
 
 const SubMenuEntryComponent: React.SFC<Connect<typeof mapProps, typeof mapDisp>> = (props) => {
   return props.helpToc
   ? (
-    <TocTree items={ props.helpToc } contentProperty={ "label" } childrenProperty={ "nodes" } depthOffset={ 1 } 
+    <TocTree items={ props.helpToc } contentProperty={ "label" } childrenProperty={ "nodes" } depthOffset={ 1 }
         useFolderIcons={ false } enableSearchBar={ false } onItemClick={ props.requestDocument } />
     )
-  : ( 
-    <ListItemText >Loading ...</ListItemText>   
-  )  
+  : (
+    <ListItemText >Loading ...</ListItemText>
+  )
 };
 
 export const SubMenuEntry = connect(mapProps, mapDisp)(SubMenuEntryComponent);
diff --git a/sdnr/wt/odlux/apps/helpApp/src/handlers/helpAppRootHandler.ts b/sdnr/wt/odlux/apps/helpApp/src/handlers/helpAppRootHandler.ts
index efdc6e8..b9ddc50 100644
--- a/sdnr/wt/odlux/apps/helpApp/src/handlers/helpAppRootHandler.ts
+++ b/sdnr/wt/odlux/apps/helpApp/src/handlers/helpAppRootHandler.ts
@@ -14,14 +14,14 @@
 
 declare module '../../../../framework/src/store/applicationStore' {
   interface IApplicationStoreState {
-    helpApp: IHelpAppStoreState
+    help: IHelpAppStoreState
   }
 }
 
 const helpAppStoreStateInit: IHelpAppStoreState = {
   busy: false,
   toc: undefined,
-  content: undefined, 
+  content: undefined,
   currentPath: undefined
 };
 
diff --git a/sdnr/wt/odlux/apps/helpApp/src/index.html b/sdnr/wt/odlux/apps/helpApp/src/index.html
index 2d20410..6865db0 100644
--- a/sdnr/wt/odlux/apps/helpApp/src/index.html
+++ b/sdnr/wt/odlux/apps/helpApp/src/index.html
@@ -17,7 +17,7 @@
     // run the application
     require(["app", "helpApp"], function (app, helpApp) {
       helpApp.register();
-      app("./app.tsx")
+       app("./app.tsx").runApplication();
     });
   </script>
 </body>
diff --git a/sdnr/wt/odlux/apps/helpApp/src/plugin.tsx b/sdnr/wt/odlux/apps/helpApp/src/plugin.tsx
index d1cf808..f871ab9 100644
--- a/sdnr/wt/odlux/apps/helpApp/src/plugin.tsx
+++ b/sdnr/wt/odlux/apps/helpApp/src/plugin.tsx
@@ -1,6 +1,6 @@
 // app configuration and main entry point for the app
 
-import * as React from "react"; 
+import * as React from "react";
 import { withRouter, RouteComponentProps, Route, Switch, Redirect } from 'react-router-dom';
 
 import { faFirstAid } from '@fortawesome/free-solid-svg-icons';  // select app icon
@@ -18,7 +18,7 @@
 import '!style-loader!css-loader!highlight.js/styles/default.css';
 
 const mapProps = (state: IApplicationStoreState) => ({
-  
+
 });
 
 const mapDisp = (dispatcher: IDispatcher) => ({
@@ -31,7 +31,7 @@
 
 const HelpApplicationRouteAdapter = connect(mapProps, mapDisp)((props: RouteComponentProps<{ '0'?: string }> & Connect<typeof mapProps, typeof mapDisp>) => {
   if (currentHelpPath !== props.match.params["0"]) {
-    // route parameter has changed 
+    // route parameter has changed
     currentHelpPath = props.match.params["0"] || undefined;
     // Hint: This timeout is need, since it is not recommended to change the state while rendering is in progress !
     window.setTimeout(() => {
@@ -54,7 +54,7 @@
 
 export async function register() {
   const applicationApi = applicationManager.registerApplication({
-    name: "helpApp",
+    name: "help",
     icon: faFirstAid,
     rootComponent: App,
     rootActionHandler: helpAppRootHandler,
@@ -63,7 +63,7 @@
   });
 
   // start the initial toc request after the application store is initalized
-  const store = await applicationApi.applicationStoreInitialized; 
+  const store = await applicationApi.applicationStoreInitialized;
   store.dispatch(requestTocAsyncAction);
 
 }
\ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/helpApp/src/services/helpService.ts b/sdnr/wt/odlux/apps/helpApp/src/services/helpService.ts
index 480cdd0..800e0b4 100644
--- a/sdnr/wt/odlux/apps/helpApp/src/services/helpService.ts
+++ b/sdnr/wt/odlux/apps/helpApp/src/services/helpService.ts
@@ -9,7 +9,7 @@
   public async getDocument(path: string): Promise<string | null> {
     // check if the result is allready in the cache
     if (this.documents[path]) return Promise.resolve(this.documents[path]);
-    
+
     // request the document
     const result = await requestRest<string>(`/help/${ path }`.replace(/\/{2,}/i, '/'));
     if (result) {
@@ -23,7 +23,7 @@
     if (this.tocNodeCollection) return Promise.resolve(this.tocNodeCollection);
 
     // request the table of contents
-    const result = await requestRest<TocNodeCollection>('/help/?meta');
+    const result = await requestRest<TocNodeCollection>('/help/?meta', undefined, false);
     if (result !== false) {
       const mapNodesCollection = (col: TocNodeCollection): TocTreeNode[] => {
         return Object.keys(col).reduce <TocTreeNode[]>((acc, key) => {
diff --git a/sdnr/wt/odlux/apps/helpApp/src/views/helpApplication.tsx b/sdnr/wt/odlux/apps/helpApp/src/views/helpApplication.tsx
index dedb936..54f7084 100644
--- a/sdnr/wt/odlux/apps/helpApp/src/views/helpApplication.tsx
+++ b/sdnr/wt/odlux/apps/helpApp/src/views/helpApplication.tsx
@@ -11,8 +11,8 @@
 import '!style-loader!css-loader!github-markdown-css/github-markdown.css'
 
 const mapProps = (state: IApplicationStoreState) => ({
-  content: state.helpApp.content,
-  currentPath: state.helpApp.currentPath
+  content: state.help.content,
+  currentPath: state.help.currentPath
 });
 
 type HelpApplicationComponentProps = Connect<typeof mapProps>;
@@ -22,27 +22,27 @@
   /**
    * Initializes a new instance.
    */
-  constructor(props: HelpApplicationComponentProps) {
+  constructor (props: HelpApplicationComponentProps) {
     super(props);
-    
+
     this.renderer = new marked.Renderer();
 
     this.renderer.link = (href: string, title: string, text: string) => {
       // check if href is rel or abs
       const absUrlMatch = href.trim().match(/^https?:\/\//i);
-      return `<a href="${ absUrlMatch ? href : resolvePath('#/helpApp/', this.props.currentPath || '/', href) }" title="${ title }" >${ text }</a>`
+      return `<a href="${absUrlMatch ? href : resolvePath('#/help/', this.props.currentPath || '/', href)}" title="${title}" >${text}</a>`
     };
 
     this.renderer.image = (href: string, title: string) => {
-      return `<img src="${ resolvePath('/help/', this.props.currentPath || '/',  href) }" alt="${ title }" />`
+      return `<img src="${resolvePath('/help/', this.props.currentPath || '/', href)}" alt="${title}" />`
     };
 
   }
 
   render(): JSX.Element {
     return this.props.content ? (
-      <Markdown text={ this.props.content } markedOptions={ { renderer: this.renderer } } className="markdown-body" 
-         style={{ maxWidth: "960px", margin: "1.5em auto" }} />
+      <Markdown text={this.props.content} markedOptions={{ renderer: this.renderer }} className="markdown-body"
+        style={{ maxWidth: "960px", margin: "1.5em auto" }} />
     ) : (<h2>Loading ...</h2>)
   }
 
diff --git a/sdnr/wt/odlux/apps/helpApp/webpack.config.js b/sdnr/wt/odlux/apps/helpApp/webpack.config.js
index fdae7d9..f9448a3 100644
--- a/sdnr/wt/odlux/apps/helpApp/webpack.config.js
+++ b/sdnr/wt/odlux/apps/helpApp/webpack.config.js
@@ -143,8 +143,26 @@
         colors: true
       },
       proxy: {
-        "/help": {
-          target: "http://localhost:8181",
+        "/oauth2/": {
+          target: "http://localhost:3000",
+          secure: false
+        },
+        "/database/": {
+          target: "http://localhost:3000",
+          secure: false
+        },
+        "/restconf/": {
+          target: "http://localhost:3000",
+          secure: false
+        },
+        "/help/": {
+          target: "http://localhost:3000",
+          secure: false
+        },
+        "/websocket/": {
+          target: "http://localhost:3000",
+          ws: true,
+          changeOrigin: true,
           secure: false
         }
       }