Просмотр исходного кода

fix(emqx_dashboard): fix monitor_current api

Ivan Dyachkov 2 лет назад
Родитель
Сommit
c20da5ffa6

+ 1 - 1
apps/emqx_dashboard/src/emqx_dashboard.app.src

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

+ 2 - 0
apps/emqx_dashboard/src/emqx_dashboard_monitor_api.erl

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