Merge pull request #5472 from DDDHuang/fix_monitor

fix: monitor response data format
This commit is contained in:
DDDHuang 2021-08-12 20:06:20 +08:00 committed by GitHub
commit 8597591e80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -193,7 +193,8 @@ lookup(Params) ->
lookup_(lists:foldl(Fun, #{}, Params)).
lookup_(#{node := Node, counter := Counter}) ->
{200, sampling(Node, Counter)};
Data = hd(maps:values(sampling(Node, Counter))),
{200, Data};
lookup_(#{node := Node}) ->
{200, sampling(Node)};
lookup_(#{counter := Counter}) ->