|
@@ -72,6 +72,10 @@
|
|
<Br>
|
|
<Br>
|
|
<button id="startbtn" class="ui teal button" onclick="startService();">Start Service</button>
|
|
<button id="startbtn" class="ui teal button" onclick="startService();">Start Service</button>
|
|
<button id="stopbtn" class="ui red disabled button" onclick="stopService();">Stop Service</button>
|
|
<button id="stopbtn" class="ui red disabled button" onclick="stopService();">Stop Service</button>
|
|
|
|
+<div id="rploopbackWarning" class="ui segment" style="display:none;">
|
|
|
|
+ <b><i class="yellow warning icon"></i> Loopback Routing Warning</b><br>
|
|
|
|
+ <small>This management interface is a loopback proxied service. <br>If you want to shutdown the reverse proxy server, please remove the proxy rule for the management interface and refresh.</small>
|
|
|
|
+</div>
|
|
<div id="statusErrmsg" class="ui red message" style="display: none;"></div>
|
|
<div id="statusErrmsg" class="ui red message" style="display: none;"></div>
|
|
<div class="ui divider"></div>
|
|
<div class="ui divider"></div>
|
|
<div class="ui two column stackable grid">
|
|
<div class="ui two column stackable grid">
|
|
@@ -107,12 +111,26 @@
|
|
<br>
|
|
<br>
|
|
<button class="ui basic green button"><i class="refresh icon"></i> Refresh</button>
|
|
<button class="ui basic green button"><i class="refresh icon"></i> Refresh</button>
|
|
<script>
|
|
<script>
|
|
|
|
+ let loopbackProxiedInterface = false;
|
|
|
|
+ //Initial the start stop button if this is reverse proxied
|
|
|
|
+ $.get("/api/proxy/requestIsProxied", function(data){
|
|
|
|
+ if (data == true){
|
|
|
|
+ //This management interface is reverse proxied by itself
|
|
|
|
+ //do not allow turning off the proxy
|
|
|
|
+ $("#stopbtn").addClass("disabled");
|
|
|
|
+ loopbackProxiedInterface = true;
|
|
|
|
+ $("#rploopbackWarning").show();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
//Get the latest server status from proxy server
|
|
//Get the latest server status from proxy server
|
|
function initRPStaste(){
|
|
function initRPStaste(){
|
|
$.get("/api/proxy/status", function(data){
|
|
$.get("/api/proxy/status", function(data){
|
|
if (data.Running == true){
|
|
if (data.Running == true){
|
|
$("#startbtn").addClass("disabled");
|
|
$("#startbtn").addClass("disabled");
|
|
- $("#stopbtn").removeClass("disabled");
|
|
|
|
|
|
+ if (!loopbackProxiedInterface){
|
|
|
|
+ $("#stopbtn").removeClass("disabled");
|
|
|
|
+ }
|
|
$("#serverstatus").addClass("green");
|
|
$("#serverstatus").addClass("green");
|
|
$("#statusTitle").text("Online");
|
|
$("#statusTitle").text("Online");
|
|
$("#statusText").text("Serving request on port: " + data.Option.Port);
|
|
$("#statusText").text("Serving request on port: " + data.Option.Port);
|