|
@@ -8,7 +8,7 @@
|
|
background-color: #00ca52 !important;
|
|
background-color: #00ca52 !important;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|
|
- <div style="width: 100%; overflow-x: auto; margin-bottom: 1em;">
|
|
|
|
|
|
+ <div style="width: 100%; overflow-x: auto; margin-bottom: 1em; min-height: 300px;">
|
|
<table class="ui celled sortable unstackable compact table">
|
|
<table class="ui celled sortable unstackable compact table">
|
|
<thead>
|
|
<thead>
|
|
<tr>
|
|
<tr>
|
|
@@ -16,7 +16,7 @@
|
|
<th>Destination</th>
|
|
<th>Destination</th>
|
|
<th>Virtual Directory</th>
|
|
<th>Virtual Directory</th>
|
|
<th>Basic Auth</th>
|
|
<th>Basic Auth</th>
|
|
- <th class="no-sort" style="min-width:100px;">Actions</th>
|
|
|
|
|
|
+ <th class="no-sort" style="min-width:150px;">Actions</th>
|
|
</tr>
|
|
</tr>
|
|
</thead>
|
|
</thead>
|
|
<tbody id="httpProxyList">
|
|
<tbody id="httpProxyList">
|
|
@@ -30,6 +30,8 @@
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+
|
|
|
|
+ /* List all proxy endpoints */
|
|
function listProxyEndpoints(){
|
|
function listProxyEndpoints(){
|
|
$.get("/api/proxy/list?type=host", function(data){
|
|
$.get("/api/proxy/list?type=host", function(data){
|
|
$("#httpProxyList").html(``);
|
|
$("#httpProxyList").html(``);
|
|
@@ -82,7 +84,9 @@
|
|
<td data-label="" editable="true" datatype="inbound"><a href="//${subd.RootOrMatchingDomain}" target="_blank">${subd.RootOrMatchingDomain}</a> ${inboundTlsIcon}</td>
|
|
<td data-label="" editable="true" datatype="inbound"><a href="//${subd.RootOrMatchingDomain}" target="_blank">${subd.RootOrMatchingDomain}</a> ${inboundTlsIcon}</td>
|
|
<td data-label="" editable="true" datatype="domain">${subd.Domain} ${tlsIcon}</td>
|
|
<td data-label="" editable="true" datatype="domain">${subd.Domain} ${tlsIcon}</td>
|
|
<td data-label="" editable="true" datatype="vdir">${vdList}</td>
|
|
<td data-label="" editable="true" datatype="vdir">${vdList}</td>
|
|
- <td data-label="" editable="true" datatype="basicauth">${subd.RequireBasicAuth?`<i class="ui green check icon"></i>`:`<i class="ui grey remove icon"></i>`}</td>
|
|
|
|
|
|
+ <td data-label="" editable="true" datatype="basicauth">
|
|
|
|
+ ${subd.RequireBasicAuth?`<i class="ui green check icon"></i>`:`<i class="ui grey remove icon"></i>`}
|
|
|
|
+ </td>
|
|
<td class="center aligned" editable="true" datatype="action" data-label="">
|
|
<td class="center aligned" editable="true" datatype="action" data-label="">
|
|
<div class="ui toggle tiny fitted checkbox" style="margin-bottom: -0.5em; margin-right: 0.4em;" title="Enable / Disable Rule">
|
|
<div class="ui toggle tiny fitted checkbox" style="margin-bottom: -0.5em; margin-right: 0.4em;" title="Enable / Disable Rule">
|
|
<input type="checkbox" class="enableToggle" name="active" ${enableChecked} eptuuid="${subd.RootOrMatchingDomain}" onchange="handleProxyRuleToggle(this);">
|
|
<input type="checkbox" class="enableToggle" name="active" ${enableChecked} eptuuid="${subd.RootOrMatchingDomain}" onchange="handleProxyRuleToggle(this);">
|
|
@@ -176,7 +180,7 @@
|
|
|
|
|
|
column.empty().append(`<div class="ui checkbox" style="margin-top: 0.4em;">
|
|
column.empty().append(`<div class="ui checkbox" style="margin-top: 0.4em;">
|
|
<input type="checkbox" class="RequireBasicAuth" ${checkstate}>
|
|
<input type="checkbox" class="RequireBasicAuth" ${checkstate}>
|
|
- <label>Require Basic Auth</label>
|
|
|
|
|
|
+ <label>Require Basic Auth</label>
|
|
</div>
|
|
</div>
|
|
<button class="ui basic tiny button" style="margin-left: 0.4em; margin-top: 0.4em;" onclick="editBasicAuthCredentials('${uuid}');"><i class="ui blue user circle icon"></i> Edit Credentials</button>
|
|
<button class="ui basic tiny button" style="margin-left: 0.4em; margin-top: 0.4em;" onclick="editBasicAuthCredentials('${uuid}');"><i class="ui blue user circle icon"></i> Edit Credentials</button>
|
|
<div class="ui basic advance segment" style="padding: 0.4em !important; border-radius: 0.4em;">
|
|
<div class="ui basic advance segment" style="padding: 0.4em !important; border-radius: 0.4em;">
|
|
@@ -191,6 +195,7 @@
|
|
<label>Skip WebSocket Origin Check<br>
|
|
<label>Skip WebSocket Origin Check<br>
|
|
<small>Check this to allow cross-origin websocket requests</small></label>
|
|
<small>Check this to allow cross-origin websocket requests</small></label>
|
|
</div>
|
|
</div>
|
|
|
|
+ <br>
|
|
<button class="ui basic compact tiny button" style="margin-left: 0.4em; margin-top: 0.4em;" onclick="editCustomHeaders('${uuid}');"><i class="heading icon"></i> Custom Headers</button>
|
|
<button class="ui basic compact tiny button" style="margin-left: 0.4em; margin-top: 0.4em;" onclick="editCustomHeaders('${uuid}');"><i class="heading icon"></i> Custom Headers</button>
|
|
<!-- <button class="ui basic compact tiny button" style="margin-left: 0.4em; margin-top: 0.4em;" onclick="editLoadBalanceOptions('${uuid}');"><i class="blue server icon"></i> Load Balance</button> -->
|
|
<!-- <button class="ui basic compact tiny button" style="margin-left: 0.4em; margin-top: 0.4em;" onclick="editLoadBalanceOptions('${uuid}');"><i class="blue server icon"></i> Load Balance</button> -->
|
|
</div>
|
|
</div>
|
|
@@ -213,7 +218,10 @@
|
|
<label>Allow plain HTTP access<br>
|
|
<label>Allow plain HTTP access<br>
|
|
<small>Allow inbound connections without TLS/SSL</small></label>
|
|
<small>Allow inbound connections without TLS/SSL</small></label>
|
|
</div><br>
|
|
</div><br>
|
|
|
|
+ <button class="ui basic tiny button" style="margin-left: 0.4em; margin-top: 0.4em;" onclick="editAccessRule('${uuid}');"><i class="ui filter icon"></i> Edit Access Rule</button>
|
|
`);
|
|
`);
|
|
|
|
+
|
|
|
|
+ $(".hostAccessRuleSelector").dropdown();
|
|
}else{
|
|
}else{
|
|
//Unknown field. Leave it untouched
|
|
//Unknown field. Leave it untouched
|
|
}
|
|
}
|
|
@@ -277,6 +285,14 @@
|
|
showSideWrapper("snippet/basicAuthEditor.html?t=" + Date.now() + "#" + payload);
|
|
showSideWrapper("snippet/basicAuthEditor.html?t=" + Date.now() + "#" + payload);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ function editAccessRule(uuid){
|
|
|
|
+ let payload = encodeURIComponent(JSON.stringify({
|
|
|
|
+ ept: "host",
|
|
|
|
+ ep: uuid
|
|
|
|
+ }));
|
|
|
|
+ showSideWrapper("snippet/hostAccessEditor.html?t=" + Date.now() + "#" + payload);
|
|
|
|
+ }
|
|
|
|
+
|
|
function quickEditVdir(uuid){
|
|
function quickEditVdir(uuid){
|
|
openTabById("vdir");
|
|
openTabById("vdir");
|
|
$("#vdirBaseRoutingRule").parent().dropdown("set selected", uuid);
|
|
$("#vdirBaseRoutingRule").parent().dropdown("set selected", uuid);
|
|
@@ -313,6 +329,9 @@
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /* Access List handling */
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
//Bind on tab switch events
|
|
//Bind on tab switch events
|