|
@@ -1,21 +1,17 @@
|
|
|
import React, {Component} from 'react';
|
|
import React, {Component} from 'react';
|
|
|
-import GenerateJs from "../common/generateJs/GenerateJs";
|
|
|
|
|
-import {Layout, Menu, LocaleProvider } from 'antd';
|
|
|
|
|
|
|
+
|
|
|
|
|
+import {Layout, Menu } from 'antd';
|
|
|
|
|
|
|
|
import Deploy from '../common/deploy/Deploy';
|
|
import Deploy from '../common/deploy/Deploy';
|
|
|
-import Schema from '../common/schema/Schema';
|
|
|
|
|
-import Graphql from "../common/graphql/Graphql";
|
|
|
|
|
-import Notification from "../common/notification/Notification";
|
|
|
|
|
-import Metabase from "../common/metabase/Metabase";
|
|
|
|
|
|
|
+import Api from "./api/Api";
|
|
|
|
|
|
|
|
-const { SubMenu } = Menu;
|
|
|
|
|
const { Content } = Layout;
|
|
const { Content } = Layout;
|
|
|
|
|
|
|
|
class CloudFunction extends Component {
|
|
class CloudFunction extends Component {
|
|
|
constructor() {
|
|
constructor() {
|
|
|
super();
|
|
super();
|
|
|
this.state = {
|
|
this.state = {
|
|
|
- menuLevel2: "schema",
|
|
|
|
|
|
|
+ menuLevel2: "deploy",
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -36,32 +32,20 @@ class CloudFunction extends Component {
|
|
|
onClick={(e) => this.switchMenu('menuLevel2', e)}
|
|
onClick={(e) => this.switchMenu('menuLevel2', e)}
|
|
|
selectedKeys={[this.state.menuLevel2]}
|
|
selectedKeys={[this.state.menuLevel2]}
|
|
|
>
|
|
>
|
|
|
- <Menu.Item key="schema">schema</Menu.Item>
|
|
|
|
|
<Menu.Item key="deploy">deploy</Menu.Item>
|
|
<Menu.Item key="deploy">deploy</Menu.Item>
|
|
|
- <Menu.Item key="graphql">graphql</Menu.Item>
|
|
|
|
|
- <Menu.Item key="graphiql">graphiql</Menu.Item>
|
|
|
|
|
- <Menu.Item key="metabase">metabase</Menu.Item>
|
|
|
|
|
- <Menu.Item key="notification">notification</Menu.Item>
|
|
|
|
|
|
|
+ <Menu.Item key="api">API</Menu.Item>
|
|
|
</Menu>
|
|
</Menu>
|
|
|
|
|
|
|
|
<Layout style={{ padding: '24px', zIndex: '0'}}>
|
|
<Layout style={{ padding: '24px', zIndex: '0'}}>
|
|
|
<Content style={{ padding: '24px', minHeight: 280, background: '#fff',marginTop: '48px' }}>
|
|
<Content style={{ padding: '24px', minHeight: 280, background: '#fff',marginTop: '48px' }}>
|
|
|
{(() => {
|
|
{(() => {
|
|
|
switch (this.state.menuLevel2) {
|
|
switch (this.state.menuLevel2) {
|
|
|
- case 'schema':
|
|
|
|
|
- return <Schema userID={this.state.userID}/>;
|
|
|
|
|
case 'deploy':
|
|
case 'deploy':
|
|
|
return <Deploy />;
|
|
return <Deploy />;
|
|
|
- case 'graphql':
|
|
|
|
|
- return <GenerateJs />;
|
|
|
|
|
- case 'graphiql':
|
|
|
|
|
- return <Graphql />;
|
|
|
|
|
- case 'metabase':
|
|
|
|
|
- return <Metabase />;
|
|
|
|
|
- case 'notification':
|
|
|
|
|
- return <Notification />;
|
|
|
|
|
|
|
+ case 'api':
|
|
|
|
|
+ return <Api />;
|
|
|
default:
|
|
default:
|
|
|
- return <Graphql />
|
|
|
|
|
|
|
+ return <Deploy />
|
|
|
}
|
|
}
|
|
|
})()}
|
|
})()}
|
|
|
</Content>
|
|
</Content>
|