|
|
@@ -1,4 +1,5 @@
|
|
|
import React, {Component} from 'react';
|
|
|
+import {FormattedMessage} from 'react-intl';
|
|
|
import {Button, Input, Spin, Icon} from 'antd';
|
|
|
|
|
|
import {SHOW_CLOUD, ADD_CLOUD, UPDATE_CLOUD} from "../gql";
|
|
|
@@ -134,18 +135,19 @@ class CloudConfig extends Component {
|
|
|
pathname: '/login',
|
|
|
})
|
|
|
}}>
|
|
|
- <Icon type="left" style={{color: '#3187FA'}}/> login
|
|
|
+ <Icon type="left" style={{color: '#3187FA'}}/> <FormattedMessage id="login"/>
|
|
|
</div>
|
|
|
+
|
|
|
<div style={{marginTop: 15}}>
|
|
|
- <span className='cloud-name'>Tencent: </span>
|
|
|
+ <span className='cloud-name'><FormattedMessage id="Tencent"/>: </span>
|
|
|
<div style={{marginBottom: 15}}>
|
|
|
<div>
|
|
|
- <div style={{marginBottom: 10}}>
|
|
|
- <span className='item-title-cloud'>ID:</span>
|
|
|
+ <div style={{marginBottom: 20}}>
|
|
|
+ <span className='item-title-cloud'>secret ID:</span>
|
|
|
<Input style={{width: 250}} value={this.state.aliID} onChange={this.inputChange('tenID')}/>
|
|
|
</div>
|
|
|
- <div style={{marginBottom: 10}}>
|
|
|
- <span className='item-title-cloud'>Key:</span>
|
|
|
+ <div style={{marginBottom: 20}}>
|
|
|
+ <span className='item-title-cloud'>secret Key:</span>
|
|
|
<Input style={{width: 250}} value={this.state.aliKey} onChange={this.inputChange('tenKey')}/>
|
|
|
</div>
|
|
|
{
|
|
|
@@ -159,62 +161,71 @@ class CloudConfig extends Component {
|
|
|
}
|
|
|
</div>
|
|
|
<Button type='primary'
|
|
|
- onClick={this.submit(this.state.tencentCLoudID, 'tencent', this.state.tenID, this.state.tenKey)}>ok</Button>
|
|
|
+ onClick={this.submit(this.state.tencentCLoudID, 'tencent', this.state.tenID, this.state.tenKey)}>
|
|
|
+ <FormattedMessage id="save"/>
|
|
|
+ </Button>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div>
|
|
|
- <span className='cloud-name'>Aliyun: </span>
|
|
|
- <div style={{marginBottom: 15}}>
|
|
|
- <div>
|
|
|
- <div style={{marginBottom: 10}}>
|
|
|
- <span className='item-title-cloud'>ID:</span>
|
|
|
- <Input style={{width: 250}} value={this.state.aliID} onChange={this.inputChange('aliID')}/>
|
|
|
- </div>
|
|
|
- <div style={{marginBottom: 10}}>
|
|
|
- <span className='item-title-cloud'>Key:</span>
|
|
|
- <Input style={{width: 250}} value={this.state.aliKey} onChange={this.inputChange('aliKey')}/>
|
|
|
- </div>
|
|
|
|
|
|
- {
|
|
|
- this.state.showOK === 'aliyun' ?
|
|
|
- <Icon type="check-circle" theme="twoTone" twoToneColor="#52c41a"/>
|
|
|
- :
|
|
|
- this.state.showNotOK === 'aliyun' ?
|
|
|
- <span>not ok</span>
|
|
|
- :
|
|
|
- ""
|
|
|
- }
|
|
|
- </div>
|
|
|
- <Button type='primary'
|
|
|
- onClick={this.submit(this.state.aliyunCLoudID, 'aliyun', this.state.aliID, this.state.aliKey)}>ok</Button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <span className='cloud-name'>AWS: </span>
|
|
|
- <div style={{marginBottom: 15}}>
|
|
|
- <div>
|
|
|
- <div style={{marginBottom: 10}}>
|
|
|
- <span className='item-title-cloud'>ID:</span>
|
|
|
- <Input style={{width: 250}} value={this.state.aliID} onChange={this.inputChange('awsID')}/>
|
|
|
- </div>
|
|
|
- <div style={{marginBottom: 10}}>
|
|
|
- <span className='item-title-cloud'>Key:</span>
|
|
|
- <Input style={{width: 250}} value={this.state.aliKey} onChange={this.inputChange('awsKey')}/>
|
|
|
- </div>
|
|
|
- {
|
|
|
- this.state.showOK === 'amazon' ?
|
|
|
- <Icon type="check-circle" theme="twoTone" twoToneColor="#52c41a"/>
|
|
|
- :
|
|
|
- this.state.showNotOK === 'amazon' ?
|
|
|
- <span>not ok</span>
|
|
|
- :
|
|
|
- ""
|
|
|
- }
|
|
|
- </div>
|
|
|
- <Button type='primary'
|
|
|
- onClick={this.submit(this.state.awsCLoudID, 'amazon', this.state.awsID, this.state.awsKey)}>ok</Button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ {/*<div>*/}
|
|
|
+ {/*<span className='cloud-name'><FormattedMessage id="Aliyun"/>: </span>*/}
|
|
|
+ {/*<div style={{marginBottom: 15}}>*/}
|
|
|
+ {/*<div>*/}
|
|
|
+ {/*<div style={{marginBottom: 10}}>*/}
|
|
|
+ {/*<span className='item-title-cloud'>ID:</span>*/}
|
|
|
+ {/*<Input style={{width: 250}} value={this.state.aliID} onChange={this.inputChange('aliID')}/>*/}
|
|
|
+ {/*</div>*/}
|
|
|
+ {/*<div style={{marginBottom: 10}}>*/}
|
|
|
+ {/*<span className='item-title-cloud'>Key:</span>*/}
|
|
|
+ {/*<Input style={{width: 250}} value={this.state.aliKey} onChange={this.inputChange('aliKey')}/>*/}
|
|
|
+ {/*</div>*/}
|
|
|
+
|
|
|
+ {/*{*/}
|
|
|
+ {/*this.state.showOK === 'aliyun' ?*/}
|
|
|
+ {/*<Icon type="check-circle" theme="twoTone" twoToneColor="#52c41a"/>*/}
|
|
|
+ {/*:*/}
|
|
|
+ {/*this.state.showNotOK === 'aliyun' ?*/}
|
|
|
+ {/*<span>not ok</span>*/}
|
|
|
+ {/*:*/}
|
|
|
+ {/*""*/}
|
|
|
+ {/*}*/}
|
|
|
+ {/*</div>*/}
|
|
|
+ {/*<Button type='primary'*/}
|
|
|
+ {/*onClick={this.submit(this.state.aliyunCLoudID, 'aliyun', this.state.aliID, this.state.aliKey)}>*/}
|
|
|
+ {/*<FormattedMessage id="save"/>*/}
|
|
|
+ {/*</Button>*/}
|
|
|
+ {/*</div>*/}
|
|
|
+ {/*</div>*/}
|
|
|
+
|
|
|
+ {/*<div>*/}
|
|
|
+ {/*<span className='cloud-name'><FormattedMessage id="AWS"/>: </span>*/}
|
|
|
+ {/*<div style={{marginBottom: 15}}>*/}
|
|
|
+ {/*<div>*/}
|
|
|
+ {/*<div style={{marginBottom: 10}}>*/}
|
|
|
+ {/*<span className='item-title-cloud'>ID:</span>*/}
|
|
|
+ {/*<Input style={{width: 250}} value={this.state.aliID} onChange={this.inputChange('awsID')}/>*/}
|
|
|
+ {/*</div>*/}
|
|
|
+ {/*<div style={{marginBottom: 10}}>*/}
|
|
|
+ {/*<span className='item-title-cloud'>Key:</span>*/}
|
|
|
+ {/*<Input style={{width: 250}} value={this.state.aliKey} onChange={this.inputChange('awsKey')}/>*/}
|
|
|
+ {/*</div>*/}
|
|
|
+ {/*{*/}
|
|
|
+ {/*this.state.showOK === 'amazon' ?*/}
|
|
|
+ {/*<Icon type="check-circle" theme="twoTone" twoToneColor="#52c41a"/>*/}
|
|
|
+ {/*:*/}
|
|
|
+ {/*this.state.showNotOK === 'amazon' ?*/}
|
|
|
+ {/*<span>not ok</span>*/}
|
|
|
+ {/*:*/}
|
|
|
+ {/*""*/}
|
|
|
+ {/*}*/}
|
|
|
+ {/*</div>*/}
|
|
|
+ {/*<Button type='primary'*/}
|
|
|
+ {/*onClick={this.submit(this.state.awsCLoudID, 'amazon', this.state.awsID, this.state.awsKey)}>*/}
|
|
|
+ {/*<FormattedMessage id="save"/>*/}
|
|
|
+ {/*</Button>*/}
|
|
|
+ {/*</div>*/}
|
|
|
+ {/*</div>*/}
|
|
|
+
|
|
|
</div>
|
|
|
:
|
|
|
<Spin style={{marginLeft: 3}}/>
|