fix(emqx_dashboard): fix monitor_current api

This commit is contained in:
Ivan Dyachkov 2023-04-03 11:55:36 +02:00
parent d25db3ace4
commit c20da5ffa6
2 changed files with 3 additions and 1 deletions

View File

@ -2,7 +2,7 @@
{application, emqx_dashboard, [ {application, emqx_dashboard, [
{description, "EMQX Web Dashboard"}, {description, "EMQX Web Dashboard"},
% strict semver, bump manually! % strict semver, bump manually!
{vsn, "5.0.15"}, {vsn, "5.0.16"},
{modules, []}, {modules, []},
{registered, [emqx_dashboard_sup]}, {registered, [emqx_dashboard_sup]},
{applications, [kernel, stdlib, mnesia, minirest, emqx, emqx_ctl]}, {applications, [kernel, stdlib, mnesia, minirest, emqx, emqx_ctl]},

View File

@ -132,6 +132,8 @@ dashboard_samplers_fun(Latest) ->
end end
end. end.
monitor_current(get, #{bindings := []}) ->
with_node(erlang:node(), fun emqx_dashboard_monitor:current_rate/1);
monitor_current(get, #{bindings := Bindings}) -> monitor_current(get, #{bindings := Bindings}) ->
RawNode = maps:get(node, Bindings, all), RawNode = maps:get(node, Bindings, all),
with_node(RawNode, fun emqx_dashboard_monitor:current_rate/1). with_node(RawNode, fun emqx_dashboard_monitor:current_rate/1).