|
|
@@ -6,7 +6,7 @@ import {Query} from "react-apollo";
|
|
|
import moment from 'moment';
|
|
|
import 'moment/locale/zh-cn';
|
|
|
|
|
|
-import CloudFuction from '../cloudFunction/CloudFunction';
|
|
|
+import CloudFunction from '../cloudFunction/CloudFunction';
|
|
|
import MonitorNotify from '../monitorNotify/MonitorNotify';
|
|
|
import DataAnalysis from '../dataAnalysis/DataAnalysis';
|
|
|
import DataStorage from '../dataStorage/DataStorage';
|
|
|
@@ -119,7 +119,6 @@ class App extends Component {
|
|
|
return (
|
|
|
<Router>
|
|
|
<Layout style={{minHeight: '100vh'}}>
|
|
|
-
|
|
|
<Header className="header" style={{position: 'fixed', zIndex: 1, width: '100%'}}>
|
|
|
<div className="logo-wrapper">
|
|
|
<div className='logo'/>
|
|
|
@@ -168,112 +167,109 @@ class App extends Component {
|
|
|
{/*</div>*/}
|
|
|
</Header>
|
|
|
|
|
|
- <Layout>
|
|
|
- <Sider
|
|
|
- width={200}
|
|
|
- style={{background: '#fff', marginTop: '64px', zIndex: '0'}}
|
|
|
- collapsible
|
|
|
- collapsed={this.state.collapsed}
|
|
|
- onCollapse={this.onCollapse}
|
|
|
+ <Sider
|
|
|
+ width={200}
|
|
|
+ style={{background: '#fff', marginTop: '64px', zIndex: '0'}}
|
|
|
+ collapsible
|
|
|
+ collapsed={this.state.collapsed}
|
|
|
+ onCollapse={this.onCollapse}
|
|
|
+ >
|
|
|
+ <Menu
|
|
|
+ theme="dark"
|
|
|
+ mode="inline"
|
|
|
+ inlineCollapsed={this.state.inlineCollapsed}
|
|
|
+ defaultSelectedKeys={['e-commerce']}
|
|
|
+ defaultOpenKeys={['trial-case']}
|
|
|
+ // openKeys={['cloud-function']}
|
|
|
+ onClick={(e) => this.switchMenu('sideBar', e)}
|
|
|
+ selectedKeys={[this.state.sideBar]}
|
|
|
+ style={{
|
|
|
+ borderRight: 0,
|
|
|
+ overflow: 'auto',
|
|
|
+ height: '100vh',
|
|
|
+ left: '0',
|
|
|
+ width: '200px',
|
|
|
+ position: 'fixed'
|
|
|
+ }}
|
|
|
>
|
|
|
- <Menu
|
|
|
- theme="dark"
|
|
|
- mode="inline"
|
|
|
- inlineCollapsed={this.state.inlineCollapsed}
|
|
|
- defaultSelectedKeys={['e-commerce']}
|
|
|
- defaultOpenKeys={['trial-case']}
|
|
|
- // openKeys={['cloud-function']}
|
|
|
- onClick={(e) => this.switchMenu('sideBar', e)}
|
|
|
- selectedKeys={[this.state.sideBar]}
|
|
|
- style={{
|
|
|
- borderRight: 0,
|
|
|
- overflow: 'auto',
|
|
|
- height: '100vh',
|
|
|
- left: '0',
|
|
|
- width: '200px',
|
|
|
- position: 'fixed'
|
|
|
- }}
|
|
|
- >
|
|
|
- <SubMenu key="trial-case" title={<span><Icon type="appstore" theme="twoTone"/><span>Trial Case</span></span>}>
|
|
|
- <Menu.Item key="e-commerce">e-commerce</Menu.Item>
|
|
|
- <Menu.Item key="keep accounts">keep accounts</Menu.Item>
|
|
|
- <Menu.Item key="appointment">appointment</Menu.Item>
|
|
|
- </SubMenu>
|
|
|
+ <SubMenu key="trial-case" title={<span><Icon type="appstore" theme="twoTone"/><span>Trial Case</span></span>}>
|
|
|
+ <Menu.Item key="e-commerce">e-commerce</Menu.Item>
|
|
|
+ <Menu.Item key="keep accounts">keep accounts</Menu.Item>
|
|
|
+ <Menu.Item key="appointment">appointment</Menu.Item>
|
|
|
+ </SubMenu>
|
|
|
|
|
|
- {(() => {
|
|
|
- switch (this.state.menuLevel1) {
|
|
|
- case 'cloud-function':
|
|
|
- return (
|
|
|
- <SubMenu
|
|
|
- key="cloud-function"
|
|
|
- title={<span><Icon type="cloud"
|
|
|
- theme="twoTone"/><span>Cloud Function</span></span>}>
|
|
|
- <Menu.Item key="wechat-service">wechat-service</Menu.Item>
|
|
|
- <Menu.Item key="graphql-service">graphql-service</Menu.Item>
|
|
|
- <Menu.Item
|
|
|
- key="quantization-service">quantization-service</Menu.Item>
|
|
|
- </SubMenu>
|
|
|
- );
|
|
|
- case 'data-storage':
|
|
|
- return (
|
|
|
- <SubMenu
|
|
|
- key="data-storage"
|
|
|
- title={<span><Icon type="database"
|
|
|
- theme="twoTone"/><span>Data Storage</span></span>}>
|
|
|
- <Menu.Item key="snbl-mongo">snbl-mongo</Menu.Item>
|
|
|
- </SubMenu>
|
|
|
- );
|
|
|
- case 'data-analysis':
|
|
|
- return (
|
|
|
- <SubMenu
|
|
|
- key="data-analysis"
|
|
|
- title={<span><Icon type="fund"
|
|
|
- theme="twoTone"/><span>data Analysis</span></span>}>
|
|
|
- <Menu.Item key="metabase">metabase</Menu.Item>
|
|
|
- </SubMenu>
|
|
|
- );
|
|
|
- case 'monitor-notification':
|
|
|
- return (
|
|
|
- <SubMenu
|
|
|
- key="monitor-notification"
|
|
|
- title={<span><Icon type="alert" theme="twoTone"/><span>Monitor Notification</span></span>}>
|
|
|
- <Menu.Item key="monitor">monitor</Menu.Item>
|
|
|
- <Menu.Item key="graphql-events">graphql-events</Menu.Item>
|
|
|
- <Menu.Item key="stock-signal">stock-signal</Menu.Item>
|
|
|
- </SubMenu>
|
|
|
- );
|
|
|
- default:
|
|
|
- return (
|
|
|
- <SubMenu
|
|
|
- key="cloud-function"
|
|
|
- title={<span><Icon type="cloud"
|
|
|
- theme="twoTone"/><span>Cloud Function</span></span>}>
|
|
|
- <Menu.Item key="wechat-service">wechat-service</Menu.Item>
|
|
|
- <Menu.Item key="graphql-service">graphql-service</Menu.Item>
|
|
|
- <Menu.Item
|
|
|
- key="quantization-service">quantization-service</Menu.Item>
|
|
|
- </SubMenu>
|
|
|
- );
|
|
|
- }
|
|
|
- })()}
|
|
|
- <SubMenu key="my-create"
|
|
|
- title={<span><Icon type="user"
|
|
|
- theme="outlined"/><span>My Create</span></span>}>
|
|
|
- <Menu.Item key="8">option9</Menu.Item>
|
|
|
- </SubMenu>
|
|
|
- </Menu>
|
|
|
- </Sider>
|
|
|
-
|
|
|
- <Layout style={{marginTop: '64px', zIndex: '0'}}>
|
|
|
- <Switch>
|
|
|
- <Route path="/" exact component={CloudFuction}/>
|
|
|
- <Route path="/data-storage/" component={DataStorage}/>
|
|
|
- <Route path="/data-analysis/" component={DataAnalysis}/>
|
|
|
- <Route path="/monitor-notification/" component={MonitorNotify}/>
|
|
|
- <Redirect path="*" to="/" />
|
|
|
- </Switch>
|
|
|
- </Layout>
|
|
|
+ {(() => {
|
|
|
+ switch (this.state.menuLevel1) {
|
|
|
+ case 'cloud-function':
|
|
|
+ return (
|
|
|
+ <SubMenu
|
|
|
+ key="cloud-function"
|
|
|
+ title={<span><Icon type="cloud"
|
|
|
+ theme="twoTone"/><span>Cloud Function</span></span>}>
|
|
|
+ <Menu.Item key="wechat-service">wechat-service</Menu.Item>
|
|
|
+ <Menu.Item key="graphql-service">graphql-service</Menu.Item>
|
|
|
+ <Menu.Item
|
|
|
+ key="quantization-service">quantization-service</Menu.Item>
|
|
|
+ </SubMenu>
|
|
|
+ );
|
|
|
+ case 'data-storage':
|
|
|
+ return (
|
|
|
+ <SubMenu
|
|
|
+ key="data-storage"
|
|
|
+ title={<span><Icon type="database"
|
|
|
+ theme="twoTone"/><span>Data Storage</span></span>}>
|
|
|
+ <Menu.Item key="snbl-mongo">snbl-mongo</Menu.Item>
|
|
|
+ </SubMenu>
|
|
|
+ );
|
|
|
+ case 'data-analysis':
|
|
|
+ return (
|
|
|
+ <SubMenu
|
|
|
+ key="data-analysis"
|
|
|
+ title={<span><Icon type="fund"
|
|
|
+ theme="twoTone"/><span>data Analysis</span></span>}>
|
|
|
+ <Menu.Item key="metabase">metabase</Menu.Item>
|
|
|
+ </SubMenu>
|
|
|
+ );
|
|
|
+ case 'monitor-notification':
|
|
|
+ return (
|
|
|
+ <SubMenu
|
|
|
+ key="monitor-notification"
|
|
|
+ title={<span><Icon type="alert" theme="twoTone"/><span>Monitor Notification</span></span>}>
|
|
|
+ <Menu.Item key="monitor">monitor</Menu.Item>
|
|
|
+ <Menu.Item key="graphql-events">graphql-events</Menu.Item>
|
|
|
+ <Menu.Item key="stock-signal">stock-signal</Menu.Item>
|
|
|
+ </SubMenu>
|
|
|
+ );
|
|
|
+ default:
|
|
|
+ return (
|
|
|
+ <SubMenu
|
|
|
+ key="cloud-function"
|
|
|
+ title={<span><Icon type="cloud"
|
|
|
+ theme="twoTone"/><span>Cloud Function</span></span>}>
|
|
|
+ <Menu.Item key="wechat-service">wechat-service</Menu.Item>
|
|
|
+ <Menu.Item key="graphql-service">graphql-service</Menu.Item>
|
|
|
+ <Menu.Item
|
|
|
+ key="quantization-service">quantization-service</Menu.Item>
|
|
|
+ </SubMenu>
|
|
|
+ );
|
|
|
+ }
|
|
|
+ })()}
|
|
|
+ <SubMenu key="my-create"
|
|
|
+ title={<span><Icon type="user"
|
|
|
+ theme="outlined"/><span>My Create</span></span>}>
|
|
|
+ <Menu.Item key="8">option9</Menu.Item>
|
|
|
+ </SubMenu>
|
|
|
+ </Menu>
|
|
|
+ </Sider>
|
|
|
|
|
|
+ <Layout style={{marginTop: '64px', zIndex: '0'}}>
|
|
|
+ <Switch>
|
|
|
+ <Route path="/" exact component={CloudFunction}/>
|
|
|
+ <Route path="/data-storage/" component={DataStorage}/>
|
|
|
+ <Route path="/data-analysis/" component={DataAnalysis}/>
|
|
|
+ <Route path="/monitor-notification/" component={MonitorNotify}/>
|
|
|
+ <Redirect path="*" to="/" />
|
|
|
+ </Switch>
|
|
|
</Layout>
|
|
|
</Layout>
|
|
|
</Router>
|