Add Socket SSL column to management UI
This commit is contained in:
parent
55dc63a801
commit
09c546a1c8
|
@ -252,6 +252,7 @@
|
||||||
<% } %>
|
<% } %>
|
||||||
<th>Bound to</th>
|
<th>Bound to</th>
|
||||||
<th>Port</th>
|
<th>Port</th>
|
||||||
|
<th>SSL</th>
|
||||||
</tr>
|
</tr>
|
||||||
<%
|
<%
|
||||||
for (var i = 0; i < overview.listeners.length; i++) {
|
for (var i = 0; i < overview.listeners.length; i++) {
|
||||||
|
@ -264,6 +265,7 @@
|
||||||
<% } %>
|
<% } %>
|
||||||
<td><%= listener.ip_address %></td>
|
<td><%= listener.ip_address %></td>
|
||||||
<td><%= listener.port %></td>
|
<td><%= listener.port %></td>
|
||||||
|
<td class="c"><%= fmt_boolean(listener.ssl || false) %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% } %>
|
<% } %>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -279,13 +279,22 @@ listener(#listener{node = Node, protocol = Protocol,
|
||||||
{protocol, Protocol},
|
{protocol, Protocol},
|
||||||
{ip_address, ip(IPAddress)},
|
{ip_address, ip(IPAddress)},
|
||||||
{port, Port},
|
{port, Port},
|
||||||
{socket_opts, format_socket_opts(Opts)}].
|
{socket_opts, format_socket_opts(Opts)},
|
||||||
|
{ssl, is_ssl_socket(Opts)}
|
||||||
|
].
|
||||||
|
|
||||||
web_context(Props0) ->
|
web_context(Props0) ->
|
||||||
SslOpts = pget(ssl_opts, Props0, []),
|
SslOpts = pget(ssl_opts, Props0, []),
|
||||||
Props = proplists:delete(ssl_opts, Props0),
|
Props = proplists:delete(ssl_opts, Props0),
|
||||||
[{ssl_opts, format_socket_opts(SslOpts)} | Props].
|
[{ssl_opts, format_socket_opts(SslOpts)} | Props].
|
||||||
|
|
||||||
|
is_ssl_socket(Opts) ->
|
||||||
|
S = proplists:get_value(socket_opts, Opts, Opts),
|
||||||
|
(proplists:get_value(ssl_opts, S, undefined) =/= undefined) orelse
|
||||||
|
(proplists:get_value(cacertfile, S, undefined) =/= undefined) orelse
|
||||||
|
(proplists:get_value(certfile, S, undefined) =/= undefined) orelse
|
||||||
|
(proplists:get_value(keyfile, S, undefined) =/= undefined).
|
||||||
|
|
||||||
format_socket_opts(Opts) ->
|
format_socket_opts(Opts) ->
|
||||||
format_socket_opts(Opts, []).
|
format_socket_opts(Opts, []).
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue