fix(api): platform check type switch binds the platform's checkers only
ci / lint (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / image (push) Skipped
ci / lint (pull_request) Successful in 11m25s
ci / test (pull_request) Successful in 12m34s
ci / build (pull_request) Successful in 18m7s
ci / image (pull_request) Successful in 5m22s

Switching a check type off in the admin area removed it for every
organization, own checkers included, and hid it from the organization's
own choice. The platform switch now only keeps such monitors off the
platform's regions: organizations with regions of their own still create
them there (422 check_type_own_checkers_only on a platform region), and
the editor marks them "own checkers only". Passive types, which no
checker runs, stay switched off entirely.

The organization's check types are chosen independently of the
platform's: its settings list every type, and the platform switch no
longer rewrites that choice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
Sebastian UnterschützandClaude Opus 5.5 committed 2026-11-24 21:46:07 +01:00
1 parent 12e6de77aa
commit bd887523de
12 files changed
+2296 -2096

No files matched your search

+14 -2
View File
@@ -579,6 +579,13 @@ templ IncidentsPage(p Page, me Me, v IncidentsView) {
}
}
// TypeOption is a check type offered in the monitor form. OwnOnly types
// run on the organization's own checkers only.
type TypeOption struct {
Type string
OwnOnly bool
}
// RegionOption is a selectable region in the monitor form.
type RegionOption struct {
ID string
@@ -639,7 +646,7 @@ type MonitorForm struct {
Game GameForm
DockerHost string
// Types are the check types to offer.
Types []string
Types []TypeOption
}
// BrokerForm holds the settings of message broker checks.
@@ -765,7 +772,12 @@ templ MonitorEditor(p Page, me Me, f MonitorForm) {
<span class="mb-1 block text-xs font-medium uppercase tracking-wider text-muted">{ i18n.T(ctx, "monitors.type") }</span>
<select name="type" data-type-select class="w-full border border-rule bg-transparent px-2 py-1.5 text-sm">
for _, t := range f.Types {
<option value={ t } selected?={ t == f.Type }>{ i18n.T(ctx, "monitors.type_"+t) }</option>
<option value={ t.Type } selected?={ t.Type == f.Type }>
{ i18n.T(ctx, "monitors.type_"+t.Type) }
if t.OwnOnly {
({ i18n.T(ctx, "monitors.type_own_only") })
}
</option>
}
</select>
</label>