|
@@ -50,28 +50,30 @@ class TencentConfig extends Component {
|
|
|
})
|
|
})
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
- deployFC = () => {
|
|
|
|
|
- let _this = this;
|
|
|
|
|
-
|
|
|
|
|
- axios.get(`${deployUrl}`,
|
|
|
|
|
- // axios.get(`http://localhost:8999/graphql/deployall`,
|
|
|
|
|
- {
|
|
|
|
|
- params: {
|
|
|
|
|
- 'cloud-name': 'tencent',
|
|
|
|
|
- schema: "ecommerce_schemaID",
|
|
|
|
|
- deploy: "deploy_1544504304478_57468453",
|
|
|
|
|
- api: "path_1544504334478_82625598",
|
|
|
|
|
- group: "group_1544504325443_46750115"
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- .then((res) => {
|
|
|
|
|
- console.log('deploy res', res);
|
|
|
|
|
- })
|
|
|
|
|
- .catch((err) => {
|
|
|
|
|
- console.log('err', err);
|
|
|
|
|
- console.log('err.response', err.response);
|
|
|
|
|
- console.log('err.response.data', err.response.data);
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ deployFC = (schema,deploy,api,group) => {
|
|
|
|
|
+
|
|
|
|
|
+ if(schema && deploy && api && group){
|
|
|
|
|
+ axios.get(`${deployUrl}`,
|
|
|
|
|
+ // axios.get(`http://localhost:8999/graphql/deployall`,
|
|
|
|
|
+ {
|
|
|
|
|
+ params: {
|
|
|
|
|
+ 'cloud-name': 'tencent',
|
|
|
|
|
+ schema: "ecommerce_schemaID",
|
|
|
|
|
+ deploy: "deploy_1544504304478_57468453",
|
|
|
|
|
+ api: "path_1544504334478_82625598",
|
|
|
|
|
+ group: "group_1544504325443_46750115"
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ console.log('deploy res', res);
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((err) => {
|
|
|
|
|
+ console.log('err', err);
|
|
|
|
|
+ console.log('err.response', err.response);
|
|
|
|
|
+ console.log('err.response.data', err.response.data);
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
render() {
|
|
render() {
|
|
@@ -91,12 +93,15 @@ class TencentConfig extends Component {
|
|
|
let group = '',
|
|
let group = '',
|
|
|
deploy = '',
|
|
deploy = '',
|
|
|
path = '',
|
|
path = '',
|
|
|
|
|
+ schemaID = '',
|
|
|
|
|
+ api = '',
|
|
|
cloudID = 'tencent_CloudID';
|
|
cloudID = 'tencent_CloudID';
|
|
|
|
|
|
|
|
if (data.project_by_id.cloud_id !== null && data.project_by_id.cloud_id.cloudName === 'tencent') {
|
|
if (data.project_by_id.cloud_id !== null && data.project_by_id.cloud_id.cloudName === 'tencent') {
|
|
|
group = data.project_by_id.apiGWGroup_id;
|
|
group = data.project_by_id.apiGWGroup_id;
|
|
|
deploy = data.project_by_id.deploy_id;
|
|
deploy = data.project_by_id.deploy_id;
|
|
|
cloudID = data.project_by_id.cloud_id.id;
|
|
cloudID = data.project_by_id.cloud_id.id;
|
|
|
|
|
+ schemaID = data.project_by_id.schema_id.id;
|
|
|
}
|
|
}
|
|
|
let defaultName = data.project_by_id.projectName;
|
|
let defaultName = data.project_by_id.projectName;
|
|
|
return (
|
|
return (
|
|
@@ -202,7 +207,7 @@ class TencentConfig extends Component {
|
|
|
''
|
|
''
|
|
|
:
|
|
:
|
|
|
data.project_by_id.schema_id.schemaState === 'ok' ?
|
|
data.project_by_id.schema_id.schemaState === 'ok' ?
|
|
|
- <Button type='primary' onClick={() => this.deployFC()}><FormattedMessage id="deploy"/>!</Button>
|
|
|
|
|
|
|
+ <Button type='primary' onClick={() => this.deployFC(schemaID,deploy,api,group)}><FormattedMessage id="deploy"/>!</Button>
|
|
|
:
|
|
:
|
|
|
<Button type='primary' disabled><FormattedMessage id="deploy"/>!</Button>
|
|
<Button type='primary' disabled><FormattedMessage id="deploy"/>!</Button>
|
|
|
|
|
|