mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-23 18:49:21 +08:00
feat: 增加华为云申请证书 (#6687)
Refs https://github.com/1Panel-dev/1Panel/issues/6047
This commit is contained in:
parent
1a44f48fad
commit
5374afb226
@ -164,6 +164,10 @@ export const DNSTypes = [
|
||||
label: i18n.global.t('website.tencentCloud'),
|
||||
value: 'TencentCloud',
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('website.huaweicloud'),
|
||||
value: 'HuaweiCloud',
|
||||
},
|
||||
{
|
||||
label: 'DNSPod (' + i18n.global.t('ssl.deprecated') + ')',
|
||||
value: 'DnsPod',
|
||||
|
@ -2138,6 +2138,7 @@ const message = {
|
||||
sni: 'Origin SNI',
|
||||
sniHelper:
|
||||
"When the reverse proxy backend is HTTPS, you might need to set the origin SNI. Please refer to the CDN service provider's documentation for details.",
|
||||
huaweicloud: 'Huawei Cloud',
|
||||
},
|
||||
php: {
|
||||
short_open_tag: 'Short tag support',
|
||||
|
@ -1987,6 +1987,7 @@ const message = {
|
||||
website404Helper: '網站 404 錯誤頁僅支援 PHP 運行環境網站和靜態網站',
|
||||
sni: '回源 SNI',
|
||||
sniHelper: '反代後端為 https 的時候可能需要設置回源 SNI,具體需要看 CDN 服務商文檔',
|
||||
huaweicloud: '華為雲',
|
||||
},
|
||||
php: {
|
||||
short_open_tag: '短標簽支持',
|
||||
|
@ -1989,6 +1989,7 @@ const message = {
|
||||
website404Helper: '网站 404 错误页仅支持 PHP 运行环境网站和静态网站',
|
||||
sni: '回源 SNI',
|
||||
sniHelper: '反代后端为 https 的时候可能需要设置回源 SNI,具体需要看 CDN 服务商文档',
|
||||
huaweicloud: '华为云',
|
||||
},
|
||||
php: {
|
||||
short_open_tag: '短标签支持',
|
||||
|
@ -14,7 +14,11 @@
|
||||
<el-input v-model.trim="account.name"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('commons.table.type')" prop="type">
|
||||
<el-select v-model="account.type" :disabled="accountData.mode === 'edit'">
|
||||
<el-select
|
||||
v-model="account.type"
|
||||
:disabled="accountData.mode === 'edit'"
|
||||
@change="changeType(account.type)"
|
||||
>
|
||||
<el-option
|
||||
v-for="(type, index) in DNSTypes"
|
||||
:key="index"
|
||||
@ -25,8 +29,11 @@
|
||||
<span class="input-help text-red-500" v-if="account.type === 'DnsPod'">
|
||||
{{ $t('ssl.deprecatedHelper') }}
|
||||
</span>
|
||||
<span class="input-help text-red-500" v-if="account.type === 'CloudFlare'">
|
||||
{{ $t('ssl.cfHelper') }}
|
||||
</span>
|
||||
</el-form-item>
|
||||
<div v-if="account.type === 'AliYun'">
|
||||
<div v-if="account.type === 'AliYun' || account.type === 'HuaweiCloud'">
|
||||
<el-form-item label="Access Key" prop="authorization.accessKey">
|
||||
<el-input v-model.trim="account.authorization['accessKey']"></el-input>
|
||||
</el-form-item>
|
||||
@ -34,6 +41,9 @@
|
||||
<el-input v-model.trim="account.authorization['secretKey']"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-form-item label="Region" prop="authorization.region" v-if="account.type === 'HuaweiCloud'">
|
||||
<el-input v-model.trim="account.authorization['region']" :placeholder="'cn-north-1'"></el-input>
|
||||
</el-form-item>
|
||||
<div v-if="account.type === 'TencentCloud'">
|
||||
<el-form-item label="Secret ID" prop="authorization.secretID">
|
||||
<el-input v-model.trim="account.authorization['secretID']"></el-input>
|
||||
@ -57,9 +67,6 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="API Token" prop="authorization.apiKey">
|
||||
<el-input v-model.trim="account.authorization['apiKey']"></el-input>
|
||||
<span class="input-help text-red-500">
|
||||
{{ $t('ssl.cfHelper') }}
|
||||
</span>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-form-item
|
||||
@ -130,6 +137,7 @@ const rules = ref<any>({
|
||||
apiKey: [Rules.requiredInput],
|
||||
apiUser: [Rules.requiredInput],
|
||||
secretID: [Rules.requiredInput],
|
||||
region: [Rules.requiredInput],
|
||||
},
|
||||
});
|
||||
const account = ref({
|
||||
@ -156,6 +164,14 @@ const resetForm = () => {
|
||||
accountForm.value?.resetFields();
|
||||
};
|
||||
|
||||
const changeType = (type: string) => {
|
||||
account.value.type = type;
|
||||
account.value.authorization = {};
|
||||
if (account.value.type == 'HuaweiCloud') {
|
||||
account.value.authorization['region'] = 'cn-north-1';
|
||||
}
|
||||
};
|
||||
|
||||
const acceptParams = async (props: AccountProps) => {
|
||||
accountData.value.mode = props.mode;
|
||||
if (props.mode === 'edit') {
|
||||
|
Loading…
Reference in New Issue
Block a user