From 655666170ae95e5ed65307a18653378fda13ae71 Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Tue, 1 Sep 2015 18:28:32 -0700 Subject: [PATCH] agent: Always enable the UI endpoints --- command/agent/http.go | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/command/agent/http.go b/command/agent/http.go index 7a61a0498..ddb2d7cd3 100644 --- a/command/agent/http.go +++ b/command/agent/http.go @@ -270,13 +270,10 @@ func (s *HTTPServer) registerHandlers(enableDebug bool) { s.mux.Handle("/ui/", http.StripPrefix("/ui/", http.FileServer(http.Dir(s.uiDir)))) } - // Enable the special endpoints for UI or SCADA - if s.uiDir != "" || s.agent.config.AtlasInfrastructure != "" { - // API's are under /internal/ui/ to avoid conflict - s.mux.HandleFunc("/v1/internal/ui/nodes", s.wrap(s.UINodes)) - s.mux.HandleFunc("/v1/internal/ui/node/", s.wrap(s.UINodeInfo)) - s.mux.HandleFunc("/v1/internal/ui/services", s.wrap(s.UIServices)) - } + // API's are under /internal/ui/ to avoid conflict + s.mux.HandleFunc("/v1/internal/ui/nodes", s.wrap(s.UINodes)) + s.mux.HandleFunc("/v1/internal/ui/node/", s.wrap(s.UINodeInfo)) + s.mux.HandleFunc("/v1/internal/ui/services", s.wrap(s.UIServices)) } // wrap is used to wrap functions to make them more convenient