-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.html
121 lines (107 loc) · 5.09 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<!DOCTYPE html>
<html>
<head>
<title>I2Pd webUI 0.1a (demo)</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/html" id="home">
<%
switch(r["i2p.router.net.status"]) {
case 0: var status = "OK"; break;
case 1: var status = "TESTING"; break;
case 2: var status = "FIREWALLED"; break;
case 3: var status = "HIDDEN"; break;
case 4: var status = "WARN_FIREWALLED_AND_FAST"; break;
case 5: var status = "WARN_FIREWALLED_AND_FLOODFILL"; break;
case 6: var status = "WARN_FIREWALLED_WITH_INBOUND_TCP"; break;
case 7: var status = "WARN_FIREWALLED_WITH_UDP_DISABLED"; break;
case 8: var status = "ERROR_I2CP"; break;
case 9: var status = "ERROR_CLOCK_SKEW"; break;
case 10: var status = "ERROR_PRIVATE_TCP_ADDRESS"; break;
case 11: var status = "ERROR_SYMMETRIC_NAT"; break;
case 12: var status = "ERROR_UDP_PORT_IN_USE"; break;
case 13: var status = "ERROR_NO_ACTIVE_PEERS_CHECK_CONNECTION_AND_FIREWALL"; break;
case 14: var status = "ERROR_UDP_DISABLED_AND_TCP_UNSET"; break;
}
%>
<div class="header">
<h1>i2pd router console</h1>
<h2>Version: <%= r["i2p.router.version"] %>, uptime: <span id="uptime"></span></h2>
<h2>Network status: <%= status %></h2>
<p>
<button id="shutdown">shutdown</button> <button id="restart" disabled>restart</button>
<button id="reseed">reseed</button>
</p>
</div>
<div class="content">
<h2 class="content-subhead">Tunnels participating: <span id="tunnels-participating"></span></h2>
<h2 class="content-subhead">Active peers: <span id="activepeers"></span></h2>
<h2 class="content-subhead">Known peers: <span id="knownpeers"></span></h2>
<h2 class="content-subhead">Bandwidth:
in <span id="bw-in"></span> Bps /
out <span id="bw-out"></span> Bps
</h2>
</div>
</script>
<script type="text/html" id="config">
<div class="header">
<h1>I2P configuration</h1>
</div>
<div class="content">
<h2 class="content-subhead">Bandwidth</h2>
<p>
<form id="config-form">
<p><input name="bwin" type="text" value="<%= r["i2p.router.net.bw.in"] %>"> KBps In</p>
<p><input name="bwout" type="text" value="<%= r["i2p.router.net.bw.out"] %>"> KBps Out</p>
<button>save</button>
</form>
</p>
</div>
</script>
<script type="text/html" id="help">
<div class="header">
<h1>I2P help</h1>
</div>
<div class="content">
<h2 class="content-subhead">Need help? Join us at IRC: #i2pd-dev at irc.freenode.net</h2>
<h2 class="content-subhead"><a href="https://github.com/PurpleI2P/i2pd">i2pd at GitHub</a> </h2>
<h2 class="content-subhead"><a href="https://geti2p.net/en/">I2P Project</a> </h2>
</div>
</script>
</head>
<body>
<div id="layout">
<a href="#menu" id="menuLink" class="menu-link">
<span></span>
</a>
<div id="menu">
<div class="pure-menu">
<span class="pure-menu-heading">i2pd</span>
<ul class="pure-menu-list">
<li class="pure-menu-item"><a href="#/" class="pure-menu-link">Home</a></li>
<li class="pure-menu-item"><a href="#/config" class="pure-menu-link">Configure</a></li>
<li class="pure-menu-item"><a href="#/help" class="pure-menu-link">Help</a></li>
</ul>
</div>
</div>
<div id="main">
<noscript>
<div class="header"><h1>Please, enable JavaScript!</h1></div>
</noscript>
</div>
</div>
<script type="text/javascript" src="js/lib/underscore-min.js"></script>
<script type="text/javascript" src="js/functions.js"></script>
<script type="text/javascript" src="js/app.js"></script>
<script type="text/javascript">
/* Init Page */
window.addEventListener('hashchange', function(){
if (document.location.hash != "#menu") router();
});
window.addEventListener('load', function() {
app.init();
});
</script>
</body>
</html>