(refactor) Clarify scheduler terminology in the Django UI

Rename the schedule form label from "Cron expression" to "Schedule
expression" and explain that cron-style timing is evaluated by the
pobsync scheduler service rather than host cron.

Update host detail and schedule form copy so operators can see that
schedules are SQL-backed and dispatched by pobsync itself.
This commit is contained in:
2026-05-19 22:48:00 +02:00
parent e8169eae42
commit 9624fb469f
4 changed files with 12 additions and 3 deletions

View File

@@ -265,8 +265,11 @@ class RetentionApplyForm(forms.Form):
class ScheduleConfigForm(forms.ModelForm): class ScheduleConfigForm(forms.ModelForm):
cron_expr = forms.CharField( cron_expr = forms.CharField(
label="Cron expression", label="Schedule expression",
help_text='Five-field cron expression, for example "15 2 * * *".', help_text=(
'Five-field cron-style expression, for example "15 2 * * *". '
"This is evaluated by the pobsync scheduler service, not host cron."
),
) )
prune_max_delete = forms.IntegerField(min_value=0) prune_max_delete = forms.IntegerField(min_value=0)

View File

@@ -49,7 +49,8 @@
<h2>Schedule</h2> <h2>Schedule</h2>
{% if schedule %} {% if schedule %}
<div class="stack"> <div class="stack">
<div><strong>Cron:</strong> {{ schedule.cron_expr }}</div> <div><strong>Schedule expression:</strong> {{ schedule.cron_expr }}</div>
<div class="muted">Evaluated by the pobsync scheduler service.</div>
<div><strong>Enabled:</strong> {{ schedule.enabled|yesno:"yes,no" }}</div> <div><strong>Enabled:</strong> {{ schedule.enabled|yesno:"yes,no" }}</div>
<div><strong>Prune:</strong> {{ schedule.prune|yesno:"yes,no" }}</div> <div><strong>Prune:</strong> {{ schedule.prune|yesno:"yes,no" }}</div>
<div><strong>Last status:</strong> {{ schedule.last_status|default:"" }}</div> <div><strong>Last status:</strong> {{ schedule.last_status|default:"" }}</div>

View File

@@ -11,6 +11,7 @@
<section class="panel"> <section class="panel">
<h2>{% if schedule %}Edit Schedule{% else %}Create Schedule{% endif %}</h2> <h2>{% if schedule %}Edit Schedule{% else %}Create Schedule{% endif %}</h2>
<p class="muted">Schedules use cron-style timing syntax, but they are evaluated by the pobsync scheduler service.</p>
<form method="post" class="form-grid"> <form method="post" class="form-grid">
{% csrf_token %} {% csrf_token %}
{{ form.non_field_errors }} {{ form.non_field_errors }}

View File

@@ -546,6 +546,8 @@ class ViewTests(TestCase):
self.assertContains(response, "web-01") self.assertContains(response, "web-01")
self.assertContains(response, "web-01.example.test") self.assertContains(response, "web-01.example.test")
self.assertContains(response, "15 2 * * *") self.assertContains(response, "15 2 * * *")
self.assertContains(response, "Schedule expression")
self.assertContains(response, "Evaluated by the pobsync scheduler service.")
self.assertContains(response, "20260519-021500Z__ABCDEFGH") self.assertContains(response, "20260519-021500Z__ABCDEFGH")
self.assertContains(response, "Discover snapshots") self.assertContains(response, "Discover snapshots")
self.assertContains(response, "Edit schedule") self.assertContains(response, "Edit schedule")
@@ -1135,6 +1137,8 @@ class ViewTests(TestCase):
self.assertEqual(response.status_code, 200) self.assertEqual(response.status_code, 200)
self.assertContains(response, "Create Schedule") self.assertContains(response, "Create Schedule")
self.assertContains(response, "Schedule expression")
self.assertContains(response, "evaluated by the pobsync scheduler service")
self.assertContains(response, "15 2 * * *") self.assertContains(response, "15 2 * * *")
self.assertContains(response, "Save schedule") self.assertContains(response, "Save schedule")