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:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user