Commit Graph
9 Commits
Author SHA1 Message Date
naeel e0e16b91a8 v1.2.18: fix onOpChange — сохранять выбранную операцию в step.operation, авто-показ облачных инстансов для не-create 2026-07-31 17:40:33 +04:00
naeel c50aaf59d8 Подробные комментарии ко всем JS-файлам фронтенда 2026-07-31 17:25:44 +04:00
naeel cc60f9401a v1.2.6: instance dropdown: outputs only + cloud button + RUNNING highlight
scenario-form.js:
- renderStepRow: non-create dropdown shows only 🆕 outputs by default
- «📥 Из облака» button toggles cloud autotest-* instances in same select
- toggleCloudInstances(idx): snapshot, flip _showCloud flag, re-render
- Button label: 📥 Из облака ↔  Скрыть облако

scenario-list.js:
- RUNNING status: yellow background #fef3c7 on both loadScenarios() and runScenario() polling
2026-07-31 12:29:43 +04:00
naeel 74c22d2612 v1.2.5: parameter editor with auto-load from API + params-render.js
Phase 1: paramDefsCache, step.params as {name:value}
Phase 2: resolveStepSvcOpId() → loadStepParams() via /api/params
Phase 3: <details> in step card, renderParamRow with pre-fill (clone def + saved values)
Phase 4: snapshotStepParams() before re-render, reset on operation change
Phase 5: collectFormSteps via collectParams() + numeric→name reverse mapping

Only scenario-form.js changed. params-render.js, api_test.py, _resolve_params unchanged.
Compatible with existing scenarios (symbolic names in DB).
2026-07-31 12:00:50 +04:00
naeel eb517594bc v1.2.4: collapsible help section in scenario editor modal
scenario-form.js: <details> block between name and steps:
- How steps work (operation → target)
- Create: service + output name
- Non-create: instance from scenario or cloud
- Parameters: key=value format with example
- Buttons: ↑↓ reorder, ✕ delete
2026-07-31 11:49:04 +04:00
naeel 622a7c7023 v1.2.3: instance_ref shows cloud instances + bigger CRUD buttons
scenario-form.js:
- showScenarioEditor loads /api/instances/list alongside services
- renderStepRow: non-create instance_ref dropdown shows:
  🆕 outputs from previous create steps
  ☁ existing cloud instances filtered by service_id
- Removed separate instance_uid text field (now in dropdown)

scenario-list.js:
- CRUD buttons: ✏📋🗑 bigger (13px, padding), vertical layout
- Run button: full-width, left-aligned
2026-07-31 11:40:29 +04:00
naeel 15f5ebe647 v1.2.2: modal scenario editor with dropdowns + output/ref
scenario-form.js — full rewrite:
- Full-screen modal (backdrop + content, 800px max-width)
- Services dropdown (GET /api/services, cached)
- Operations dropdown (GET /api/operations/{svcId}, cached)
- output field for create steps
- instance_ref dropdown (previous outputs) + explicit instance_uid
- [↑][↓] reorder buttons
- Auto-load operations on service change

index.html — modal CSS (#scenario-modal, .modal-backdrop, .modal-content)
2026-07-31 10:19:26 +04:00
naeel 38f58ddbd7 v1.1.57: fix scenario editor body bug + relativeTime columns + infra UUIDs
- scenario-form.js: fix ReferenceError body is not defined in renderEditor()
- utils.js: relativeTime(iso) → 3ч 12м / 2д 5ч / только что
- instances.js: columns created / modified with relativeTime()
- index.html: instanceUid under displayName in infra column
2026-07-30 22:22:19 +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