From 09c5bac10218bacbbede841373774c06b1bd354f Mon Sep 17 00:00:00 2001 From: John Cowen Date: Thu, 26 May 2022 17:23:56 +0100 Subject: [PATCH] Export top-level HCP Enabled go-template variable for UI (#13165) * Update ui template data to export HCPEnabled at the top level --- agent/uiserver/ui_template_data.go | 1 + agent/uiserver/uiserver_test.go | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/agent/uiserver/ui_template_data.go b/agent/uiserver/ui_template_data.go index bb262861a4..97dcbf51d1 100644 --- a/agent/uiserver/ui_template_data.go +++ b/agent/uiserver/ui_template_data.go @@ -31,6 +31,7 @@ func uiTemplateDataFromConfig(cfg *config.RuntimeConfig) (map[string]interface{} d := map[string]interface{}{ "ContentPath": cfg.UIConfig.ContentPath, "ACLsEnabled": cfg.ACLsEnabled, + "HCPEnabled": cfg.UIConfig.HCPEnabled, "UIConfig": uiCfg, "LocalDatacenter": cfg.Datacenter, "PrimaryDatacenter": cfg.PrimaryDatacenter, diff --git a/agent/uiserver/uiserver_test.go b/agent/uiserver/uiserver_test.go index 73d38df7ce..97835f2b02 100644 --- a/agent/uiserver/uiserver_test.go +++ b/agent/uiserver/uiserver_test.go @@ -39,6 +39,7 @@ func TestUIServerIndex(t *testing.T) { wantContains: []string{"