Merge branch 'main' of github.com:usual2970/certimate

This commit is contained in:
Yoan.liu
2025-03-09 07:22:13 +08:00
90 changed files with 2756 additions and 729 deletions

View File

@@ -9,6 +9,7 @@ import { type AccessModel } from "@/domain/access";
import { ACCESS_PROVIDERS } from "@/domain/provider";
import { useAntdForm, useAntdFormName } from "@/hooks";
import AccessForm1PanelConfig from "./AccessForm1PanelConfig";
import AccessFormACMEHttpReqConfig from "./AccessFormACMEHttpReqConfig";
import AccessFormAliyunConfig from "./AccessFormAliyunConfig";
import AccessFormAWSConfig from "./AccessFormAWSConfig";
@@ -99,6 +100,8 @@ const AccessForm = forwardRef<AccessFormInstance, AccessFormProps>(({ className,
NOTICE: If you add new child component, please keep ASCII order.
*/
switch (fieldProvider) {
case ACCESS_PROVIDERS["1PANEL"]:
return <AccessForm1PanelConfig {...nestedFormProps} />;
case ACCESS_PROVIDERS.ACMEHTTPREQ:
return <AccessFormACMEHttpReqConfig {...nestedFormProps} />;
case ACCESS_PROVIDERS.ALIYUN:

View File

@@ -0,0 +1,85 @@
import { useTranslation } from "react-i18next";
import { Form, type FormInstance, Input, Switch } from "antd";
import { createSchemaFieldRule } from "antd-zod";
import { z } from "zod";
import { type AccessConfigFor1Panel } from "@/domain/access";
type AccessForm1PanelConfigFieldValues = Nullish<AccessConfigFor1Panel>;
export type AccessForm1PanelConfigProps = {
form: FormInstance;
formName: string;
disabled?: boolean;
initialValues?: AccessForm1PanelConfigFieldValues;
onValuesChange?: (values: AccessForm1PanelConfigFieldValues) => void;
};
const initFormModel = (): AccessForm1PanelConfigFieldValues => {
return {
apiUrl: "http://<your-host-addr>:20410/",
apiKey: "",
};
};
const AccessForm1PanelConfig = ({ form: formInst, formName, disabled, initialValues, onValuesChange }: AccessForm1PanelConfigProps) => {
const { t } = useTranslation();
const formSchema = z.object({
apiUrl: z.string().url(t("common.errmsg.url_invalid")),
apiKey: z
.string()
.min(1, t("access.form.1panel_api_key.placeholder"))
.max(64, t("common.errmsg.string_max", { max: 64 }))
.trim(),
allowInsecureConnections: z.boolean().nullish(),
});
const formRule = createSchemaFieldRule(formSchema);
const handleFormChange = (_: unknown, values: z.infer<typeof formSchema>) => {
onValuesChange?.(values);
};
return (
<Form
form={formInst}
disabled={disabled}
initialValues={initialValues ?? initFormModel()}
layout="vertical"
name={formName}
onValuesChange={handleFormChange}
>
<Form.Item
name="apiUrl"
label={t("access.form.1panel_api_url.label")}
rules={[formRule]}
tooltip={<span dangerouslySetInnerHTML={{ __html: t("access.form.1panel_api_url.tooltip") }}></span>}
>
<Input placeholder={t("access.form.1panel_api_url.placeholder")} />
</Form.Item>
<Form.Item
name="apiKey"
label={t("access.form.1panel_api_key.label")}
rules={[formRule]}
tooltip={<span dangerouslySetInnerHTML={{ __html: t("access.form.1panel_api_key.tooltip") }}></span>}
>
<Input.Password autoComplete="new-password" placeholder={t("access.form.1panel_api_key.placeholder")} />
</Form.Item>
<Form.Item
name="allowInsecureConnections"
label={t("access.form.1panel_allow_insecure_conns.label")}
rules={[formRule]}
tooltip={<span dangerouslySetInnerHTML={{ __html: t("access.form.1panel_allow_insecure_conns.tooltip") }}></span>}
>
<Switch
checkedChildren={t("access.form.1panel_allow_insecure_conns.switch.on")}
unCheckedChildren={t("access.form.1panel_allow_insecure_conns.switch.off")}
/>
</Form.Item>
</Form>
);
};
export default AccessForm1PanelConfig;

View File

@@ -1,5 +1,5 @@
import { useTranslation } from "react-i18next";
import { Form, type FormInstance, Input } from "antd";
import { Form, type FormInstance, Input, Switch } from "antd";
import { createSchemaFieldRule } from "antd-zod";
import { z } from "zod";
@@ -17,7 +17,7 @@ export type AccessFormBaotaPanelConfigProps = {
const initFormModel = (): AccessFormBaotaPanelConfigFieldValues => {
return {
apiUrl: "http://<your-ipaddr>:8888/",
apiUrl: "http://<your-host-addr>:8888/",
apiKey: "",
};
};
@@ -32,6 +32,7 @@ const AccessFormBaotaPanelConfig = ({ form: formInst, formName, disabled, initia
.min(1, t("access.form.baotapanel_api_key.placeholder"))
.max(64, t("common.errmsg.string_max", { max: 64 }))
.trim(),
allowInsecureConnections: z.boolean().nullish(),
});
const formRule = createSchemaFieldRule(formSchema);
@@ -65,6 +66,18 @@ const AccessFormBaotaPanelConfig = ({ form: formInst, formName, disabled, initia
>
<Input.Password autoComplete="new-password" placeholder={t("access.form.baotapanel_api_key.placeholder")} />
</Form.Item>
<Form.Item
name="allowInsecureConnections"
label={t("access.form.baotapanel_allow_insecure_conns.label")}
rules={[formRule]}
tooltip={<span dangerouslySetInnerHTML={{ __html: t("access.form.baotapanel_allow_insecure_conns.tooltip") }}></span>}
>
<Switch
checkedChildren={t("access.form.baotapanel_allow_insecure_conns.switch.on")}
unCheckedChildren={t("access.form.baotapanel_allow_insecure_conns.switch.off")}
/>
</Form.Item>
</Form>
);
};

View File

@@ -17,7 +17,7 @@ export type AccessFormCdnflyConfigProps = {
const initFormModel = (): AccessFormCdnflyConfigFieldValues => {
return {
apiUrl: "http://<your-ipaddr>:88/",
apiUrl: "http://<your-host-addr>:88/",
apiKey: "",
apiSecret: "",
};

View File

@@ -17,7 +17,7 @@ export type AccessFormPowerDNSConfigProps = {
const initFormModel = (): AccessFormPowerDNSConfigFieldValues => {
return {
apiUrl: "http://<your-ipaddr>:8082/",
apiUrl: "http://<your-host-addr>:8082/",
apiKey: "",
};
};

View File

@@ -1,5 +1,5 @@
import { useTranslation } from "react-i18next";
import { Form, type FormInstance, Input } from "antd";
import { Form, type FormInstance, Input, Switch } from "antd";
import { createSchemaFieldRule } from "antd-zod";
import { z } from "zod";
@@ -17,7 +17,7 @@ export type AccessFormSafeLineConfigProps = {
const initFormModel = (): AccessFormSafeLineConfigFieldValues => {
return {
apiUrl: "http://<your-ipaddr>:9443/",
apiUrl: "http://<your-host-addr>:9443/",
apiToken: "",
};
};
@@ -32,6 +32,7 @@ const AccessFormSafeLineConfig = ({ form: formInst, formName, disabled, initialV
.min(1, t("access.form.safeline_api_token.placeholder"))
.max(64, t("common.errmsg.string_max", { max: 64 }))
.trim(),
allowInsecureConnections: z.boolean().nullish(),
});
const formRule = createSchemaFieldRule(formSchema);
@@ -65,6 +66,18 @@ const AccessFormSafeLineConfig = ({ form: formInst, formName, disabled, initialV
>
<Input.Password autoComplete="new-password" placeholder={t("access.form.safeline_api_token.placeholder")} />
</Form.Item>
<Form.Item
name="allowInsecureConnections"
label={t("access.form.safeline_allow_insecure_conns.label")}
rules={[formRule]}
tooltip={<span dangerouslySetInnerHTML={{ __html: t("access.form.safeline_allow_insecure_conns.tooltip") }}></span>}
>
<Switch
checkedChildren={t("access.form.safeline_allow_insecure_conns.switch.on")}
unCheckedChildren={t("access.form.safeline_allow_insecure_conns.switch.off")}
/>
</Form.Item>
</Form>
);
};

View File

@@ -1,5 +1,5 @@
import { useTranslation } from "react-i18next";
import { Form, type FormInstance, Input } from "antd";
import { Form, type FormInstance, Input, Switch } from "antd";
import { createSchemaFieldRule } from "antd-zod";
import { z } from "zod";
@@ -26,6 +26,7 @@ const AccessFormWebhookConfig = ({ form: formInst, formName, disabled, initialVa
const formSchema = z.object({
url: z.string({ message: t("access.form.webhook_url.placeholder") }).url(t("common.errmsg.url_invalid")),
allowInsecureConnections: z.boolean().nullish(),
});
const formRule = createSchemaFieldRule(formSchema);
@@ -45,6 +46,18 @@ const AccessFormWebhookConfig = ({ form: formInst, formName, disabled, initialVa
<Form.Item name="url" label={t("access.form.webhook_url.label")} rules={[formRule]}>
<Input placeholder={t("access.form.webhook_url.placeholder")} />
</Form.Item>
<Form.Item
name="allowInsecureConnections"
label={t("access.form.webhook_allow_insecure_conns.label")}
rules={[formRule]}
tooltip={<span dangerouslySetInnerHTML={{ __html: t("access.form.webhook_allow_insecure_conns.tooltip") }}></span>}
>
<Switch
checkedChildren={t("access.form.webhook_allow_insecure_conns.switch.on")}
unCheckedChildren={t("access.form.webhook_allow_insecure_conns.switch.off")}
/>
</Form.Item>
</Form>
);
};

View File

@@ -13,8 +13,7 @@ const NotifyChannelEditFormBarkFields = () => {
.nullish(),
deviceKey: z
.string({ message: t("settings.notification.channel.form.bark_device_key.placeholder") })
.min(1, t("settings.notification.channel.form.bark_device_key.placeholder"))
.max(256, t("common.errmsg.string_max", { max: 256 })),
.nonempty(t("settings.notification.channel.form.bark_device_key.placeholder")),
});
const formRule = createSchemaFieldRule(formSchema);

View File

@@ -9,12 +9,10 @@ const NotifyChannelEditFormDingTalkFields = () => {
const formSchema = z.object({
accessToken: z
.string({ message: t("settings.notification.channel.form.dingtalk_access_token.placeholder") })
.min(1, t("settings.notification.channel.form.dingtalk_access_token.placeholder"))
.max(256, t("common.errmsg.string_max", { max: 256 })),
.nonempty(t("settings.notification.channel.form.dingtalk_access_token.placeholder")),
secret: z
.string({ message: t("settings.notification.channel.form.dingtalk_secret.placeholder") })
.min(1, t("settings.notification.channel.form.dingtalk_secret.placeholder"))
.max(64, t("common.errmsg.string_max", { max: 64 })),
.nonempty(t("settings.notification.channel.form.dingtalk_secret.placeholder")),
});
const formRule = createSchemaFieldRule(formSchema);

View File

@@ -7,10 +7,7 @@ const NotifyChannelEditFormWeComFields = () => {
const { t } = useTranslation();
const formSchema = z.object({
webhookUrl: z
.string({ message: t("settings.notification.channel.form.wecom_webhook_url.placeholder") })
.min(1, t("settings.notification.channel.form.wecom_webhook_url.placeholder"))
.url({ message: t("common.errmsg.url_invalid") }),
webhookUrl: z.string({ message: t("settings.notification.channel.form.wecom_webhook_url.placeholder") }).url({ message: t("common.errmsg.url_invalid") }),
});
const formRule = createSchemaFieldRule(formSchema);

View File

@@ -98,8 +98,8 @@ const NotifyChannels = ({ className, classNames, style, styles }: NotifyChannels
<Switch
defaultChecked={channels[channel.type]?.enabled as boolean}
disabled={channels[channel.type] == null}
checkedChildren={t("settings.notification.channel.enabled.on")}
unCheckedChildren={t("settings.notification.channel.enabled.off")}
checkedChildren={t("settings.notification.channel.switch.on")}
unCheckedChildren={t("settings.notification.channel.switch.off")}
onChange={(checked) => handleSwitchChange(channel.type, checked)}
/>
</div>

View File

@@ -64,6 +64,7 @@ const DeployProviderPicker = ({ className, style, autoFocus, placeholder, onSele
DEPLOY_CATEGORIES.LOADBALANCE,
DEPLOY_CATEGORIES.FIREWALL,
DEPLOY_CATEGORIES.AV,
DEPLOY_CATEGORIES.SERVERLESS,
DEPLOY_CATEGORIES.WEBSITE,
DEPLOY_CATEGORIES.OTHER,
].map((key) => ({

View File

@@ -14,6 +14,10 @@ export type WorkflowElementsProps = {
const WorkflowElementsContainer = ({ className, style, disabled }: WorkflowElementsProps) => {
const [scale, setScale] = useState(1);
const MIN_SCALE = 0.2;
const MAX_SCALE = 2;
const STEP_SCALE = 0.05;
return (
<div className={mergeCls("relative size-full overflow-hidden", className)} style={style}>
<div className="size-full overflow-auto">
@@ -28,9 +32,9 @@ const WorkflowElementsContainer = ({ className, style, disabled }: WorkflowEleme
<Card className="absolute bottom-4 right-6 z-[2] rounded-lg p-2 shadow-lg" styles={{ body: { padding: 0 } }}>
<div className="flex items-center gap-2">
<Button icon={<MinusOutlinedIcon />} disabled={scale <= 0.5} onClick={() => setScale((s) => Math.max(0.5, s - 0.1))} />
<Button icon={<MinusOutlinedIcon />} disabled={scale <= MIN_SCALE} onClick={() => setScale((s) => Math.max(MIN_SCALE, s - STEP_SCALE))} />
<Typography.Text className="min-w-[3em] text-center">{Math.round(scale * 100)}%</Typography.Text>
<Button icon={<PlusOutlinedIcon />} disabled={scale >= 2} onClick={() => setScale((s) => Math.min(2, s + 0.1))} />
<Button icon={<PlusOutlinedIcon />} disabled={scale >= MAX_SCALE} onClick={() => setScale((s) => Math.min(MAX_SCALE, s + STEP_SCALE))} />
<Button icon={<ExpandOutlinedIcon />} onClick={() => setScale(1)} />
</div>
</Card>

View File

@@ -15,12 +15,15 @@ import { type WorkflowNode, type WorkflowNodeConfigForDeploy } from "@/domain/wo
import { useAntdForm, useAntdFormName, useZustandShallowSelector } from "@/hooks";
import { useWorkflowStore } from "@/stores/workflow";
import DeployNodeConfigForm1PanelConsoleConfig from "./DeployNodeConfigForm1PanelConsoleConfig";
import DeployNodeConfigForm1PanelSiteConfig from "./DeployNodeConfigForm1PanelSiteConfig";
import DeployNodeConfigFormAliyunALBConfig from "./DeployNodeConfigFormAliyunALBConfig";
import DeployNodeConfigFormAliyunCASDeployConfig from "./DeployNodeConfigFormAliyunCASDeployConfig";
import DeployNodeConfigFormAliyunCDNConfig from "./DeployNodeConfigFormAliyunCDNConfig";
import DeployNodeConfigFormAliyunCLBConfig from "./DeployNodeConfigFormAliyunCLBConfig";
import DeployNodeConfigFormAliyunDCDNConfig from "./DeployNodeConfigFormAliyunDCDNConfig";
import DeployNodeConfigFormAliyunESAConfig from "./DeployNodeConfigFormAliyunESAConfig";
import DeployNodeConfigFormAliyunFCConfig from "./DeployNodeConfigFormAliyunFCConfig";
import DeployNodeConfigFormAliyunLiveConfig from "./DeployNodeConfigFormAliyunLiveConfig";
import DeployNodeConfigFormAliyunNLBConfig from "./DeployNodeConfigFormAliyunNLBConfig";
import DeployNodeConfigFormAliyunOSSConfig from "./DeployNodeConfigFormAliyunOSSConfig";
@@ -55,6 +58,7 @@ import DeployNodeConfigFormTencentCloudCOSConfig from "./DeployNodeConfigFormTen
import DeployNodeConfigFormTencentCloudCSSConfig from "./DeployNodeConfigFormTencentCloudCSSConfig.tsx";
import DeployNodeConfigFormTencentCloudECDNConfig from "./DeployNodeConfigFormTencentCloudECDNConfig.tsx";
import DeployNodeConfigFormTencentCloudEOConfig from "./DeployNodeConfigFormTencentCloudEOConfig.tsx";
import DeployNodeConfigFormTencentCloudSCFConfig from "./DeployNodeConfigFormTencentCloudSCFConfig";
import DeployNodeConfigFormTencentCloudSSLDeployConfig from "./DeployNodeConfigFormTencentCloudSSLDeployConfig";
import DeployNodeConfigFormTencentCloudVODConfig from "./DeployNodeConfigFormTencentCloudVODConfig";
import DeployNodeConfigFormTencentCloudWAFConfig from "./DeployNodeConfigFormTencentCloudWAFConfig";
@@ -138,6 +142,10 @@ const DeployNodeConfigForm = forwardRef<DeployNodeConfigFormInstance, DeployNode
NOTICE: If you add new child component, please keep ASCII order.
*/
switch (fieldProvider) {
case DEPLOY_PROVIDERS["1PANEL_CONSOLE"]:
return <DeployNodeConfigForm1PanelConsoleConfig {...nestedFormProps} />;
case DEPLOY_PROVIDERS["1PANEL_SITE"]:
return <DeployNodeConfigForm1PanelSiteConfig {...nestedFormProps} />;
case DEPLOY_PROVIDERS.ALIYUN_ALB:
return <DeployNodeConfigFormAliyunALBConfig {...nestedFormProps} />;
case DEPLOY_PROVIDERS.ALIYUN_CAS_DEPLOY:
@@ -150,6 +158,8 @@ const DeployNodeConfigForm = forwardRef<DeployNodeConfigFormInstance, DeployNode
return <DeployNodeConfigFormAliyunDCDNConfig {...nestedFormProps} />;
case DEPLOY_PROVIDERS.ALIYUN_ESA:
return <DeployNodeConfigFormAliyunESAConfig {...nestedFormProps} />;
case DEPLOY_PROVIDERS.ALIYUN_FC:
return <DeployNodeConfigFormAliyunFCConfig {...nestedFormProps} />;
case DEPLOY_PROVIDERS.ALIYUN_LIVE:
return <DeployNodeConfigFormAliyunLiveConfig {...nestedFormProps} />;
case DEPLOY_PROVIDERS.ALIYUN_NLB:
@@ -218,6 +228,8 @@ const DeployNodeConfigForm = forwardRef<DeployNodeConfigFormInstance, DeployNode
return <DeployNodeConfigFormTencentCloudECDNConfig {...nestedFormProps} />;
case DEPLOY_PROVIDERS.TENCENTCLOUD_EO:
return <DeployNodeConfigFormTencentCloudEOConfig {...nestedFormProps} />;
case DEPLOY_PROVIDERS.TENCENTCLOUD_SCF:
return <DeployNodeConfigFormTencentCloudSCFConfig {...nestedFormProps} />;
case DEPLOY_PROVIDERS.TENCENTCLOUD_SSL_DEPLOY:
return <DeployNodeConfigFormTencentCloudSSLDeployConfig {...nestedFormProps} />;
case DEPLOY_PROVIDERS.TENCENTCLOUD_VOD:
@@ -427,8 +439,8 @@ const DeployNodeConfigForm = forwardRef<DeployNodeConfigFormInstance, DeployNode
<div>{t("workflow_node.deploy.form.skip_on_last_succeeded.prefix")}</div>
<Form.Item name="skipOnLastSucceeded" noStyle rules={[formRule]}>
<Switch
checkedChildren={t("workflow_node.deploy.form.skip_on_last_succeeded.enabled.on")}
unCheckedChildren={t("workflow_node.deploy.form.skip_on_last_succeeded.enabled.off")}
checkedChildren={t("workflow_node.deploy.form.skip_on_last_succeeded.switch.on")}
unCheckedChildren={t("workflow_node.deploy.form.skip_on_last_succeeded.switch.off")}
/>
</Form.Item>
<div>{t("workflow_node.deploy.form.skip_on_last_succeeded.suffix")}</div>

View File

@@ -0,0 +1,56 @@
import { useTranslation } from "react-i18next";
import { Form, type FormInstance, Switch } from "antd";
import { createSchemaFieldRule } from "antd-zod";
import { z } from "zod";
type DeployNodeConfigForm1PanelConsoleConfigFieldValues = Nullish<{
autoRestart?: boolean;
}>;
export type DeployNodeConfigForm1PanelConsoleConfigProps = {
form: FormInstance;
formName: string;
disabled?: boolean;
initialValues?: DeployNodeConfigForm1PanelConsoleConfigFieldValues;
onValuesChange?: (values: DeployNodeConfigForm1PanelConsoleConfigFieldValues) => void;
};
const initFormModel = (): DeployNodeConfigForm1PanelConsoleConfigFieldValues => {
return {};
};
const DeployNodeConfigForm1PanelConsoleConfig = ({
form: formInst,
formName,
disabled,
initialValues,
onValuesChange,
}: DeployNodeConfigForm1PanelConsoleConfigProps) => {
const { t } = useTranslation();
const formSchema = z.object({
autoRestart: z.boolean().nullish(),
});
const formRule = createSchemaFieldRule(formSchema);
const handleFormChange = (_: unknown, values: z.infer<typeof formSchema>) => {
onValuesChange?.(values);
};
return (
<Form
form={formInst}
disabled={disabled}
initialValues={initialValues ?? initFormModel()}
layout="vertical"
name={formName}
onValuesChange={handleFormChange}
>
<Form.Item name="autoRestart" label={t("workflow_node.deploy.form.1panel_console_auto_restart.label")} rules={[formRule]}>
<Switch />
</Form.Item>
</Form>
);
};
export default DeployNodeConfigForm1PanelConsoleConfig;

View File

@@ -0,0 +1,63 @@
import { useTranslation } from "react-i18next";
import { Form, type FormInstance, Input } from "antd";
import { createSchemaFieldRule } from "antd-zod";
import { z } from "zod";
type DeployNodeConfigForm1PanelSiteConfigFieldValues = Nullish<{
websiteId: string | number;
}>;
export type DeployNodeConfigForm1PanelSiteConfigProps = {
form: FormInstance;
formName: string;
disabled?: boolean;
initialValues?: DeployNodeConfigForm1PanelSiteConfigFieldValues;
onValuesChange?: (values: DeployNodeConfigForm1PanelSiteConfigFieldValues) => void;
};
const initFormModel = (): DeployNodeConfigForm1PanelSiteConfigFieldValues => {
return {};
};
const DeployNodeConfigForm1PanelSiteConfig = ({
form: formInst,
formName,
disabled,
initialValues,
onValuesChange,
}: DeployNodeConfigForm1PanelSiteConfigProps) => {
const { t } = useTranslation();
const formSchema = z.object({
websiteId: z.union([z.string(), z.number()]).refine((v) => {
return /^\d+$/.test(v + "") && +v > 0;
}, t("workflow_node.deploy.form.1panel_site_website_id.placeholder")),
});
const formRule = createSchemaFieldRule(formSchema);
const handleFormChange = (_: unknown, values: z.infer<typeof formSchema>) => {
onValuesChange?.(values);
};
return (
<Form
form={formInst}
disabled={disabled}
initialValues={initialValues ?? initFormModel()}
layout="vertical"
name={formName}
onValuesChange={handleFormChange}
>
<Form.Item
name="websiteId"
label={t("workflow_node.deploy.form.1panel_site_website_id.label")}
rules={[formRule]}
tooltip={<span dangerouslySetInnerHTML={{ __html: t("workflow_node.deploy.form.1panel_site_website_id.tooltip") }}></span>}
>
<Input type="number" placeholder={t("workflow_node.deploy.form.1panel_site_website_id.placeholder")} />
</Form.Item>
</Form>
);
};
export default DeployNodeConfigForm1PanelSiteConfig;

View File

@@ -0,0 +1,90 @@
import { useTranslation } from "react-i18next";
import { Form, type FormInstance, Input, Select } from "antd";
import { createSchemaFieldRule } from "antd-zod";
import { z } from "zod";
import { validDomainName } from "@/utils/validators";
type DeployNodeConfigFormAliyunFCConfigFieldValues = Nullish<{
region: string;
serviceVersion: string;
domain: string;
}>;
export type DeployNodeConfigFormAliyunFCConfigProps = {
form: FormInstance;
formName: string;
disabled?: boolean;
initialValues?: DeployNodeConfigFormAliyunFCConfigFieldValues;
onValuesChange?: (values: DeployNodeConfigFormAliyunFCConfigFieldValues) => void;
};
const initFormModel = (): DeployNodeConfigFormAliyunFCConfigFieldValues => {
return {
serviceVersion: "3.0",
};
};
const DeployNodeConfigFormAliyunFCConfig = ({ form: formInst, formName, disabled, initialValues, onValuesChange }: DeployNodeConfigFormAliyunFCConfigProps) => {
const { t } = useTranslation();
const formSchema = z.object({
serviceVersion: z.union([z.literal("2.0"), z.literal("3.0")], {
message: t("workflow_node.deploy.form.aliyun_fc_service_version.placeholder"),
}),
region: z
.string({ message: t("workflow_node.deploy.form.aliyun_fc_region.placeholder") })
.nonempty(t("workflow_node.deploy.form.aliyun_fc_region.placeholder"))
.trim(),
domain: z
.string({ message: t("workflow_node.deploy.form.aliyun_fc_domain.placeholder") })
.refine((v) => validDomainName(v), t("common.errmsg.domain_invalid")),
});
const formRule = createSchemaFieldRule(formSchema);
const handleFormChange = (_: unknown, values: z.infer<typeof formSchema>) => {
onValuesChange?.(values);
};
return (
<Form
form={formInst}
disabled={disabled}
initialValues={initialValues ?? initFormModel()}
layout="vertical"
name={formName}
onValuesChange={handleFormChange}
>
<Form.Item name="serviceVersion" label={t("workflow_node.deploy.form.aliyun_fc_service_version.label")} rules={[formRule]}>
<Select placeholder={t("workflow_node.deploy.form.aliyun_fc_service_version.placeholder")}>
<Select.Option key="2.0" value="2.0">
2.0
</Select.Option>
<Select.Option key="3.0" value="3.0">
3.0
</Select.Option>
</Select>
</Form.Item>
<Form.Item
name="region"
label={t("workflow_node.deploy.form.aliyun_fc_region.label")}
rules={[formRule]}
tooltip={<span dangerouslySetInnerHTML={{ __html: t("workflow_node.deploy.form.aliyun_fc_region.tooltip") }}></span>}
>
<Input placeholder={t("workflow_node.deploy.form.aliyun_fc_region.placeholder")} />
</Form.Item>
<Form.Item
name="domain"
label={t("workflow_node.deploy.form.aliyun_fc_domain.label")}
rules={[formRule]}
tooltip={<span dangerouslySetInnerHTML={{ __html: t("workflow_node.deploy.form.aliyun_fc_domain.tooltip") }}></span>}
>
<Input placeholder={t("workflow_node.deploy.form.aliyun_fc_domain.placeholder")} />
</Form.Item>
</Form>
);
};
export default DeployNodeConfigFormAliyunFCConfig;

View File

@@ -0,0 +1,79 @@
import { useTranslation } from "react-i18next";
import { Form, type FormInstance, Input } from "antd";
import { createSchemaFieldRule } from "antd-zod";
import { z } from "zod";
import { validDomainName } from "@/utils/validators";
type DeployNodeConfigFormTencentCloudSCFConfigFieldValues = Nullish<{
region: string;
domain: string;
}>;
export type DeployNodeConfigFormTencentCloudSCFConfigProps = {
form: FormInstance;
formName: string;
disabled?: boolean;
initialValues?: DeployNodeConfigFormTencentCloudSCFConfigFieldValues;
onValuesChange?: (values: DeployNodeConfigFormTencentCloudSCFConfigFieldValues) => void;
};
const initFormModel = (): DeployNodeConfigFormTencentCloudSCFConfigFieldValues => {
return {};
};
const DeployNodeConfigFormTencentCloudSCFConfig = ({
form: formInst,
formName,
disabled,
initialValues,
onValuesChange,
}: DeployNodeConfigFormTencentCloudSCFConfigProps) => {
const { t } = useTranslation();
const formSchema = z.object({
region: z
.string({ message: t("workflow_node.deploy.form.tencentcloud_scf_region.placeholder") })
.nonempty(t("workflow_node.deploy.form.tencentcloud_scf_region.placeholder"))
.trim(),
domain: z
.string({ message: t("workflow_node.deploy.form.tencentcloud_scf_domain.placeholder") })
.refine((v) => validDomainName(v), t("common.errmsg.domain_invalid")),
});
const formRule = createSchemaFieldRule(formSchema);
const handleFormChange = (_: unknown, values: z.infer<typeof formSchema>) => {
onValuesChange?.(values);
};
return (
<Form
form={formInst}
disabled={disabled}
initialValues={initialValues ?? initFormModel()}
layout="vertical"
name={formName}
onValuesChange={handleFormChange}
>
<Form.Item
name="region"
label={t("workflow_node.deploy.form.tencentcloud_scf_region.label")}
rules={[formRule]}
tooltip={<span dangerouslySetInnerHTML={{ __html: t("workflow_node.deploy.form.tencentcloud_scf_region.tooltip") }}></span>}
>
<Input placeholder={t("workflow_node.deploy.form.tencentcloud_scf_region.placeholder")} />
</Form.Item>
<Form.Item
name="domain"
label={t("workflow_node.deploy.form.tencentcloud_scf_domain.label")}
rules={[formRule]}
tooltip={<span dangerouslySetInnerHTML={{ __html: t("workflow_node.deploy.form.tencentcloud_scf_domain.tooltip") }}></span>}
>
<Input placeholder={t("workflow_node.deploy.form.tencentcloud_scf_domain.placeholder")} />
</Form.Item>
</Form>
);
};
export default DeployNodeConfigFormTencentCloudSCFConfig;

View File

@@ -80,6 +80,15 @@ const DeployNodeConfigFormTencentCloudSSLDeployConfig = ({
<Input placeholder={t("workflow_node.deploy.form.tencentcloud_ssl_deploy_region.placeholder")} />
</Form.Item>
<Form.Item
name="resourceType"
label={t("workflow_node.deploy.form.tencentcloud_ssl_deploy_resource_type.label")}
rules={[formRule]}
tooltip={<span dangerouslySetInnerHTML={{ __html: t("workflow_node.deploy.form.tencentcloud_ssl_deploy_resource_type.tooltip") }}></span>}
>
<Input placeholder={t("workflow_node.deploy.form.tencentcloud_ssl_deploy_resource_type.placeholder")} />
</Form.Item>
<Form.Item
label={t("workflow_node.deploy.form.tencentcloud_ssl_deploy_resource_ids.label")}
tooltip={<span dangerouslySetInnerHTML={{ __html: t("workflow_node.deploy.form.tencentcloud_ssl_deploy_resource_ids.tooltip") }}></span>}

View File

@@ -258,12 +258,13 @@ const SharedNodeConfigDrawer = ({
const handleClose = () => {
if (pending) return;
const oldValues = Object.fromEntries(Object.entries(node.config ?? {}).filter(([_, value]) => value !== null && value !== undefined));
const newValues = Object.fromEntries(Object.entries(getFormValues()).filter(([_, value]) => value !== null && value !== undefined));
const oldValues = JSON.parse(JSON.stringify(node.config ?? {}));
const newValues = JSON.parse(JSON.stringify(getFormValues()));
const changed = !isEqual(oldValues, {}) && !isEqual(oldValues, newValues);
const { promise, resolve, reject } = Promise.withResolvers();
if (changed) {
console.log(oldValues, newValues);
modalApi.confirm({
title: t("common.text.operation_confirm"),
content: t("workflow_node.unsaved_changes.confirm"),

View File

@@ -6,6 +6,7 @@ export interface AccessModel extends BaseModel {
NOTICE: If you add new type, please keep ASCII order.
*/ Record<string, unknown> &
(
| AccessConfigFor1Panel
| AccessConfigForACMEHttpReq
| AccessConfigForAliyun
| AccessConfigForAWS
@@ -46,6 +47,12 @@ export interface AccessModel extends BaseModel {
}
// #region AccessConfig
export type AccessConfigFor1Panel = {
apiUrl: string;
apiKey: string;
allowInsecureConnections?: boolean;
};
export type AccessConfigForACMEHttpReq = {
endpoint: string;
mode?: string;
@@ -82,6 +89,7 @@ export type AccessConfigForBaishan = {
export type AccessConfigForBaotaPanel = {
apiUrl: string;
apiKey: string;
allowInsecureConnections?: boolean;
};
export type AccessConfigForBytePlus = {
@@ -193,6 +201,7 @@ export type AccessConfigForRainYun = {
export type AccessConfigForSafeLine = {
apiUrl: string;
apiToken: string;
allowInsecureConnections?: boolean;
};
export type AccessConfigForSSH = {
@@ -222,6 +231,7 @@ export type AccessConfigForVolcEngine = {
export type AccessConfigForWebhook = {
url: string;
allowInsecureConnections?: boolean;
};
export type AccessConfigForWestcn = {

View File

@@ -4,6 +4,7 @@
NOTICE: If you add new constant, please keep ASCII order.
*/
export const ACCESS_PROVIDERS = Object.freeze({
["1PANEL"]: "1panel",
ACMEHTTPREQ: "acmehttpreq",
ALIYUN: "aliyun",
AWS: "aws",
@@ -84,6 +85,7 @@ export const accessProvidersMap: Map<AccessProvider["type"] | string, AccessProv
[ACCESS_PROVIDERS.BYTEPLUS, "provider.byteplus", "/imgs/providers/byteplus.svg", [ACCESS_USAGES.DEPLOY]],
[ACCESS_PROVIDERS.UCLOUD, "provider.ucloud", "/imgs/providers/ucloud.svg", [ACCESS_USAGES.DEPLOY]],
[ACCESS_PROVIDERS.SAFELINE, "provider.safeline", "/imgs/providers/safeline.svg", [ACCESS_USAGES.DEPLOY]],
[ACCESS_PROVIDERS["1PANEL"], "provider.1panel", "/imgs/providers/1panel.svg", [ACCESS_USAGES.DEPLOY]],
[ACCESS_PROVIDERS.BAOTAPANEL, "provider.baotapanel", "/imgs/providers/baotapanel.svg", [ACCESS_USAGES.DEPLOY]],
[ACCESS_PROVIDERS.CACHEFLY, "provider.cachefly", "/imgs/providers/cachefly.png", [ACCESS_USAGES.DEPLOY]],
[ACCESS_PROVIDERS.CDNFLY, "provider.cdnfly", "/imgs/providers/cdnfly.png", [ACCESS_USAGES.DEPLOY]],
@@ -211,12 +213,15 @@ export const applyDNSProvidersMap: Map<ApplyDNSProvider["type"] | string, ApplyD
NOTICE: If you add new constant, please keep ASCII order.
*/
export const DEPLOY_PROVIDERS = Object.freeze({
["1PANEL_CONSOLE"]: `${ACCESS_PROVIDERS["1PANEL"]}-console`,
["1PANEL_SITE"]: `${ACCESS_PROVIDERS["1PANEL"]}-site`,
ALIYUN_ALB: `${ACCESS_PROVIDERS.ALIYUN}-alb`,
ALIYUN_CAS_DEPLOY: `${ACCESS_PROVIDERS.ALIYUN}-casdeploy`,
ALIYUN_CDN: `${ACCESS_PROVIDERS.ALIYUN}-cdn`,
ALIYUN_CLB: `${ACCESS_PROVIDERS.ALIYUN}-clb`,
ALIYUN_DCDN: `${ACCESS_PROVIDERS.ALIYUN}-dcdn`,
ALIYUN_ESA: `${ACCESS_PROVIDERS.ALIYUN}-esa`,
ALIYUN_FC: `${ACCESS_PROVIDERS.ALIYUN}-fc`,
ALIYUN_LIVE: `${ACCESS_PROVIDERS.ALIYUN}-live`,
ALIYUN_NLB: `${ACCESS_PROVIDERS.ALIYUN}-nlb`,
ALIYUN_OSS: `${ACCESS_PROVIDERS.ALIYUN}-oss`,
@@ -252,6 +257,7 @@ export const DEPLOY_PROVIDERS = Object.freeze({
TENCENTCLOUD_CSS: `${ACCESS_PROVIDERS.TENCENTCLOUD}-css`,
TENCENTCLOUD_ECDN: `${ACCESS_PROVIDERS.TENCENTCLOUD}-ecdn`,
TENCENTCLOUD_EO: `${ACCESS_PROVIDERS.TENCENTCLOUD}-eo`,
TENCENTCLOUD_SCF: `${ACCESS_PROVIDERS.TENCENTCLOUD}-scf`,
TENCENTCLOUD_SSL_DEPLOY: `${ACCESS_PROVIDERS.TENCENTCLOUD}-ssldeploy`,
TENCENTCLOUD_VOD: `${ACCESS_PROVIDERS.TENCENTCLOUD}-vod`,
TENCENTCLOUD_WAF: `${ACCESS_PROVIDERS.TENCENTCLOUD}-waf`,
@@ -275,6 +281,7 @@ export const DEPLOY_CATEGORIES = Object.freeze({
LOADBALANCE: "loadbalance",
FIREWALL: "firewall",
AV: "av",
SERVERLESS: "serverless",
WEBSITE: "website",
OTHER: "other",
} as const);
@@ -309,6 +316,7 @@ export const deployProvidersMap: Map<DeployProvider["type"] | string, DeployProv
[DEPLOY_PROVIDERS.ALIYUN_WAF, "provider.aliyun.waf", DEPLOY_CATEGORIES.FIREWALL],
[DEPLOY_PROVIDERS.ALIYUN_LIVE, "provider.aliyun.live", DEPLOY_CATEGORIES.AV],
[DEPLOY_PROVIDERS.ALIYUN_VOD, "provider.aliyun.vod", DEPLOY_CATEGORIES.AV],
[DEPLOY_PROVIDERS.ALIYUN_FC, "provider.aliyun.fc", DEPLOY_CATEGORIES.SERVERLESS],
[DEPLOY_PROVIDERS.ALIYUN_CAS_DEPLOY, "provider.aliyun.cas_deploy", DEPLOY_CATEGORIES.OTHER],
[DEPLOY_PROVIDERS.TENCENTCLOUD_COS, "provider.tencentcloud.cos", DEPLOY_CATEGORIES.STORAGE],
[DEPLOY_PROVIDERS.TENCENTCLOUD_CDN, "provider.tencentcloud.cdn", DEPLOY_CATEGORIES.CDN],
@@ -318,6 +326,7 @@ export const deployProvidersMap: Map<DeployProvider["type"] | string, DeployProv
[DEPLOY_PROVIDERS.TENCENTCLOUD_WAF, "provider.tencentcloud.waf", DEPLOY_CATEGORIES.FIREWALL],
[DEPLOY_PROVIDERS.TENCENTCLOUD_CSS, "provider.tencentcloud.css", DEPLOY_CATEGORIES.AV],
[DEPLOY_PROVIDERS.TENCENTCLOUD_VOD, "provider.tencentcloud.vod", DEPLOY_CATEGORIES.AV],
[DEPLOY_PROVIDERS.TENCENTCLOUD_SCF, "provider.tencentcloud.scf", DEPLOY_CATEGORIES.SERVERLESS],
[DEPLOY_PROVIDERS.TENCENTCLOUD_SSL_DEPLOY, "provider.tencentcloud.ssl_deploy", DEPLOY_CATEGORIES.OTHER],
[DEPLOY_PROVIDERS.HUAWEICLOUD_CDN, "provider.huaweicloud.cdn", DEPLOY_CATEGORIES.CDN],
[DEPLOY_PROVIDERS.HUAWEICLOUD_ELB, "provider.huaweicloud.elb", DEPLOY_CATEGORIES.LOADBALANCE],
@@ -345,6 +354,8 @@ export const deployProvidersMap: Map<DeployProvider["type"] | string, DeployProv
[DEPLOY_PROVIDERS.CDNFLY, "provider.cdnfly", DEPLOY_CATEGORIES.CDN],
[DEPLOY_PROVIDERS.EDGIO_APPLICATIONS, "provider.edgio.applications", DEPLOY_CATEGORIES.WEBSITE],
[DEPLOY_PROVIDERS.GCORE_CDN, "provider.gcore.cdn", DEPLOY_CATEGORIES.CDN],
[DEPLOY_PROVIDERS["1PANEL_SITE"], "provider.1panel.site", DEPLOY_CATEGORIES.WEBSITE],
[DEPLOY_PROVIDERS["1PANEL_CONSOLE"], "provider.1panel.console", DEPLOY_CATEGORIES.OTHER],
[DEPLOY_PROVIDERS.BAOTAPANEL_SITE, "provider.baotapanel.site", DEPLOY_CATEGORIES.WEBSITE],
[DEPLOY_PROVIDERS.BAOTAPANEL_CONSOLE, "provider.baotapanel.console", DEPLOY_CATEGORIES.OTHER],
[DEPLOY_PROVIDERS.SAFELINE, "provider.safeline", DEPLOY_CATEGORIES.FIREWALL],

View File

@@ -173,8 +173,13 @@ export type WorkflowNodeIOValueSelector = {
id: string;
name: string;
};
// #endregion
const isBranchLike = (node: WorkflowNode) => {
return node.type === WorkflowNodeType.Branch || node.type === WorkflowNodeType.ExecuteResultBranch;
};
type InitWorkflowOptions = {
template?: "standard";
};
@@ -191,6 +196,9 @@ export const initWorkflow = (options: InitWorkflowOptions = {}): WorkflowModel =
current.next = newNode(WorkflowNodeType.Deploy, {});
current = current.next;
current.next = newNode(WorkflowNodeType.ExecuteResultBranch, {});
current = current.next!.branches![1];
current.next = newNode(WorkflowNodeType.Notify, {});
}
@@ -265,14 +273,27 @@ export const updateNode = (node: WorkflowNode, targetNode: WorkflowNode) => {
let current = draft;
while (current) {
if (current.id === targetNode.id) {
Object.assign(current, targetNode);
// Object.assign(current, targetNode);
// TODO: 暂时这么处理,避免 #485 #489后续再优化
current.type = targetNode.type;
current.name = targetNode.name;
current.config = targetNode.config;
current.inputs = targetNode.inputs;
current.outputs = targetNode.outputs;
current.next = targetNode.next;
current.branches = targetNode.branches;
current.validated = targetNode.validated;
break;
}
if (current.type === WorkflowNodeType.Branch || current.type === WorkflowNodeType.ExecuteResultBranch) {
current.branches = current.branches!.map((branch) => updateNode(branch, targetNode));
if (isBranchLike(current)) {
current.branches ??= [];
current.branches = current.branches.map((branch) => updateNode(branch, targetNode));
}
current = current.next as WorkflowNode;
}
return draft;
});
};
@@ -281,20 +302,24 @@ export const addNode = (node: WorkflowNode, previousNodeId: string, targetNode:
return produce(node, (draft) => {
let current = draft;
while (current) {
if (current.id === previousNodeId && targetNode.type !== WorkflowNodeType.Branch && targetNode.type !== WorkflowNodeType.ExecuteResultBranch) {
if (current.id === previousNodeId && !isBranchLike(targetNode)) {
targetNode.next = current.next;
current.next = targetNode;
break;
} else if (current.id === previousNodeId && (targetNode.type === WorkflowNodeType.Branch || targetNode.type === WorkflowNodeType.ExecuteResultBranch)) {
} else if (current.id === previousNodeId && isBranchLike(targetNode)) {
targetNode.branches![0].next = current.next;
current.next = targetNode;
break;
}
if (current.type === WorkflowNodeType.Branch || current.type === WorkflowNodeType.ExecuteResultBranch) {
current.branches = current.branches!.map((branch) => addNode(branch, previousNodeId, targetNode));
if (isBranchLike(current)) {
current.branches ??= [];
current.branches = current.branches.map((branch) => addNode(branch, previousNodeId, targetNode));
}
current = current.next as WorkflowNode;
}
return draft;
});
};
@@ -307,18 +332,24 @@ export const addBranch = (node: WorkflowNode, branchNodeId: string) => {
if (current.type !== WorkflowNodeType.Branch) {
return draft;
}
current.branches!.push(
current.branches ??= [];
current.branches.push(
newNode(WorkflowNodeType.Condition, {
branchIndex: current.branches!.length,
branchIndex: current.branches.length,
})
);
break;
}
if (current.type === WorkflowNodeType.Branch || current.type === WorkflowNodeType.ExecuteResultBranch) {
current.branches = current.branches!.map((branch) => addBranch(branch, branchNodeId));
if (isBranchLike(current)) {
current.branches ??= [];
current.branches = current.branches.map((branch) => addBranch(branch, branchNodeId));
}
current = current.next as WorkflowNode;
}
return draft;
});
};
@@ -331,11 +362,15 @@ export const removeNode = (node: WorkflowNode, targetNodeId: string) => {
current.next = current.next.next;
break;
}
if (current.type === WorkflowNodeType.Branch || current.type === WorkflowNodeType.ExecuteResultBranch) {
current.branches = current.branches!.map((branch) => removeNode(branch, targetNodeId));
if (isBranchLike(current)) {
current.branches ??= [];
current.branches = current.branches.map((branch) => removeNode(branch, targetNodeId));
}
current = current.next as WorkflowNode;
}
return draft;
});
};
@@ -351,14 +386,16 @@ export const removeBranch = (node: WorkflowNode, branchNodeId: string, branchInd
};
while (current && last) {
if (current.id === branchNodeId) {
if (current.type !== WorkflowNodeType.Branch && current.type !== WorkflowNodeType.ExecuteResultBranch) {
if (!isBranchLike(current)) {
return draft;
}
current.branches!.splice(branchIndex, 1);
current.branches ??= [];
current.branches.splice(branchIndex, 1);
// 如果仅剩一个分支,删除分支节点,将分支节点的下一个节点挂载到当前节点
if (current.branches!.length === 1) {
const branch = current.branches![0];
if (current.branches.length === 1) {
const branch = current.branches[0];
if (branch.next) {
last.next = branch.next;
let lastNode: WorkflowNode | undefined = branch.next;
@@ -373,19 +410,23 @@ export const removeBranch = (node: WorkflowNode, branchNodeId: string, branchInd
break;
}
if (current.type === WorkflowNodeType.Branch || current.type === WorkflowNodeType.ExecuteResultBranch) {
current.branches = current.branches!.map((branch) => removeBranch(branch, branchNodeId, branchIndex));
if (isBranchLike(current)) {
current.branches ??= [];
current.branches = current.branches.map((branch) => removeBranch(branch, branchNodeId, branchIndex));
}
current = current.next as WorkflowNode;
last = last.next;
}
return draft;
});
};
export const getWorkflowOutputBeforeId = (root: WorkflowNode, nodeId: string, type: string): WorkflowNode[] => {
// 1 个分支的节点,不应该能获取到相邻分支上节点的输出
const output: WorkflowNode[] = [];
export const getOutputBeforeNodeId = (root: WorkflowNode, nodeId: string, type: string): WorkflowNode[] => {
// 个分支的节点,不应该能获取到相邻分支上节点的输出
const outputs: WorkflowNode[] = [];
const traverse = (current: WorkflowNode, output: WorkflowNode[]) => {
if (!current) {
@@ -395,7 +436,7 @@ export const getWorkflowOutputBeforeId = (root: WorkflowNode, nodeId: string, ty
return true;
}
// 如果当前节点是execute_failure,清除execute_result_branch节点前一个节点的输出
// 如果当前节点是 ExecuteFailure清除 ExecuteResultBranch 节点前一个节点的输出
if (current.type === WorkflowNodeType.ExecuteFailure) {
output.splice(output.length - 1);
}
@@ -407,7 +448,7 @@ export const getWorkflowOutputBeforeId = (root: WorkflowNode, nodeId: string, ty
});
}
if (current.type === WorkflowNodeType.Branch || current.type === WorkflowNodeType.ExecuteResultBranch) {
if (isBranchLike(current)) {
const currentLength = output.length;
for (const branch of current.branches!) {
if (traverse(branch, output)) {
@@ -423,14 +464,14 @@ export const getWorkflowOutputBeforeId = (root: WorkflowNode, nodeId: string, ty
return traverse(current.next as WorkflowNode, output);
};
traverse(root, output);
return output;
traverse(root, outputs);
return outputs;
};
export const isAllNodesValidated = (node: WorkflowNode): boolean => {
let current = node as typeof node | undefined;
while (current) {
if (current.type === WorkflowNodeType.Branch || current.type === WorkflowNodeType.ExecuteResultBranch) {
if (isBranchLike(current)) {
for (const branch of current.branches!) {
if (!isAllNodesValidated(branch)) {
return false;

View File

@@ -23,6 +23,16 @@
"access.form.provider.label": "Provider",
"access.form.provider.placeholder": "Please select a provider",
"access.form.provider.tooltip": "DNS provider: The provider that hosts your domain names and manages your DNS records.<br>Host provider: The provider that hosts your servers or cloud services for deploying certificates.<br><br><i>Cannot be edited after saving.</i>",
"access.form.1panel_api_url.label": "1Panel URL",
"access.form.1panel_api_url.placeholder": "Please enter 1Panel URL",
"access.form.1panel_api_url.tooltip": "For more information, see <a href=\"https://docs.1panel.pro/dev_manual/api_manual/\" target=\"_blank\">https://docs.1panel.pro/dev_manual/api_manual/</a>",
"access.form.1panel_api_key.label": "1Panel API key",
"access.form.1panel_api_key.placeholder": "Please enter 1Panel API key",
"access.form.1panel_api_key.tooltip": "For more information, see <a href=\"https://docs.1panel.pro/dev_manual/api_manual/\" target=\"_blank\">https://docs.1panel.pro/dev_manual/api_manual/</a>",
"access.form.1panel_allow_insecure_conns.label": "Insecure SSL/TLS connections",
"access.form.1panel_allow_insecure_conns.tooltip": "Allowing insecure connections may lead to data leak or tampering. Use this option only when under trusted networks.",
"access.form.1panel_allow_insecure_conns.switch.on": "Allow",
"access.form.1panel_allow_insecure_conns.switch.off": "Disallow",
"access.form.acmehttpreq_endpoint.label": "Endpoint",
"access.form.acmehttpreq_endpoint.placeholder": "Please enter endpoint",
"access.form.acmehttpreq_endpoint.tooltip": "For more information, see <a href=\"https://go-acme.github.io/lego/dns/httpreq/\" target=\"_blank\">https://go-acme.github.io/lego/dns/httpreq/</a>",
@@ -73,6 +83,10 @@
"access.form.baotapanel_api_key.label": "aaPanel API key",
"access.form.baotapanel_api_key.placeholder": "Please enter aaPanel API key",
"access.form.baotapanel_api_key.tooltip": "For more information, see <a href=\"https://www.bt.cn/bbs/thread-20376-1-1.html\" target=\"_blank\">https://www.bt.cn/bbs/thread-20376-1-1.html</a>",
"access.form.baotapanel_allow_insecure_conns.label": "Insecure SSL/TLS connections",
"access.form.baotapanel_allow_insecure_conns.tooltip": "Allowing insecure connections may lead to data leak or tampering. Use this option only when under trusted networks.",
"access.form.baotapanel_allow_insecure_conns.switch.on": "Allow",
"access.form.baotapanel_allow_insecure_conns.switch.off": "Disallow",
"access.form.byteplus_access_key.label": "BytePlus AccessKey",
"access.form.byteplus_access_key.placeholder": "Please enter BytePlus AccessKey",
"access.form.byteplus_access_key.tooltip": "For more information, see <a href=\"https://docs.byteplus.com/en/docs/byteplus-platform/docs-managing-keys\" target=\"_blank\">https://docs.byteplus.com/en/docs/byteplus-platform/docs-managing-keys</a>",
@@ -194,6 +208,10 @@
"access.form.safeline_api_token.label": "SafeLine API token",
"access.form.safeline_api_token.placeholder": "Please enter SafeLine API token",
"access.form.safeline_api_token.tooltip": "For more information, see <a href=\"https://docs.waf.chaitin.com/en/reference/articles/openapi\" target=\"_blank\">https://docs.waf.chaitin.com/en/reference/articles/openapi</a>",
"access.form.safeline_allow_insecure_conns.label": "Insecure SSL/TLS connections",
"access.form.safeline_allow_insecure_conns.tooltip": "Allowing insecure connections may lead to data leak or tampering. Use this option only when under trusted networks.",
"access.form.safeline_allow_insecure_conns.switch.on": "Allow",
"access.form.safeline_allow_insecure_conns.switch.off": "Disallow",
"access.form.ssh_host.label": "Server host",
"access.form.ssh_host.placeholder": "Please enter server host",
"access.form.ssh_port.label": "Server port",
@@ -233,6 +251,10 @@
"access.form.volcengine_secret_access_key.tooltip": "For more information, see <a href=\"https://www.volcengine.com/docs/6291/216571\" target=\"_blank\">https://www.volcengine.com/docs/6291/216571</a>",
"access.form.webhook_url.label": "Webhook URL",
"access.form.webhook_url.placeholder": "Please enter Webhook URL",
"access.form.webhook_allow_insecure_conns.label": "Insecure SSL/TLS connections",
"access.form.webhook_allow_insecure_conns.tooltip": "Allowing insecure connections may lead to data leak or tampering. Use this option only when under trusted networks.",
"access.form.webhook_allow_insecure_conns.switch.on": "Allow",
"access.form.webhook_allow_insecure_conns.switch.off": "Disallow",
"access.form.westcn_username.label": "West.cn username",
"access.form.westcn_username.placeholder": "Please enter West.cn username",
"access.form.westcn_username.tooltip": "For more information, see <a href=\"https://www.west.cn/CustomerCenter/doc/apiv2.html#12u3001u8eabu4efdu9a8cu8bc10a3ca20id3d12u3001u8eabu4efdu9a8cu8bc13e203ca3e\" target=\"_blank\">https://www.west.cn/CustomerCenter/doc/apiv2.html</a>",

View File

@@ -1,5 +1,7 @@
{
"provider.1panel": "1Panel",
"provider.1panel.console": "1Panel - Console",
"provider.1panel.site": "1Panel - Website",
"provider.acmehttpreq": "Http Request (ACME Proxy)",
"provider.aliyun": "Alibaba Cloud",
"provider.aliyun.alb": "Alibaba Cloud - ALB (Application Load Balancer)",
@@ -9,6 +11,7 @@
"provider.aliyun.dcdn": "Alibaba Cloud - DCDN (Dynamic Route for Content Delivery Network)",
"provider.aliyun.dns": "Alibaba Cloud - DNS (Domain Name Service)",
"provider.aliyun.esa": "Alibaba Cloud - ESA (Edge Security Acceleration)",
"provider.aliyun.fc": "Alibaba Cloud - FC (Function Compute)",
"provider.aliyun.live": "Alibaba Cloud - ApsaraVideo Live",
"provider.aliyun.nlb": "Alibaba Cloud - NLB (Network Load Balancer)",
"provider.aliyun.oss": "Alibaba Cloud - OSS (Object Storage Service)",
@@ -28,7 +31,7 @@
"provider.baishan.cdn": "Baishan - CDN (Content Delivery Network)",
"provider.baotapanel": "aaPanel (aka BaoTaPanel)",
"provider.baotapanel.console": "aaPanel (aka BaoTaPanel) - Console",
"provider.baotapanel.site": "aaPanel (aka BaoTaPanel) - Site",
"provider.baotapanel.site": "aaPanel (aka BaoTaPanel) - Website",
"provider.byteplus": "BytePlus",
"provider.byteplus.cdn": "BytePlus - CDN (Content Delivery Network)",
"provider.cachefly": "CacheFly",
@@ -83,6 +86,7 @@
"provider.tencentcloud.dns": "Tencent Cloud - DNS (Domain Name Service)",
"provider.tencentcloud.ecdn": "Tencent Cloud - ECDN (Enterprise Content Delivery Network)",
"provider.tencentcloud.eo": "Tencent Cloud - EdgeOne",
"provider.tencentcloud.scf": "Tencent Cloud - SCF (Serverless Cloud Function)",
"provider.tencentcloud.ssl_deploy": "Tencent Cloud - via SSL Certificate Service Deployment Job",
"provider.tencentcloud.vod": "Tencent Cloud - VOD (Video on Demand)",
"provider.tencentcloud.waf": "Tencent Cloud - WAF (Web Application Firewall)",
@@ -106,6 +110,7 @@
"provider.category.loadbalance": "Loadbalance",
"provider.category.firewall": "Firewall",
"provider.category.av": "Audio/Video",
"provider.category.serverless": "Serverless",
"provider.category.website": "Website",
"provider.category.other": "Other"
}

View File

@@ -16,7 +16,7 @@
"settings.password.form.password.errmsg.not_matched": "Passwords do not match",
"settings.notification.tab": "Notification",
"settings.notification.template.card.title": "Template",
"settings.notification.template.card.title": "Certificate expiration notification template",
"settings.notification.template.form.subject.label": "Subject",
"settings.notification.template.form.subject.placeholder": "Please enter notification subject",
"settings.notification.template.form.subject.extra": "Supported variables (${COUNT}: number of expiring soon)",
@@ -24,8 +24,8 @@
"settings.notification.template.form.message.placeholder": "Please enter notification message",
"settings.notification.template.form.message.extra": "Supported variables (${COUNT}: number of expiring soon. ${DOMAINS}: Domain list)",
"settings.notification.channels.card.title": "Channels",
"settings.notification.channel.enabled.on": "On",
"settings.notification.channel.enabled.off": "Off",
"settings.notification.channel.switch.on": "On",
"settings.notification.channel.switch.off": "Off",
"settings.notification.push_test.button": "Send test notification",
"settings.notification.push_test.pushed": "Sent",
"settings.notification.channel.form.bark_server_url.label": "Server URL",
@@ -44,7 +44,7 @@
"settings.notification.channel.form.email_smtp_host.placeholder": "Please enter SMTP host",
"settings.notification.channel.form.email_smtp_port.label": "SMTP port",
"settings.notification.channel.form.email_smtp_port.placeholder": "Please enter SMTP port",
"settings.notification.channel.form.email_smtp_tls.label": "Use TLS/SSL",
"settings.notification.channel.form.email_smtp_tls.label": "Use SSL/TLS",
"settings.notification.channel.form.email_username.label": "Username",
"settings.notification.channel.form.email_username.placeholder": "please enter username",
"settings.notification.channel.form.email_password.label": "Password",

View File

@@ -20,7 +20,7 @@
"workflow_node.start.form.trigger_cron.errmsg.invalid": "Please enter a valid cron expression",
"workflow_node.start.form.trigger_cron.tooltip": "Exactly 5 space separated segments. Time zone is based on the server.",
"workflow_node.start.form.trigger_cron.extra": "Expected execution time for the last 5 times:",
"workflow_node.start.form.trigger_cron.guide": "Tips: If you have multiple workflows, it is recommended to set them to run at multiple times of the day instead of always running at specific times.<br><br>Reference links:<br>1. <a href=\"https://letsencrypt.org/docs/rate-limits/\" target=\"_blank\">Lets Encrypt rate limits</a><br>2. <a href=\"https://letsencrypt.org/docs/faq/#why-should-my-let-s-encrypt-acme-client-run-at-a-random-time\" target=\"_blank\">Why should my Lets Encrypt (ACME) client run at a random time?</a>",
"workflow_node.start.form.trigger_cron.guide": "Tips: If you have multiple workflows, it is recommended to set them to run at multiple times of the day instead of always running at specific times. Don't always set it to midnight every day to avoid spikes in traffic.<br><br>Reference links:<br>1. <a href=\"https://letsencrypt.org/docs/rate-limits/\" target=\"_blank\">Lets Encrypt rate limits</a><br>2. <a href=\"https://letsencrypt.org/docs/faq/#why-should-my-let-s-encrypt-acme-client-run-at-a-random-time\" target=\"_blank\">Why should my Lets Encrypt (ACME) client run at a random time?</a>",
"workflow_node.apply.label": "Application",
"workflow_node.apply.form.domains.label": "Domains",
@@ -90,6 +90,10 @@
"workflow_node.deploy.form.certificate.placeholder": "Please select certificate",
"workflow_node.deploy.form.certificate.tooltip": "The certificate to be deployed comes from the previous application stage node.",
"workflow_node.deploy.form.params_config.label": "Parameter settings",
"workflow_node.deploy.form.1panel_console_auto_restart.label": "Auto restart after deployment",
"workflow_node.deploy.form.1panel_site_website_id.label": "1Panel website ID",
"workflow_node.deploy.form.1panel_site_website_id.placeholder": "Please enter 1Panel website ID",
"workflow_node.deploy.form.1panel_site_website_id.tooltip": "You can find it on 1Panel WebUI.",
"workflow_node.deploy.form.aliyun_alb_resource_type.label": "Resource type",
"workflow_node.deploy.form.aliyun_alb_resource_type.placeholder": "Please select resource type",
"workflow_node.deploy.form.aliyun_alb_resource_type.option.loadbalancer.label": "ALB load balancer",
@@ -150,6 +154,14 @@
"workflow_node.deploy.form.aliyun_esa_site_id.label": "Alibaba Cloud ESA site ID",
"workflow_node.deploy.form.aliyun_esa_site_id.placeholder": "Please enter Alibaba Cloud ESA site ID",
"workflow_node.deploy.form.aliyun_esa_site_id.tooltip": "For more information, see <a href=\"https://esa.console.aliyun.com/siteManage/list\" target=\"_blank\">https://esa.console.aliyun.com/siteManage/list</a>",
"workflow_node.deploy.form.aliyun_fc_region.label": "Alibaba Cloud FC region",
"workflow_node.deploy.form.aliyun_fc_region.placeholder": "Please enter Alibaba Cloud FC region (e.g. cn-hangzhou)",
"workflow_node.deploy.form.aliyun_fc_region.tooltip": "For more information, see <a href=\"https://www.alibabacloud.com/help/en/functioncompute/fc-3-0/product-overview/supported-regions\" target=\"_blank\">https://www.alibabacloud.com/help/en/functioncompute/fc-3-0/product-overview/supported-regions</a>",
"workflow_node.deploy.form.aliyun_fc_service_version.label": "Alibaba Cloud FC version",
"workflow_node.deploy.form.aliyun_fc_service_version.placeholder": "Please select Alibaba Cloud FC version",
"workflow_node.deploy.form.aliyun_fc_domain.label": "Alibaba Cloud FC domain",
"workflow_node.deploy.form.aliyun_fc_domain.placeholder": "Please enter Alibaba Cloud FC domain name",
"workflow_node.deploy.form.aliyun_fc_domain.tooltip": "For more information, see <a href=\"https://fcnext.console.aliyun.com\" target=\"_blank\">https://fcnext.console.aliyun.com</a>",
"workflow_node.deploy.form.aliyun_live_region.label": "Alibaba Cloud Live region",
"workflow_node.deploy.form.aliyun_live_region.placeholder": "Please enter Alibaba Cloud Live region (e.g. cn-hangzhou)",
"workflow_node.deploy.form.aliyun_live_region.tooltip": "For more information, see <a href=\"https://www.alibabacloud.com/help/en/live/product-overview/supported-regions\" target=\"_blank\">https://www.alibabacloud.com/help/en/live/product-overview/supported-regions</a>",
@@ -341,9 +353,9 @@
"workflow_node.deploy.form.local_shell_env.option.sh.label": "POSIX Bash (on Linux / macOS)",
"workflow_node.deploy.form.local_shell_env.option.cmd.label": "CMD (on Windows)",
"workflow_node.deploy.form.local_shell_env.option.powershell.label": "PowerShell (on Windows)",
"workflow_node.deploy.form.local_pre_command.label": "Pre-command",
"workflow_node.deploy.form.local_pre_command.label": "Pre-command (Optional)",
"workflow_node.deploy.form.local_pre_command.placeholder": "Please enter command to be executed before saving files",
"workflow_node.deploy.form.local_post_command.label": "Post-command",
"workflow_node.deploy.form.local_post_command.label": "Post-command (Optional)",
"workflow_node.deploy.form.local_post_command.placeholder": "Please enter command to be executed after saving files",
"workflow_node.deploy.form.local_preset_scripts.button": "Use preset scripts",
"workflow_node.deploy.form.local_preset_scripts.option.reload_nginx.label": "POSIX Bash - Reload nginx",
@@ -388,9 +400,9 @@
"workflow_node.deploy.form.ssh_jks_storepass.tooltip": "For more information, see <a href=\"https://docs.oracle.com/cd/E19509-01/820-3503/ggfen/index.html\" target=\"_blank\">https://docs.oracle.com/cd/E19509-01/820-3503/ggfen/index.html</a>",
"workflow_node.deploy.form.ssh_shell_env.label": "Shell",
"workflow_node.deploy.form.ssh_shell_env.value": "POSIX Bash (on Linux / macOS)",
"workflow_node.deploy.form.ssh_pre_command.label": "Pre-command",
"workflow_node.deploy.form.ssh_pre_command.label": "Pre-command (Optional)",
"workflow_node.deploy.form.ssh_pre_command.placeholder": "Please enter command to be executed before uploading files",
"workflow_node.deploy.form.ssh_post_command.label": "Post-command",
"workflow_node.deploy.form.ssh_post_command.label": "Post-command (Optional)",
"workflow_node.deploy.form.ssh_post_command.placeholder": "Please enter command to be executed after uploading files",
"workflow_node.deploy.form.ssh_preset_scripts.button": "Use preset scripts",
"workflow_node.deploy.form.ssh_preset_scripts.option.reload_nginx.label": "POSIX Bash - Reload nginx",
@@ -441,10 +453,19 @@
"workflow_node.deploy.form.tencentcloud_eo_domain.label": "Tencent Cloud EdgeOne domain",
"workflow_node.deploy.form.tencentcloud_eo_domain.placeholder": "Please enter Tencent Cloud EdgeOne domain name",
"workflow_node.deploy.form.tencentcloud_eo_domain.tooltip": "For more information, see <a href=\"https://console.tencentcloud.com/edgeone\" target=\"_blank\">https://console.tencentcloud.com/edgeone</a>",
"workflow_node.deploy.form.tencentcloud_scf_region.label": "Tencent Cloud SCF region",
"workflow_node.deploy.form.tencentcloud_scf_region.placeholder": "Please enter Tencent Cloud SCF region (e.g. ap-guangzhou)",
"workflow_node.deploy.form.tencentcloud_scf_region.tooltip": "For more information, see <a href=\"https://www.tencentcloud.com/document/product/583/17299\" target=\"_blank\">https://www.tencentcloud.com/document/product/583/17299</a>",
"workflow_node.deploy.form.tencentcloud_scf_domain.label": "Tencent Cloud SCF domain",
"workflow_node.deploy.form.tencentcloud_scf_domain.placeholder": "Please enter Tencent Cloud SCF domain name",
"workflow_node.deploy.form.tencentcloud_scf_domain.tooltip": "For more information, see <a href=\"https://console.tencentcloud.com/scf\" target=\"_blank\">https://console.tencentcloud.com/scf</a>",
"workflow_node.deploy.form.tencentcloud_ssl_deploy.guide": "TIPS: You need to go to the Tencent Cloud console to check the actual deployment results by yourself, because Tencent Cloud deployment tasks are running asynchronously.",
"workflow_node.deploy.form.tencentcloud_ssl_deploy_region.label": "Tencent Cloud service region",
"workflow_node.deploy.form.tencentcloud_ssl_deploy_region.placeholder": "Please enter Tencent Cloud service region (e.g. ap-guangzhou)",
"workflow_node.deploy.form.tencentcloud_ssl_deploy_region.tooltip": "For more information, see <a href=\"https://www.tencentcloud.com/document/product/1007/36573\" target=\"_blank\">https://www.tencentcloud.com/document/product/1007/36573</a>",
"workflow_node.deploy.form.tencentcloud_ssl_deploy_resource_type.label": "Tencent Cloud resource type",
"workflow_node.deploy.form.tencentcloud_ssl_deploy_resource_type.placeholder": "Please enter Tencent Cloud resource type",
"workflow_node.deploy.form.tencentcloud_ssl_deploy_resource_type.tooltip": "For more information, see <a href=\"https://cloud.tencent.com.cn/document/product/400/91667\" target=\"_blank\">https://cloud.tencent.com.cn/document/product/400/91667</a>",
"workflow_node.deploy.form.tencentcloud_ssl_deploy_resource_ids.label": "Tencent Cloud resource IDs",
"workflow_node.deploy.form.tencentcloud_ssl_deploy_resource_ids.placeholder": "Please enter Tencent Cloud resource IDs (separated by semicolons)",
"workflow_node.deploy.form.tencentcloud_ssl_deploy_resource_ids.errmsg.invalid": "Please enter a valid Tencent Cloud resource ID",
@@ -526,8 +547,8 @@
"workflow_node.deploy.form.skip_on_last_succeeded.label": "Repeated deployment",
"workflow_node.deploy.form.skip_on_last_succeeded.prefix": "If the last deployment was successful, ",
"workflow_node.deploy.form.skip_on_last_succeeded.suffix": " to re-deploy.",
"workflow_node.deploy.form.skip_on_last_succeeded.enabled.on": "skip",
"workflow_node.deploy.form.skip_on_last_succeeded.enabled.off": "not skip",
"workflow_node.deploy.form.skip_on_last_succeeded.switch.on": "skip",
"workflow_node.deploy.form.skip_on_last_succeeded.switch.off": "not skip",
"workflow_node.notify.label": "Notification",
"workflow_node.notify.form.subject.label": "Subject",

View File

@@ -23,6 +23,16 @@
"access.form.provider.label": "提供商",
"access.form.provider.placeholder": "请选择提供商",
"access.form.provider.tooltip": "提供商分为两种类型:<br>【DNS 提供商】你的 DNS 托管方,通常等同于域名注册商,用于在申请证书时管理您的域名解析记录。<br>【主机提供商】你的服务器或云服务的托管方,用于部署签发的证书。<br><br>该字段保存后不可修改。",
"access.form.1panel_api_url.label": "1Panel URL",
"access.form.1panel_api_url.placeholder": "请输入 1Panel URL",
"access.form.1panel_api_url.tooltip": "这是什么?请参阅 <a href=\"https://1panel.cn/docs/dev_manual/api_manual/\" target=\"_blank\">https://1panel.cn/docs/dev_manual/api_manual/</a>",
"access.form.1panel_api_key.label": "1Panel 接口密钥",
"access.form.1panel_api_key.placeholder": "请输入 1Panel 接口密钥",
"access.form.1panel_api_key.tooltip": "这是什么?请参阅 <a href=\"https://1panel.cn/docs/dev_manual/api_manual/\" target=\"_blank\">https://1panel.cn/docs/dev_manual/api_manual/</a>",
"access.form.1panel_allow_insecure_conns.label": "忽略 SSL/TLS 证书错误",
"access.form.1panel_allow_insecure_conns.tooltip": "忽略 SSL/TLS 证书错误可能导致数据泄露或被篡改。建议仅在可信网络下启用。",
"access.form.1panel_allow_insecure_conns.switch.on": "允许",
"access.form.1panel_allow_insecure_conns.switch.off": "不允许",
"access.form.acmehttpreq_endpoint.label": "服务端点",
"access.form.acmehttpreq_endpoint.placeholder": "请输入服务端点",
"access.form.acmehttpreq_endpoint.tooltip": "这是什么?请参阅 <a href=\"https://go-acme.github.io/lego/dns/httpreq/\" target=\"_blank\">https://go-acme.github.io/lego/dns/httpreq/</a>",
@@ -73,6 +83,10 @@
"access.form.baotapanel_api_key.label": "宝塔面板接口密钥",
"access.form.baotapanel_api_key.placeholder": "请输入宝塔面板接口密钥",
"access.form.baotapanel_api_key.tooltip": "这是什么?请参阅 <a href=\"https://www.bt.cn/bbs/thread-113890-1-1.html\" target=\"_blank\">https://www.bt.cn/bbs/thread-113890-1-1.html</a>",
"access.form.baotapanel_allow_insecure_conns.label": "忽略 SSL/TLS 证书错误",
"access.form.baotapanel_allow_insecure_conns.tooltip": "忽略 SSL/TLS 证书错误可能导致数据泄露或被篡改。建议仅在可信网络下启用。",
"access.form.baotapanel_allow_insecure_conns.switch.on": "允许",
"access.form.baotapanel_allow_insecure_conns.switch.off": "不允许",
"access.form.byteplus_access_key.label": "BytePlus AccessKey",
"access.form.byteplus_access_key.placeholder": "请输入 BytePlus AccessKey",
"access.form.byteplus_access_key.tooltip": "这是什么?请参阅 <a href=\"https://docs.byteplus.com/zh-CN/docs/byteplus-platform/docs-managing-keys\" target=\"_blank\">https://docs.byteplus.com/zh-CN/docs/byteplus-platform/docs-managing-keys</a>",
@@ -194,6 +208,10 @@
"access.form.safeline_api_token.label": "雷池 API Token",
"access.form.safeline_api_token.placeholder": "请输入雷池 API Token",
"access.form.safeline_api_token.tooltip": "这是什么?请参阅 <a href=\"https://docs.waf-ce.chaitin.cn/zh/%E6%9B%B4%E5%A4%9A%E6%8A%80%E6%9C%AF%E6%96%87%E6%A1%A3/OPENAPI\" target=\"_blank\">https://docs.waf-ce.chaitin.cn/zh/更多技术文档/OPENAPI</a>",
"access.form.safeline_allow_insecure_conns.label": "忽略 SSL/TLS 证书错误",
"access.form.safeline_allow_insecure_conns.tooltip": "忽略 SSL/TLS 证书错误可能导致数据泄露或被篡改。建议仅在可信网络下启用。",
"access.form.safeline_allow_insecure_conns.switch.on": "允许",
"access.form.safeline_allow_insecure_conns.switch.off": "不允许",
"access.form.ssh_host.label": "服务器地址",
"access.form.ssh_host.placeholder": "请输入服务器地址",
"access.form.ssh_port.label": "服务器端口",
@@ -233,6 +251,10 @@
"access.form.volcengine_secret_access_key.tooltip": "这是什么?请参阅 <a href=\"https://www.volcengine.com/docs/6291/216571\" target=\"_blank\">https://www.volcengine.com/docs/6291/216571</a>",
"access.form.webhook_url.label": "Webhook 回调地址",
"access.form.webhook_url.placeholder": "请输入 Webhook 回调地址",
"access.form.webhook_allow_insecure_conns.label": "忽略 SSL/TLS 证书错误",
"access.form.webhook_allow_insecure_conns.tooltip": "忽略 SSL/TLS 证书错误可能导致数据泄露或被篡改。建议仅在可信网络下启用。",
"access.form.webhook_allow_insecure_conns.switch.on": "允许",
"access.form.webhook_allow_insecure_conns.switch.off": "不允许",
"access.form.westcn_username.label": "西部数码用户名",
"access.form.westcn_username.placeholder": "请输入西部数码用户名",
"access.form.westcn_username.tooltip": "这是什么?请参阅 <a href=\"https://www.west.cn/CustomerCenter/doc/apiv2.html#12u3001u8eabu4efdu9a8cu8bc10a3ca20id3d12u3001u8eabu4efdu9a8cu8bc13e203ca3e\" target=\"_blank\">https://www.west.cn/CustomerCenter/doc/apiv2.html</a>",

View File

@@ -1,5 +1,7 @@
{
"provider.1panel": "1Panel",
"provider.1panel.console": "1Panel - 面板",
"provider.1panel.site": "1Panel - 网站",
"provider.acmehttpreq": "Http Request (ACME Proxy)",
"provider.aliyun": "阿里云",
"provider.aliyun.alb": "阿里云 - 应用型负载均衡 ALB",
@@ -8,6 +10,7 @@
"provider.aliyun.clb": "阿里云 - 传统型负载均衡 CLB",
"provider.aliyun.dcdn": "阿里云 - 全站加速 DCDN",
"provider.aliyun.esa": "阿里云 - 边缘安全加速 ESA",
"provider.aliyun.fc": "阿里云 - 函数计算 FC",
"provider.aliyun.dns": "阿里云 - 云解析 DNS",
"provider.aliyun.live": "阿里云 - 视频直播 Live",
"provider.aliyun.nlb": "阿里云 - 网络型负载均衡 NLB",
@@ -83,6 +86,7 @@
"provider.tencentcloud.dns": "腾讯云 - 云解析 DNS",
"provider.tencentcloud.ecdn": "腾讯云 - 全站加速网络 ECDN",
"provider.tencentcloud.eo": "腾讯云 - 边缘安全加速平台 EdgeOne",
"provider.tencentcloud.scf": "腾讯云 - 云函数 SCF",
"provider.tencentcloud.ssl_deploy": "腾讯云 - 通过 SSL 证书服务创建部署任务",
"provider.tencentcloud.vod": "腾讯云 - 云点播 VOD",
"provider.tencentcloud.waf": "腾讯云 - Web 应用防火墙 WAF",
@@ -106,6 +110,7 @@
"provider.category.loadbalance": "负载均衡",
"provider.category.firewall": "防火墙",
"provider.category.av": "音视频",
"provider.category.website": "网站",
"provider.category.serverless": "Serverless",
"provider.category.website": "网站托管",
"provider.category.other": "其他"
}

View File

@@ -16,16 +16,16 @@
"settings.password.form.password.errmsg.not_matched": "两次密码不一致",
"settings.notification.tab": "消息推送",
"settings.notification.template.card.title": "通知模板",
"settings.notification.template.card.title": "证书过期通知模板(全局)",
"settings.notification.template.form.subject.label": "通知主题",
"settings.notification.template.form.subject.placeholder": "请输入通知主题",
"settings.notification.template.form.subject.extra": "支持的变量(${COUNT}: 即将过期张数)",
"settings.notification.template.form.message.label": "通知内容",
"settings.notification.template.form.message.placeholder": "请输入通知内容",
"settings.notification.template.form.message.extra": "支持的变量(${COUNT}: 即将过期张数;${DOMAINS}: 域名列表)",
"settings.notification.template.form.message.extra": "过期前 20 天发送通知。支持的变量(${COUNT}: 即将过期张数;${DOMAINS}: 域名列表)",
"settings.notification.channels.card.title": "通知渠道",
"settings.notification.channel.enabled.on": "启用",
"settings.notification.channel.enabled.off": "停用",
"settings.notification.channel.switch.on": "启用",
"settings.notification.channel.switch.off": "停用",
"settings.notification.push_test.button": "推送测试消息",
"settings.notification.push_test.pushed": "已推送",
"settings.notification.channel.form.bark_server_url.label": "服务器地址",
@@ -44,7 +44,7 @@
"settings.notification.channel.form.email_smtp_host.placeholder": "请输入 SMTP 服务器地址",
"settings.notification.channel.form.email_smtp_port.label": "SMTP 服务器端口",
"settings.notification.channel.form.email_smtp_port.placeholder": "请输入 SMTP 服务器端口",
"settings.notification.channel.form.email_smtp_tls.label": "TLS/SSL 连接",
"settings.notification.channel.form.email_smtp_tls.label": "SSL/TLS 连接",
"settings.notification.channel.form.email_username.label": "用户名",
"settings.notification.channel.form.email_username.placeholder": "请输入用户名",
"settings.notification.channel.form.email_password.label": "密码",

View File

@@ -20,7 +20,7 @@
"workflow_node.start.form.trigger_cron.errmsg.invalid": "请输入正确的 Cron 表达式",
"workflow_node.start.form.trigger_cron.tooltip": "五段式表达式,支持使用任意值(即 <strong>*</strong>)、值列表分隔符(即 <strong>,</strong>)、值的范围(即 <strong>-</strong>)、步骤值(即 <strong>/</strong>)等四种表达式。时区以服务器设置为准。",
"workflow_node.start.form.trigger_cron.extra": "预计最近 5 次执行时间:",
"workflow_node.start.form.trigger_cron.guide": "小贴士:如果你有多个工作流,建议将它们设置为在一天中的多个时间段运行,而非总是在相同的特定时间。<br><br>参考链接:<br>1. <a href=\"https://letsencrypt.org/zh-cn/docs/rate-limits/\" target=\"_blank\">Lets Encrypt 速率限制</a><br>2. <a href=\"https://letsencrypt.org/zh-cn/docs/faq/#%E4%B8%BA%E4%BB%80%E4%B9%88%E6%88%91%E7%9A%84-let-s-encrypt-acme-%E5%AE%A2%E6%88%B7%E7%AB%AF%E5%90%AF%E5%8A%A8%E6%97%B6%E9%97%B4%E5%BA%94%E5%BD%93%E9%9A%8F%E6%9C%BA\" target=\"_blank\">为什么我的 Lets Encrypt (ACME) 客户端启动时间应当随机?</a>",
"workflow_node.start.form.trigger_cron.guide": "小贴士:如果你有多个工作流,建议将它们设置为在一天中的多个时间段运行,而非总是在相同的特定时间。也不要总是设置为每日零时,以免遭遇证书颁发机构的流量高峰。<br><br>参考链接:<br>1. <a href=\"https://letsencrypt.org/zh-cn/docs/rate-limits/\" target=\"_blank\">Lets Encrypt 速率限制</a><br>2. <a href=\"https://letsencrypt.org/zh-cn/docs/faq/#%E4%B8%BA%E4%BB%80%E4%B9%88%E6%88%91%E7%9A%84-let-s-encrypt-acme-%E5%AE%A2%E6%88%B7%E7%AB%AF%E5%90%AF%E5%8A%A8%E6%97%B6%E9%97%B4%E5%BA%94%E5%BD%93%E9%9A%8F%E6%9C%BA\" target=\"_blank\">为什么我的 Lets Encrypt (ACME) 客户端启动时间应当随机?</a>",
"workflow_node.apply.label": "申请",
"workflow_node.apply.form.domains.label": "域名",
@@ -85,11 +85,15 @@
"workflow_node.deploy.form.provider_access.placeholder": "请选择主机提供商授权",
"workflow_node.deploy.form.provider_access.tooltip": "用于部署证书,注意与申请阶段所需的 DNS 提供商相区分。",
"workflow_node.deploy.form.provider_access.button": "新建",
"workflow_node.deploy.form.provider_access.guide_for_local": "小贴士:由于表单限制,你同样需要为本地部署选择一个授权 —— 即使它是空白的。",
"workflow_node.deploy.form.provider_access.guide_for_local": "小贴士:由于表单限制,你同样需要为本地部署选择一个授权 —— 即使它是空白的。<br>请注意:如果你使用 Docker 安装 Certimate“本地部署”将会部署到容器内而非宿主机上。",
"workflow_node.deploy.form.certificate.label": "待部署证书",
"workflow_node.deploy.form.certificate.placeholder": "请选择待部署证书",
"workflow_node.deploy.form.certificate.tooltip": "待部署证书来自之前的申请阶段。如果选项为空请先确保前序节点配置正确。",
"workflow_node.deploy.form.params_config.label": "参数设置",
"workflow_node.deploy.form.1panel_console_auto_restart.label": "部署后自动重启面板服务",
"workflow_node.deploy.form.1panel_site_website_id.label": "1Panel 网站 ID",
"workflow_node.deploy.form.1panel_site_website_id.placeholder": "请输入 1Panel 网站 ID",
"workflow_node.deploy.form.1panel_site_website_id.tooltip": "请在 1Panel 管理面板查看。",
"workflow_node.deploy.form.aliyun_alb_resource_type.label": "证书替换方式",
"workflow_node.deploy.form.aliyun_alb_resource_type.placeholder": "请选择证书替换方式",
"workflow_node.deploy.form.aliyun_alb_resource_type.option.loadbalancer.label": "替换指定负载均衡器下的全部 HTTPS/QUIC 监听的证书",
@@ -150,6 +154,14 @@
"workflow_node.deploy.form.aliyun_esa_site_id.label": "阿里云 ESA 站点 ID",
"workflow_node.deploy.form.aliyun_esa_site_id.placeholder": "请输入阿里云 ESA 站点 ID",
"workflow_node.deploy.form.aliyun_esa_site_id.tooltip": "这是什么?请参阅 <a href=\"https://esa.console.aliyun.com/siteManage/list\" target=\"_blank\">https://esa.console.aliyun.com/siteManage/list</a>",
"workflow_node.deploy.form.aliyun_fc_region.label": "阿里云 FC 服务地域",
"workflow_node.deploy.form.aliyun_fc_region.placeholder": "请输入阿里云 FC 服务地域例如cn-hangzhou",
"workflow_node.deploy.form.aliyun_fc_region.tooltip": "这是什么?请参阅 <a href=\"https://help.aliyun.com/zh/functioncompute/fc-3-0/product-overview/supported-regions\" target=\"_blank\">https://help.aliyun.com/zh/functioncompute/fc-3-0/product-overview/supported-regions</a>",
"workflow_node.deploy.form.aliyun_fc_service_version.label": "阿里云 FC 服务版本",
"workflow_node.deploy.form.aliyun_fc_service_version.placeholder": "请选择阿里云 FC 服务版本",
"workflow_node.deploy.form.aliyun_fc_domain.label": "阿里云 FC 自定义域名",
"workflow_node.deploy.form.aliyun_fc_domain.placeholder": "请输入阿里云 FC 自定义域名",
"workflow_node.deploy.form.aliyun_fc_domain.tooltip": "这是什么?请参阅 see <a href=\"https://fcnext.console.aliyun.com/\" target=\"_blank\">https://fcnext.console.aliyun.com/</a>",
"workflow_node.deploy.form.aliyun_live_region.label": "阿里云视频直播服务地域",
"workflow_node.deploy.form.aliyun_live_region.placeholder": "请输入阿里云视频直播服务地域例如cn-hangzhou",
"workflow_node.deploy.form.aliyun_live_region.tooltip": "这是什么?请参阅 <a href=\"https://help.aliyun.com/zh/live/product-overview/supported-regions\" target=\"_blank\">https://help.aliyun.com/zh/live/product-overview/supported-regions</a>",
@@ -341,9 +353,9 @@
"workflow_node.deploy.form.local_shell_env.option.sh.label": "POSIX BashLinux / macOS",
"workflow_node.deploy.form.local_shell_env.option.cmd.label": "CMDWindows",
"workflow_node.deploy.form.local_shell_env.option.powershell.label": "PowerShellWindows",
"workflow_node.deploy.form.local_pre_command.label": "前置命令",
"workflow_node.deploy.form.local_pre_command.label": "前置命令(可选)",
"workflow_node.deploy.form.local_pre_command.placeholder": "请输入保存文件前执行的命令",
"workflow_node.deploy.form.local_post_command.label": "后置命令",
"workflow_node.deploy.form.local_post_command.label": "后置命令(可选)",
"workflow_node.deploy.form.local_post_command.placeholder": "请输入保存文件后执行的命令",
"workflow_node.deploy.form.local_preset_scripts.button": "使用预设脚本",
"workflow_node.deploy.form.local_preset_scripts.option.reload_nginx.label": "POSIX Bash - 重启 nginx 进程",
@@ -388,9 +400,9 @@
"workflow_node.deploy.form.ssh_jks_storepass.tooltip": "这是什么?请参阅 <a href=\"https://docs.oracle.com/cd/E19509-01/820-3503/ggfen/index.html\" target=\"_blank\">https://docs.oracle.com/cd/E19509-01/820-3503/ggfen/index.html</a>",
"workflow_node.deploy.form.ssh_shell_env.label": "命令执行环境",
"workflow_node.deploy.form.ssh_shell_env.value": "POSIX BashLinux / macOS",
"workflow_node.deploy.form.ssh_pre_command.label": "前置命令",
"workflow_node.deploy.form.ssh_pre_command.label": "前置命令(可选)",
"workflow_node.deploy.form.ssh_pre_command.placeholder": "请输入保存文件前执行的命令",
"workflow_node.deploy.form.ssh_post_command.label": "后置命令",
"workflow_node.deploy.form.ssh_post_command.label": "后置命令(可选)",
"workflow_node.deploy.form.ssh_post_command.placeholder": "请输入保存文件后执行的命令",
"workflow_node.deploy.form.ssh_preset_scripts.button": "使用预设脚本",
"workflow_node.deploy.form.ssh_preset_scripts.option.reload_nginx.label": "POSIX Bash - 重启 nginx 进程",
@@ -441,6 +453,12 @@
"workflow_node.deploy.form.tencentcloud_eo_domain.label": "腾讯云 EdgeOne 加速域名",
"workflow_node.deploy.form.tencentcloud_eo_domain.placeholder": "请输入腾讯云 EdgeOne 加速域名",
"workflow_node.deploy.form.tencentcloud_eo_domain.tooltip": "这是什么?请参阅 <a href=\"https://console.cloud.tencent.com/edgeone\" target=\"_blank\">https://console.cloud.tencent.com/edgeone</a>",
"workflow_node.deploy.form.tencentcloud_scf_region.label": "腾讯云 SCF 产品地域",
"workflow_node.deploy.form.tencentcloud_scf_region.placeholder": "输入腾讯云 SCF 产品地域例如ap-guangzhou",
"workflow_node.deploy.form.tencentcloud_scf_region.tooltip": "这是什么?请参阅 <a href=\"https://cloud.tencent.com/document/product/583/17299\" target=\"_blank\">https://cloud.tencent.com/document/product/583/17299</a>",
"workflow_node.deploy.form.tencentcloud_scf_domain.label": "腾讯云 SCF 自定义域名",
"workflow_node.deploy.form.tencentcloud_scf_domain.placeholder": "输入腾讯云 SCF 自定义域名",
"workflow_node.deploy.form.tencentcloud_scf_domain.tooltip": "这是什么?请参阅 <a href=\"https://console.tencentcloud.com/scf\" target=\"_blank\">https://console.tencentcloud.com/scf</a>",
"workflow_node.deploy.form.tencentcloud_ssl_deploy.guide": "小贴士:由于腾讯云证书部署任务是异步的,此节点若执行成功仅代表已创建部署任务,实际部署结果需要你自行前往腾讯云控制台查询。",
"workflow_node.deploy.form.tencentcloud_ssl_deploy_region.label": "腾讯云云产品地域",
"workflow_node.deploy.form.tencentcloud_ssl_deploy_region.placeholder": "请输入腾讯云云产品地域例如ap-guangzhou",
@@ -529,8 +547,8 @@
"workflow_node.deploy.form.skip_on_last_succeeded.label": "重复部署",
"workflow_node.deploy.form.skip_on_last_succeeded.prefix": "当上次部署已成功时",
"workflow_node.deploy.form.skip_on_last_succeeded.suffix": "重新部署。",
"workflow_node.deploy.form.skip_on_last_succeeded.enabled.on": "跳过",
"workflow_node.deploy.form.skip_on_last_succeeded.enabled.off": "不跳过",
"workflow_node.deploy.form.skip_on_last_succeeded.switch.on": "跳过",
"workflow_node.deploy.form.skip_on_last_succeeded.switch.off": "不跳过",
"workflow_node.notify.label": "通知",
"workflow_node.notify.form.subject.label": "通知主题",

View File

@@ -310,7 +310,7 @@ const StatisticCard = ({
onClick?: () => void;
}) => {
return (
<Card className="size-full overflow-hidden" bordered={false} hoverable loading={loading} onClick={onClick}>
<Card className="size-full overflow-hidden" hoverable loading={loading} variant="borderless" onClick={onClick}>
<Space size="middle">
{icon}
<Statistic

View File

@@ -7,7 +7,7 @@ import {
type WorkflowNodeConfigForStart,
addBranch,
addNode,
getWorkflowOutputBeforeId,
getOutputBeforeNodeId,
removeBranch,
removeNode,
updateNode,
@@ -244,6 +244,6 @@ export const useWorkflowStore = create<WorkflowState>((set, get) => ({
},
getWorkflowOuptutBeforeId: (nodeId: string, type: string) => {
return getWorkflowOutputBeforeId(get().workflow.draft as WorkflowNode, nodeId, type);
return getOutputBeforeNodeId(get().workflow.draft as WorkflowNode, nodeId, type);
},
}));

View File

@@ -1,8 +1,8 @@
import { parseExpression } from "cron-parser";
import { CronExpressionParser } from "cron-parser";
export const validCronExpression = (expr: string): boolean => {
try {
parseExpression(expr);
CronExpressionParser.parse(expr);
if (expr.trim().split(" ").length !== 5) return false; // pocketbase 后端仅支持五段式的表达式
return true;
@@ -15,12 +15,7 @@ export const getNextCronExecutions = (expr: string, times = 1): Date[] => {
if (!validCronExpression(expr)) return [];
const now = new Date();
const cron = parseExpression(expr, { currentDate: now, iterator: true });
const cron = CronExpressionParser.parse(expr, { currentDate: now });
const result: Date[] = [];
for (let i = 0; i < times; i++) {
const next = cron.next();
result.push(next.value.toDate());
}
return result;
return cron.take(times).map((date) => date.toDate());
};