Merge pull request #12539 from zhongwencool/rocketmq-channel-status
fix: Rocketmq channel status
This commit is contained in:
commit
c08522bc1e
|
@ -1,7 +1,7 @@
|
|||
%% -*- mode: erlang -*-
|
||||
{application, emqx_auth_http, [
|
||||
{description, "EMQX External HTTP API Authentication and Authorization"},
|
||||
{vsn, "0.1.3"},
|
||||
{vsn, "0.1.4"},
|
||||
{registered, []},
|
||||
{mod, {emqx_auth_http_app, []}},
|
||||
{applications, [
|
||||
|
|
|
@ -157,7 +157,7 @@ parse_config(
|
|||
method => Method,
|
||||
base_url => BaseUrl,
|
||||
headers => Headers,
|
||||
base_path_templete => emqx_authz_utils:parse_str(Path, allowed_vars()),
|
||||
base_path_template => emqx_authz_utils:parse_str(Path, allowed_vars()),
|
||||
base_query_template => emqx_authz_utils:parse_deep(
|
||||
cow_qs:parse_qs(to_bin(Query)),
|
||||
allowed_vars()
|
||||
|
@ -197,7 +197,7 @@ generate_request(
|
|||
#{
|
||||
method := Method,
|
||||
headers := Headers,
|
||||
base_path_templete := BasePathTemplate,
|
||||
base_path_template := BasePathTemplate,
|
||||
base_query_template := BaseQueryTemplate,
|
||||
body_template := BodyTemplate
|
||||
}
|
||||
|
|
|
@ -74,6 +74,11 @@ fields("creation_opts") ->
|
|||
importance => ?IMPORTANCE_HIDDEN,
|
||||
converter => fun(_, _) -> 1 end,
|
||||
desc => ?DESC("batch_size")
|
||||
}},
|
||||
{batch_time, #{
|
||||
importance => ?IMPORTANCE_HIDDEN,
|
||||
converter => fun(_, _) -> 0 end,
|
||||
desc => ?DESC("batch_size")
|
||||
}}
|
||||
]);
|
||||
fields(action) ->
|
||||
|
@ -102,6 +107,11 @@ fields(action_resource_opts) ->
|
|||
importance => ?IMPORTANCE_HIDDEN,
|
||||
converter => fun(_, _) -> 1 end,
|
||||
desc => ?DESC("batch_size")
|
||||
}},
|
||||
{batch_time, #{
|
||||
importance => ?IMPORTANCE_HIDDEN,
|
||||
converter => fun(_, _) -> 0 end,
|
||||
desc => ?DESC("batch_size")
|
||||
}}
|
||||
]);
|
||||
fields(resource_opts) ->
|
||||
|
|
|
@ -179,11 +179,14 @@ on_remove_channel(
|
|||
{ok, NewState}.
|
||||
|
||||
on_get_channel_status(
|
||||
_ResId,
|
||||
_ChannelId,
|
||||
_State
|
||||
InstanceId,
|
||||
ChannelId,
|
||||
#{installed_channels := Channels} = State
|
||||
) ->
|
||||
?status_connected.
|
||||
case maps:find(ChannelId, Channels) of
|
||||
{ok, _} -> on_get_status(InstanceId, State);
|
||||
error -> ?status_disconnected
|
||||
end.
|
||||
|
||||
on_get_channels(ResId) ->
|
||||
emqx_bridge_v2:get_channels_for_connector(ResId).
|
||||
|
|
Loading…
Reference in New Issue