Selaa lähdekoodia

默认和状态

kulley 6 vuotta sitten
vanhempi
commit
cdf919786f

+ 1 - 3
src/app/basicVersion/caseShow/CaseShow.jsx

@@ -285,7 +285,6 @@ class CaseShowDetail extends Component {
                                         </div>
                                     </div>
                                 </div>
-
                             )
                         }
                     }
@@ -293,5 +292,4 @@ class CaseShowDetail extends Component {
             </div>
         )
     }
-}
-
+}

+ 29 - 20
src/app/basicVersion/caseShow/UserCustom.js

@@ -82,15 +82,15 @@ class UserCustom extends Component {
                                 <Step title=<Step12/> />
                                 <Step title=<Step13/> />
                                 <Step title=
-                                          <Step14
-                                      getPrimaryConfigDetail={this.getPrimaryConfigDetail}
-                                      userID={userID}
-                                      bucketName={bucketName}
-                                      secretID={secretID}
-                                      secretKey={secretKey}
-                                      appId={appId}
-                                      cloudID={cloudID}
-                                />
+                                      <Step14
+                                          getPrimaryConfigDetail={this.getPrimaryConfigDetail}
+                                          userID={userID}
+                                          bucketName={bucketName}
+                                          secretID={secretID}
+                                          secretKey={secretKey}
+                                          appId={appId}
+                                          cloudID={cloudID}
+                                      />
                                 />
                             </Steps>
                         </Col>
@@ -214,7 +214,8 @@ class NameAndDB extends Component {
             db: '',
             username: '',
             password: '',
-            admin: ''
+            admin: '',
+            disableDeployButton: false
         }
     }
 
@@ -404,7 +405,7 @@ class NameAndDB extends Component {
         }
     };
 
-    storeEdnAndDeploy = (secretID, secretKey, appId, bucketName, dbKind, userID, admin, username, password, db, host, customName, cloudID) => {
+    storeEdnAndDeploy = (secretID='AKIDkYBvY0LOJ2bzCDmnMjz4xgFertmVJlVE', secretKey='zwjKk29TdcYP8g2FG5kCSWmz3wcH92lN', appId='1254337200', bucketName, dbKind, userID, admin, username, password, db, host, customName, cloudID) => {
         // store *.edn to cos
         let deployConf = dbKind === 'mongodb' ?
             ` {:secretId "${secretID}"\n` +
@@ -468,7 +469,8 @@ class NameAndDB extends Component {
             username,
             password,
             admin,
-            customName
+            customName,
+            disableDeployButton
         } = this.state;
         let {secretID, secretKey, appId, bucketName, cloudID} = this.props
         return (
@@ -508,7 +510,7 @@ class NameAndDB extends Component {
                             this.state.dbKind === 'mongodb' ?
                                 <div>
                                     <div>
-                                        <span>host</span>
+                                        <span className='item-title-cloud'>地址</span>
                                         <Input style={{width: 250}} value={this.state.host}
                                                onChange={(e) => {
                                                    this.setState({host: e.target.value})
@@ -517,7 +519,7 @@ class NameAndDB extends Component {
                                     </div>
 
                                     <div>
-                                        <span>db-name</span>
+                                        <span className='item-title-cloud'>数据库名称</span>
                                         <Input style={{width: 250}} value={this.state.db}
                                                onChange={(e) => {
                                                    this.setState({db: e.target.value})
@@ -526,7 +528,7 @@ class NameAndDB extends Component {
                                     </div>
 
                                     <div>
-                                        <span>admin-db</span>
+                                        <span className='item-title-cloud'>验证数据库</span>
                                         <Input style={{width: 250}} value={this.state.admin}
                                                onChange={(e) => {
                                                    this.setState({admin: e.target.value})
@@ -535,7 +537,7 @@ class NameAndDB extends Component {
                                     </div>
 
                                     <div>
-                                        <span>username</span>
+                                        <span className='item-title-cloud'>用户名</span>
                                         <Input style={{width: 250}} value={this.state.username}
                                                onChange={(e) => {
                                                    this.setState({username: e.target.value})
@@ -544,7 +546,7 @@ class NameAndDB extends Component {
                                     </div>
 
                                     <div>
-                                        <span>password</span>
+                                        <span className='item-title-cloud'>密码</span>
                                         <Input type='password' style={{width: 250}} value={this.state.password}
                                                onChange={(e) => {
                                                    this.setState({password: e.target.value})
@@ -556,9 +558,16 @@ class NameAndDB extends Component {
                                 ''
                         }
 
-                        <Button type='primary' onClick={() => {
-                            this.storeEdnAndDeploy(secretID, secretKey, appId, bucketName, dbKind, userID, admin, username, password, db, host, customName, cloudID)
-                        }}>开始部署</Button>
+                        {
+                            disableDeployButton?
+                                '正在部署...'
+                                :
+                                <Button type='primary' onClick={() => {
+                                    this.storeEdnAndDeploy(secretID, secretKey, appId, bucketName, dbKind, userID, admin, username, password, db, host, customName, cloudID)
+                                }}>开始部署</Button>
+
+                        }
+
                     </div>
                 </Modal>
             </div>