Skip to content

Commit e0bccb4

Browse files
razvanphpmichaelklishin
authored andcommitted
Add Socket SSL column to management UI
(cherry picked from commit 09c546a)
1 parent 4fa8e84 commit e0bccb4

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

deps/rabbitmq_management/priv/www/js/tmpl/overview.ejs

+2
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@
252252
<% } %>
253253
<th>Bound to</th>
254254
<th>Port</th>
255+
<th>SSL</th>
255256
</tr>
256257
<%
257258
for (var i = 0; i < overview.listeners.length; i++) {
@@ -264,6 +265,7 @@
264265
<% } %>
265266
<td><%= listener.ip_address %></td>
266267
<td><%= listener.port %></td>
268+
<td class="c"><%= fmt_boolean(listener.ssl || false) %></td>
267269
</tr>
268270
<% } %>
269271
</table>

deps/rabbitmq_management_agent/src/rabbit_mgmt_format.erl

+10-1
Original file line numberDiff line numberDiff line change
@@ -279,13 +279,22 @@ listener(#listener{node = Node, protocol = Protocol,
279279
{protocol, Protocol},
280280
{ip_address, ip(IPAddress)},
281281
{port, Port},
282-
{socket_opts, format_socket_opts(Opts)}].
282+
{socket_opts, format_socket_opts(Opts)},
283+
{ssl, is_ssl_socket(Opts)}
284+
].
283285

284286
web_context(Props0) ->
285287
SslOpts = pget(ssl_opts, Props0, []),
286288
Props = proplists:delete(ssl_opts, Props0),
287289
[{ssl_opts, format_socket_opts(SslOpts)} | Props].
288290

291+
is_ssl_socket(Opts) ->
292+
S = proplists:get_value(socket_opts, Opts, Opts),
293+
(proplists:get_value(ssl_opts, S, undefined) =/= undefined) orelse
294+
(proplists:get_value(cacertfile, S, undefined) =/= undefined) orelse
295+
(proplists:get_value(certfile, S, undefined) =/= undefined) orelse
296+
(proplists:get_value(keyfile, S, undefined) =/= undefined).
297+
289298
format_socket_opts(Opts) ->
290299
format_socket_opts(Opts, []).
291300

0 commit comments

Comments
 (0)