|
@@ -76,7 +76,7 @@ class DeployCard extends Component {
|
|
|
serviceName: '',
|
|
serviceName: '',
|
|
|
vpcId: '',
|
|
vpcId: '',
|
|
|
subnetId: '',
|
|
subnetId: '',
|
|
|
- }
|
|
|
|
|
|
|
+ };
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
componentWillReceiveProps(next) {
|
|
componentWillReceiveProps(next) {
|
|
@@ -85,7 +85,7 @@ class DeployCard extends Component {
|
|
|
this.setState({
|
|
this.setState({
|
|
|
description,
|
|
description,
|
|
|
functionName,
|
|
functionName,
|
|
|
- region: next.region === '' ? region: next.region,
|
|
|
|
|
|
|
+ region: next.region === '' ? region : next.region,
|
|
|
cosBucketName,
|
|
cosBucketName,
|
|
|
cosObjectName,
|
|
cosObjectName,
|
|
|
cosBucketRegion: next.region === '' ? cosBucketRegion : next.region,
|
|
cosBucketRegion: next.region === '' ? cosBucketRegion : next.region,
|
|
@@ -96,7 +96,7 @@ class DeployCard extends Component {
|
|
|
} else {
|
|
} else {
|
|
|
this.setState({
|
|
this.setState({
|
|
|
functionName: next.defalutName,
|
|
functionName: next.defalutName,
|
|
|
- region: next.region === '' ? 'ap-beijing': next.region,
|
|
|
|
|
|
|
+ region: next.region === '' ? 'ap-beijing' : next.region,
|
|
|
cosBucketName: 'graphqlfc',
|
|
cosBucketName: 'graphqlfc',
|
|
|
cosObjectName: next.defalutName,
|
|
cosObjectName: next.defalutName,
|
|
|
cosBucketRegion: next.region === '' ? 'ap-beijing' : next.region,
|
|
cosBucketRegion: next.region === '' ? 'ap-beijing' : next.region,
|
|
@@ -196,6 +196,13 @@ class DeployCard extends Component {
|
|
|
overflow: 'hidden',
|
|
overflow: 'hidden',
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ const ioobotCloudID = ['tencent_CloudID', 'aliyun_CloudID'];
|
|
|
|
|
+
|
|
|
|
|
+ const disable = {
|
|
|
|
|
+ 'subnetId': ioobotCloudID.includes(this.props.cloudID) ? true : '',
|
|
|
|
|
+ 'vpcId': ioobotCloudID.includes(this.props.cloudID) ? true : '',
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
return (
|
|
return (
|
|
|
<div>
|
|
<div>
|
|
|
<div style={{marginBottom: 10}}>
|
|
<div style={{marginBottom: 10}}>
|
|
@@ -217,7 +224,8 @@ class DeployCard extends Component {
|
|
|
</span>
|
|
</span>
|
|
|
<Radio.Group onChange={(e) => {
|
|
<Radio.Group onChange={(e) => {
|
|
|
this.props.switchRegion(e);
|
|
this.props.switchRegion(e);
|
|
|
- }} defaultValue={this.state.region} value={removePrefix('ap-', this.state.region)} buttonStyle="solid">
|
|
|
|
|
|
|
+ }} defaultValue={this.state.region} value={removePrefix('ap-', this.state.region)}
|
|
|
|
|
+ buttonStyle="solid">
|
|
|
<Radio.Button value="guangzhou">Guangzhou</Radio.Button>
|
|
<Radio.Button value="guangzhou">Guangzhou</Radio.Button>
|
|
|
<Radio.Button value="shanghai">Shanghai</Radio.Button>
|
|
<Radio.Button value="shanghai">Shanghai</Radio.Button>
|
|
|
<Radio.Button value="beijing">Beijing</Radio.Button>
|
|
<Radio.Button value="beijing">Beijing</Radio.Button>
|
|
@@ -233,7 +241,7 @@ class DeployCard extends Component {
|
|
|
<Icon type="question-circle"/>
|
|
<Icon type="question-circle"/>
|
|
|
</Tooltip>
|
|
</Tooltip>
|
|
|
</span>
|
|
</span>
|
|
|
- <Radio.Group onChange={(e)=>{
|
|
|
|
|
|
|
+ <Radio.Group onChange={(e) => {
|
|
|
// 如果不想一变所有都变,就将 onchange 改成
|
|
// 如果不想一变所有都变,就将 onchange 改成
|
|
|
// onChange={this.switchConfig('cosBucketRegion')}
|
|
// onChange={this.switchConfig('cosBucketRegion')}
|
|
|
this.props.switchRegion(e);
|
|
this.props.switchRegion(e);
|
|
@@ -247,14 +255,14 @@ class DeployCard extends Component {
|
|
|
</div>
|
|
</div>
|
|
|
{/*腾讯云为空字符串,不显示,这里未作区分*/}
|
|
{/*腾讯云为空字符串,不显示,这里未作区分*/}
|
|
|
{/*<div style={{marginBottom: 10}}>*/}
|
|
{/*<div style={{marginBottom: 10}}>*/}
|
|
|
- {/*<span className='vice-title'>{valueToKey['serviceName']}*/}
|
|
|
|
|
- {/*<span> </span>*/}
|
|
|
|
|
- {/*<Tooltip placement="top" title={toolTipTitle['serviceName']}>*/}
|
|
|
|
|
- {/*<Icon type="question-circle"/>*/}
|
|
|
|
|
- {/*</Tooltip>*/}
|
|
|
|
|
- {/*</span>*/}
|
|
|
|
|
- {/*<Input value={this.state.serviceName} style={{width: 200}} disabled*/}
|
|
|
|
|
- {/*onChange={this.switchConfig('serviceName')}/>*/}
|
|
|
|
|
|
|
+ {/*<span className='vice-title'>{valueToKey['serviceName']}*/}
|
|
|
|
|
+ {/*<span> </span>*/}
|
|
|
|
|
+ {/*<Tooltip placement="top" title={toolTipTitle['serviceName']}>*/}
|
|
|
|
|
+ {/*<Icon type="question-circle"/>*/}
|
|
|
|
|
+ {/*</Tooltip>*/}
|
|
|
|
|
+ {/*</span>*/}
|
|
|
|
|
+ {/*<Input value={this.state.serviceName} style={{width: 200}} disabled*/}
|
|
|
|
|
+ {/*onChange={this.switchConfig('serviceName')}/>*/}
|
|
|
{/*</div>*/}
|
|
{/*</div>*/}
|
|
|
{
|
|
{
|
|
|
this.state.configs.map(config => (
|
|
this.state.configs.map(config => (
|
|
@@ -266,6 +274,7 @@ class DeployCard extends Component {
|
|
|
</Tooltip>
|
|
</Tooltip>
|
|
|
</span>
|
|
</span>
|
|
|
<Input value={this.state[config]} style={{width: 200}}
|
|
<Input value={this.state[config]} style={{width: 200}}
|
|
|
|
|
+ disabled={disable[config] === true}
|
|
|
onChange={this.switchConfig(config)}/>
|
|
onChange={this.switchConfig(config)}/>
|
|
|
</div>
|
|
</div>
|
|
|
))
|
|
))
|