|
|
@@ -8,15 +8,26 @@ import {manageUsers} from "../../../../config";
|
|
|
|
|
|
const Panel = Collapse.Panel;
|
|
|
|
|
|
+const valueToKey = {
|
|
|
+ 'functionName': '',
|
|
|
+ 'cosBucketName': '',
|
|
|
+ 'cosObjectName': '',
|
|
|
+ 'cosBucketRegion': '',
|
|
|
+ 'serviceName': '',
|
|
|
+ 'subnetId': '',
|
|
|
+ 'vpcId': '',
|
|
|
+ 'region': '',
|
|
|
+ 'description': '',
|
|
|
+};
|
|
|
|
|
|
class DeployCard extends Component {
|
|
|
constructor(props) {
|
|
|
super(props);
|
|
|
- let {functionName, cosBucketName, cosObjectName, cosBucketRegion, serviceName, vpcId, subnetId, region} = props.deploy;
|
|
|
+ let {functionName, cosBucketName, cosObjectName, cosBucketRegion, serviceName, vpcId, subnetId, region, description} = props.deploy;
|
|
|
props.deploy !== '' ?
|
|
|
this.state = {
|
|
|
configs: ['description', 'cosBucketName', 'cosObjectName', 'vpcId', 'subnetId'],
|
|
|
- description: '',
|
|
|
+ description,
|
|
|
showOK: false,
|
|
|
functionName,
|
|
|
region,
|
|
|
@@ -30,7 +41,7 @@ class DeployCard extends Component {
|
|
|
:
|
|
|
this.state = {
|
|
|
configs: ['description', 'cosBucketName', 'cosObjectName', 'vpcId', 'subnetId'],
|
|
|
- description: '',
|
|
|
+ description: props.description,
|
|
|
showOK: false,
|
|
|
functionName: props.defalutName,
|
|
|
region: props.region,
|
|
|
@@ -45,8 +56,9 @@ class DeployCard extends Component {
|
|
|
|
|
|
componentWillReceiveProps(next) {
|
|
|
if (next.deploy !== '') {
|
|
|
- let {functionName, cosBucketName, cosObjectName, cosBucketRegion, serviceName, vpcId, subnetId, region} = next.deploy;
|
|
|
+ let {functionName, cosBucketName, cosObjectName, cosBucketRegion, serviceName, vpcId, subnetId, region, description} = next.deploy;
|
|
|
this.setState({
|
|
|
+ description,
|
|
|
functionName,
|
|
|
region,
|
|
|
cosBucketName,
|