naeel
|
0783319fd1
|
Рефакторинг API-слоя, операций и БД
|
2026-07-31 17:13:54 +04:00 |
|
naeel
|
82a3be2067
|
v1.2.16: save full instance metadata (instance_meta JSONB)
init_db.py: ALTER TABLE runs ADD instance_meta JSONB
save_run.py: +instance_meta parameter → JSONB insert
api_test.py: _finish_op fetches GET /instances/{uid} after poll, saves all fields
scenario.py: run_scenario same — per-step instance metadata
Excludes: instanceUid, displayName, svc, serviceId, explainedStatus (already in other columns)
|
2026-07-31 14:19:29 +04:00 |
|
naeel
|
353e07bfa8
|
v1.2.1: fix tracker_add in executor + labelCls + descr context + script order
Opus review fixes:
- executor.py: tracker_add inside executor after instance_uid, before params/run (A3, orphan protection)
- executor.py: descr parameter (version/context instead of hardcoded)
- api_test.py: pass client_id/stand/descr, remove duplicate tracker_add
- scenario.py: pass client_id/stand/descr with scenario context
- params-render.js: fix labelCls ReferenceError in renderMapFixedRow (pre-existing bug)
- index.html: params-render.js already before operations.js (verified)
|
2026-07-31 09:45:05 +04:00 |
|
naeel
|
91e97f6f75
|
v1.2.0: unified executor + flexible instance refs + params-render.js
Phase 1 — New modules:
- api/utils.py: find_uid(), uid_from_location() (replaces 2 duplicates)
- operations/poll.py: poll_until_done() (shared sync/async polling)
- operations/executor.py: execute_operation() (single CREATE/non-CREATE flow)
Phase 2 — Format + validation:
- routes/api_scenario_defs.py: _validate_steps with output/instance_ref/instance_uid
- operations/scenario.py: resolve instance_uid > instance_ref > service_id,
use executor + poll_until_done, persist instance_bindings
Phase 3 — Migration:
- routes/api_test.py: create/non-create through executor, _finish_op through poll_until_done
- db/init_db.py: startup cleanup of stuck scenario_runs (>1h)
Phase 4 — UI shared module:
- static/js/params-render.js: renderParamRow, renderMapFixedRow, collectParams
- static/js/operations.js: use params-render.js (remove duplicates)
- templates/index.html: include params-render.js
- app.py: bump 1.1.57 → 1.2.0
|
2026-07-31 08:55:06 +04:00 |
|
naeel
|
a96658b9b5
|
v1.1.55: split large files + CRUD scenario editor
Backend (5→7 files):
- api_test.py: 622→479, terraform functions → operations/terraform.py (142)
- api_scenario.py: 241→split into run (153) + defs (108) with _validate_steps()
- db/scenario_defs.py: +client_id, stand, is_seed in list_definitions
Frontend (1→10 files):
- app.js: 554→16 (loader), split into:
utils.js (45), instances.js (89), operations.js (249),
history.js (35), scenario-list.js (90)
- New CRUD: scenario-form.js (128), create (25), edit (12), delete (13)
Max file size: JS 249, PY 479
|
2026-07-30 22:02:22 +04:00 |
|
naeel
|
7354d9c125
|
v1.1.52: fix scenario create (drop svcOperationId) + http_client _status debug
|
2026-07-30 15:51:22 +04:00 |
|
naeel
|
983b387708
|
v1.1.50: scenario_definitions DB+CRUD, seed, runner from DB, 409 lock, UI definitions, drop config.yaml scenarios
|
2026-07-30 15:06:05 +04:00 |
|
naeel
|
7f69c916ec
|
v1.1.48: fix 4 scenario bugs — save_run: scenario_run_id+step_number, run_id before thread (202), TIMEOUT op_data init, RUNNING before API call, GET /run/<id>
|
2026-07-30 14:08:29 +04:00 |
|
naeel
|
566a6da8d9
|
v1.1.47: fix scenario UUID extraction — _find_uid + _uid_from_location fallback
|
2026-07-30 13:57:34 +04:00 |
|
naeel
|
7eeb1131b3
|
v1.1.46: phase2 — scenario runner MVP (YAML config, DB schema, API endpoints, UI section)
|
2026-07-30 13:48:34 +04:00 |
|