diff --git a/build/.eslintrc.json b/build/.eslintrc.json index c7dea914e..46763b1d3 100644 --- a/build/.eslintrc.json +++ b/build/.eslintrc.json @@ -136,6 +136,7 @@ "no-confusing-arrow": "error", "no-console": "off", "no-continue": "off", + "no-debugger": "off", "no-div-regex": "error", "no-duplicate-imports": "error", "no-else-return": "off", diff --git a/build/.gitignore b/build/.gitignore index 2d439464d..66ab50665 100644 --- a/build/.gitignore +++ b/build/.gitignore @@ -1,5 +1,5 @@ # NetCreate ignored directories -/runtime +/runtime/netcreate.json # Also ignore build system directories .npmignore diff --git a/build/app/assets/htmldemos/simple/simple.html b/build/app/assets/htmldemos/simple/simple.html index d4c7bfafb..2d6ec6798 100644 --- a/build/app/assets/htmldemos/simple/simple.html +++ b/build/app/assets/htmldemos/simple/simple.html @@ -20,8 +20,13 @@

Simple HTML in an IFRAME

diff --git a/build/app/init-appshell.jsx b/build/app/init-appshell.jsx index 3ec506874..c23a0484d 100644 --- a/build/app/init-appshell.jsx +++ b/build/app/init-appshell.jsx @@ -18,28 +18,16 @@ /// REACT LIBRARIES /////////////////////////////////////////////////////////// /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const React = require('react'); - const { - Alert, - Collapse, - Navbar, - NavbarToggler, - NavbarBrand, - Nav, - NavItem, - NavLink, - UncontrolledDropdown, - DropdownToggle, - DropdownMenu, - DropdownItem - } = require('reactstrap'); - const { - Switch, - Route, - Redirect, - Link - } = require('react-router-dom'); + const { Alert, Collapse } = require('reactstrap'); + const { Navbar, NavbarToggler } = require('reactstrap'); + const { NavbarBrand, Nav, NavItem, NavLink } = require('reactstrap'); + const { UncontrolledDropdown, DropdownToggle } = require('reactstrap'); + const { DropdownMenu, DropdownItem } = require('reactstrap'); + const { Switch, Route, Redirect, Link } = require('react-router-dom'); // workaround name collision in ReactRouterNavLink with ReactStrap const RRNavLink = require('react-router-dom').NavLink; + // + const { renderRoutes } = require('react-router-config'); /** (1) ROUTED COMPONENTS ****************************************************\ @@ -60,9 +48,39 @@ const AutoCompleteDemo = require('view/autocompletedemo/AutoCompleteDemo'); const DevUnisys = require('view/dev-unisys/DevUnisys'); const DevDB = require('view/dev-db/DevDB'); + const DevReact = require('view/dev-react/DevReact'); // const Prototype = require('view/prototype/Prototype'); // const D3Test = require('view/d3test/D3Test'); + const Routes = [ + { + path: '/', + exact: true, + component: AutoCompleteDemo + }, + { + path: '/dev-unisys', + component: DevUnisys + }, + { + path: '/dev-db', + component: DevDB + }, + { + path: '/dev-react', + component: DevReact + }, + { + path: '/simple', + component: (props) => {return HTML(props)} + }, + { + path: '*', + restricted: false, + component: NoMatch + } + ]; + /** (2) ROUTED FUNCTIONS *****************************************************\ Used by render()'s to load a plain html page that is @@ -79,7 +97,7 @@ init-appshell.HTML() | iframe flex:1 0 auto, border:0 \*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ function HTML ( props ) { - SETTINGS.ForceReloadSingleApp(); + SETTINGS.ForceReloadOnNavigation(); let loc = props.location.pathname.substring(1); loc = '/htmldemos/'+loc+'/'+loc+'.html'; return ( @@ -90,7 +108,6 @@ ); } - /** (3) NO ROUTE *************************************************************\ Used by render()'s when there are no matching routes \*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ @@ -101,8 +118,6 @@ ); } - - /** APPLICATION NAVBAR + SWITCHED ROUTER VIEW ********************************\ The application shell consists of a navbar implemented with Reactstrap @@ -136,50 +151,37 @@ class AppShell extends React.Component { To add a new HTML, add the link to both the