Move integration + geo-restriction UI to deploy/settings page

User feedback: these settings belong on the Beállítások (settings) page,
not the app description/details page. Moves both sections from app_info.html
to deploy.html and rewires data in deployHandler instead of appDetailHandler.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-25 20:37:05 +01:00
parent b5f4a666f0
commit 4ee8ba6851
3 changed files with 217 additions and 219 deletions
+22 -22
View File
@@ -390,6 +390,28 @@ func (s *Server) deployHandler(w http.ResponseWriter, r *http.Request, name stri
data["BackupDestWarningSeverity"] = health.Severity
}
}
// App-to-app integrations
if meta.HasIntegrations() && s.integrationMgr != nil {
data["HasIntegrations"] = true
data["Integrations"] = s.integrationMgr.ListForProvider(meta.Slug)
}
// Geo-restriction per-app data
geo := s.settings.GetGeoRestriction()
if geo != nil && geo.Enabled && s.cfg.Infrastructure.CFAPIToken != "" {
data["GeoGlobalEnabled"] = true
data["GeoGlobalCountries"] = geo.AllowedCountries
if ov, ok := geo.AppOverrides[name]; ok {
data["GeoAppOverride"] = true
data["GeoAppOverrideCountries"] = ov.AllowedCountries
} else {
data["GeoAppOverrideCountries"] = []string{}
}
} else {
data["GeoGlobalCountries"] = []string{}
data["GeoAppOverrideCountries"] = []string{}
}
}
// Memory info for deploy page (only for non-deployed apps)
@@ -478,28 +500,6 @@ func (s *Server) appDetailHandler(w http.ResponseWriter, r *http.Request, slug s
data["HasOptionalConfig"] = found.Meta.HasOptionalConfig()
data["EffectiveSubdomain"] = effectiveSubdomain
// App-to-app integrations
if found.Meta.HasIntegrations() && s.integrationMgr != nil {
data["HasIntegrations"] = true
data["Integrations"] = s.integrationMgr.ListForProvider(found.Meta.Slug)
}
// Geo-restriction per-app data
geo := s.settings.GetGeoRestriction()
if geo != nil && geo.Enabled && s.cfg.Infrastructure.CFAPIToken != "" {
data["GeoGlobalEnabled"] = true
data["GeoGlobalCountries"] = geo.AllowedCountries
if ov, ok := geo.AppOverrides[found.Name]; ok {
data["GeoAppOverride"] = true
data["GeoAppOverrideCountries"] = ov.AllowedCountries
} else {
data["GeoAppOverrideCountries"] = []string{}
}
} else {
data["GeoGlobalCountries"] = []string{}
data["GeoAppOverrideCountries"] = []string{}
}
s.executeTemplate(w, r, "app_info", data)
}