diff --git a/README.md b/README.md index b3e10229..cd1086ad 100644 --- a/README.md +++ b/README.md @@ -145,6 +145,9 @@ public class ExampleApplication { - http://localhost:8080/task-ui +## Schedulers +![Schedulers](screenshots/schedulers-screen.png) + ## Triggers ![Triggers](screenshots/triggers-screen.png) diff --git a/core/pom.xml b/core/pom.xml index 36a4d097..269f3b44 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -115,8 +115,7 @@ org.sterl.spring.persistent_tasks.api.** - - ../spring-persistent-tasks-ui/src/server-api.d.ts + ../ui/src/server-api.d.ts module diff --git a/db/src/main/resources/spring-persistent-tasks/db/pt-changelog-v1.xml b/db/src/main/resources/spring-persistent-tasks/db/pt-changelog-v1.xml index a573b850..2b82be45 100644 --- a/db/src/main/resources/spring-persistent-tasks/db/pt-changelog-v1.xml +++ b/db/src/main/resources/spring-persistent-tasks/db/pt-changelog-v1.xml @@ -47,7 +47,7 @@ - + diff --git a/screenshots/schedulers-screen.png b/screenshots/schedulers-screen.png new file mode 100644 index 00000000..18df226b Binary files /dev/null and b/screenshots/schedulers-screen.png differ diff --git a/ui/pom.xml b/ui/pom.xml index 419aa18d..ac3becda 100644 --- a/ui/pom.xml +++ b/ui/pom.xml @@ -18,6 +18,11 @@ spring-boot-starter-web provided + + org.sterl.spring + spring-persistent-tasks-core + ${project.version} + diff --git a/ui/src/server-api.d.ts b/ui/src/server-api.d.ts index 788da37a..0122ba76 100644 --- a/ui/src/server-api.d.ts +++ b/ui/src/server-api.d.ts @@ -94,4 +94,4 @@ export interface Serializable { export interface Consumer { } -export type TriggerStatus = "NEW" | "RUNNING" | "SUCCESS" | "FAILED" | "CANCELED"; +export type TriggerStatus = "WAITING" | "RUNNING" | "SUCCESS" | "FAILED" | "CANCELED"; diff --git a/ui/src/trigger/views/trigger-staus.view.tsx b/ui/src/trigger/views/trigger-staus.view.tsx index ec0e2eaf..7efc8b11 100644 --- a/ui/src/trigger/views/trigger-staus.view.tsx +++ b/ui/src/trigger/views/trigger-staus.view.tsx @@ -7,14 +7,16 @@ interface Props { const TriggerStatusView = ({ data }: Props) => { if (!data) return undefined; - if (data.status === "SUCCESS") return SUCCESS; - if (data.status === "RUNNING") return RUNNING; - if (data.status === "FAILED") return FAILED; + if (data.status === "SUCCESS") return Success; + if (data.status === "FAILED") return Failed; + if (data.status === "RUNNING") return Running; - if (data.end != null && data.status === "NEW") { - return RETRY; + if (data.executionCount > 0 && data.status === "WAITING") { + return Retry; } - if (data.status === "NEW") return WAITING; + if (data.status === "WAITING") return Wating; + if (data.status === "CANCELED") + return Canceled; return {data.status}; };