feat: remove zone from /clients api

This commit is contained in:
zhongwencool 2023-06-14 16:55:19 +08:00
parent 121cd9124a
commit bd33dcb049
3 changed files with 3 additions and 16 deletions

View File

@ -75,7 +75,6 @@ listener_mqtt_tcp_conf(Port, EnableAuthn) ->
PortS = integer_to_binary(Port),
#{
<<"acceptors">> => 16,
<<"zone">> => <<"default">>,
<<"access_rules">> => ["allow all"],
<<"bind">> => <<"0.0.0.0:", PortS/binary>>,
<<"max_connections">> => 1024000,

View File

@ -170,7 +170,7 @@ drop_hidden_roots(Conf) ->
lists:foldl(fun(K, Acc) -> maps:remove(K, Acc) end, Conf, hidden_roots()).
hidden_roots() ->
[<<"trace">>, <<"stats">>, <<"broker">>].
[<<"trace">>, <<"stats">>, <<"broker">>, <<"persistent_session_store">>].
get_config(Key) ->
case emqx:get_raw_config([Key], undefined) of

View File

@ -63,7 +63,6 @@
-define(CLIENT_QSCHEMA, [
{<<"node">>, atom},
{<<"username">>, binary},
{<<"zone">>, atom},
{<<"ip_address">>, ip},
{<<"conn_state">>, atom},
{<<"clean_start">>, atom},
@ -122,11 +121,6 @@ schema("/clients") ->
required => false,
desc => <<"User name">>
})},
{zone,
hoconsc:mk(binary(), #{
in => query,
required => false
})},
{ip_address,
hoconsc:mk(binary(), #{
in => query,
@ -549,12 +543,7 @@ fields(client) ->
" Maximum number of subscriptions allowed by this client">>
})},
{username, hoconsc:mk(binary(), #{desc => <<"User name of client when connecting">>})},
{mountpoint, hoconsc:mk(binary(), #{desc => <<"Topic mountpoint">>})},
{zone,
hoconsc:mk(binary(), #{
desc =>
<<"Indicate the configuration group used by the client">>
})}
{mountpoint, hoconsc:mk(binary(), #{desc => <<"Topic mountpoint">>})}
];
fields(authz_cache) ->
[
@ -848,8 +837,6 @@ ms(clientid, X) ->
#{clientinfo => #{clientid => X}};
ms(username, X) ->
#{clientinfo => #{username => X}};
ms(zone, X) ->
#{clientinfo => #{zone => X}};
ms(conn_state, X) ->
#{conn_state => X};
ms(ip_address, X) ->
@ -930,6 +917,7 @@ format_channel_info(WhichNode, {_, ClientInfo0, ClientStats}) ->
sockname,
retry_interval,
upgrade_qos,
zone,
%% sessionID, defined in emqx_session.erl
id
],