forked from dvandal/cryptonote-nodejs-pool
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathadmin.html
117 lines (98 loc) · 3.82 KB
/
admin.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
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1">
<title>Mining Pool Admin Panel</title>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-timeago/1.6.3/jquery.timeago.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.3.0/handlebars.min.js"></script>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<link href="//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
</head>
<body>
<div id="wrapper">
<!-- Navigation -->
<div class="nav-side-menu">
<div class="brand"><a href="/">Admin Panel</a></div>
<i class="fa fa-bars fa-2x toggle-btn" data-toggle="collapse" data-target="#menu-content"></i>
<div class="menu-list">
<ul id="menu-content" class="menu-content collapsed out">
<li><a class="hot_link" data-page="admin/statistics.html" href="#">
<i class="fa fa-bar-chart-o"></i> Statistics
</a></li>
<li><a class="hot_link" data-page="admin/monitoring.html" href="#monitoring">
<i class="fa fa-eye"></i> Monitoring
</a></li>
<li><a class="hot_link" data-page="admin/userslist.html" href="#users_list">
<i class="fa fa-users"></i> Users List
</a></li>
<li><a class="hot_link" data-page="admin/ports.html" href="#ports">
<i class="fa fa-link"></i> Ports Usage
</a></li>
<li><a class="hot_link" data-page="admin/tools.html" href="#tools">
<i class="fa fa-gears"></i> Tools
</a></li>
<li class="sign-out"><a class="hot_link" href="/">
<i class="fa fa-sign-out"></i> Return to Pool
</a></li>
</ul>
</div>
</div>
<!-- Page content -->
<div id="page-wrapper">
<div id="page"></div>
<p id="loading" class="text-center"><i class="fa fa-circle-o-notch fa-spin"></i></p>
</div>
</div>
<!-- Footer -->
<footer>
<div class="text-muted">
Powered by <a target="_blank" href="https://github.com/dvandal/cryptonote-nodejs-pool"><i class="fa fa-github"></i> cryptonote-nodejs-pool</a>
<span id="poolVersion"></span>
<span class="hidden-xs">open sourced under the <a href="http://www.gnu.org/licenses/gpl-2.0.html">GPL</a></span>
</div>
</footer>
<!-- Javascript -->
<script src="config.js"></script>
<script src="js/common.js"></script>
<script>
// Fetch pool statistics
lastStats = {};
$(function() {
$.get(api + '/stats', function(data) {
lastStats = data;
$('#poolVersion').html(lastStats.config.version);
routePage();
});
});
function fetchLiveStats() {
$.ajax({
url: api + '/live_stats',
dataType: 'json',
cache: 'false'
}).done(function(data) {
if(currentPage.update) {
currentPage.update();
}
}).always(function() {
fetchLiveStats();
});
}
// Render template function
function renderTemplate(usersData, templateId, view) {
var source = $(templateId).html(),
template = Handlebars.compile(source),
context = usersData,
html = template(context);
$(view).html(html);
}
// Initialize
$(function(){
$("head").append("<link rel='stylesheet' href=" + themeCss + ">");
$("head").append("<link rel='stylesheet' href=themes/admin.css>");
});
</script>
</body>
</html>