(Graceful) restart and reseed buttons in webui.

This commit is contained in:
EinMByte 2015-09-17 23:18:31 +02:00
parent fbea1ea142
commit dbade8b569

View File

@ -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() {
<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>