فهرست منبع

fix(emqx_dashboard): fix monitor_current api

Ivan Dyachkov 2 سال پیش
والد
کامیت
c20da5ffa6
2فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 1 1
      apps/emqx_dashboard/src/emqx_dashboard.app.src
  2. 2 0
      apps/emqx_dashboard/src/emqx_dashboard_monitor_api.erl

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

@@ -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]},

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

@@ -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).