zinit_ui features for scheduler #40

Open
opened 2026-03-09 06:02:51 +00:00 by despiegk · 2 comments
Owner

geomind_code/zinit#30

show which jobs are scheduled
and allow to go inside a job and see all details

https://forge.ourworld.tf/geomind_code/zinit/issues/30 show which jobs are scheduled and allow to go inside a job and see all details
Author
Owner

Implementation Spec for Issue #40 — Schedules Tab

Objective

Add a new Schedules tab to the Zinit Dashboard that lists all scheduled actions (via schedule.list RPC), displays summary info in a table, and provides a detail panel (via schedule.status RPC) showing full schedule configuration including last run time. Purely frontend changes — the RPC methods already exist.

Requirements

  1. New "Schedules" tab button in navbar with clock icon and count badge
  2. List view table: Name, Context, Cron/Interval, Active Jobs, Max Instances
  3. Search/filter input for schedules
  4. Detail panel with full schedule status from schedule.status
  5. Integration with existing refreshAll() auto-refresh cycle
  6. Cross-linking: action name in detail view links to Actions tab via chipLink

Files to Modify

  • crates/zinit_ui/templates/base.html — Add tab button
  • crates/zinit_ui/templates/index.html — Add tab pane HTML
  • crates/zinit_ui/static/js/dashboard.js — Add all JS logic (load, render, filter, detail view)

Implementation Plan

Step 1: Add Tab Button to base.html

Add Schedules nav button with bi-clock-history icon and badge after Secrets tab.

Step 2: Add Tab Pane to index.html

Insert Schedules tab pane with table (5 columns), search input, empty state, and detail panel.

Step 3: Add JavaScript to dashboard.js

  • cachedSchedules variable
  • loadSchedules() — calls schedule.list RPC
  • renderSchedules() — renders table rows
  • filterSchedules() — search filter
  • viewSchedule(name) — calls schedule.status, renders detail panel
  • formatInterval(ms) — helper for interval display
  • Update refreshAll() to include loadSchedules()
  • Update navigateTo() for hash routing

Acceptance Criteria

  • Schedules tab appears with icon and count badge
  • Table shows all scheduled actions with correct columns
  • Search filters by name and context
  • Clicking a row shows detail panel with full status
  • Detail panel includes chipLink to parent action
  • Last run time displayed correctly
  • Auto-refresh works alongside other tabs
  • Empty state displays when no schedules exist

Notes

  • No backend changes needed — schedule.list and schedule.status RPC methods are already implemented
  • Schedules tab is read-only (schedules are managed via action specs)
  • Combined Cron/Interval column since actions use one or the other
## Implementation Spec for Issue #40 — Schedules Tab ### Objective Add a new **Schedules** tab to the Zinit Dashboard that lists all scheduled actions (via `schedule.list` RPC), displays summary info in a table, and provides a detail panel (via `schedule.status` RPC) showing full schedule configuration including last run time. Purely frontend changes — the RPC methods already exist. ### Requirements 1. New "Schedules" tab button in navbar with clock icon and count badge 2. List view table: Name, Context, Cron/Interval, Active Jobs, Max Instances 3. Search/filter input for schedules 4. Detail panel with full schedule status from `schedule.status` 5. Integration with existing `refreshAll()` auto-refresh cycle 6. Cross-linking: action name in detail view links to Actions tab via `chipLink` ### Files to Modify - `crates/zinit_ui/templates/base.html` — Add tab button - `crates/zinit_ui/templates/index.html` — Add tab pane HTML - `crates/zinit_ui/static/js/dashboard.js` — Add all JS logic (load, render, filter, detail view) ### Implementation Plan #### Step 1: Add Tab Button to `base.html` Add Schedules nav button with `bi-clock-history` icon and badge after Secrets tab. #### Step 2: Add Tab Pane to `index.html` Insert Schedules tab pane with table (5 columns), search input, empty state, and detail panel. #### Step 3: Add JavaScript to `dashboard.js` - `cachedSchedules` variable - `loadSchedules()` — calls `schedule.list` RPC - `renderSchedules()` — renders table rows - `filterSchedules()` — search filter - `viewSchedule(name)` — calls `schedule.status`, renders detail panel - `formatInterval(ms)` — helper for interval display - Update `refreshAll()` to include `loadSchedules()` - Update `navigateTo()` for hash routing ### Acceptance Criteria - [ ] Schedules tab appears with icon and count badge - [ ] Table shows all scheduled actions with correct columns - [ ] Search filters by name and context - [ ] Clicking a row shows detail panel with full status - [ ] Detail panel includes chipLink to parent action - [ ] Last run time displayed correctly - [ ] Auto-refresh works alongside other tabs - [ ] Empty state displays when no schedules exist ### Notes - No backend changes needed — `schedule.list` and `schedule.status` RPC methods are already implemented - Schedules tab is read-only (schedules are managed via action specs) - Combined Cron/Interval column since actions use one or the other
Author
Owner

Implementation Complete

Changes Made

3 files modified:

  1. crates/zinit_ui/templates/base.html — Added Schedules tab button with bi-clock-history icon and count badge
  2. crates/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 panel
  3. crates/zinit_ui/static/js/dashboard.js — Added:
    • cachedSchedules data variable
    • loadSchedules() — fetches from schedule.list RPC
    • renderSchedules() — renders table with search filtering
    • filterSchedules() — search filter handler
    • viewSchedule(name) — fetches schedule.status and renders detail panel with cron/interval, instance limits, active jobs, last run time, time window, and chipLink to parent action
    • formatInterval(ms) — helper for displaying interval durations
    • Updated refreshAll() to include schedules
    • Updated navigateTo() for hash routing

Build Status

  • cargo build -p zinit_ui — compiles successfully
  • No backend changes needed (RPC methods already exist)

Features

  • Schedules tab with icon and count badge
  • Table with all scheduled actions
  • Search/filter by name and context
  • Detail panel with full schedule status
  • chipLink to parent action for navigation
  • Auto-refresh every 5s
  • Hash routing support
  • Empty state display
## Implementation Complete ### Changes Made **3 files modified:** 1. `crates/zinit_ui/templates/base.html` — Added Schedules tab button with `bi-clock-history` icon and count badge 2. `crates/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 panel 3. `crates/zinit_ui/static/js/dashboard.js` — Added: - `cachedSchedules` data variable - `loadSchedules()` — fetches from `schedule.list` RPC - `renderSchedules()` — renders table with search filtering - `filterSchedules()` — search filter handler - `viewSchedule(name)` — fetches `schedule.status` and renders detail panel with cron/interval, instance limits, active jobs, last run time, time window, and chipLink to parent action - `formatInterval(ms)` — helper for displaying interval durations - Updated `refreshAll()` to include schedules - Updated `navigateTo()` for hash routing ### Build Status - ✅ `cargo build -p zinit_ui` — compiles successfully - No backend changes needed (RPC methods already exist) ### Features - [x] Schedules tab with icon and count badge - [x] Table with all scheduled actions - [x] Search/filter by name and context - [x] Detail panel with full schedule status - [x] chipLink to parent action for navigation - [x] Auto-refresh every 5s - [x] Hash routing support - [x] Empty state display
despiegk added this to the now milestone 2026-03-09 10:22:55 +00:00
Commenting is not possible because the repository is archived.
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
geomind_code/zinit_archive2#40
No description provided.