mirror of
https://github.com/usual2970/certimate.git
synced 2025-08-14 21:31:45 +00:00
feat(ui): release & run workflow
This commit is contained in:
@@ -353,17 +353,14 @@ const FormFieldDomainsModalForm = ({
|
||||
setModel({ domains: data?.split(MULTIPLE_INPUT_DELIMITER) });
|
||||
}, [data]);
|
||||
|
||||
const handleFinish = useCallback(
|
||||
(values: z.infer<typeof formSchema>) => {
|
||||
onFinish?.(
|
||||
values.domains
|
||||
.map((e) => e.trim())
|
||||
.filter((e) => !!e)
|
||||
.join(MULTIPLE_INPUT_DELIMITER)
|
||||
);
|
||||
},
|
||||
[onFinish]
|
||||
);
|
||||
const handleFormFinish = (values: z.infer<typeof formSchema>) => {
|
||||
onFinish?.(
|
||||
values.domains
|
||||
.map((e) => e.trim())
|
||||
.filter((e) => !!e)
|
||||
.join(MULTIPLE_INPUT_DELIMITER)
|
||||
);
|
||||
};
|
||||
|
||||
return (
|
||||
<ModalForm
|
||||
@@ -375,7 +372,7 @@ const FormFieldDomainsModalForm = ({
|
||||
trigger={trigger}
|
||||
validateTrigger="onSubmit"
|
||||
width={480}
|
||||
onFinish={handleFinish}
|
||||
onFinish={handleFormFinish}
|
||||
>
|
||||
<Form.Item name="domains" rules={[formRule]}>
|
||||
<MultipleInput placeholder={t("workflow_node.apply.form.domains.multiple_input_modal.placeholder")} />
|
||||
@@ -400,17 +397,14 @@ const FormFieldNameserversModalForm = ({ data, trigger, onFinish }: { data: stri
|
||||
setModel({ nameservers: data?.split(MULTIPLE_INPUT_DELIMITER) });
|
||||
}, [data]);
|
||||
|
||||
const handleFinish = useCallback(
|
||||
(values: z.infer<typeof formSchema>) => {
|
||||
onFinish?.(
|
||||
values.nameservers
|
||||
.map((e) => e.trim())
|
||||
.filter((e) => !!e)
|
||||
.join(MULTIPLE_INPUT_DELIMITER)
|
||||
);
|
||||
},
|
||||
[onFinish]
|
||||
);
|
||||
const handleFormFinish = (values: z.infer<typeof formSchema>) => {
|
||||
onFinish?.(
|
||||
values.nameservers
|
||||
.map((e) => e.trim())
|
||||
.filter((e) => !!e)
|
||||
.join(MULTIPLE_INPUT_DELIMITER)
|
||||
);
|
||||
};
|
||||
|
||||
return (
|
||||
<ModalForm
|
||||
@@ -422,7 +416,7 @@ const FormFieldNameserversModalForm = ({ data, trigger, onFinish }: { data: stri
|
||||
trigger={trigger}
|
||||
validateTrigger="onSubmit"
|
||||
width={480}
|
||||
onFinish={handleFinish}
|
||||
onFinish={handleFormFinish}
|
||||
>
|
||||
<Form.Item name="nameservers" rules={[formRule]}>
|
||||
<MultipleInput placeholder={t("workflow_node.apply.form.nameservers.multiple_input_modal.placeholder")} />
|
||||
|
@@ -6,9 +6,9 @@ import { z } from "zod";
|
||||
|
||||
import Show from "@/components/Show";
|
||||
|
||||
const FORMAT_PEM = "pem" as const;
|
||||
const FORMAT_PFX = "pfx" as const;
|
||||
const FORMAT_JKS = "jks" as const;
|
||||
const FORMAT_PEM = "PEM" as const;
|
||||
const FORMAT_PFX = "PFX" as const;
|
||||
const FORMAT_JKS = "JKS" as const;
|
||||
|
||||
const SHELLENV_SH = "sh" as const;
|
||||
const SHELLENV_CMD = "cmd" as const;
|
||||
|
@@ -6,9 +6,9 @@ import { z } from "zod";
|
||||
|
||||
import Show from "@/components/Show";
|
||||
|
||||
const FORMAT_PEM = "pem" as const;
|
||||
const FORMAT_PFX = "pfx" as const;
|
||||
const FORMAT_JKS = "jks" as const;
|
||||
const FORMAT_PEM = "PEM" as const;
|
||||
const FORMAT_PFX = "PFX" as const;
|
||||
const FORMAT_JKS = "JKS" as const;
|
||||
|
||||
const DeployNodeFormSSHFields = () => {
|
||||
const { t } = useTranslation();
|
||||
|
@@ -32,28 +32,11 @@ const WorkflowRunDetailDrawer = ({ data, loading, trigger, ...props }: WorkflowR
|
||||
<Drawer closable destroyOnClose open={open} loading={loading} placement="right" title={`runlog-${data?.id}`} width={640} onClose={() => setOpen(false)}>
|
||||
<Show when={!!data}>
|
||||
<Show when={data!.succeed}>
|
||||
<Alert
|
||||
showIcon
|
||||
type="success"
|
||||
message={
|
||||
<>
|
||||
<Typography.Text type="success">{t("workflow_run.props.status.succeeded")}</Typography.Text>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
<Alert showIcon type="success" message={<Typography.Text type="success">{t("workflow_run.props.status.succeeded")}</Typography.Text>} />
|
||||
</Show>
|
||||
|
||||
<Show when={!!data!.error}>
|
||||
<Alert
|
||||
showIcon
|
||||
type="error"
|
||||
message={
|
||||
<>
|
||||
<Typography.Text type="danger">{t("workflow_run.props.status.failed")}</Typography.Text>
|
||||
</>
|
||||
}
|
||||
description={data!.error}
|
||||
/>
|
||||
<Alert showIcon type="error" message={<Typography.Text type="danger">{t("workflow_run.props.status.failed")}</Typography.Text>} />
|
||||
</Show>
|
||||
|
||||
<div className="mt-4 p-4 bg-black text-stone-200 rounded-md">
|
||||
|
@@ -54,12 +54,12 @@ const WorkflowRuns = ({ className, style, workflowId }: WorkflowRunsProps) => {
|
||||
</Space>
|
||||
);
|
||||
} else {
|
||||
<Tooltip title={record.error}>
|
||||
return (
|
||||
<Space>
|
||||
<CloseCircleOutlinedIcon style={{ color: themeToken.colorError }} />
|
||||
<Typography.Text type="danger">{t("workflow_run.props.status.failed")}</Typography.Text>
|
||||
</Space>
|
||||
</Tooltip>;
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user