Merge tag 'v5.0.6' into merge-506-to-master
This commit is contained in:
commit
97b9d378a5
|
@ -1,4 +1,4 @@
|
|||
# 5.0.6
|
||||
# 5.0.7
|
||||
|
||||
## Bug fixes
|
||||
|
||||
|
@ -6,6 +6,12 @@
|
|||
* Fix `$queue` topic name error in management API return. [#8728](https://github.com/emqx/emqx/pull/8728)
|
||||
* Fix sometimes `client.connected` and `client.disconnected` could be in wrong order. [#8625](https://github.com/emqx/emqx/pull/8625)
|
||||
|
||||
# 5.0.6
|
||||
|
||||
## Bug fixes
|
||||
|
||||
* Upgrade Dashboard version to fix an issue where the node status was not displayed correctly. [#8771](https://github.com/emqx/emqx/pull/8771)
|
||||
|
||||
# 5.0.5
|
||||
|
||||
## Bug fixes
|
||||
|
@ -21,6 +27,7 @@
|
|||
* Updated `/nodes` API node_status from `Running/Stopped` to `running/stopped`. [#8642](https://github.com/emqx/emqx/pull/8642)
|
||||
* Improve handling of placeholder interpolation errors [#8635](https://github.com/emqx/emqx/pull/8635)
|
||||
* Better logging on unknown object IDs. [#8670](https://github.com/emqx/emqx/pull/8670)
|
||||
* The bind option support `:1883` style. [#8758](https://github.com/emqx/emqx/pull/8758)
|
||||
|
||||
# 5.0.4
|
||||
|
||||
|
|
2
Makefile
2
Makefile
|
@ -6,7 +6,7 @@ export EMQX_DEFAULT_BUILDER = ghcr.io/emqx/emqx-builder/5.0-17:1.13.4-24.2.1-1-d
|
|||
export EMQX_DEFAULT_RUNNER = debian:11-slim
|
||||
export OTP_VSN ?= $(shell $(CURDIR)/scripts/get-otp-vsn.sh)
|
||||
export ELIXIR_VSN ?= $(shell $(CURDIR)/scripts/get-elixir-vsn.sh)
|
||||
export EMQX_DASHBOARD_VERSION ?= v1.0.6
|
||||
export EMQX_DASHBOARD_VERSION ?= v1.0.7
|
||||
export EMQX_EE_DASHBOARD_VERSION ?= e1.0.0
|
||||
export EMQX_REL_FORM ?= tgz
|
||||
export QUICER_DOWNLOAD_FROM_RELEASE = 1
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
%% `apps/emqx/src/bpapi/README.md'
|
||||
|
||||
%% Community edition
|
||||
-define(EMQX_RELEASE_CE, "5.0.5-beta.1").
|
||||
-define(EMQX_RELEASE_CE, "5.0.6").
|
||||
|
||||
%% Enterprise edition
|
||||
-define(EMQX_RELEASE_EE, "5.0.0-alpha.1").
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{id, "emqx"},
|
||||
{description, "EMQX Core"},
|
||||
% strict semver, bump manually!
|
||||
{vsn, "5.0.5"},
|
||||
{vsn, "5.0.6"},
|
||||
{modules, []},
|
||||
{registered, []},
|
||||
{applications, [
|
||||
|
|
|
@ -2162,8 +2162,12 @@ to_bar_separated_list(Str) ->
|
|||
%% - 127.0.0.1:1883
|
||||
%% - ::1:1883
|
||||
%% - [::1]:1883
|
||||
%% - :1883
|
||||
%% - :::1883
|
||||
to_ip_port(Str) ->
|
||||
case split_ip_port(Str) of
|
||||
{"", Port} ->
|
||||
{ok, {{0, 0, 0, 0}, list_to_integer(Port)}};
|
||||
{Ip, Port} ->
|
||||
PortVal = list_to_integer(Port),
|
||||
case inet:parse_address(Ip) of
|
||||
|
|
|
@ -197,7 +197,7 @@ its own from which a browser should permit loading resources."""
|
|||
zh: "多语言支持"
|
||||
}
|
||||
}
|
||||
bootstrap_user {
|
||||
bootstrap_users_file {
|
||||
desc {
|
||||
en: "Initialize users file."
|
||||
zh: "初始化用户文件"
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
-export([
|
||||
add_default_user/0,
|
||||
default_username/0,
|
||||
add_bootstrap_user/0
|
||||
add_bootstrap_users/0
|
||||
]).
|
||||
|
||||
-type emqx_admin() :: #?ADMIN{}.
|
||||
|
@ -85,16 +85,16 @@ mnesia(boot) ->
|
|||
add_default_user() ->
|
||||
add_default_user(binenv(default_username), binenv(default_password)).
|
||||
|
||||
-spec add_bootstrap_user() -> ok | {error, _}.
|
||||
add_bootstrap_user() ->
|
||||
case emqx:get_config([dashboard, bootstrap_user], undefined) of
|
||||
-spec add_bootstrap_users() -> ok | {error, _}.
|
||||
add_bootstrap_users() ->
|
||||
case emqx:get_config([dashboard, bootstrap_users_file], undefined) of
|
||||
undefined ->
|
||||
ok;
|
||||
File ->
|
||||
case mnesia:table_info(?ADMIN, size) of
|
||||
0 ->
|
||||
?SLOG(debug, #{msg => "Add dashboard bootstrap users", file => File}),
|
||||
add_bootstrap_user(File);
|
||||
add_bootstrap_users(File);
|
||||
_ ->
|
||||
ok
|
||||
end
|
||||
|
@ -312,7 +312,7 @@ add_default_user(Username, Password) ->
|
|||
_ -> {ok, default_user_exists}
|
||||
end.
|
||||
|
||||
add_bootstrap_user(File) ->
|
||||
add_bootstrap_users(File) ->
|
||||
case file:open(File, [read]) of
|
||||
{ok, Dev} ->
|
||||
{ok, MP} = re:compile(<<"(\.+):(\.+$)">>, [ungreedy]),
|
||||
|
@ -324,7 +324,12 @@ add_bootstrap_user(File) ->
|
|||
after
|
||||
file:close(Dev)
|
||||
end;
|
||||
Error ->
|
||||
{error, Reason} = Error ->
|
||||
?SLOG(error, #{
|
||||
msg => "failed to open the dashboard bootstrap users file",
|
||||
file => File,
|
||||
reason => Reason
|
||||
}),
|
||||
Error
|
||||
end.
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ start(_StartType, _StartArgs) ->
|
|||
case emqx_dashboard:start_listeners() of
|
||||
ok ->
|
||||
emqx_dashboard_cli:load(),
|
||||
case emqx_dashboard_admin:add_bootstrap_user() of
|
||||
case emqx_dashboard_admin:add_bootstrap_users() of
|
||||
ok ->
|
||||
{ok, _} = emqx_dashboard_admin:add_default_user(),
|
||||
{ok, Sup};
|
||||
|
|
|
@ -55,7 +55,8 @@ fields("dashboard") ->
|
|||
)},
|
||||
{cors, fun cors/1},
|
||||
{i18n_lang, fun i18n_lang/1},
|
||||
{bootstrap_user, ?HOCON(binary(), #{desc => ?DESC(bootstrap_user), required => false})}
|
||||
{bootstrap_users_file,
|
||||
?HOCON(binary(), #{desc => ?DESC(bootstrap_users_file), required => false})}
|
||||
];
|
||||
fields("listeners") ->
|
||||
[
|
||||
|
|
|
@ -342,11 +342,18 @@ list_listeners(get, #{query_string := Query}) ->
|
|||
{200, listener_status_by_id(NodeL)}.
|
||||
|
||||
crud_listeners_by_id(get, #{bindings := #{id := Id0}}) ->
|
||||
Listeners = [
|
||||
Conf#{<<"id">> => Id, <<"type">> => Type}
|
||||
|| {Id, Type, Conf} <- emqx_listeners:list_raw(),
|
||||
Id =:= Id0
|
||||
],
|
||||
Listeners =
|
||||
[
|
||||
Conf#{
|
||||
<<"id">> => Id,
|
||||
<<"type">> => Type,
|
||||
<<"bind">> := iolist_to_binary(
|
||||
emqx_listeners:format_bind(maps:get(<<"bind">>, Conf))
|
||||
)
|
||||
}
|
||||
|| {Id, Type, Conf} <- emqx_listeners:list_raw(),
|
||||
Id =:= Id0
|
||||
],
|
||||
case Listeners of
|
||||
[] -> {404, #{code => 'BAD_LISTENER_ID', message => ?LISTENER_NOT_FOUND}};
|
||||
[L] -> {200, L}
|
||||
|
|
Loading…
Reference in New Issue