|
|
@@ -124,7 +124,7 @@ class DeployCardRender extends Component {
|
|
|
};
|
|
|
};
|
|
|
|
|
|
- ok = (id, userID, projectID, cloudID, deploy) => {
|
|
|
+ ok = (id, userID, projectID, cloudID, deploy, projectStatus) => {
|
|
|
let {description, cosBucketName, subnetId, cosObjectName, region, vpcId, cosBucketRegion, functionName} = this.state;
|
|
|
let varObj = {
|
|
|
id,
|
|
|
@@ -195,7 +195,7 @@ class DeployCardRender extends Component {
|
|
|
request(graphqlUrl, UPDATE_PROJECT_ONLY_STATUS, {
|
|
|
id: projectID,
|
|
|
updatedAt: new Date().getTime(),
|
|
|
- projectStatus: 'updated'
|
|
|
+ projectStatus: projectStatus === 'deployed' ? 'updated': 'functioned'
|
|
|
}).then(data => {
|
|
|
if(data.update_project !== null)
|
|
|
this.props.stepByStep(1);
|
|
|
@@ -376,7 +376,7 @@ class DeployCardRender extends Component {
|
|
|
<div>
|
|
|
<Button onClick={() => {
|
|
|
const id = idGen('deploy');
|
|
|
- this.ok(id, this.props.userID, this.props.projectID, this.props.cloudID, this.props.deploy);
|
|
|
+ this.ok(id, this.props.userID, this.props.projectID, this.props.cloudID, this.props.deploy, this.props.projectStatus);
|
|
|
}} type='primary'><FormattedMessage id="save"/></Button>
|
|
|
{
|
|
|
this.state.showOK === true ?
|
|
|
@@ -392,7 +392,7 @@ class DeployCardRender extends Component {
|
|
|
<div>
|
|
|
<Button onClick={() => {
|
|
|
const id = idGen('deploy');
|
|
|
- this.ok(id, this.props.userID, this.props.projectID, this.props.cloudID, this.props.deploy);
|
|
|
+ this.ok(id, this.props.userID, this.props.projectID, this.props.cloudID, this.props.deploy, this.props.projectStatus);
|
|
|
}} type='primary'><FormattedMessage id="save"/></Button>
|
|
|
{
|
|
|
this.state.showOK === true ?
|