fix(dashboard): licence quota not provided to ce edition
This commit is contained in:
parent
ecd0da9fde
commit
89128958ed
|
@ -428,16 +428,20 @@ stats(dropped) -> emqx_metrics:val('messages.dropped').
|
||||||
|
|
||||||
%% the non rate values should be same on all nodes
|
%% the non rate values should be same on all nodes
|
||||||
non_rate_value() ->
|
non_rate_value() ->
|
||||||
#{
|
(license_quota())#{
|
||||||
retained_msg_count => emqx_retainer:retained_count(),
|
retained_msg_count => emqx_retainer:retained_count(),
|
||||||
license_quota => license_quota(),
|
|
||||||
node_uptime => emqx_sys:uptime()
|
node_uptime => emqx_sys:uptime()
|
||||||
}.
|
}.
|
||||||
|
|
||||||
|
-if(?EMQX_RELEASE_EDITION == ee).
|
||||||
license_quota() ->
|
license_quota() ->
|
||||||
case emqx_license_checker:limits() of
|
case emqx_license_checker:limits() of
|
||||||
{ok, #{max_connections := Quota}} ->
|
{ok, #{max_connections := Quota}} ->
|
||||||
Quota;
|
#{license_quota => Quota};
|
||||||
{error, no_license} ->
|
{error, no_license} ->
|
||||||
0
|
#{license_quota => 0}
|
||||||
end.
|
end.
|
||||||
|
-else.
|
||||||
|
license_quota() ->
|
||||||
|
#{}.
|
||||||
|
-endif.
|
||||||
|
|
Loading…
Reference in New Issue