Explorar o código

Merge remote-tracking branch 'origin/master'

Csy817 %!s(int64=7) %!d(string=hai) anos
pai
achega
40628ec15c

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

+ 1 - 1
src/app/common/deploy/tencent/TencentConfig.js

@@ -126,7 +126,7 @@ class TencentConfig extends Component {
                 <div style={{padding: '30px'}}>
                     <Row gutter={16}>
                         <Col span={14}>
-                            <FormattedMessage id="Deploy">{msg => <Card title={msg} style={{marginBottom: 10}}><DeployCard deploy={this.state.currentDeploy} switchRegion={this.switchRegion} region={this.state.region} defalutName={this.props.defalutName} userID={this.props.userID} cloudID={this.props.cloudID} pass={this.pass} kind={this.props.kind} trialcase={this.props.trialcase}/></Card>}</FormattedMessage>
+                            <FormattedMessage id="fc Deploy">{msg => <Card title={msg} style={{marginBottom: 10}}><DeployCard deploy={this.state.currentDeploy} switchRegion={this.switchRegion} region={this.state.region} defalutName={this.props.defalutName} userID={this.props.userID} cloudID={this.props.cloudID} pass={this.pass} kind={this.props.kind} trialcase={this.props.trialcase}/></Card>}</FormattedMessage>
                             <FormattedMessage id="API Group">{msg => <Card title={msg} style={{marginBottom: 10}}><APIGroupCard group={this.state.currentGroup} switchRegion={this.switchRegion} region={this.state.region} userID={this.props.userID} cloudID={this.props.cloudID} pass={this.pass} kind={this.props.kind} trialcase={this.props.trialcase}/></Card>}</FormattedMessage>
                             <FormattedMessage id="API Path">{msg => <Card title={msg} style={{marginBottom: 10}}><APIPathCard path={this.state.currentPath} defalutName={this.props.defalutName} userID={this.props.userID} deployID={this.state.currentDeploy? this.state.currentDeploy.id : this.state.deployIdPassToPath} groupID={this.state.currentGroup? this.state.currentGroup.id : this.state.groupIdPassToPath} trialcase={this.props.trialcase}/></Card>}</FormattedMessage>
                             <FormattedMessage id="Notification">{msg => <Card title={msg}><NotificationCard userID={this.props.userID} trialcase={this.props.trialcase}/></Card>}</FormattedMessage>

+ 1 - 1
src/app/graphqlService/TrialCase.jsx

@@ -75,7 +75,7 @@ class TrialCase extends Component {
                                     case 'schema':
                                         return <Schema trialcase={true} userID={this.state.userID} schemaName={schemaName} schemaID={schemaID} history={this.props.history} location={this.props.location}/>;
                                     case 'deploy':
-                                        return <Deploy userID={this.state.userID} schemaID={schemaID}/>;
+                                        return <Deploy trialcase={true} userID={this.state.userID} schemaID={schemaID}/>;
                                     case 'graphiql':
                                         return <Graphql/>;
                                     case 'template':

+ 1 - 1
src/app/wechatService/WxTrialCase.js

@@ -54,7 +54,7 @@ class WxTrialCase extends Component {
                                 case 'wechat-config':
                                     return <WxConfig defaultAppName={'ecommerce'} defaultConfigID={'ecommerce_wxConfigID'} trialcase={true} history={this.props.history} location={this.props.location}/>;
                                 case 'wechat-deploy':
-                                    return <WxDeploy userID={this.state.userID} configID={configID}/>;
+                                    return <WxDeploy trialcase={true} userID={this.state.userID} configID={configID}/>;
                                 case 'wechat-result':
                                     return <WxResult/>;
                                 default:

+ 1 - 0
src/language/en_US.js

@@ -65,6 +65,7 @@ const en_US = {
     "please input table name": "please input table name",
     "field name": 'field name',
     "Confirm": 'Confirm',
+    "fc Deploy": "Deploy",
     "API Group": 'API Group',
     "API Path": 'API Path',
     "Notification": 'Notification',

+ 1 - 0
src/language/zh_CN.js

@@ -66,6 +66,7 @@ const zh_CN = {
     "please input table name": "请输入表名",
     "field name": '字段名',
     "Confirm": '确认修改',
+    "fc Deploy": "云函数配置",
     "API Group": 'API组 配置',
     "API Path": 'API路径 配置',
     "Notification": '通知配置',