feat(ui): workflow logs

This commit is contained in:
Fu Diwei
2025-03-18 20:02:39 +08:00
parent af5d7465a1
commit fd6e41c566
16 changed files with 173 additions and 63 deletions

View File

@@ -28,7 +28,7 @@ import { ClientResponseError } from "pocketbase";
import CertificateDetailDrawer from "@/components/certificate/CertificateDetailDrawer";
import { CERTIFICATE_SOURCES, type CertificateModel } from "@/domain/certificate";
import { type ListCertificateRequest, list as listCertificate, remove as removeCertificate } from "@/repository/certificate";
import { list as listCertificates, type ListRequest as listCertificatesRequest, remove as removeCertificate } from "@/repository/certificate";
import { getErrMsg } from "@/utils/error";
const CertificateList = () => {
@@ -223,9 +223,9 @@ const CertificateList = () => {
run: refreshData,
} = useRequest(
() => {
return listCertificate({
return listCertificates({
keyword: filters["keyword"] as string,
state: filters["state"] as ListCertificateRequest["state"],
state: filters["state"] as listCertificatesRequest["state"],
page: page,
perPage: pageSize,
});

View File

@@ -275,7 +275,7 @@ const Dashboard = () => {
</Button>
</Space>
</Card>
<Card className="flex-1" title={t("dashboard.latest_workflow_run")}>
<Card className="flex-1" title={t("dashboard.latest_workflow_runs")}>
<Table<WorkflowRunModel>
columns={tableColumns}
dataSource={tableData}

View File

@@ -41,7 +41,7 @@ import { ClientResponseError } from "pocketbase";
import { WORKFLOW_TRIGGERS, type WorkflowModel, isAllNodesValidated } from "@/domain/workflow";
import { WORKFLOW_RUN_STATUSES } from "@/domain/workflowRun";
import { list as listWorkflow, remove as removeWorkflow, save as saveWorkflow } from "@/repository/workflow";
import { list as listWorkflows, remove as removeWorkflow, save as saveWorkflow } from "@/repository/workflow";
import { getErrMsg } from "@/utils/error";
const WorkflowList = () => {
@@ -253,7 +253,7 @@ const WorkflowList = () => {
run: refreshData,
} = useRequest(
() => {
return listWorkflow({
return listWorkflows({
keyword: filters["keyword"] as string,
enabled: (filters["state"] as string) === "enabled" ? true : (filters["state"] as string) === "disabled" ? false : undefined,
page: page,