From 7c8e452a3cd5995547499e70126783cd2d55bf2b Mon Sep 17 00:00:00 2001 From: JimMoen Date: Fri, 17 Dec 2021 10:52:55 +0800 Subject: [PATCH 1/2] chore(dashboard): update dashboard version --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d2026da6d..887206e14 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ export EMQX_DEFAULT_BUILDER = ghcr.io/emqx/emqx-builder/4.4-2:23.3.4.9-3-alpine3 export EMQX_DEFAULT_RUNNER = alpine:3.14 export OTP_VSN ?= $(shell $(CURDIR)/scripts/get-otp-vsn.sh) export PKG_VSN ?= $(shell $(CURDIR)/pkg-vsn.sh) -export EMQX_DASHBOARD_VERSION ?= v0.5.0 +export EMQX_DASHBOARD_VERSION ?= v0.7.0 export DOCKERFILE := deploy/docker/Dockerfile export DOCKERFILE_TESTING := deploy/docker/Dockerfile.testing ifeq ($(OS),Windows_NT) From 3a3226fc78d086e3184e2f5c7f832045ef7321fc Mon Sep 17 00:00:00 2001 From: JimMoen Date: Fri, 17 Dec 2021 10:53:10 +0800 Subject: [PATCH 2/2] fix(dashboard): enable dashboard by default --- apps/emqx_dashboard/src/emqx_dashboard.erl | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/apps/emqx_dashboard/src/emqx_dashboard.erl b/apps/emqx_dashboard/src/emqx_dashboard.erl index 953e3e52b..0c7c03f63 100644 --- a/apps/emqx_dashboard/src/emqx_dashboard.erl +++ b/apps/emqx_dashboard/src/emqx_dashboard.erl @@ -48,16 +48,10 @@ start_listeners() -> 'basicAuth' => #{type => http, scheme => basic}, 'bearerAuth' => #{type => http, scheme => bearer} }}}, - Dispatch = - case os:getenv("_EMQX_ENABLE_DASHBOARD") of - V when V =:= "true" orelse V =:= "1" -> - [{"/", cowboy_static, {priv_file, emqx_dashboard, "www/index.html"}}, - {"/static/[...]", cowboy_static, {priv_dir, emqx_dashboard, "www/static"}}, - {'_', cowboy_static, {priv_file, emqx_dashboard, "www/index.html"}} - ]; - _ -> - [] - end, + Dispatch = [ {"/", cowboy_static, {priv_file, emqx_dashboard, "www/index.html"}} + , {"/static/[...]", cowboy_static, {priv_dir, emqx_dashboard, "www/static"}} + , {'_', cowboy_static, {priv_file, emqx_dashboard, "www/index.html"}} + ], BaseMinirest = #{ base_path => ?BASE_PATH, modules => minirest_api:find_api_modules(apps()),