mirror of https://github.com/PurpleI2P/i2pd.git
EinMByte
9 years ago
5 changed files with 212 additions and 1 deletions
@ -0,0 +1,66 @@
@@ -0,0 +1,66 @@
|
||||
<!DOCTYPE html> |
||||
<html lang="en"> |
||||
<head> |
||||
<title>Purple I2P 0.10.0 Webconsole</title> |
||||
<meta charset="utf-8"> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1"> |
||||
<link rel="stylesheet" href="css/main.css"> |
||||
<script type="text/javascript" src="javascript/I2PControl.js"></script> |
||||
<script type="text/javascript"> |
||||
function updateNetDbInfo(result, session) { |
||||
if(session.error) { |
||||
alert("Error: " + session.error["message"]); |
||||
return; |
||||
} |
||||
|
||||
var table = document.getElementById("tunnels").getElementsByTagName("tbody")[0]; |
||||
|
||||
for(id in result["i2p.router.net.tunnels.inbound.list"]) { |
||||
if(!result["i2p.router.net.tunnels.inbound.list"].hasOwnProperty(id)) |
||||
continue; |
||||
var tunnel = result["i2p.router.net.tunnels.inbound.list"][id]; |
||||
|
||||
var row = table.insertRow(table.rows.length); |
||||
row.insertCell(0).appendChild(document.createTextNode(id)); |
||||
row.insertCell(1).appendChild(document.createTextNode(tunnel["status"] ? tunnel["status"] : "running")); |
||||
row.insertCell(2).appendChild(document.createTextNode(tunnel["layout"])); |
||||
} |
||||
} |
||||
|
||||
function requestNetDbInfo(session) { |
||||
session.request("RouterInfo", { |
||||
"i2p.router.net.tunnels.inbound.list" : "", |
||||
}, updateNetDbInfo); |
||||
} |
||||
|
||||
window.onload = function() { |
||||
var session = new I2PControl.Session("itoopie"); |
||||
session.start(function() { requestNetDbInfo(session); }); |
||||
}; |
||||
</script> |
||||
</head> |
||||
|
||||
<body> |
||||
<div class="header"> |
||||
<h1>i2pd router console</h1> |
||||
<h2>Tunnel List</h2> |
||||
</div> |
||||
|
||||
<div class="content"> |
||||
|
||||
<table id="tunnels"> |
||||
<thead> |
||||
<th>Tunnel ID</th> |
||||
<th>Status</th> |
||||
<th>Overview</th> |
||||
</thead> |
||||
<tbody> |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
|
||||
<!--#include virtual="menu.html" --> |
||||
<!--#include virtual="footer.html" --> |
||||
|
||||
</body> |
||||
</html> |
Loading…
Reference in new issue