|
@@ -82,15 +82,15 @@ class UserCustom extends Component {
|
|
|
<Step title=<Step12/> />
|
|
<Step title=<Step12/> />
|
|
|
<Step title=<Step13/> />
|
|
<Step title=<Step13/> />
|
|
|
<Step title=
|
|
<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>
|
|
</Steps>
|
|
|
</Col>
|
|
</Col>
|
|
@@ -214,7 +214,8 @@ class NameAndDB extends Component {
|
|
|
db: '',
|
|
db: '',
|
|
|
username: '',
|
|
username: '',
|
|
|
password: '',
|
|
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
|
|
// store *.edn to cos
|
|
|
let deployConf = dbKind === 'mongodb' ?
|
|
let deployConf = dbKind === 'mongodb' ?
|
|
|
` {:secretId "${secretID}"\n` +
|
|
` {:secretId "${secretID}"\n` +
|
|
@@ -468,7 +469,8 @@ class NameAndDB extends Component {
|
|
|
username,
|
|
username,
|
|
|
password,
|
|
password,
|
|
|
admin,
|
|
admin,
|
|
|
- customName
|
|
|
|
|
|
|
+ customName,
|
|
|
|
|
+ disableDeployButton
|
|
|
} = this.state;
|
|
} = this.state;
|
|
|
let {secretID, secretKey, appId, bucketName, cloudID} = this.props
|
|
let {secretID, secretKey, appId, bucketName, cloudID} = this.props
|
|
|
return (
|
|
return (
|
|
@@ -508,7 +510,7 @@ class NameAndDB extends Component {
|
|
|
this.state.dbKind === 'mongodb' ?
|
|
this.state.dbKind === 'mongodb' ?
|
|
|
<div>
|
|
<div>
|
|
|
<div>
|
|
<div>
|
|
|
- <span>host</span>
|
|
|
|
|
|
|
+ <span className='item-title-cloud'>地址</span>
|
|
|
<Input style={{width: 250}} value={this.state.host}
|
|
<Input style={{width: 250}} value={this.state.host}
|
|
|
onChange={(e) => {
|
|
onChange={(e) => {
|
|
|
this.setState({host: e.target.value})
|
|
this.setState({host: e.target.value})
|
|
@@ -517,7 +519,7 @@ class NameAndDB extends Component {
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
<div>
|
|
|
- <span>db-name</span>
|
|
|
|
|
|
|
+ <span className='item-title-cloud'>数据库名称</span>
|
|
|
<Input style={{width: 250}} value={this.state.db}
|
|
<Input style={{width: 250}} value={this.state.db}
|
|
|
onChange={(e) => {
|
|
onChange={(e) => {
|
|
|
this.setState({db: e.target.value})
|
|
this.setState({db: e.target.value})
|
|
@@ -526,7 +528,7 @@ class NameAndDB extends Component {
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
<div>
|
|
|
- <span>admin-db</span>
|
|
|
|
|
|
|
+ <span className='item-title-cloud'>验证数据库</span>
|
|
|
<Input style={{width: 250}} value={this.state.admin}
|
|
<Input style={{width: 250}} value={this.state.admin}
|
|
|
onChange={(e) => {
|
|
onChange={(e) => {
|
|
|
this.setState({admin: e.target.value})
|
|
this.setState({admin: e.target.value})
|
|
@@ -535,7 +537,7 @@ class NameAndDB extends Component {
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
<div>
|
|
|
- <span>username</span>
|
|
|
|
|
|
|
+ <span className='item-title-cloud'>用户名</span>
|
|
|
<Input style={{width: 250}} value={this.state.username}
|
|
<Input style={{width: 250}} value={this.state.username}
|
|
|
onChange={(e) => {
|
|
onChange={(e) => {
|
|
|
this.setState({username: e.target.value})
|
|
this.setState({username: e.target.value})
|
|
@@ -544,7 +546,7 @@ class NameAndDB extends Component {
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
<div>
|
|
|
- <span>password</span>
|
|
|
|
|
|
|
+ <span className='item-title-cloud'>密码</span>
|
|
|
<Input type='password' style={{width: 250}} value={this.state.password}
|
|
<Input type='password' style={{width: 250}} value={this.state.password}
|
|
|
onChange={(e) => {
|
|
onChange={(e) => {
|
|
|
this.setState({password: e.target.value})
|
|
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>
|
|
</div>
|
|
|
</Modal>
|
|
</Modal>
|
|
|
</div>
|
|
</div>
|