- Schedules web UI (/settings/crons): list, add, edit, pause/resume, delete jobs - cron task type: full orchestrator tool loop on a schedule, result → notification channel - parse_schedule: monthly/yearly formats (monthly:DD:HH:MM, yearly:MM:DD:HH:MM) - HA inbound webhook tools toggle: orchestrator loop vs. direct LLM, configurable in UI - ae_db_query/describe/show_view: SELECT-only Aether MariaDB access (admin, per-user creds) - /settings/integrations: admin-only page for Aether DB credentials - Schedules nav link added to all settings pages - pymysql added to requirements - Docs updated: HELP.md, MASTER.md, CLAUDE.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
151 lines
6.3 KiB
HTML
151 lines
6.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Cortex — Schedules</title>
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap" rel="stylesheet">
|
|
<link rel="stylesheet" href="/static/pg.css">
|
|
<script>(function(){var t=localStorage.getItem('theme')||(window.matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light');document.documentElement.setAttribute('data-theme',t);})();</script>
|
|
<style>
|
|
.cron-table {
|
|
width: 100%; border-collapse: collapse; font-size: 0.82rem;
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
.cron-table th {
|
|
text-align: left; padding: 0.4rem 0.6rem;
|
|
border-bottom: 2px solid var(--pg-border);
|
|
color: var(--pg-muted); font-weight: 600; font-size: 0.75rem;
|
|
text-transform: uppercase; letter-spacing: 0.04em;
|
|
}
|
|
.cron-table td {
|
|
padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--pg-border);
|
|
vertical-align: middle;
|
|
}
|
|
.cron-table tr:last-child td { border-bottom: none; }
|
|
.cron-table tr:hover td { background: var(--pg-hover); }
|
|
|
|
.badge {
|
|
display: inline-block; padding: 0.15rem 0.45rem;
|
|
border-radius: 4px; font-size: 0.72rem; font-weight: 600;
|
|
text-transform: uppercase; letter-spacing: 0.03em;
|
|
}
|
|
.badge-enabled { background: color-mix(in srgb, var(--pg-accent) 18%, transparent); color: var(--pg-accent); }
|
|
.badge-paused { background: color-mix(in srgb, var(--pg-muted) 18%, transparent); color: var(--pg-muted); }
|
|
.badge-remind { background: color-mix(in srgb, #a78bfa 15%, transparent); color: #a78bfa; }
|
|
.badge-note { background: color-mix(in srgb, #60a5fa 15%, transparent); color: #60a5fa; }
|
|
.badge-message { background: color-mix(in srgb, #34d399 15%, transparent); color: #34d399; }
|
|
.badge-brief { background: color-mix(in srgb, #fb923c 15%, transparent); color: #fb923c; }
|
|
.badge-task { background: color-mix(in srgb, #f472b6 15%, transparent); color: #f472b6; }
|
|
|
|
.cron-actions { display: flex; gap: 0.35rem; }
|
|
.btn-cron {
|
|
padding: 0.2rem 0.55rem; border-radius: 4px; border: 1px solid var(--pg-border);
|
|
background: transparent; color: var(--pg-muted); font-size: 0.75rem; cursor: pointer;
|
|
font-family: inherit;
|
|
}
|
|
.btn-cron:hover { border-color: var(--pg-accent); color: var(--pg-accent); }
|
|
.btn-cron-del:hover { border-color: var(--pg-danger, #ef4444); color: var(--pg-danger, #ef4444); }
|
|
.btn-cron-del { color: var(--pg-dimmer); }
|
|
|
|
.payload-cell {
|
|
max-width: 240px; overflow: hidden; text-overflow: ellipsis;
|
|
white-space: nowrap; color: var(--pg-dimmer);
|
|
}
|
|
|
|
.persona-group { margin-bottom: 0.25rem; }
|
|
.persona-group-label {
|
|
font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
|
|
letter-spacing: 0.06em; color: var(--pg-dimmer); margin: 1.25rem 0 0.5rem;
|
|
}
|
|
|
|
.empty-state {
|
|
text-align: center; padding: 2rem 1rem;
|
|
color: var(--pg-dimmer); font-size: 0.85rem;
|
|
border: 1px dashed var(--pg-border); border-radius: 8px;
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.add-form-grid {
|
|
display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.75rem;
|
|
}
|
|
.add-form-grid .field-full { grid-column: 1 / -1; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<nav class="page-nav">
|
|
<a href="{{ back_href }}" class="nav-link">← Chat</a>
|
|
<a href="{{ help_href }}" class="nav-link">Help</a>
|
|
<a href="/settings" class="nav-link">Settings</a>
|
|
<a href="/settings/notifications" class="nav-link">Notifications</a>
|
|
<a href="/settings/tools" class="nav-link">Tools</a>
|
|
<a href="/settings/crons" class="nav-link active">Schedules</a>
|
|
{{ integrations_nav }}
|
|
<span class="nav-spacer"></span>
|
|
<a href="/logout" class="nav-link nav-logout">Sign out</a>
|
|
</nav>
|
|
<div class="page-wrap">
|
|
<h1 class="page-title">Schedules</h1>
|
|
<p class="page-subtitle">Recurring jobs — reminders, notes, briefings, and agentic tasks.</p>
|
|
|
|
<!-- SUCCESS -->
|
|
<!-- ERROR -->
|
|
|
|
<!-- Edit form (shown only when editing) -->
|
|
{{ edit_html }}
|
|
|
|
<!-- Cron list -->
|
|
{{ cron_list_html }}
|
|
|
|
<!-- Add new cron -->
|
|
<div class="section">
|
|
<h2>Add schedule</h2>
|
|
<form method="POST" action="/settings/crons/add">
|
|
<div class="add-form-grid">
|
|
<div class="field">
|
|
<label for="add_persona">Persona</label>
|
|
<select id="add_persona" name="persona">
|
|
{{ persona_options }}
|
|
</select>
|
|
</div>
|
|
<div class="field">
|
|
<label for="add_job_type">Type</label>
|
|
<select id="add_job_type" name="job_type">
|
|
<option value="remind">remind — append to REMINDERS.md</option>
|
|
<option value="note">note — append to SCRATCH.md</option>
|
|
<option value="message">message — send payload as-is</option>
|
|
<option value="brief">brief — LLM response, no tools</option>
|
|
<option value="task">task — full orchestrator tool loop</option>
|
|
</select>
|
|
</div>
|
|
<div class="field">
|
|
<label for="add_label">Label</label>
|
|
<input type="text" id="add_label" name="label"
|
|
placeholder="Monday morning summary"
|
|
required autocomplete="off">
|
|
</div>
|
|
<div class="field">
|
|
<label for="add_schedule">Schedule</label>
|
|
<input type="text" id="add_schedule" name="schedule"
|
|
placeholder="weekly:mon:08:00"
|
|
required autocomplete="off" spellcheck="false">
|
|
<p class="hint">
|
|
hourly · daily · daily:HH:MM · weekly:DOW · weekly:DOW:HH:MM ·
|
|
monthly · monthly:DD · monthly:DD:HH:MM · yearly:MM:DD · yearly:MM:DD:HH:MM
|
|
</p>
|
|
</div>
|
|
<div class="field field-full">
|
|
<label for="add_payload">Payload / prompt</label>
|
|
<textarea id="add_payload" name="payload" rows="3"
|
|
placeholder="Check my open tasks and send a summary." required></textarea>
|
|
</div>
|
|
</div>
|
|
<button type="submit" class="btn-submit">Add schedule</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|