Added Stream forwarding support

This commit is contained in:
Jamie Curnow
2018-02-16 16:57:54 +10:00
parent d2130a24a1
commit b57d1e5a66
15 changed files with 264 additions and 38 deletions
+26 -11
View File
@@ -1,7 +1,14 @@
<td><a href="<%- ssl ? 'https' : 'http' %>://<%- hostname %>" target="_blank"><%- hostname %></a></td>
<td>
<% if (type === 'stream') { %>
<%- incoming_port %>
<%- protocols.join(', ').toUpperCase() %>
<% } else { %>
<a href="<%- ssl ? 'https' : 'http' %>://<%- hostname %>" target="_blank"><%- hostname %></a>
<% } %>
</td>
<td>
<span class="monospace">
<% if (type === 'proxy') { %>
<% if (type === 'proxy' || type === 'stream') { %>
<%- forward_server %>:<%- forward_port %>
<% } else if (type === 'redirection') { %>
<%- forward_host %>
@@ -11,19 +18,27 @@
</span>
</td>
<td>
<% if (ssl && force_ssl) { %>
Forced
<% } else if (ssl) { %>
Enabled
<% if (type === 'stream') { %>
-
<% } else { %>
No
<% if (ssl && force_ssl) { %>
Forced
<% } else if (ssl) { %>
Enabled
<% } else { %>
No
<% } %>
<% } %>
</td>
<td>
<% if (access_list) { %>
<a href="#" class="access_list"><%- access_list.name %></a>
<% if (type === 'stream') { %>
-
<% } else { %>
<em>None</em>
<% if (access_list) { %>
<a href="#" class="access_list"><%- access_list.name %></a>
<% } else { %>
<em>None</em>
<% } %>
<% } %>
</td>
<td class="text-right">
@@ -31,7 +46,7 @@
<button type="button" class="btn btn-default btn-xs renew" title="Renew SSL"><i class="fa fa-shield" aria-hidden="true"></i></button>
<% } %>
<button type="button" class="btn btn-default btn-xs reconfigure" title="Reconfigure Nginx"><i class="fa fa-refresh" aria-hidden="true"></i></button>
<button type="button" class="btn btn-default btn-xs advanced" title="Advanced Configuration"><i class="fa fa-code" aria-hidden="true"></i></button>
<button type="button" class="btn btn-default btn-xs advanced" title="Advanced Configuration"<%- type === 'stream' ? ' disabled' : '' %>><i class="fa fa-code" aria-hidden="true"></i></button>
<button type="button" class="btn btn-warning btn-xs edit" title="Edit"><i class="fa fa-pencil" aria-hidden="true"></i></button>
<button type="button" class="btn btn-danger btn-xs delete" title="Delete"><i class="fa fa-times" aria-hidden="true"></i></button>
</td>