|
@@ -1,14 +1,9 @@
|
|
|
import React, {Component} from 'react';
|
|
import React, {Component} from 'react';
|
|
|
import {Button, Input, Spin, Icon} from 'antd';
|
|
import {Button, Input, Spin, Icon} from 'antd';
|
|
|
|
|
|
|
|
-import {SHOW_CLOUD, ADD_CLOUD, UPDATE_CLOUD} from "../../gql";
|
|
|
|
|
|
|
+import {SHOW_CLOUD, ADD_CLOUD, UPDATE_CLOUD} from "../gql";
|
|
|
import {request} from 'graphql-request'
|
|
import {request} from 'graphql-request'
|
|
|
|
|
|
|
|
-// 需求:
|
|
|
|
|
-// 这个页面不应放在目录上
|
|
|
|
|
-// 检测用户是否有该字段
|
|
|
|
|
-// 如果没有,页面跳转到此
|
|
|
|
|
-
|
|
|
|
|
const idGen = (kind) => {
|
|
const idGen = (kind) => {
|
|
|
return kind + '_' + Date.now() + '_' + Math.random().toString().slice(-8);
|
|
return kind + '_' + Date.now() + '_' + Math.random().toString().slice(-8);
|
|
|
};
|
|
};
|
|
@@ -138,10 +133,14 @@ class Config extends Component {
|
|
|
<span className='cloud-name'>Tencent: </span>
|
|
<span className='cloud-name'>Tencent: </span>
|
|
|
<div style={{marginBottom: 15}}>
|
|
<div style={{marginBottom: 15}}>
|
|
|
<div>
|
|
<div>
|
|
|
- ID: <Input style={{width: 250}} value={this.state.tenID}
|
|
|
|
|
- onChange={this.inputChange('tenID')}/>
|
|
|
|
|
- Key: <Input style={{width: 250}} value={this.state.tenKey}
|
|
|
|
|
- onChange={this.inputChange('tenKey')}/>
|
|
|
|
|
|
|
+ <div>
|
|
|
|
|
+ ID: <Input style={{width: 250}} value={this.state.tenID}
|
|
|
|
|
+ onChange={this.inputChange('tenID')}/>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ Key: <Input style={{width: 250}} value={this.state.tenKey}
|
|
|
|
|
+ onChange={this.inputChange('tenKey')}/>
|
|
|
|
|
+ </div>
|
|
|
{
|
|
{
|
|
|
this.state.showOK === 'tencent'?
|
|
this.state.showOK === 'tencent'?
|
|
|
<Icon type="check-circle" theme="twoTone" twoToneColor="#52c41a" />
|
|
<Icon type="check-circle" theme="twoTone" twoToneColor="#52c41a" />
|
|
@@ -159,10 +158,14 @@ class Config extends Component {
|
|
|
<span className='cloud-name'>Aliyun: </span>
|
|
<span className='cloud-name'>Aliyun: </span>
|
|
|
<div style={{marginBottom: 15}}>
|
|
<div style={{marginBottom: 15}}>
|
|
|
<div>
|
|
<div>
|
|
|
- ID: <Input style={{width: 250}} value={this.state.aliID}
|
|
|
|
|
- onChange={this.inputChange('aliID')}/>
|
|
|
|
|
- Key: <Input style={{width: 250}} value={this.state.aliKey}
|
|
|
|
|
- onChange={this.inputChange('aliKey')}/>
|
|
|
|
|
|
|
+ <div>
|
|
|
|
|
+ ID: <Input style={{width: 250}} value={this.state.aliID}
|
|
|
|
|
+ onChange={this.inputChange('aliID')}/>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ Key: <Input style={{width: 250}} value={this.state.aliKey}
|
|
|
|
|
+ onChange={this.inputChange('aliKey')}/>
|
|
|
|
|
+ </div>
|
|
|
{
|
|
{
|
|
|
this.state.showOK === 'aliyun'?
|
|
this.state.showOK === 'aliyun'?
|
|
|
<Icon type="check-circle" theme="twoTone" twoToneColor="#52c41a" />
|
|
<Icon type="check-circle" theme="twoTone" twoToneColor="#52c41a" />
|
|
@@ -180,10 +183,14 @@ class Config extends Component {
|
|
|
<span className='cloud-name'>AWS: </span>
|
|
<span className='cloud-name'>AWS: </span>
|
|
|
<div style={{marginBottom: 15}}>
|
|
<div style={{marginBottom: 15}}>
|
|
|
<div>
|
|
<div>
|
|
|
- ID: <Input style={{width: 250}} value={this.state.awsID}
|
|
|
|
|
- onChange={this.inputChange('awsID')}/>
|
|
|
|
|
- Key: <Input style={{width: 250}} value={this.state.awsKey}
|
|
|
|
|
- onChange={this.inputChange('awsKey')}/>
|
|
|
|
|
|
|
+ <div>
|
|
|
|
|
+ ID: <Input style={{width: 250}} value={this.state.awsID}
|
|
|
|
|
+ onChange={this.inputChange('awsID')}/>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ Key: <Input style={{width: 250}} value={this.state.awsKey}
|
|
|
|
|
+ onChange={this.inputChange('awsKey')}/>
|
|
|
|
|
+ </div>
|
|
|
{
|
|
{
|
|
|
this.state.showOK === 'amazon'?
|
|
this.state.showOK === 'amazon'?
|
|
|
<Icon type="check-circle" theme="twoTone" twoToneColor="#52c41a" />
|
|
<Icon type="check-circle" theme="twoTone" twoToneColor="#52c41a" />
|