chore: rm some useless mgmt func
This commit is contained in:
parent
bf827cffa8
commit
1edf9fd086
|
@ -93,23 +93,13 @@
|
||||||
]).
|
]).
|
||||||
|
|
||||||
%% Common Table API
|
%% Common Table API
|
||||||
-export([ item/2
|
-export([ max_row_limit/0
|
||||||
, max_row_limit/0
|
|
||||||
]).
|
]).
|
||||||
|
|
||||||
-export([ return/0
|
|
||||||
, return/1]).
|
|
||||||
|
|
||||||
-define(APP, emqx_management).
|
-define(APP, emqx_management).
|
||||||
|
|
||||||
-elvis([{elvis_style, god_modules, disable}]).
|
-elvis([{elvis_style, god_modules, disable}]).
|
||||||
|
|
||||||
%% TODO: remove these function after all api use minirest version 1.X
|
|
||||||
return() ->
|
|
||||||
ok.
|
|
||||||
return(_Response) ->
|
|
||||||
ok.
|
|
||||||
|
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% Node Info
|
%% Node Info
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
@ -331,7 +321,8 @@ call_client(Node, ClientId, Req) ->
|
||||||
do_list_subscriptions() ->
|
do_list_subscriptions() ->
|
||||||
case check_row_limit([mqtt_subproperty]) of
|
case check_row_limit([mqtt_subproperty]) of
|
||||||
false -> throw(max_row_limit);
|
false -> throw(max_row_limit);
|
||||||
ok -> [item(subscription, Sub) || Sub <- ets:tab2list(mqtt_subproperty)]
|
ok -> [#{topic => Topic, clientid => ClientId, options => Options}
|
||||||
|
|| {{Topic, ClientId}, Options} <- ets:tab2list(mqtt_subproperty)]
|
||||||
end.
|
end.
|
||||||
|
|
||||||
list_subscriptions(Node) ->
|
list_subscriptions(Node) ->
|
||||||
|
@ -452,19 +443,6 @@ create_banned(Banned) ->
|
||||||
delete_banned(Who) ->
|
delete_banned(Who) ->
|
||||||
emqx_banned:delete(Who).
|
emqx_banned:delete(Who).
|
||||||
|
|
||||||
%%--------------------------------------------------------------------
|
|
||||||
%% Common Table API
|
|
||||||
%%--------------------------------------------------------------------
|
|
||||||
|
|
||||||
item(subscription, {{Topic, ClientId}, Options}) ->
|
|
||||||
#{topic => Topic, clientid => ClientId, options => Options};
|
|
||||||
|
|
||||||
%% TODO: may be delete
|
|
||||||
item(route, #route{topic = Topic, dest = Node}) ->
|
|
||||||
#{topic => Topic, node => Node};
|
|
||||||
item(route, {Topic, Node}) ->
|
|
||||||
#{topic => Topic, node => Node}.
|
|
||||||
|
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% Internal Functions.
|
%% Internal Functions.
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue