diff --git a/internal/core/config_profile.go b/internal/core/config_profile.go index 3a6f02f..1f0266d 100644 --- a/internal/core/config_profile.go +++ b/internal/core/config_profile.go @@ -486,39 +486,3 @@ func regionViews(regions []store.Region) []configRegionView { } return out } - -// repeaterProfiles is an org's region-def commands resolved for a specific -// repeater's location, for the console reference block. Base-settings profiles are -// a viewing choice on the org config page, so they aren't auto-applied here. -type repeaterProfiles struct { - OrgName string - OrgSlug string - Commands []string -} - -// resolvedProfilesForRepeater returns, for each org the repeater is contributed to -// whose regions cover the repeater's location, the `region def`/`region save` -// commands to apply that region hierarchy. -func (s *Handlers) resolvedProfilesForRepeater(r *http.Request, rep *store.Repeater) []repeaterProfiles { - orgs, err := s.Store.ListRepeaterOrgs(r.Context(), rep.ID) - if err != nil { - return nil - } - var out []repeaterProfiles - for _, o := range orgs { - regions, err := s.Store.ListRegions(r.Context(), o.OrgID) - if err != nil { - continue - } - rootAllow, err := s.Store.RootAllowFlood(r.Context(), o.OrgID) - if err != nil { - continue - } - cmds := store.RegionDefCommands(regions, rootAllow, rep.Latitude, rep.Longitude) - if len(cmds) == 0 { - continue - } - out = append(out, repeaterProfiles{OrgName: o.OrgName, OrgSlug: o.OrgSlug, Commands: cmds}) - } - return out -} diff --git a/internal/core/console.go b/internal/core/console.go index 86c5dcb..dd4a2b0 100644 --- a/internal/core/console.go +++ b/internal/core/console.go @@ -156,9 +156,6 @@ func (s *Handlers) pageConsole(w http.ResponseWriter, r *http.Request) { s.Render(w, r, "console.html", map[string]any{ "Repeater": rep, "Commands": allowed, - // Recommended configuration from each org this repeater is contributed to, - // resolved for the repeater's location (region commands vary by lat/lon). - "Profiles": s.resolvedProfilesForRepeater(r, rep), }) } diff --git a/internal/core/templates/console.html b/internal/core/templates/console.html index 2dbe8c6..2a64413 100644 --- a/internal/core/templates/console.html +++ b/internal/core/templates/console.html @@ -53,22 +53,6 @@ -{{if .Profiles}} -{{range .Profiles}} -
These are the commands {{.OrgName}} recommends for this repeater's location. Copy them into the console above.
-{{range .Commands}}{{.}}
-{{end}}
-