xy 7 лет назад
Родитель
Сommit
11d12de1b8
2 измененных файлов с 19 добавлено и 7 удалено
  1. 3 3
      src/app/common/deploy/Deploy.jsx
  2. 16 4
      src/app/common/deploy/tencent/DeployCard.js

+ 3 - 3
src/app/common/deploy/Deploy.jsx

@@ -18,13 +18,13 @@ const tabListNoTitle = [{
 
 // [{
 //     key: 'tencent',
-//     tab: 'Tencent',
+//     tab: <FormattedMessage id='Tencent'/>,
 // }, {
 //     key: 'aliyun',
-//     tab: 'Aliyun',
+//     tab: <FormattedMessage id='Aliyun'/>,
 // }, {
 //     key: 'amazon',
-//     tab: 'AWS',
+//     tab: <FormattedMessage id='AWS'/>,
 // }];
 
 

+ 16 - 4
src/app/common/deploy/tencent/DeployCard.js

@@ -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,