feat: enhance certificate model
This commit is contained in:
@@ -107,6 +107,16 @@ const CertificateList = () => {
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
key: "issuer",
|
||||
title: t("certificate.props.brand"),
|
||||
render: (_, record) => (
|
||||
<Space className="max-w-full" direction="vertical" size={4}>
|
||||
<Typography.Text>{record.issuer}</Typography.Text>
|
||||
<Typography.Text>{record.keyAlgorithm}</Typography.Text>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
{
|
||||
key: "source",
|
||||
title: t("certificate.props.source"),
|
||||
@@ -250,7 +260,7 @@ const CertificateList = () => {
|
||||
dataSource={tableData}
|
||||
loading={loading}
|
||||
locale={{
|
||||
emptyText: <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description={loadedError ? getErrMsg(loadedError) : t("certificate.nodata")} />,
|
||||
emptyText: <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description={getErrMsg(loadedError ?? t("certificate.nodata"))} />,
|
||||
}}
|
||||
pagination={{
|
||||
current: page,
|
||||
|
||||
@@ -60,13 +60,13 @@ const WorkflowDetail = () => {
|
||||
const [allowRun, setAllowRun] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
setIsRunning(lastRunStatus == WORKFLOW_RUN_STATUSES.RUNNING);
|
||||
setIsRunning(lastRunStatus == WORKFLOW_RUN_STATUSES.PENDING || lastRunStatus == WORKFLOW_RUN_STATUSES.RUNNING);
|
||||
}, [lastRunStatus]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!!workflowId && isRunning) {
|
||||
subscribeWorkflow(workflowId, (e) => {
|
||||
if (e.record.lastRunStatus !== WORKFLOW_RUN_STATUSES.RUNNING) {
|
||||
if (e.record.lastRunStatus !== WORKFLOW_RUN_STATUSES.PENDING && e.record.lastRunStatus !== WORKFLOW_RUN_STATUSES.RUNNING) {
|
||||
setIsRunning(false);
|
||||
unsubscribeWorkflow(workflowId);
|
||||
}
|
||||
@@ -178,7 +178,7 @@ const WorkflowDetail = () => {
|
||||
|
||||
// subscribe before running workflow
|
||||
unsubscribeFn = await subscribeWorkflow(workflowId!, (e) => {
|
||||
if (e.record.lastRunStatus !== WORKFLOW_RUN_STATUSES.RUNNING) {
|
||||
if (e.record.lastRunStatus !== WORKFLOW_RUN_STATUSES.PENDING && e.record.lastRunStatus !== WORKFLOW_RUN_STATUSES.RUNNING) {
|
||||
setIsRunning(false);
|
||||
unsubscribeFn?.();
|
||||
}
|
||||
|
||||
@@ -350,7 +350,7 @@ const WorkflowList = () => {
|
||||
dataSource={tableData}
|
||||
loading={loading}
|
||||
locale={{
|
||||
emptyText: <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description={loadedError ? getErrMsg(loadedError) : t("workflow.nodata")} />,
|
||||
emptyText: <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description={getErrMsg(loadedError ?? t("workflow.nodata"))} />,
|
||||
}}
|
||||
pagination={{
|
||||
current: page,
|
||||
|
||||
Reference in New Issue
Block a user