|
|
@@ -10,7 +10,7 @@ import {
|
|
|
UPDATE_PROJECT_ONLY_STATUS
|
|
|
} from "../../../../../gql";
|
|
|
import {request} from 'graphql-request'
|
|
|
-import {removePrefix, shiftPrefix} from "../../../../../func";
|
|
|
+import {removePrefix, shiftPrefix, pushPostfix} from "../../../../../func";
|
|
|
|
|
|
const Panel = Collapse.Panel;
|
|
|
|
|
|
@@ -65,7 +65,7 @@ class DeployCardRender extends Component {
|
|
|
functionName,
|
|
|
region,
|
|
|
cosBucketName,
|
|
|
- cosObjectName,
|
|
|
+ cosObjectName: removePrefix('.jar', cosObjectName),
|
|
|
cosBucketRegion,
|
|
|
serviceName,
|
|
|
vpcId,
|
|
|
@@ -96,7 +96,7 @@ class DeployCardRender extends Component {
|
|
|
functionName,
|
|
|
region: next.region === '' ? region : next.region,
|
|
|
cosBucketName,
|
|
|
- cosObjectName,
|
|
|
+ cosObjectName: removePrefix('.jar', cosObjectName),
|
|
|
cosBucketRegion: next.region === '' ? cosBucketRegion : next.region,
|
|
|
serviceName,
|
|
|
vpcId,
|
|
|
@@ -126,19 +126,17 @@ class DeployCardRender extends Component {
|
|
|
|
|
|
ok = (id, userID, projectID, cloudID, deploy) => {
|
|
|
let {description, cosBucketName, subnetId, cosObjectName, region, vpcId, cosBucketRegion, functionName} = this.state;
|
|
|
- region = shiftPrefix('ap-', region);
|
|
|
- cosBucketRegion = shiftPrefix('ap-', cosBucketRegion);
|
|
|
let varObj = {
|
|
|
id,
|
|
|
cloud_id: cloudID,
|
|
|
user_id: userID,
|
|
|
+ cosObjectName: pushPostfix('.jar', cosObjectName),
|
|
|
+ region: shiftPrefix('ap-', region),
|
|
|
+ cosBucketRegion: shiftPrefix('ap-', cosBucketRegion),
|
|
|
description,
|
|
|
cosBucketName,
|
|
|
- subnetId,
|
|
|
- cosObjectName,
|
|
|
- region,
|
|
|
vpcId,
|
|
|
- cosBucketRegion,
|
|
|
+ subnetId,
|
|
|
functionName,
|
|
|
memorySize: 512,
|
|
|
timeout: 300,
|
|
|
@@ -176,17 +174,15 @@ class DeployCardRender extends Component {
|
|
|
)
|
|
|
} else {
|
|
|
let {description, cosBucketName, subnetId, cosObjectName, region, vpcId, cosBucketRegion, functionName} = this.state;
|
|
|
- region = shiftPrefix('ap-', region);
|
|
|
- cosBucketRegion = shiftPrefix('ap-', cosBucketRegion);
|
|
|
let varObj = {
|
|
|
id: deploy.id,
|
|
|
+ cosObjectName: pushPostfix('.jar', cosObjectName),
|
|
|
+ region: shiftPrefix('ap-', region),
|
|
|
+ cosBucketRegion: shiftPrefix('ap-', cosBucketRegion),
|
|
|
description,
|
|
|
subnetId,
|
|
|
cosBucketName,
|
|
|
- cosObjectName,
|
|
|
- region,
|
|
|
vpcId,
|
|
|
- cosBucketRegion,
|
|
|
functionName,
|
|
|
updatedAt: new Date().getTime()
|
|
|
};
|
|
|
@@ -332,7 +328,7 @@ class DeployCardRender extends Component {
|
|
|
<Icon type="question-circle"/>
|
|
|
</Tooltip>
|
|
|
</span>
|
|
|
- <Input value={this.state.cosBucketName} style={{width: 200}}
|
|
|
+ <Input value={this.state.cosObjectName} style={{width: 200}}
|
|
|
disabled={disable['cosObjectName'] === true} addonAfter=".jar"
|
|
|
onChange={this.switchConfig('cosObjectName')}/>
|
|
|
</div>
|