@exellix/jobs-ui 1.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,64 +1,71 @@
1
1
  # @exellix/jobs-ui
2
2
 
3
- Read-only **query + HTTP** layer over the Exellix job queue. Lists, groups, and counts **job runs** from [`@exellix/exellix-db`](../exellix-db/README.md). No execution rights no `enqueue` / `claim` / `complete` / `fail`.
3
+ **Jobs dashboard** React operator SPA for the Exellix job queue. Queue overview, run detail, record-centric views, Source→Records workflow, and work-factory wizards (continuous work, batches, on-demand).
4
4
 
5
- > A **JobRun** is one graph run on one input. See [`temp/jobs/`](../temp/jobs/README.md) for the design. This package replaces the old `@exellix/exellix-matrix-read`.
5
+ | Package | Role |
6
+ |---------|------|
7
+ | [`@exellix/jobs`](../jobs/README.md) | Jobs **manager** — queue runtime, worker loop, CLI |
8
+ | [`@exellix/jobs-api`](../jobs-api/README.md) | Jobs **HTTP API** — REST server this UI talks to |
9
+ | **`@exellix/jobs-ui`** (this) | Jobs **dashboard** — React SPA only |
10
+ | [`@exellix/jobs-db`](../jobs-db/README.md) | Jobs **data tier** — Mongo persistence |
11
+
12
+ > A **JobRun** is one graph run on one input. See [`temp/jobs/`](../temp/jobs/README.md) for the design.
13
+
14
+ > **Migration from 1.x:** `@exellix/jobs-ui@1.x` bundled the HTTP API and dashboard in one package. **2.x is dashboard-only** — use [`@exellix/jobs-api`](../jobs-api/README.md) for the REST server and programmatic queries.
6
15
 
7
16
  ## Install
8
17
 
9
18
  ```bash
10
- npm install @exellix/jobs-ui @exellix/exellix-db
19
+ npm install @exellix/jobs-ui
11
20
  ```
12
21
 
13
- ## Queries
22
+ The dashboard requires a running `@exellix/jobs-api` instance (or any host serving the same `/api/*` contract).
14
23
 
15
- ```ts
16
- import { createJobRunStore } from '@exellix/exellix-db';
17
- import { listRuns, getRun, groupByItem, countByStatus, countRuns } from '@exellix/jobs-ui';
24
+ ## Quick start
18
25
 
19
- const { store } = await createJobRunStore({ mongoUri: process.env.MONGO_URI });
26
+ ```bash
27
+ # terminal 1 — API backend (needs MONGO_URI)
28
+ cd ../jobs-api && npm run serve
20
29
 
21
- await listRuns(store, { jobDefId, status: 'pending', page: 1, pageSize: 50 });
22
- await getRun(store, jobRunId);
23
- await groupByItem(store, itemId); // all runs for one source item
24
- await countByStatus(store, jobDefId); // { blocked, pending, running, done, failed }
25
- await countRuns(store, { graphId, status });
30
+ # terminal 2 UI with HMR
31
+ npm run dev # Vite on :5190, proxies /api → http://localhost:3099
26
32
  ```
27
33
 
28
- ## HTTP server
29
-
30
- ```bash
31
- # MONGO_URI must be set (or available in ../graph-engine/.env via the workspace)
32
- npm run ui:serve # → jobs-ui listening on http://0.0.0.0:3099
33
- # or, after install:
34
- npx exellix-jobs-ui serve
35
- ```
34
+ Set `VITE_API_PROXY` to point at a remote API during dev. Set `VITE_DEV_PORT` to change the dev server port.
36
35
 
37
- Set `PORT` to override the default `3099`.
36
+ ### Combined deploy (single port)
38
37
 
39
- | Route | Returns |
40
- |-------|---------|
41
- | `GET /health` | liveness |
42
- | `GET /runs` | paged list (query: `jobDefId`, `status`, `itemId`, `graphId`, `page`, `pageSize`) |
43
- | `GET /runs/:id` | a single job run (404 if missing) |
44
- | `GET /items/:itemId/runs` | all job runs for one source item |
45
- | `GET /stats/by-status` | counts by status (optional `?jobDefId=`) |
38
+ Build the UI, then let the API serve it:
46
39
 
47
40
  ```bash
48
- curl http://localhost:3099/health
49
- curl "http://localhost:3099/runs?status=pending&pageSize=20"
50
- curl http://localhost:3099/stats/by-status
41
+ npm run build
42
+ cd ../jobs-api && JOBS_UI_STATIC_DIR=../jobs-ui/dist npm run serve
51
43
  ```
52
44
 
53
- There is no bundled HTML dashboard; this package is the read API a frontend builds on.
45
+ ## Browser routes
46
+
47
+ | Route | Page |
48
+ |-------|------|
49
+ | `/` | Queue Overview |
50
+ | `/runs` | Runs list |
51
+ | `/runs/:id` | Run detail |
52
+ | `/sources` | Source picker |
53
+ | `/records` | Records list |
54
+ | `/records/:recordId` | Record detail |
55
+ | `/items/:itemId` | Item timeline + DAG |
56
+ | `/jobs/new` | Create / enqueue job |
57
+ | `/job-defs` | Job definition list |
58
+ | `/job-defs/:id` | Job definition detail |
59
+ | `/settings` | App-wide queue execution settings |
60
+
61
+ Work-factory routes: `/work`, `/work/:id`, `/batches/:id`, on-demand flows — see [`jobs-api` HTTP docs](../jobs-api/README.md).
54
62
 
55
63
  ## Scripts
56
64
 
57
65
  ```bash
58
- npm run build # tsc → dist/
59
- npm test # unit + live (live runs only when MONGO_URI is set)
60
- npm run test:live # live Mongo integration tests only
61
- npm run ui:serve # start the HTTP server
66
+ npm run build # vite build → dist/
67
+ npm run dev # Vite dev server + API proxy
68
+ npm test # build smoke test + graph-picker unit tests
62
69
  ```
63
70
 
64
71
  ## License