Implement async manual CSV ingest, unified UI pagination/filters, and serial placeholder strategy

This commit is contained in:
2026-02-21 22:14:04 +03:00
parent ca762a658b
commit c84102d2f1
44 changed files with 3314 additions and 342 deletions

View File

@@ -6,19 +6,28 @@
## Registry
- `GET /projects`
- `POST /projects`
- `GET /projects/{id}`
- `GET /assets`
- `POST /assets`
- `GET /registry/assets/{id}`
- `PUT /registry/assets/{id}`
- `DELETE /registry/assets/{id}`
- `GET /components`
- `POST /components`
- `GET /registry/components/{id}`
- `PUT /registry/components/{id}`
Registry invariants:
- Assets do not carry `project_id` in request/response contracts.
## Ingest
- `POST /ingest/hardware`
- `POST /ingest/manual/csv`
- `GET /ingest/manual/csv/jobs/{id}`
Manual CSV ingest contract:
- `POST /ingest/manual/csv` is asynchronous and returns `202 Accepted` with `job_id`.
- Final result is read from `GET /ingest/manual/csv/jobs/{id}`.
## Timeline
@@ -39,6 +48,34 @@
- `GET /ui/components/{id}`
- `GET /ui/failures`
- `GET /ui/ingest`
- `GET /ui/ingest/manual-template.csv`
## CSV Export Contract
Route: `GET /ui/ingest/manual-template.csv`
Rules:
- Encoding: UTF-8.
- UTF-8 BOM is included at file start for Excel compatibility.
- Delimiter: `;`.
- Line endings: `\r\n`.
- Escaping: RFC4180-compatible (fields with `;`, `"`, `\n`, `\r` are quoted; inner `"` is doubled).
- Header row is always present.
- Stable column order (deterministic, no map-driven order).
- Exported header order:
- ата_осмотра`
- `серийный_номер_сервера`
- `вендор`
- `p/n_устройства`
- `s/n_устройства`
- окейшн_в_сервере`
- ерсия_прошивки`
- `состояние_оборудования`
- Identifier-like columns are exported with Excel-safe text protection (to preserve leading zeros/codes).
- Empty values are exported as empty cells (no `null`/`undefined`).
- HTTP headers:
- `Content-Type: text/csv; charset=utf-8`
- `Content-Disposition: attachment; filename="manual-import-template.csv"`
## Routing Notes