fix(rules): don't show the module name 'emqx_rule_outputs' in outputs
This commit is contained in:
parent
9b4b3d2e8c
commit
cd4227b851
|
@ -257,11 +257,16 @@ format_output(Outputs) ->
|
||||||
[do_format_output(Out) || Out <- Outputs].
|
[do_format_output(Out) || Out <- Outputs].
|
||||||
|
|
||||||
do_format_output(#{mod := Mod, func := Func, args := Args}) ->
|
do_format_output(#{mod := Mod, func := Func, args := Args}) ->
|
||||||
#{function => list_to_binary(lists:concat([Mod,":",Func])),
|
#{function => printable_function_name(Mod, Func),
|
||||||
args => maps:remove(preprocessed_tmpl, Args)};
|
args => maps:remove(preprocessed_tmpl, Args)};
|
||||||
do_format_output(BridgeChannelId) when is_binary(BridgeChannelId) ->
|
do_format_output(BridgeChannelId) when is_binary(BridgeChannelId) ->
|
||||||
BridgeChannelId.
|
BridgeChannelId.
|
||||||
|
|
||||||
|
printable_function_name(emqx_rule_outputs, Func) ->
|
||||||
|
Func;
|
||||||
|
printable_function_name(Mod, Func) ->
|
||||||
|
list_to_binary(lists:concat([Mod,":",Func])).
|
||||||
|
|
||||||
get_rule_metrics(Id) ->
|
get_rule_metrics(Id) ->
|
||||||
Format = fun (Node, #{matched := Matched,
|
Format = fun (Node, #{matched := Matched,
|
||||||
rate := Current,
|
rate := Current,
|
||||||
|
|
Loading…
Reference in New Issue