diff --git a/main.go b/main.go index cfa5e6a..3affb1f 100644 --- a/main.go +++ b/main.go @@ -60,6 +60,7 @@ type TemplateData struct { Features []InstallationInfoFeature `json:"features"` Containers []InstallationInfoContainer `json:"containers"` ForwardedPrefix string + FeatureByName map[string]bool } var auth *cnAuth.CnAuth @@ -142,6 +143,12 @@ func getInstallatioInfo() (*TemplateData,error) { return nil,err } + // map features to FeatureByName + installationInfo.FeatureByName = make( map[string]bool, 0 ) + for f := 0 ; f< len(installationInfo.Features); f++ { + installationInfo.FeatureByName[installationInfo.Features[f].Name] = installationInfo.Features[f].Working + } + log.Info("getInstallatioInfo: json done") return installationInfo,nil diff --git a/templates/index.html b/templates/index.html index 29d5039..79d8e7c 100644 --- a/templates/index.html +++ b/templates/index.html @@ -61,7 +61,9 @@