(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:
@@ -265,8 +265,11 @@ class RetentionApplyForm(forms.Form):
|
||||
|
||||
class ScheduleConfigForm(forms.ModelForm):
|
||||
cron_expr = forms.CharField(
|
||||
label="Cron expression",
|
||||
help_text='Five-field cron expression, for example "15 2 * * *".',
|
||||
label="Schedule expression",
|
||||
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)
|
||||
|
||||
|
||||
@@ -49,7 +49,8 @@
|
||||
<h2>Schedule</h2>
|
||||
{% if schedule %}
|
||||
<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>Prune:</strong> {{ schedule.prune|yesno:"yes,no" }}</div>
|
||||
<div><strong>Last status:</strong> {{ schedule.last_status|default:"" }}</div>
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
<section class="panel">
|
||||
<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">
|
||||
{% csrf_token %}
|
||||
{{ form.non_field_errors }}
|
||||
|
||||
@@ -546,6 +546,8 @@ class ViewTests(TestCase):
|
||||
self.assertContains(response, "web-01")
|
||||
self.assertContains(response, "web-01.example.test")
|
||||
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, "Discover snapshots")
|
||||
self.assertContains(response, "Edit schedule")
|
||||
@@ -1135,6 +1137,8 @@ class ViewTests(TestCase):
|
||||
|
||||
self.assertEqual(response.status_code, 200)
|
||||
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, "Save schedule")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user