zinit_ui features for scheduler #40
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?
#30
show which jobs are scheduled
and allow to go inside a job and see all details
Implementation Spec for Issue #40 — Schedules Tab
Objective
Add a new Schedules tab to the Zinit Dashboard that lists all scheduled actions (via
schedule.listRPC), displays summary info in a table, and provides a detail panel (viaschedule.statusRPC) showing full schedule configuration including last run time. Purely frontend changes — the RPC methods already exist.Requirements
schedule.statusrefreshAll()auto-refresh cyclechipLinkFiles to Modify
crates/zinit_ui/templates/base.html— Add tab buttoncrates/zinit_ui/templates/index.html— Add tab pane HTMLcrates/zinit_ui/static/js/dashboard.js— Add all JS logic (load, render, filter, detail view)Implementation Plan
Step 1: Add Tab Button to
base.htmlAdd Schedules nav button with
bi-clock-historyicon and badge after Secrets tab.Step 2: Add Tab Pane to
index.htmlInsert Schedules tab pane with table (5 columns), search input, empty state, and detail panel.
Step 3: Add JavaScript to
dashboard.jscachedSchedulesvariableloadSchedules()— callsschedule.listRPCrenderSchedules()— renders table rowsfilterSchedules()— search filterviewSchedule(name)— callsschedule.status, renders detail panelformatInterval(ms)— helper for interval displayrefreshAll()to includeloadSchedules()navigateTo()for hash routingAcceptance Criteria
Notes
schedule.listandschedule.statusRPC methods are already implementedImplementation Complete
Changes Made
3 files modified:
crates/zinit_ui/templates/base.html— Added Schedules tab button withbi-clock-historyicon and count badgecrates/zinit_ui/templates/index.html— Added Schedules tab pane with table (Name, Context, Cron/Interval, Active Jobs, Max Instances), search input, empty state, and detail panelcrates/zinit_ui/static/js/dashboard.js— Added:cachedSchedulesdata variableloadSchedules()— fetches fromschedule.listRPCrenderSchedules()— renders table with search filteringfilterSchedules()— search filter handlerviewSchedule(name)— fetchesschedule.statusand renders detail panel with cron/interval, instance limits, active jobs, last run time, time window, and chipLink to parent actionformatInterval(ms)— helper for displaying interval durationsrefreshAll()to include schedulesnavigateTo()for hash routingBuild Status
cargo build -p zinit_ui— compiles successfullyFeatures