Skip to content

Commit

Permalink
Merge pull request #6727 from ioito/hotfix/qx-default-region-id
Browse files Browse the repository at this point in the history
fix: default region id
  • Loading branch information
easy-mj committed Jun 19, 2024
2 parents 985fce5 + 6320f27 commit 3edaefe
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 23 deletions.
4 changes: 2 additions & 2 deletions containers/Cloudenv/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -653,9 +653,9 @@
"cloudenv.international_cloud": "Public Cloud",
"cloudenv.finance_cloud": "Financial Cloud",
"cloudenv.cloudaccount.apsara.endpoint": "ASAPI Endpoint",
"cloudenv.cloudaccount.apsara.default_region": "Default RegionId",
"cloudenv.cloudaccount.hcso.endpoint_domain": "Endpoint Domain",
"cloudenv.cloudaccount.hcso.default_region": "Default Region ID",
"cloudenv.cloudaccount.hcso.region_id": "Default Region ID",
"cloudenv.cloudaccount.region_id": "Default Region ID",
"cloudenv.cloudaccount.hcso.iam": "IAM Endpoint",
"cloudenv.cloudaccount.hcso.ecs": "ECS Endpoint",
"cloudenv.cloudaccount.hcso.vpc": "VPC Endpoint",
Expand Down
3 changes: 1 addition & 2 deletions containers/Cloudenv/locales/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -652,9 +652,8 @@
"cloudenv.international_cloud": "パブリッククラウド",
"cloudenv.finance_cloud": "金融クラウド",
"cloudenv.cloudaccount.apsara.endpoint": "ASAPI エンドポイント",
"cloudenv.cloudaccount.apsara.default_region": "既定のリージョン ID",
"cloudenv.cloudaccount.region_id": "既定のリージョン ID",
"cloudenv.cloudaccount.hcso.endpoint_domain": "エンドポイント ドメイン名",
"cloudenv.cloudaccount.hcso.default_region": "既定のゾーン",
"cloudenv.cloudaccount.hcso.iam": "統合認証サービスのエンドポイント",
"cloudenv.cloudaccount.hcso.ecs": "エラスティッククラウドサービスのエンドポイント",
"cloudenv.cloudaccount.hcso.vpc": "virtual@:dictionary.private_envエンドポイント",
Expand Down
3 changes: 1 addition & 2 deletions containers/Cloudenv/locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -653,9 +653,8 @@
"cloudenv.international_cloud": "公共云",
"cloudenv.finance_cloud": "金融云",
"cloudenv.cloudaccount.apsara.endpoint": "ASAPI 端点",
"cloudenv.cloudaccount.apsara.default_region": "默认区域ID",
"cloudenv.cloudaccount.region_id": "默认区域ID",
"cloudenv.cloudaccount.hcso.endpoint_domain": "端点(Endpoint)域名",
"cloudenv.cloudaccount.hcso.default_region": "默认区域",
"cloudenv.cloudaccount.hcso.iam": "统一身份认证服务 端点",
"cloudenv.cloudaccount.hcso.ecs": "弹性云服务 端点",
"cloudenv.cloudaccount.hcso.vpc": "虚拟@:dictionary.private_env 端点",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<a-form-item :label="keySecretField.label.s">
<a-input-password v-decorator="decorators.password" :placeholder="keySecretField.placeholder.s" />
</a-form-item>
<a-form-item :label="$t('cloudenv.cloudaccount.apsara.default_region')">
<a-input v-decorator="decorators.default_region" :placeholder="$t('common.tips.input', [$t('cloudenv.cloudaccount.apsara.default_region')])" />
<a-form-item :label="$t('cloudenv.cloudaccount.region_id')">
<a-input v-decorator="decorators.region_id" :placeholder="$t('common.tips.input', [$t('cloudenv.cloudaccount.region_id')])" />
</a-form-item>
<a-form-item :label="$t('cloudenv.cloudaccount.apsara.endpoint')">
<a-input v-decorator="decorators.endpoint" :placeholder="$t('common.tips.input', [$t('cloudenv.cloudaccount.apsara.endpoint')])" />
Expand Down Expand Up @@ -122,11 +122,11 @@ export default {
],
},
],
default_region: [
'default_region',
region_id: [
'region_id',
{
rules: [
{ required: true, message: this.$t('common.tips.input', [this.$t('cloudenv.cloudaccount.apsara.default_region')]) },
{ required: true, message: this.$t('common.tips.input', [this.$t('cloudenv.cloudaccount.region_id')]) },
],
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<a-form-item :label="keySecretField.label.s">
<a-input-password v-decorator="decorators.password" :placeholder="keySecretField.placeholder.s" />
</a-form-item>
<a-form-item :label="$t('cloudenv.cloudaccount.hcso.default_region')">
<a-input v-decorator="decorators.default_region" :placeholder="$t('common.tips.input', [$t('cloudenv.cloudaccount.hcso.default_region')])" />
<a-form-item :label="$t('cloudenv.cloudaccount.region_id')">
<a-input v-decorator="decorators.region_id" :placeholder="$t('common.tips.input', [$t('cloudenv.cloudaccount.region_id')])" />
<div slot="extra">
{{$t('cloudenv.cloudaccount.hcso.endpoint_domain.tips')}}
</div>
Expand Down Expand Up @@ -108,7 +108,7 @@ export default {
data () {
const keySecretField = keySecretFields[this.provider.toLowerCase()]
this.endpoint_domain_change = _.debounce(this.endpoint_domain_change, 500)
this.default_region_change = _.debounce(this.default_region_change, 500)
this.region_id_change = _.debounce(this.region_id_change, 500)
return {
docs: getCloudaccountDocs(this.$store.getters.scope),
decorators: this.getDecorators(keySecretField),
Expand All @@ -129,7 +129,7 @@ export default {
sfs_turbo: 'sfs-turbo',
},
prevs: {
default_region: '',
region_id: '',
endpoint_domain: '',
},
}
Expand Down Expand Up @@ -192,11 +192,11 @@ export default {
],
},
],
default_region: [
'default_region',
region_id: [
'region_id',
{
rules: [
{ required: true, message: this.$t('common.tips.input', [this.$t('cloudenv.cloudaccount.hcso.default_region')]) },
{ required: true, message: this.$t('common.tips.input', [this.$t('cloudenv.cloudaccount.region_id')]) },
],
},
],
Expand Down Expand Up @@ -262,7 +262,7 @@ export default {
prevs[k] = prevs[k].substring(0, i) + domain
}
if (region && region.length > 0) {
prevs[k] = prevs[k].replace(this.prevs.default_region, region)
prevs[k] = prevs[k].replace(this.prevs.region_id, region)
}
currents[k] = prevs[k]
} else {
Expand All @@ -276,15 +276,15 @@ export default {
},
endpoint_domain_change () {
const d = this.form.fc.getFieldValue('endpoint_domain')
const r = this.form.fc.getFieldValue('default_region')
const r = this.form.fc.getFieldValue('region_id')
this.form.fc.setFieldsValue(this.endpoints(d, r))
this.prevs.endpoint_domain = d
},
default_region_change () {
region_id_change () {
const d = this.form.fc.getFieldValue('endpoint_domain')
const r = this.form.fc.getFieldValue('default_region')
const r = this.form.fc.getFieldValue('region_id')
this.form.fc.setFieldsValue(this.endpoints(d, r))
this.prevs.default_region = r
this.prevs.region_id = r
},
},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
:placeholder="$t('common.tips.input', [$t('cloudenv.private_key')])"
:auto-size="{ minRows: 6, maxRows: 8 }" />
</upload-pem-file>
<a-form-item :label="$t('cloudenv.cloudaccount.region_id')">
<a-input v-decorator="decorators.region_id" :placeholder="$t('common.tips.input', [$t('cloudenv.cloudaccount.region_id')])" />
</a-form-item>
<domain-project :fc="form.fc" :form-layout="formLayout" :decorators="{ project: decorators.project, domain: decorators.domain, auto_create_project: decorators.auto_create_project }" />
<blocked-resources :decorators="{ isOpenBlockedResources: decorators.isOpenBlockedResources, blockedResources: decorators.blockedResources }" />
<proxy-setting :fc="form.fc" :fd="form.fd" ref="proxySetting" />
Expand Down Expand Up @@ -125,6 +128,14 @@ export default {
],
},
],
region_id: [
'region_id',
{
rules: [
{ required: false, message: this.$t('common.tips.input', [this.$t('cloudenv.cloudaccount.region_id')]) },
],
},
],
auto_create_project: [
'auto_create_project',
{
Expand Down

0 comments on commit 3edaefe

Please sign in to comment.