|
|
@@ -17,7 +17,9 @@ class TencentConfig extends Component {
|
|
|
groups: [],
|
|
|
currentGroup: '',
|
|
|
paths: [],
|
|
|
- currentPath: ''
|
|
|
+ currentPath: '',
|
|
|
+ deployIdPassToPath: '',
|
|
|
+ groupIdPassToPath: ''
|
|
|
};
|
|
|
|
|
|
// todo: 没做每个 deploy 和 apigroup 和 apipath 的切换
|
|
|
@@ -51,6 +53,17 @@ class TencentConfig extends Component {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ pass = (value, kind) => {
|
|
|
+ if(kind === 'deploy')
|
|
|
+ this.setState({
|
|
|
+ deployIdPassToPath: value
|
|
|
+ });
|
|
|
+ else
|
|
|
+ this.setState({
|
|
|
+ groupIdPassToPath: value
|
|
|
+ })
|
|
|
+ };
|
|
|
+
|
|
|
switchRegion = (e) => {
|
|
|
this.setState({
|
|
|
region: e.target.value
|
|
|
@@ -63,9 +76,9 @@ class TencentConfig extends Component {
|
|
|
<div style={{padding: '30px'}}>
|
|
|
<Row gutter={16}>
|
|
|
<Col span={14}>
|
|
|
- <Card title="Deploy" style={{marginBottom: 10}}><DeployCard deploy={this.state.currentDeploy} switchRegion={this.switchRegion} region={this.state.region} schemaName={this.props.schemaName} userID={this.props.userID} cloudID={this.props.cloudID}/></Card>
|
|
|
- <Card title="API Group" style={{marginBottom: 10}}><APIGroupCard group={this.state.currentGroup} switchRegion={this.switchRegion} region={this.state.region} userID={this.props.userID} cloudID={this.props.cloudID}/></Card>
|
|
|
- <Card title="API Path"><APIPathCard path={this.state.currentPath} schemaName={this.props.schemaName} userID={this.props.userID} deployID={this.state.currentDeploy.id} groupID={this.state.currentGroup.id}/></Card>
|
|
|
+ <Card title="Deploy" style={{marginBottom: 10}}><DeployCard deploy={this.state.currentDeploy} switchRegion={this.switchRegion} region={this.state.region} schemaName={this.props.schemaName} userID={this.props.userID} cloudID={this.props.cloudID} pass={this.pass}/></Card>
|
|
|
+ <Card title="API Group" style={{marginBottom: 10}}><APIGroupCard group={this.state.currentGroup} switchRegion={this.switchRegion} region={this.state.region} userID={this.props.userID} cloudID={this.props.cloudID} pass={this.pass}/></Card>
|
|
|
+ <Card title="API Path"><APIPathCard path={this.state.currentPath} schemaName={this.props.schemaName} userID={this.props.userID} deployID={this.state.currentDeploy? this.state.currentDeploy.id : this.state.deployIdPassToPath} groupID={this.state.currentGroup? this.state.currentGroup.id : this.state.groupIdPassToPath}/></Card>
|
|
|
</Col>
|
|
|
<Col offset={2} span={6}>
|
|
|
<Button type='primary'>deploy it</Button>
|