now way how to get runs #11
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_proc#11
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
allow creation of runs and sscheduling
also right mouse button for running it and deleteting and edit
Implementation Spec for Issue #11 — Run Creation, Scheduling, and Context Menu for Runs
Objective
Enable users to manually create runs and schedule them from the Runs tab in the dashboard, and add a right-click context menu on run rows with options for Run (re-run), Delete, and Edit (view/update run status/dependencies).
Currently the Runs tab is read-only. The RPC backend already supports
run.create,run.update, andrun.delete. There is a mature context menu system already used for Actions, Jobs, and Services. This is entirely a UI-layer change; no Rust code changes are needed.Requirements
core)Files to Modify
crates/hero_proc_ui/templates/index.htmlcrates/hero_proc_ui/static/js/dashboard.jsshowRunForm(),createRun(),editRun(),showRunEditForm(),saveRunEdit(),showRunContextMenu(),showScheduleForm(),createSchedule(); wireoncontextmenuon run rows inrenderRuns()No Rust backend changes required.
Implementation Plan
Step 1 — HTML: Add "New Run" button to Runs toolbar
File:
crates/hero_proc_ui/templates/index.html<button class="btn btn-sm btn-primary-custom" onclick="showRunForm()"><i class="bi bi-plus"></i> New Run</button>Dependencies: none
Step 2 — HTML: Add "New Schedule" button to Schedules toolbar
File:
crates/hero_proc_ui/templates/index.html<button class="btn btn-sm btn-primary-custom" onclick="showScheduleForm()">after the schedules search inputDependencies: none (parallel with Step 1)
Step 3 — JS: Wire
oncontextmenuon run rows inrenderRuns()File:
crates/hero_proc_ui/static/js/dashboard.jsoncontextmenu="showRunContextMenu(event, r.id, r.status)"to the<tr>element inrenderRuns()Dependencies: Step 4
Step 4 — JS: Add
showRunContextMenu()functionFile:
crates/hero_proc_ui/static/js/dashboard.jsshowJobContextMenuDependencies: none
Step 5 — JS: Add
showRunForm()andcreateRun()functionsFile:
crates/hero_proc_ui/static/js/dashboard.jsshowRunForm(): renders a creation form in the runs detail panelcreateRun(): callsrpc('run.create', { context, dependencies }), then refreshes and opens new runDependencies: Step 1
Step 6 — JS: Add
editRun(),showRunEditForm(),saveRunEdit()functionsFile:
crates/hero_proc_ui/static/js/dashboard.jseditRun(id): fetches run viarun.getand callsshowRunEditForm()showRunEditForm(r): renders form with status dropdown (editable) and deps (read-only)saveRunEdit(e, id): callsrpc('run.update', { id, status })and refreshesDependencies: Steps 3, 4
Step 7 — JS: Add
showScheduleForm()andcreateSchedule()functionsFile:
crates/hero_proc_ui/static/js/dashboard.jscreateSchedule(): callsaction.getto fetch the spec, patchesschedule_policy, callsaction.setDependencies: Step 2
Acceptance Criteria
run.createand shows the new run's detailaction.setNotes
run.updatebackend currently only acceptsstatus,started_at,finished_at— notdependencies. Dependencies are creation-time only; show them read-only in the edit form.setupAutocomplete()must be called after inserting form HTML that uses action name autocomplete.Test Results
test_completion_bash— hangs indefinitely on macOS)Test output (last 50 lines)
Implementation Complete ✅
All changes are UI-only (no Rust backend changes required). The RPC methods
run.create,run.update,run.delete,run.get,action.get, andaction.setwere already available.Changes Made
crates/hero_proc_ui/templates/index.htmlonclick="showRunForm()")onclick="showScheduleForm()")crates/hero_proc_ui/static/js/dashboard.jsshowRunForm()— opens a creation form in the runs detail panel with context and dependency fieldscreateRun(e)— callsrun.createRPC, toasts success, refreshes list, navigates to new runeditRun(id)— fetches run viarun.getand opens the edit formshowRunEditForm(r)— renders an edit form with status dropdown (editable) and dependencies (read-only)saveRunEdit(e, id)— callsrun.updatewith new status, refreshes list and detail viewshowRunContextMenu(event, runId, runStatus)— right-click context menu with View / Edit / Kill All Jobs (if active) / Delete optionsrenderRuns()— wiredoncontextmenu="showRunContextMenu(...)"on each run row<tr>showScheduleForm()— modal form with action autocomplete, cron expression, interval, max instances, start/end timecreateSchedule(e)— fetches action spec viaaction.get, patchesschedule_policy, saves viaaction.setTest Results
Acceptance Criteria
run.createand shows the new run's detailaction.setImplementation committed:
4cfec86Browse:
4cfec86