Merge pull request #4234 from hashicorp/feature/default-new-ui

Switch over to defaulting to the new UI
pull/4261/head
Matt Keeler 7 years ago committed by GitHub
commit 3afa4f9c7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -157,9 +157,9 @@ func (s *HTTPServer) handler(enableDebug bool) http.Handler {
} }
if s.IsUIEnabled() { if s.IsUIEnabled() {
new_ui, err := strconv.ParseBool(os.Getenv("CONSUL_UI_BETA")) legacy_ui, err := strconv.ParseBool(os.Getenv("CONSUL_UI_LEGACY"))
if err != nil { if err != nil {
new_ui = false legacy_ui = false
} }
var uifs http.FileSystem var uifs http.FileSystem
@ -169,15 +169,15 @@ func (s *HTTPServer) handler(enableDebug bool) http.Handler {
} else { } else {
fs := assetFS() fs := assetFS()
if new_ui { if legacy_ui {
fs.Prefix += "/v2/"
} else {
fs.Prefix += "/v1/" fs.Prefix += "/v1/"
} else {
fs.Prefix += "/v2/"
} }
uifs = fs uifs = fs
} }
if new_ui { if !legacy_ui {
uifs = &redirectFS{fs: uifs} uifs = &redirectFS{fs: uifs}
} }

@ -27,13 +27,13 @@ By default this is `http://localhost:8500/ui`.
You can view a live demo of the Consul Web UI You can view a live demo of the Consul Web UI
[here](http://demo.consul.io). [here](http://demo.consul.io).
## How to Use the New UI ## How to Use the Legacy UI
On May 11, 2018, our redesign of the web UI went into beta. You can use it with As of Consul version 1.2.0 the original Consul UI is deprecated. You can
Consul 1.1.0 by setting the environment variable `CONSUL_UI_BETA` to `true`. still enable it by setting the environment variable `CONSUL_UI_LEGACY` to `true`.
Without this environment variable, the web UI will default to the old version. To Without this environment variable, the web UI will default to the latest version.
use the old UI version, either set `CONSUL_UI_BETA` to false, or don't include To use the latest UI version, either set `CONSUL_UI_LEGACY` to false or don't
that environment variable at all. include that environment variable at all.
## Next Steps ## Next Steps

Loading…
Cancel
Save