fix(emqx_management): fix topics (routes) cli list command

This commit is contained in:
Zaiming (Stone) Shi 2022-06-22 00:05:45 +02:00
parent 54f3dd3ddc
commit a6f111798b
3 changed files with 9 additions and 5 deletions

View File

@ -2,7 +2,7 @@
{application, emqx_management, [
{description, "EMQX Management API and CLI"},
% strict semver, bump manually!
{vsn, "5.0.0"},
{vsn, "5.0.1"},
{modules, []},
{registered, [emqx_management_sup]},
{applications, [kernel, stdlib, emqx_plugins, minirest, emqx]},

View File

@ -0,0 +1,7 @@
%% -*- mode: erlang -*-
%% Unless you know what you are doing, DO NOT edit manually!!
{VSN,
[{"5.0.0",[{load_module,emqx_mgmt_cli,brutal_purge,soft_purge,[]}]},
{<<".*">>,[]}],
[{"5.0.0",[{load_module,emqx_mgmt_cli,brutal_purge,soft_purge,[]}]},
{<<".*">>,[]}]}.

View File

@ -170,7 +170,7 @@ if_client(ClientId, Fun) ->
%% @doc Topics Command
topics(["list"]) ->
dump(emqx_route);
dump(emqx_route, emqx_topic);
topics(["show", Topic]) ->
Routes = ets:lookup(emqx_route, bin(Topic)),
[print({emqx_topic, Route}) || Route <- Routes];
@ -658,9 +658,6 @@ olp(_) ->
%% Dump ETS
%%--------------------------------------------------------------------
dump(Table) ->
dump(Table, Table, ets:first(Table), []).
dump(Table, Tag) ->
dump(Table, Tag, ets:first(Table), []).