xy 7 лет назад
Родитель
Сommit
b94e6fbae2

+ 3 - 3
src/components/common/schema/change/SchemaChange.jsx → src/components/common/schema/Column.jsx

@@ -1,14 +1,14 @@
 import React, {Component} from 'react';
 import React, {Component} from 'react';
 
 
 import {Select, Input, Icon, Button, notification, Spin} from 'antd';
 import {Select, Input, Icon, Button, notification, Spin} from 'antd';
-import {UPDATE_SCHEMA, SHOW_SCHEMA, SHOW_TABLE} from "../../../gql";
+import {UPDATE_SCHEMA, SHOW_SCHEMA, SHOW_TABLE} from "../../gql";
 import gql from "graphql-tag";
 import gql from "graphql-tag";
 
 
 import {Mutation, Query} from "react-apollo";
 import {Mutation, Query} from "react-apollo";
 
 
 const Option = Select.Option;
 const Option = Select.Option;
 
 
-class SchemaChange extends Component {
+class Column extends Component {
     constructor(props) {
     constructor(props) {
         super(props);
         super(props);
         this.state = {
         this.state = {
@@ -190,7 +190,7 @@ class SchemaChange extends Component {
     }
     }
 }
 }
 
 
-export default SchemaChange;
+export default Column;
 
 
 
 
 class UpdateTableButton extends Component {
 class UpdateTableButton extends Component {

+ 1 - 1
src/components/common/schema/Create.js

@@ -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'

+ 3 - 3
src/components/common/schema/Schema.jsx

@@ -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)}

+ 0 - 0
src/components/common/schema/Table.js