Browse Source

(Graceful) restart and reseed buttons in webui.

pull/271/head
EinMByte 9 years ago
parent
commit
dbade8b569
  1. 15
      webui/index.html

15
webui/index.html

@ -44,6 +44,18 @@ function requestRouterInfo(session) { @@ -44,6 +44,18 @@ function requestRouterInfo(session) {
window.onload = function() {
var session = new I2PControl.Session("itoopie");
session.start(function() { requestRouterInfo(session); });
document.getElementById("shutdown").onclick = function() {
session.request("RouterManager", {"Shutdown" : ""}, function() {});
this.disabled = true;
};
document.getElementById("shutdown-graceful").onclick = function() {
session.request("RouterManager", {"ShutdownGraceful" : ""}, function() {});
this.disabled = true;
};
document.getElementById("reseed").onclick = function() {
session.request("RouterManager", {"Reseed" : ""}, function() {});
this.disabled = true;
};
};
</script>
@ -55,7 +67,8 @@ window.onload = function() { @@ -55,7 +67,8 @@ window.onload = function() {
<h2>Version: <span id="version"></span>, uptime: <span id="uptime"></span></h2>
<h2>Network status: <span id="status"></span></h2>
<p>
<button id="shutdown">shutdown</button>
<button id="shutdown-graceful">graceful shutdown</button>
<button id="shutdown">force shutdown</button>
<button id="restart" disabled>restart</button>
<button id="reseed">reseed</button>
</p>

Loading…
Cancel
Save