mirror of
https://github.com/usual2970/certimate.git
synced 2025-10-05 05:54:53 +00:00
Merge pull request #254 from fudiwei/feat/cloud-load-balance
feat: huaweicloud elb deployer
This commit is contained in:
@@ -6,7 +6,7 @@ type DeployEditContext = {
|
||||
deploy: DeployConfig;
|
||||
error: Record<string, string>;
|
||||
setDeploy: (deploy: DeployConfig) => void;
|
||||
setError: (error: Record<string, string>) => void;
|
||||
setError: (error: Record<string, string | undefined>) => void;
|
||||
};
|
||||
|
||||
export const Context = createContext<DeployEditContext>({} as DeployEditContext);
|
||||
|
@@ -15,6 +15,7 @@ import DeployToTencentCDN from "./DeployToTencentCDN";
|
||||
import DeployToTencentCLB from "./DeployToTencentCLB";
|
||||
import DeployToTencentCOS from "./DeployToTencentCOS";
|
||||
import DeployToHuaweiCloudCDN from "./DeployToHuaweiCloudCDN";
|
||||
import DeployToHuaweiCloudELB from "./DeployToHuaweiCloudELB";
|
||||
import DeployToQiniuCDN from "./DeployToQiniuCDN";
|
||||
import DeployToSSH from "./DeployToSSH";
|
||||
import DeployToWebhook from "./DeployToWebhook";
|
||||
@@ -83,7 +84,7 @@ const DeployEditDialog = ({ trigger, deployConfig, onSave }: DeployEditDialogPro
|
||||
return true;
|
||||
}
|
||||
|
||||
return item.configType === locDeployConfig.type.split("-")[0];
|
||||
return item.configType === deployTargetsMap.get(locDeployConfig.type)?.provider;
|
||||
});
|
||||
|
||||
const handleSaveClick = () => {
|
||||
@@ -129,6 +130,9 @@ const DeployEditDialog = ({ trigger, deployConfig, onSave }: DeployEditDialogPro
|
||||
case "huaweicloud-cdn":
|
||||
childComponent = <DeployToHuaweiCloudCDN />;
|
||||
break;
|
||||
case "huaweicloud-elb":
|
||||
childComponent = <DeployToHuaweiCloudELB />;
|
||||
break;
|
||||
case "qiniu-cdn":
|
||||
childComponent = <DeployToQiniuCDN />;
|
||||
break;
|
||||
|
@@ -12,6 +12,17 @@ const DeployToAliyunCDN = () => {
|
||||
|
||||
const { deploy: data, setDeploy, error, setError } = useDeployEditContext();
|
||||
|
||||
useEffect(() => {
|
||||
if (!data.id) {
|
||||
setDeploy({
|
||||
...data,
|
||||
config: {
|
||||
domain: "",
|
||||
},
|
||||
});
|
||||
}
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
setError({});
|
||||
}, []);
|
||||
|
@@ -8,9 +8,22 @@ import { Label } from "@/components/ui/label";
|
||||
import { useDeployEditContext } from "./DeployEdit";
|
||||
|
||||
const DeployToAliyunOSS = () => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const { deploy: data, setDeploy, error, setError } = useDeployEditContext();
|
||||
|
||||
const { t } = useTranslation();
|
||||
useEffect(() => {
|
||||
if (!data.id) {
|
||||
setDeploy({
|
||||
...data,
|
||||
config: {
|
||||
endpoint: "oss-cn-hangzhou.aliyuncs.com",
|
||||
bucket: "",
|
||||
domain: "",
|
||||
},
|
||||
});
|
||||
}
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
setError({});
|
||||
@@ -32,11 +45,11 @@ const DeployToAliyunOSS = () => {
|
||||
}, [data]);
|
||||
|
||||
useEffect(() => {
|
||||
const bucketResp = bucketSchema.safeParse(data.config?.domain);
|
||||
if (!bucketResp.success) {
|
||||
const resp = bucketSchema.safeParse(data.config?.bucket);
|
||||
if (!resp.success) {
|
||||
setError({
|
||||
...error,
|
||||
bucket: JSON.parse(bucketResp.error.message)[0].message,
|
||||
bucket: JSON.parse(resp.error.message)[0].message,
|
||||
});
|
||||
} else {
|
||||
setError({
|
||||
@@ -44,35 +57,22 @@ const DeployToAliyunOSS = () => {
|
||||
bucket: "",
|
||||
});
|
||||
}
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (!data.id) {
|
||||
setDeploy({
|
||||
...data,
|
||||
config: {
|
||||
endpoint: "oss-cn-hangzhou.aliyuncs.com",
|
||||
bucket: "",
|
||||
domain: "",
|
||||
},
|
||||
});
|
||||
}
|
||||
}, []);
|
||||
}, [data]);
|
||||
|
||||
const domainSchema = z.string().regex(/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/, {
|
||||
message: t("common.errmsg.domain_invalid"),
|
||||
});
|
||||
|
||||
const bucketSchema = z.string().min(1, {
|
||||
message: t("domain.deployment.form.oss_bucket.placeholder"),
|
||||
message: t("domain.deployment.form.aliyun_oss_bucket.placeholder"),
|
||||
});
|
||||
|
||||
return (
|
||||
<div className="flex flex-col space-y-8">
|
||||
<div>
|
||||
<Label>{t("domain.deployment.form.oss_endpoint.label")}</Label>
|
||||
<Label>{t("domain.deployment.form.aliyun_oss_endpoint.label")}</Label>
|
||||
<Input
|
||||
placeholder={t("domain.deployment.form.oss_endpoint.placeholder")}
|
||||
placeholder={t("domain.deployment.form.aliyun_oss_endpoint.placeholder")}
|
||||
className="w-full mt-1"
|
||||
value={data?.config?.endpoint}
|
||||
onChange={(e) => {
|
||||
@@ -91,9 +91,9 @@ const DeployToAliyunOSS = () => {
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Label>{t("domain.deployment.form.oss_bucket.label")}</Label>
|
||||
<Label>{t("domain.deployment.form.aliyun_oss_bucket.label")}</Label>
|
||||
<Input
|
||||
placeholder={t("domain.deployment.form.oss_bucket.placeholder")}
|
||||
placeholder={t("domain.deployment.form.aliyun_oss_bucket.placeholder")}
|
||||
className="w-full mt-1"
|
||||
value={data?.config?.bucket}
|
||||
onChange={(e) => {
|
||||
|
@@ -12,6 +12,18 @@ const DeployToHuaweiCloudCDN = () => {
|
||||
|
||||
const { deploy: data, setDeploy, error, setError } = useDeployEditContext();
|
||||
|
||||
useEffect(() => {
|
||||
if (!data.id) {
|
||||
setDeploy({
|
||||
...data,
|
||||
config: {
|
||||
region: "cn-north-1",
|
||||
domain: "",
|
||||
},
|
||||
});
|
||||
}
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
setError({});
|
||||
}, []);
|
||||
@@ -37,6 +49,23 @@ const DeployToHuaweiCloudCDN = () => {
|
||||
|
||||
return (
|
||||
<div className="flex flex-col space-y-8">
|
||||
<div>
|
||||
<Label>{t("domain.deployment.form.huaweicloud_elb_region.label")}</Label>
|
||||
<Input
|
||||
placeholder={t("domain.deployment.form.huaweicloud_elb_region.placeholder")}
|
||||
className="w-full mt-1"
|
||||
value={data?.config?.region}
|
||||
onChange={(e) => {
|
||||
const newData = produce(data, (draft) => {
|
||||
draft.config ??= {};
|
||||
draft.config.region = e.target.value?.trim();
|
||||
});
|
||||
setDeploy(newData);
|
||||
}}
|
||||
/>
|
||||
<div className="text-red-600 text-sm mt-1">{error?.region}</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Label>{t("domain.deployment.form.domain.label")}</Label>
|
||||
<Input
|
||||
@@ -44,26 +73,9 @@ const DeployToHuaweiCloudCDN = () => {
|
||||
className="w-full mt-1"
|
||||
value={data?.config?.domain}
|
||||
onChange={(e) => {
|
||||
const temp = e.target.value;
|
||||
|
||||
const resp = domainSchema.safeParse(temp);
|
||||
if (!resp.success) {
|
||||
setError({
|
||||
...error,
|
||||
domain: JSON.parse(resp.error.message)[0].message,
|
||||
});
|
||||
} else {
|
||||
setError({
|
||||
...error,
|
||||
domain: "",
|
||||
});
|
||||
}
|
||||
|
||||
const newData = produce(data, (draft) => {
|
||||
if (!draft.config) {
|
||||
draft.config = {};
|
||||
}
|
||||
draft.config.domain = temp;
|
||||
draft.config ??= {};
|
||||
draft.config.domain = e.target.value?.trim();
|
||||
});
|
||||
setDeploy(newData);
|
||||
}}
|
||||
|
190
ui/src/components/certimate/DeployToHuaweiCloudELB.tsx
Normal file
190
ui/src/components/certimate/DeployToHuaweiCloudELB.tsx
Normal file
@@ -0,0 +1,190 @@
|
||||
import { useEffect } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { z } from "zod";
|
||||
import { produce } from "immer";
|
||||
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import { Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
|
||||
import { useDeployEditContext } from "./DeployEdit";
|
||||
|
||||
const DeployToHuaweiCloudCDN = () => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const { deploy: data, setDeploy, error, setError } = useDeployEditContext();
|
||||
|
||||
useEffect(() => {
|
||||
if (!data.id) {
|
||||
setDeploy({
|
||||
...data,
|
||||
config: {
|
||||
region: "cn-north-1",
|
||||
resourceType: "",
|
||||
certificateId: "",
|
||||
loadbalancerId: "",
|
||||
listenerId: "",
|
||||
},
|
||||
});
|
||||
}
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
setError({});
|
||||
}, []);
|
||||
|
||||
const formSchema = z
|
||||
.object({
|
||||
region: z.string().min(1, t("domain.deployment.form.huaweicloud_elb_region.placeholder")),
|
||||
resourceType: z.string().min(1, t("domain.deployment.form.huaweicloud_elb_resource_type.placeholder")),
|
||||
certificateId: z.string().optional(),
|
||||
loadbalancerId: z.string().optional(),
|
||||
listenerId: z.string().optional(),
|
||||
})
|
||||
.refine((data) => (data.resourceType === "certificate" ? !!data.certificateId?.trim() : true), {
|
||||
message: t("domain.deployment.form.huaweicloud_elb_certificate_id.placeholder"),
|
||||
path: ["certificateId"],
|
||||
})
|
||||
.refine((data) => (data.resourceType === "loadbalancer" ? !!data.certificateId?.trim() : true), {
|
||||
message: t("domain.deployment.form.huaweicloud_elb_loadbalancer_id.placeholder"),
|
||||
path: ["loadbalancerId"],
|
||||
})
|
||||
.refine((data) => (data.resourceType === "listener" ? !!data.listenerId?.trim() : true), {
|
||||
message: t("domain.deployment.form.huaweicloud_elb_listener_id.placeholder"),
|
||||
path: ["listenerId"],
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
const res = formSchema.safeParse(data.config);
|
||||
if (!res.success) {
|
||||
setError({
|
||||
...error,
|
||||
region: res.error.errors.find((e) => e.path[0] === "region")?.message,
|
||||
resourceType: res.error.errors.find((e) => e.path[0] === "resourceType")?.message,
|
||||
certificateId: res.error.errors.find((e) => e.path[0] === "certificateId")?.message,
|
||||
loadbalancerId: res.error.errors.find((e) => e.path[0] === "loadbalancerId")?.message,
|
||||
listenerId: res.error.errors.find((e) => e.path[0] === "listenerId")?.message,
|
||||
});
|
||||
} else {
|
||||
setError({
|
||||
...error,
|
||||
region: undefined,
|
||||
resourceType: undefined,
|
||||
certificateId: undefined,
|
||||
loadbalancerId: undefined,
|
||||
listenerId: undefined,
|
||||
});
|
||||
}
|
||||
}, [data]);
|
||||
|
||||
return (
|
||||
<div className="flex flex-col space-y-8">
|
||||
<div>
|
||||
<Label>{t("domain.deployment.form.huaweicloud_elb_region.label")}</Label>
|
||||
<Input
|
||||
placeholder={t("domain.deployment.form.huaweicloud_elb_region.placeholder")}
|
||||
className="w-full mt-1"
|
||||
value={data?.config?.region}
|
||||
onChange={(e) => {
|
||||
const newData = produce(data, (draft) => {
|
||||
draft.config ??= {};
|
||||
draft.config.region = e.target.value?.trim();
|
||||
});
|
||||
setDeploy(newData);
|
||||
}}
|
||||
/>
|
||||
<div className="text-red-600 text-sm mt-1">{error?.region}</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Label>{t("domain.deployment.form.huaweicloud_elb_resource_type.label")}</Label>
|
||||
<Select
|
||||
value={data?.config?.resourceType}
|
||||
onValueChange={(value) => {
|
||||
const newData = produce(data, (draft) => {
|
||||
draft.config ??= {};
|
||||
draft.config.resourceType = value?.trim();
|
||||
});
|
||||
setDeploy(newData);
|
||||
}}
|
||||
>
|
||||
<SelectTrigger>
|
||||
<SelectValue placeholder={t("domain.deployment.form.huaweicloud_elb_resource_type.placeholder")} />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectGroup>
|
||||
<SelectItem value="certificate">{t("domain.deployment.form.huaweicloud_elb_resource_type.option.certificate.label")}</SelectItem>
|
||||
<SelectItem value="loadbalancer">{t("domain.deployment.form.huaweicloud_elb_resource_type.option.loadbalancer.label")}</SelectItem>
|
||||
<SelectItem value="listener">{t("domain.deployment.form.huaweicloud_elb_resource_type.option.listener.label")}</SelectItem>
|
||||
</SelectGroup>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
<div className="text-red-600 text-sm mt-1">{error?.resourceType}</div>
|
||||
</div>
|
||||
|
||||
{data?.config?.resourceType === "certificate" ? (
|
||||
<div>
|
||||
<Label>{t("domain.deployment.form.huaweicloud_elb_certificate_id.label")}</Label>
|
||||
<Input
|
||||
placeholder={t("domain.deployment.form.huaweicloud_elb_certificate_id.placeholder")}
|
||||
className="w-full mt-1"
|
||||
value={data?.config?.certificateId}
|
||||
onChange={(e) => {
|
||||
const newData = produce(data, (draft) => {
|
||||
draft.config ??= {};
|
||||
draft.config.certificateId = e.target.value?.trim();
|
||||
});
|
||||
setDeploy(newData);
|
||||
}}
|
||||
/>
|
||||
<div className="text-red-600 text-sm mt-1">{error?.certificateId}</div>
|
||||
</div>
|
||||
) : (
|
||||
<></>
|
||||
)}
|
||||
|
||||
{data?.config?.resourceType === "loadbalancer" ? (
|
||||
<div>
|
||||
<Label>{t("domain.deployment.form.huaweicloud_elb_loadbalancer_id.label")}</Label>
|
||||
<Input
|
||||
placeholder={t("domain.deployment.form.huaweicloud_elb_loadbalancer_id.placeholder")}
|
||||
className="w-full mt-1"
|
||||
value={data?.config?.loadbalancerId}
|
||||
onChange={(e) => {
|
||||
const newData = produce(data, (draft) => {
|
||||
draft.config ??= {};
|
||||
draft.config.loadbalancerId = e.target.value?.trim();
|
||||
});
|
||||
setDeploy(newData);
|
||||
}}
|
||||
/>
|
||||
<div className="text-red-600 text-sm mt-1">{error?.loadbalancerId}</div>
|
||||
</div>
|
||||
) : (
|
||||
<></>
|
||||
)}
|
||||
|
||||
{data?.config?.resourceType === "listener" ? (
|
||||
<div>
|
||||
<Label>{t("domain.deployment.form.huaweicloud_elb_listener_id.label")}</Label>
|
||||
<Input
|
||||
placeholder={t("domain.deployment.form.huaweicloud_elb_listener_id.placeholder")}
|
||||
className="w-full mt-1"
|
||||
value={data?.config?.listenerId}
|
||||
onChange={(e) => {
|
||||
const newData = produce(data, (draft) => {
|
||||
draft.config ??= {};
|
||||
draft.config.listenerId = e.target.value?.trim();
|
||||
});
|
||||
setDeploy(newData);
|
||||
}}
|
||||
/>
|
||||
<div className="text-red-600 text-sm mt-1">{error?.listenerId}</div>
|
||||
</div>
|
||||
) : (
|
||||
<></>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default DeployToHuaweiCloudCDN;
|
@@ -8,13 +8,8 @@ import { useDeployEditContext } from "./DeployEdit";
|
||||
|
||||
const DeployToKubernetesSecret = () => {
|
||||
const { t } = useTranslation();
|
||||
const { setError } = useDeployEditContext();
|
||||
|
||||
useEffect(() => {
|
||||
setError({});
|
||||
}, []);
|
||||
|
||||
const { deploy: data, setDeploy } = useDeployEditContext();
|
||||
const { deploy: data, setDeploy, setError } = useDeployEditContext();
|
||||
|
||||
useEffect(() => {
|
||||
if (!data.id) {
|
||||
@@ -30,6 +25,10 @@ const DeployToKubernetesSecret = () => {
|
||||
}
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
setError({});
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="flex flex-col space-y-8">
|
||||
|
@@ -12,6 +12,17 @@ const DeployToQiniuCDN = () => {
|
||||
|
||||
const { deploy: data, setDeploy, error, setError } = useDeployEditContext();
|
||||
|
||||
useEffect(() => {
|
||||
if (!data.id) {
|
||||
setDeploy({
|
||||
...data,
|
||||
config: {
|
||||
domain: "",
|
||||
},
|
||||
});
|
||||
}
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
setError({});
|
||||
}, []);
|
||||
|
@@ -76,7 +76,6 @@ const DeployToTencentCLB = () => {
|
||||
}
|
||||
}, []);
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
if (!data.id) {
|
||||
setDeploy({
|
||||
@@ -92,7 +91,7 @@ const DeployToTencentCLB = () => {
|
||||
}, []);
|
||||
|
||||
const regionSchema = z.string().regex(/^ap-[a-z]+$/, {
|
||||
message: t("domain.deployment.form.clb_region.placeholder"),
|
||||
message: t("domain.deployment.form.tencent_clb_region.placeholder"),
|
||||
});
|
||||
|
||||
const domainSchema = z.string().regex(/^$|^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/, {
|
||||
@@ -100,19 +99,19 @@ const DeployToTencentCLB = () => {
|
||||
});
|
||||
|
||||
const clbIdSchema = z.string().regex(/^lb-[a-zA-Z0-9]{8}$/, {
|
||||
message: t("domain.deployment.form.clb_id.placeholder"),
|
||||
message: t("domain.deployment.form.tencent_clb_id.placeholder"),
|
||||
});
|
||||
|
||||
const lsnIdSchema = z.string().regex(/^lbl-.{8}$/, {
|
||||
message: t("domain.deployment.form.clb_listener.placeholder"),
|
||||
message: t("domain.deployment.form.tencent_clb_listener.placeholder"),
|
||||
});
|
||||
|
||||
return (
|
||||
<div className="flex flex-col space-y-8">
|
||||
<div>
|
||||
<Label>{t("domain.deployment.form.clb_region.label")}</Label>
|
||||
<Label>{t("domain.deployment.form.tencent_clb_region.label")}</Label>
|
||||
<Input
|
||||
placeholder={t("domain.deployment.form.clb_region.placeholder")}
|
||||
placeholder={t("domain.deployment.form.tencent_clb_region.placeholder")}
|
||||
className="w-full mt-1"
|
||||
value={data?.config?.region}
|
||||
onChange={(e) => {
|
||||
@@ -144,9 +143,9 @@ const DeployToTencentCLB = () => {
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Label>{t("domain.deployment.form.clb_id.label")}</Label>
|
||||
<Label>{t("domain.deployment.form.tencent_clb_id.label")}</Label>
|
||||
<Input
|
||||
placeholder={t("domain.deployment.form.clb_id.placeholder")}
|
||||
placeholder={t("domain.deployment.form.tencent_clb_id.placeholder")}
|
||||
className="w-full mt-1"
|
||||
value={data?.config?.clbId}
|
||||
onChange={(e) => {
|
||||
@@ -178,9 +177,9 @@ const DeployToTencentCLB = () => {
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Label>{t("domain.deployment.form.clb_listener.label")}</Label>
|
||||
<Label>{t("domain.deployment.form.tencent_clb_listener.label")}</Label>
|
||||
<Input
|
||||
placeholder={t("domain.deployment.form.clb_listener.placeholder")}
|
||||
placeholder={t("domain.deployment.form.tencent_clb_listener.placeholder")}
|
||||
className="w-full mt-1"
|
||||
value={data?.config?.lsnId}
|
||||
onChange={(e) => {
|
||||
@@ -212,9 +211,9 @@ const DeployToTencentCLB = () => {
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Label>{t("domain.deployment.form.clb_domain.label")}</Label>
|
||||
<Label>{t("domain.deployment.form.tencent_clb_domain.label")}</Label>
|
||||
<Input
|
||||
placeholder={t("domain.deployment.form.clb_domain.placeholder")}
|
||||
placeholder={t("domain.deployment.form.tencent_clb_domain.placeholder")}
|
||||
className="w-full mt-1"
|
||||
value={data?.config?.domain}
|
||||
onChange={(e) => {
|
||||
|
@@ -89,9 +89,9 @@ const DeployToTencentCOS = () => {
|
||||
return (
|
||||
<div className="flex flex-col space-y-8">
|
||||
<div>
|
||||
<Label>{t("domain.deployment.form.cos_region.label")}</Label>
|
||||
<Label>{t("domain.deployment.form.tencent_cos_region.label")}</Label>
|
||||
<Input
|
||||
placeholder={t("domain.deployment.form.cos_region.placeholder")}
|
||||
placeholder={t("domain.deployment.form.tencent_cos_region.placeholder")}
|
||||
className="w-full mt-1"
|
||||
value={data?.config?.region}
|
||||
onChange={(e) => {
|
||||
@@ -123,9 +123,9 @@ const DeployToTencentCOS = () => {
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Label>{t("domain.deployment.form.cos_bucket.label")}</Label>
|
||||
<Label>{t("domain.deployment.form.tencent_cos_bucket.label")}</Label>
|
||||
<Input
|
||||
placeholder={t("domain.deployment.form.cos_bucket.placeholder")}
|
||||
placeholder={t("domain.deployment.form.tencent_cos_bucket.placeholder")}
|
||||
className="w-full mt-1"
|
||||
value={data?.config?.bucket}
|
||||
onChange={(e) => {
|
||||
|
@@ -65,6 +65,7 @@ export type Statistic = {
|
||||
|
||||
type DeployTarget = {
|
||||
type: string;
|
||||
provider: string;
|
||||
name: string;
|
||||
icon: string;
|
||||
};
|
||||
@@ -78,10 +79,11 @@ export const deployTargetsMap: Map<DeployTarget["type"], DeployTarget> = new Map
|
||||
["tencent-clb", "common.provider.tencent.clb", "/imgs/providers/tencent.svg"],
|
||||
["tencent-cos", "common.provider.tencent.cos", "/imgs/providers/tencent.svg"],
|
||||
["huaweicloud-cdn", "common.provider.huaweicloud.cdn", "/imgs/providers/huaweicloud.svg"],
|
||||
["huaweicloud-elb", "common.provider.huaweicloud.elb", "/imgs/providers/huaweicloud.svg"],
|
||||
["qiniu-cdn", "common.provider.qiniu.cdn", "/imgs/providers/qiniu.svg"],
|
||||
["local", "common.provider.local", "/imgs/providers/local.svg"],
|
||||
["ssh", "common.provider.ssh", "/imgs/providers/ssh.svg"],
|
||||
["webhook", "common.provider.webhook", "/imgs/providers/webhook.svg"],
|
||||
["k8s-secret", "common.provider.kubernetes.secret", "/imgs/providers/k8s.svg"],
|
||||
].map(([type, name, icon]) => [type, { type, name, icon }])
|
||||
].map(([type, name, icon]) => [type, { type, provider: type.split("-")[0], name, icon }])
|
||||
);
|
||||
|
@@ -56,14 +56,15 @@
|
||||
"common.provider.aliyun.oss": "Alibaba Cloud - OSS",
|
||||
"common.provider.aliyun.cdn": "Alibaba Cloud - CDN",
|
||||
"common.provider.aliyun.dcdn": "Alibaba Cloud - DCDN",
|
||||
"common.provider.tencent": "Tencent",
|
||||
"common.provider.tencent.cdn": "Tencent - CDN",
|
||||
"common.provider.tencent.clb": "Tencent - CLB",
|
||||
"common.provider.tencent.cos": "Tencent - COS",
|
||||
"common.provider.tencent": "Tencent Cloud",
|
||||
"common.provider.tencent.cdn": "Tencent Cloud - CDN",
|
||||
"common.provider.tencent.clb": "Tencent Cloud - CLB",
|
||||
"common.provider.tencent.cos": "Tencent Cloud - COS",
|
||||
"common.provider.huaweicloud": "Huawei Cloud",
|
||||
"common.provider.huaweicloud.cdn": "Huawei Cloud - CDN",
|
||||
"common.provider.qiniu": "Qiniu",
|
||||
"common.provider.qiniu.cdn": "Qiniu - CDN",
|
||||
"common.provider.huaweicloud.elb": "Huawei Cloud - ELB",
|
||||
"common.provider.qiniu": "Qiniu Cloud",
|
||||
"common.provider.qiniu.cdn": "Qiniu Cloud - CDN",
|
||||
"common.provider.aws": "AWS",
|
||||
"common.provider.cloudflare": "Cloudflare",
|
||||
"common.provider.namesilo": "Namesilo",
|
||||
|
@@ -54,21 +54,38 @@
|
||||
"domain.deployment.form.access.label": "Access Configuration",
|
||||
"domain.deployment.form.access.placeholder": "Please select provider authorization configuration",
|
||||
"domain.deployment.form.access.list": "Provider Authorization Configurations",
|
||||
"domain.deployment.form.cos_region.label": "Region",
|
||||
"domain.deployment.form.cos_region.placeholder": "Please enter region, e.g. ap-guangzhou",
|
||||
"domain.deployment.form.cos_bucket.label": "Bucket",
|
||||
"domain.deployment.form.cos_bucket.placeholder": "Please enter bucket, e.g. example-1250000000",
|
||||
"domain.deployment.form.clb_region.label": "region(please distinguish between region and availability zone)",
|
||||
"domain.deployment.form.clb_region.placeholder": "Please enter region, e.g. ap-guangzhou",
|
||||
"domain.deployment.form.clb_id.label": "CLB id",
|
||||
"domain.deployment.form.clb_id.placeholder": "Please enter CLB id, e.g. lb-xxxxxxxx",
|
||||
"domain.deployment.form.clb_listener.label": "Listener id",
|
||||
"domain.deployment.form.clb_listener.placeholder": "Please enter listener id, e.g. lbl-xxxxxxxx. The specific listener should have set the corresponding domain HTTPS forwarding, and the original certificate domain should be consistent with the certificate to be deployed.",
|
||||
"domain.deployment.form.clb_domain.label": "Deploy to domain (Wildcard domain is also supported)",
|
||||
"domain.deployment.form.clb_domain.placeholder": "Please enter domain to be deployed. If SNI is not enabled, you can leave it blank.",
|
||||
"domain.deployment.form.domain.label": "Deploy to domain (Single domain only, not wildcard domain)",
|
||||
"domain.deployment.form.domain.label.wildsupported": "Deploy to domain (Wildcard domain is also supported)",
|
||||
"domain.deployment.form.domain.placeholder": "Please enter domain to be deployed",
|
||||
"domain.deployment.form.aliyun_oss_endpoint.label": "Endpoint",
|
||||
"domain.deployment.form.aliyun_oss_endpoint.placeholder": "Please enter endpoint",
|
||||
"domain.deployment.form.aliyun_oss_bucket.label": "Bucket",
|
||||
"domain.deployment.form.aliyun_oss_bucket.placeholder": "Please enter bucket",
|
||||
"domain.deployment.form.tencent_cos_region.label": "Region",
|
||||
"domain.deployment.form.tencent_cos_region.placeholder": "Please enter region (e.g. ap-guangzhou)",
|
||||
"domain.deployment.form.tencent_cos_bucket.label": "Bucket",
|
||||
"domain.deployment.form.tencent_cos_bucket.placeholder": "Please enter bucket",
|
||||
"domain.deployment.form.tencent_clb_region.label": "Region",
|
||||
"domain.deployment.form.tencent_clb_region.placeholder": "Please enter region (e.g. ap-guangzhou)",
|
||||
"domain.deployment.form.tencent_clb_id.label": "CLB ID",
|
||||
"domain.deployment.form.tencent_clb_id.placeholder": "Please enter CLB ID (e.g. lb-xxxxxxxx)",
|
||||
"domain.deployment.form.tencent_clb_listener.label": "Listener ID",
|
||||
"domain.deployment.form.tencent_clb_listener.placeholder": "Please enter listener ID (e.g. lbl-xxxxxxxx). The specific listener should have set the corresponding domain HTTPS forwarding, and the original certificate domain should be consistent with the certificate to be deployed.",
|
||||
"domain.deployment.form.tencent_clb_domain.label": "Deploy to domain (Wildcard domain is also supported)",
|
||||
"domain.deployment.form.tencent_clb_domain.placeholder": "Please enter domain to be deployed. If SNI is not enabled, you can leave it blank.",
|
||||
"domain.deployment.form.huaweicloud_elb_region.label": "Region",
|
||||
"domain.deployment.form.huaweicloud_elb_region.placeholder": "Please enter region (e.g. cn-north-1)",
|
||||
"domain.deployment.form.huaweicloud_elb_resource_type.label": "Resource Type",
|
||||
"domain.deployment.form.huaweicloud_elb_resource_type.placeholder": "Please select ELB resource type",
|
||||
"domain.deployment.form.huaweicloud_elb_resource_type.option.certificate.label": "ELB Certificate",
|
||||
"domain.deployment.form.huaweicloud_elb_resource_type.option.loadbalancer.label": "ELB LoadBalancer",
|
||||
"domain.deployment.form.huaweicloud_elb_resource_type.option.listener.label": "ELB Listener",
|
||||
"domain.deployment.form.huaweicloud_elb_certificate_id.label": "Certificate ID",
|
||||
"domain.deployment.form.huaweicloud_elb_certificate_id.placeholder": "Please enter ELB certificate ID",
|
||||
"domain.deployment.form.huaweicloud_elb_loadbalancer_id.label": "LoadBalancer ID",
|
||||
"domain.deployment.form.huaweicloud_elb_loadbalancer_id.placeholder": "Please enter ELB loadbalancer ID",
|
||||
"domain.deployment.form.huaweicloud_elb_listener_id.label": "Listener ID",
|
||||
"domain.deployment.form.huaweicloud_elb_listener_id.placeholder": "Please enter ELB listener ID",
|
||||
"domain.deployment.form.ssh_key_path.label": "Private Key Save Path",
|
||||
"domain.deployment.form.ssh_key_path.placeholder": "Please enter private key save path",
|
||||
"domain.deployment.form.ssh_cert_path.label": "Certificate Save Path",
|
||||
@@ -77,10 +94,6 @@
|
||||
"domain.deployment.form.ssh_pre_command.placeholder": "Command to be executed before deploying the certificate",
|
||||
"domain.deployment.form.ssh_command.label": "Command",
|
||||
"domain.deployment.form.ssh_command.placeholder": "Please enter command",
|
||||
"domain.deployment.form.oss_endpoint.label": "Endpoint",
|
||||
"domain.deployment.form.oss_endpoint.placeholder": "Please enter endpoint",
|
||||
"domain.deployment.form.oss_bucket.label": "Bucket",
|
||||
"domain.deployment.form.oss_bucket.placeholder": "Please enter bucket",
|
||||
"domain.deployment.form.k8s_namespace.label": "Namespace",
|
||||
"domain.deployment.form.k8s_namespace.placeholder": "Please enter namespace",
|
||||
"domain.deployment.form.k8s_secret_name.label": "Secret Name",
|
||||
|
@@ -51,17 +51,17 @@
|
||||
"common.errmsg.host_invalid": "请输入正确的域名或 IP 地址",
|
||||
"common.errmsg.ip_invalid": "请输入正确的 IP 地址",
|
||||
"common.errmsg.url_invalid": "请输入正确的 URL",
|
||||
|
||||
"common.provider.tencent": "腾讯云",
|
||||
"common.provider.tencent.cdn": "腾讯云 - CDN",
|
||||
"common.provider.tencent.clb": "腾讯云 - CLB",
|
||||
"common.provider.tencent.cos": "腾讯云 - COS",
|
||||
"common.provider.aliyun": "阿里云",
|
||||
"common.provider.aliyun.oss": "阿里云 - OSS",
|
||||
"common.provider.aliyun.cdn": "阿里云 - CDN",
|
||||
"common.provider.aliyun.dcdn": "阿里云 - DCDN",
|
||||
"common.provider.tencent": "腾讯云",
|
||||
"common.provider.tencent.cos": "腾讯云 - COS",
|
||||
"common.provider.tencent.cdn": "腾讯云 - CDN",
|
||||
"common.provider.tencent.clb": "腾讯云 - CLB",
|
||||
"common.provider.huaweicloud": "华为云",
|
||||
"common.provider.huaweicloud.cdn": "华为云 - CDN",
|
||||
"common.provider.huaweicloud.elb": "华为云 - ELB",
|
||||
"common.provider.qiniu": "七牛云",
|
||||
"common.provider.qiniu.cdn": "七牛云 - CDN",
|
||||
"common.provider.aws": "AWS",
|
||||
@@ -79,4 +79,3 @@
|
||||
"common.provider.telegram": "Telegram",
|
||||
"common.provider.lark": "飞书"
|
||||
}
|
||||
|
||||
|
@@ -54,21 +54,38 @@
|
||||
"domain.deployment.form.access.label": "授权配置",
|
||||
"domain.deployment.form.access.placeholder": "请选择授权配置",
|
||||
"domain.deployment.form.access.list": "服务商授权配置列表",
|
||||
"domain.deployment.form.cos_region.label": "region",
|
||||
"domain.deployment.form.cos_region.placeholder": "请输入 region, 如 ap-guangzhou",
|
||||
"domain.deployment.form.cos_bucket.label": "存储桶",
|
||||
"domain.deployment.form.cos_bucket.placeholder": "请输入存储桶名, 如 example-1250000000",
|
||||
"domain.deployment.form.clb_region.label": "region(地域, 请准确区分地域和可用区)",
|
||||
"domain.deployment.form.clb_region.placeholder": "请输入 region, 如 ap-guangzhou",
|
||||
"domain.deployment.form.clb_id.label": "CLB id",
|
||||
"domain.deployment.form.clb_id.placeholder": "请输入CLB实例id, 如 lb-xxxxxxxx",
|
||||
"domain.deployment.form.clb_listener.label": "监听器 id(对应监听器应已设置对应域名HTTPS转发, 且原证书对应域名应与待部署证书的一致)",
|
||||
"domain.deployment.form.clb_listener.placeholder": "请输入监听器id, 如 lbl-xxxxxxxx",
|
||||
"domain.deployment.form.clb_domain.label": "部署到域名(支持泛域名)",
|
||||
"domain.deployment.form.clb_domain.placeholder": "请输入部署到的域名, 如未开启SNI, 可置空忽略此项",
|
||||
"domain.deployment.form.domain.label": "部署到域名(仅支持单个域名;不支持泛域名)",
|
||||
"domain.deployment.form.domain.label.wildsupported": "部署到域名(支持泛域名)",
|
||||
"domain.deployment.form.domain.placeholder": "请输入部署到的域名",
|
||||
"domain.deployment.form.aliyun_oss_endpoint.label": "Endpoint",
|
||||
"domain.deployment.form.aliyun_oss_endpoint.placeholder": "请输入 Endpoint",
|
||||
"domain.deployment.form.aliyun_oss_bucket.label": "存储桶",
|
||||
"domain.deployment.form.aliyun_oss_bucket.placeholder": "请输入存储桶名",
|
||||
"domain.deployment.form.tencent_cos_region.label": "地域",
|
||||
"domain.deployment.form.tencent_cos_region.placeholder": "请输入地域(如 ap-guangzhou)",
|
||||
"domain.deployment.form.tencent_cos_bucket.label": "存储桶",
|
||||
"domain.deployment.form.tencent_cos_bucket.placeholder": "请输入存储桶名",
|
||||
"domain.deployment.form.tencent_clb_region.label": "地域",
|
||||
"domain.deployment.form.tencent_clb_region.placeholder": "请输入地域(如 ap-guangzhou)",
|
||||
"domain.deployment.form.tencent_clb_id.label": "负载均衡器 ID",
|
||||
"domain.deployment.form.tencent_clb_id.placeholder": "请输入负载均衡器实例 ID(如 lb-xxxxxxxx)",
|
||||
"domain.deployment.form.tencent_clb_listener.label": "监听器 ID(对应监听器应已设置对应域名 HTTPS 转发, 且原证书对应域名应与待部署证书的一致)",
|
||||
"domain.deployment.form.tencent_clb_listener.placeholder": "请输入监听器 ID(如 lb-xxxxxxxx)",
|
||||
"domain.deployment.form.tencent_clb_domain.label": "部署到域名(支持泛域名)",
|
||||
"domain.deployment.form.tencent_clb_domain.placeholder": "请输入部署到的域名, 如未开启 SNI, 可置空忽略此项",
|
||||
"domain.deployment.form.huaweicloud_elb_region.label": "地域",
|
||||
"domain.deployment.form.huaweicloud_elb_region.placeholder": "请输入地域(如 cn-north-1)",
|
||||
"domain.deployment.form.huaweicloud_elb_resource_type.label": "资源类型替换方式",
|
||||
"domain.deployment.form.huaweicloud_elb_resource_type.placeholder": "请选择资源类型替换方式",
|
||||
"domain.deployment.form.huaweicloud_elb_resource_type.option.certificate.label": "按证书替换",
|
||||
"domain.deployment.form.huaweicloud_elb_resource_type.option.loadbalancer.label": "按负载均衡器替换",
|
||||
"domain.deployment.form.huaweicloud_elb_resource_type.option.listener.label": "按监听器替换",
|
||||
"domain.deployment.form.huaweicloud_elb_certificate_id.label": "证书 ID",
|
||||
"domain.deployment.form.huaweicloud_elb_certificate_id.placeholder": "请输入证书 ID(可从华为云控制面板获取)",
|
||||
"domain.deployment.form.huaweicloud_elb_loadbalancer_id.label": "负载均衡器 ID",
|
||||
"domain.deployment.form.huaweicloud_elb_loadbalancer_id.placeholder": "请输入负载均衡器 ID(可从华为云控制面板获取)",
|
||||
"domain.deployment.form.huaweicloud_elb_listener_id.label": "监听器 ID",
|
||||
"domain.deployment.form.huaweicloud_elb_listener_id.placeholder": "请输入监听器 ID(可从华为云控制面板获取)",
|
||||
"domain.deployment.form.ssh_key_path.label": "私钥保存路径",
|
||||
"domain.deployment.form.ssh_key_path.placeholder": "请输入私钥保存路径",
|
||||
"domain.deployment.form.ssh_cert_path.label": "证书保存路径",
|
||||
@@ -77,10 +94,6 @@
|
||||
"domain.deployment.form.ssh_pre_command.placeholder": "在部署证书前执行的命令",
|
||||
"domain.deployment.form.ssh_command.label": "命令",
|
||||
"domain.deployment.form.ssh_command.placeholder": "请输入要执行的命令",
|
||||
"domain.deployment.form.oss_endpoint.label": "Endpoint",
|
||||
"domain.deployment.form.oss_endpoint.placeholder": "请输入 Endpoint",
|
||||
"domain.deployment.form.oss_bucket.label": "存储桶",
|
||||
"domain.deployment.form.oss_bucket.placeholder": "请输入存储桶名",
|
||||
"domain.deployment.form.k8s_namespace.label": "命名空间",
|
||||
"domain.deployment.form.k8s_namespace.placeholder": "请输入 K8S 命名空间",
|
||||
"domain.deployment.form.k8s_secret_name.label": "Secret 名称",
|
||||
|
Reference in New Issue
Block a user