|
@@ -2,7 +2,7 @@ import React, {Component} from 'react';
|
|
|
|
|
|
|
|
import {Row, Col, Input, Icon, Button, Spin} from 'antd';
|
|
import {Row, Col, Input, Icon, Button, Spin} from 'antd';
|
|
|
import './index.css';
|
|
import './index.css';
|
|
|
-import SchemaChange from './change/SchemaChange';
|
|
|
|
|
|
|
+import Column from './Column';
|
|
|
import {Mutation, Query} from "react-apollo";
|
|
import {Mutation, Query} from "react-apollo";
|
|
|
import gql from "graphql-tag";
|
|
import gql from "graphql-tag";
|
|
|
import {SHOW_SCHEMA, ADD_SCHEMA, DELETE_SCHEMA, SHOW_TABLE} from '../../gql'
|
|
import {SHOW_SCHEMA, ADD_SCHEMA, DELETE_SCHEMA, SHOW_TABLE} from '../../gql'
|
|
@@ -49,7 +49,7 @@ class Schema extends Component {
|
|
|
<Col span={17} offset={1}>
|
|
<Col span={17} offset={1}>
|
|
|
{
|
|
{
|
|
|
this.state.currentTable === 'add' ?
|
|
this.state.currentTable === 'add' ?
|
|
|
- <SchemaChange
|
|
|
|
|
|
|
+ <Column
|
|
|
currentSchema={this.state.currentSchema}
|
|
currentSchema={this.state.currentSchema}
|
|
|
currentTableIndex={-2}
|
|
currentTableIndex={-2}
|
|
|
columns={[]}
|
|
columns={[]}
|
|
@@ -68,7 +68,7 @@ class Schema extends Component {
|
|
|
if (data.schema_by_id === null) data = [];
|
|
if (data.schema_by_id === null) data = [];
|
|
|
else data = JSON.parse(data.schema_by_id.schemaData);
|
|
else data = JSON.parse(data.schema_by_id.schemaData);
|
|
|
return (
|
|
return (
|
|
|
- <SchemaChange
|
|
|
|
|
|
|
+ <Column
|
|
|
currentSchema={this.state.currentSchema}
|
|
currentSchema={this.state.currentSchema}
|
|
|
currentTable={this.state.currentTable}
|
|
currentTable={this.state.currentTable}
|
|
|
currentTableIndex={this.state.currentTable === '' ? -2 : data.findIndex(obj => obj.name === this.state.currentTable)}
|
|
currentTableIndex={this.state.currentTable === '' ? -2 : data.findIndex(obj => obj.name === this.state.currentTable)}
|