mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-13 01:20:22 +03:00
(Graceful) restart and reseed buttons in webui.
This commit is contained in:
parent
fbea1ea142
commit
dbade8b569
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user