forked from Bendr0id/xmrigCC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
782 lines (684 loc) · 32.3 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
<!DOCTYPE html>
<html lang=\"en\" xmlns="http://www.w3.org/1999/html">
<head>
<meta charset=\"utf-8\">
<title>XMRigCC Dashboard</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.16/css/dataTables.bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/1.5.0/css/buttons.bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/select/1.2.5/css/select.dataTables.min.css">
<link href="https://gitcdn.github.io/bootstrap-toggle/2.2.2/css/bootstrap-toggle.min.css" rel="stylesheet">
<link rel="shortcut icon" href="https://root.graef.in:8443/static/xmrigcc/favicon.ico">
<style>
.right{text-align:right;}
.left{text-align:left;}
.center{text-align:center; padding-bottom: 50pt}
.center-tab{text-align: center; vertical-align: middle;}
.online { color: green}
.offline { color: red}
.paused { color: yellow}
.toggle { border-radius: 2px;}
.toggle .toggle-handle { border-radius: 2px; }
form label
{
display:block;
margin-bottom: 5px;
text-align: left;
}
form label span {
display:inline-block;
margin-left: .5rem;
text-align: left;
}
form label input {
vertical-align: top;
}
</style>
<script type="text/javascript" language="javascript" src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script type="text/javascript" language="javascript" src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" language="javascript" src="https://cdn.datatables.net/1.10.16/js/dataTables.bootstrap.min.js"></script>
<script type="text/javascript" language="javascript" src="https://cdn.datatables.net/buttons/1.5.0/js/dataTables.buttons.min.js"></script>
<script type="text/javascript" language="javascript" src="https://cdn.datatables.net/buttons/1.5.0/js/buttons.bootstrap.min.js"></script>
<script type="text/javascript" language="javascript" src="https://cdn.datatables.net/select/1.2.4/js/dataTables.select.min.js"></script>
<script type="text/javascript" language="javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-timeago/1.6.1/jquery.timeago.min.js"></script>
<script type="text/javascript" language="javascript" src="https://cdnjs.cloudflare.com/ajax/libs/numeral.js/2.0.6/numeral.min.js"></script>
<script src="https://gitcdn.github.io/bootstrap-toggle/2.2.2/js/bootstrap-toggle.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://use.fontawesome.com/6b3cdfc597.js"></script>
<script type="text/javascript">
var TRESHOLD_IN_MS = 60 * 1000;
var RELOAD_INTERVAL_IN_MS = 10 * 1000;
var latestRelease = "";
var currentServerTime = 0;
var clockDrift = 0;
$.fn.dataTable.ext.search.push(
function( settings, data, dataIndex ) {
var hideOffline = $('#hideOffline').prop('checked');
var showNotification = $('#showOfflineNotification').prop('checked');
var clientId = settings.aoData[dataIndex]._aData.client_status.client_id;
var lastStatus = settings.aoData[dataIndex]._aData.client_status.last_status_update * 1000;
var online = isOnline(lastStatus);
if (!online) {
var threshold = currentServerTime - (TRESHOLD_IN_MS + RELOAD_INTERVAL_IN_MS);
if (lastStatus > threshold && showNotification) {
$("#notificationBar").after('<div class="alert alert-danger alert-dismissable fade in">' +
'<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>' +
'<strong>Miner ' + clientId + ' just went offline!</strong> Last update: ' + new Date(lastStatus) +
'</div>');
}
}
return (online || !hideOffline);
}
);
$(document).ready(function() {
var table = $('#clientStatusList').DataTable({
dom: "<'row'<'col-sm-9'B><'col-sm-3'f>><'row'<'col-sm-12't>><'row'<'col-sm-4'i><'col-sm-8'<'#serverTime'>>>",
bPaginate: false,
ajax: {
url: "/admin/getClientStatusList",
dataSrc: 'client_status_list'
},
deferRender: true,
columns: [
{
data: null,
defaultContent: '',
className: 'select-checkbox',
orderable: false
},
{data: "client_status.client_id", render: clientInfo},
{data: "client_status.current_pool"},
{data: "client_status.current_status", render: clientStatus},
{data: "client_status.current_algo_name", render: algoAndPowVariantName},
{data: "client_status.hashrate_short", render: round, className: "right"},
{data: "client_status.hashrate_medium", render: round, className: "right"},
{data: "client_status.hashrate_long", render: round, className: "right"},
{data: "client_status.hashrate_highest", render: round, className: "right"},
{data: "client_status.hashes_total", className: "right"},
{data: "client_status.avg_time", className: "right"},
{data: "client_status.shares_good", className: "right"},
{data: "client_status.shares_total", className: "right"},
{data: "client_status.uptime", render: uptime, className: "right"},
{data: "client_status.last_status_update", render: laststatus},
{
data: null,
defaultContent:
"<td class='center-tab'><button type='button' id='LOG' class='btn btn-xs btn-info' data-toggle='tooltip' title='View miner log'><i class='fa fa-file-text-o'></i></button></td>",
orderable: false,
className: "center-tab"
},
{
data: null,
defaultContent:
"<td class='center-tab'><button type='button' id='EDIT' class='btn btn-xs btn-primary' data-toggle='tooltip' title='Edit miner config'><i class='fa fa-edit'></i></button></td>",
orderable: false,
className: "center-tab"
}
],
rowId: 'client_status.client_id',
select: {
style: "multi+shift"
},
order: [1, 'asc'],
lengthChange: false,
buttons: [
{
text: '<i class="fa fa-download"> Pull miner config</i>',
className: 'btn-default',
enabled: false,
enabled: false,
action: function () {
table.rows({selected: true}).eq(0).each(function (index) {
var row = table.row(index);
var data = row.data();
sendAction("PUBLISH_CONFIG", data.client_status.client_id);
});
}
},
{
text: '<i class="fa fa-upload"> Push miner config</i>',
className: 'btn-primary',
enabled: false,
action: function () {
table.rows({selected: true}).eq(0).each(function (index) {
var row = table.row(index);
var data = row.data();
sendAction("UPDATE_CONFIG", data.client_status.client_id);
});
}
},
{
text: '<i class="fa fa-play"> Start miner</i>',
className: 'btn-success',
enabled: false,
action: function () {
table.rows({selected: true}).eq(0).each(function (index) {
var row = table.row(index);
var data = row.data();
sendAction("START", data.client_status.client_id);
});
}
},
{
text: '<i class="fa fa-pause"> Pause miner</i>',
className: 'btn-warning',
enabled: false,
action: function () {
table.rows({selected: true}).eq(0).each(function (index) {
var row = table.row(index);
var data = row.data();
sendAction("STOP", data.client_status.client_id);
});
}
},
{
text: '<i class="fa fa-repeat"> Restart miner</i>',
className: 'btn-info',
enabled: false,
action: function () {
table.rows({selected: true}).eq(0).each(function (index) {
var row = table.row(index);
var data = row.data();
sendAction("RESTART", data.client_status.client_id);
});
}
},
{
text: '<i class="fa fa-power-off"> Shutdown miner</i>',
className: 'btn-danger',
enabled: false,
action: function () {
table.rows({selected: true}).eq(0).each(function (index) {
var row = table.row(index);
var data = row.data();
sendAction("SHUTDOWN", data.client_status.client_id);
});
}
},
{
text: '<i class="fa fa-edit"> Multi miner editor</i>',
className: 'btn-primary',
enabled: false,
action: function () {
$('#multiMinerEditor').modal('show');
}
}
],
"footerCallback": function (row, data, start, end, display) {
var api = this.api();
var sumHashrateShort = 0;
var sumHashrateMedium = 0;
var sumHashrateLong = 0;
var sumHashrateHighest = 0;
var sumHashesTotal = 0;
var avgTimeTotal = 0;
var sumSharesGood = 0;
var sumSharedTotal = 0;
sumHashrateShort = api
.column(5, {page: 'current'})
.data()
.reduce(function (a, b) {
return a + b;
}, 0);
sumHashrateMedium = api
.column(6, {page: 'current'})
.data()
.reduce(function (a, b) {
return a + b;
}, 0);
sumHashrateLong = api
.column(7, {page: 'current'})
.data()
.reduce(function (a, b) {
return a + b;
}, 0);
sumHashrateHighest = api
.column(8, {page: 'current'})
.data()
.reduce(function (a, b) {
return a + b;
}, 0);
sumHashesTotal = api
.column(9, {page: 'current'})
.data()
.reduce(function (a, b) {
return a + b;
}, 0);
avgTimeTotal = api
.column(10, {page: 'current'})
.data()
.reduce(function (a, b) {
return (a + b) / 2;
}, 0);
sumSharesGood = api
.column(11, {page: 'current'})
.data()
.reduce(function (a, b) {
return a + b;
}, 0);
sumSharedTotal = api
.column(12, {page: 'current'})
.data()
.reduce(function (a, b) {
return a + b;
}, 0);
sumHashrateShort = round(sumHashrateShort);
sumHashrateMedium = round(sumHashrateMedium);
sumHashrateLong = round(sumHashrateLong);
sumHashrateHighest = round(sumHashrateHighest);
avgTimeTotal = round(avgTimeTotal);
// update footer
$(api.column(5).footer()).html(sumHashrateShort);
$(api.column(6).footer()).html(sumHashrateMedium);
$(api.column(7).footer()).html(sumHashrateLong);
$(api.column(8).footer()).html(sumHashrateHighest);
$(api.column(9).footer()).html(sumHashesTotal);
$(api.column(10).footer()).html(avgTimeTotal);
$(api.column(11).footer()).html(sumSharesGood);
$(api.column(12).footer()).html(sumSharedTotal);
}
});
table.on('xhr.dt', function ( e, settings, json, xhr ) {
// check version
if (latestRelease === "" && json !== undefined) {
$.ajax({
url: "https://api.github.com/repos/Bendr0id/xmrigCC/releases/latest",
type: 'GET',
dataType: "json",
success: function (release) {
latestRelease = release.tag_name
latestVersion = parseInt(release.tag_name.split('.').join(""));
currentVersion = parseInt(json.current_version.split('.').join(""));
if (latestVersion > currentVersion) {
$("#updateNotificationBar").html('<div class="alert alert-info alert-dismissable fade in">' +
'<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>' +
'<a href="https://github.com/Bendr0id/xmrigCC/releases/latest"><strong>Update!</strong> XMRigCC v' + latestRelease + ' is available for download\n</a>' +
'</div>');
}
}
});
}
currentServerTime = settings.json.current_server_time * 1000;
clockDrift = new Date().getTime() - currentServerTime;
$('#serverTime').html("<div class='dataTables_info text-right'>" + new Date(currentServerTime) + "</div>");
});
table.on('select', function () {
var selectedRows = table.rows({selected: true}).count();
table.button(0).enable(selectedRows > 0);
table.button(1).enable(selectedRows > 0);
table.button(2).enable(selectedRows > 0);
table.button(3).enable(selectedRows > 0);
table.button(4).enable(selectedRows > 0);
table.button(5).enable(selectedRows > 0);
table.button(6).enable(selectedRows > 0);
});
table.on('deselect', function () {
var selectedRows = table.rows({selected: true}).count();
table.button(0).enable(selectedRows > 0);
table.button(1).enable(selectedRows > 0);
table.button(2).enable(selectedRows > 0);
table.button(3).enable(selectedRows > 0);
table.button(4).enable(selectedRows > 0);
table.button(5).enable(selectedRows > 0);
table.button(6).enable(selectedRows > 0);
});
table.buttons().container().appendTo('#clientStatusList_wrapper .col-sm-6:eq(0)');
$('#hideOffline').change(function() {
table.draw();
});
$('#resetClientStatusList').click(function() {
resetClientStatusList();
});
$('#clientStatusList tbody ').on( 'click', 'button#EDIT', function () {
var data = table.row( $(this).parents('tr') ).data();
var clientId = data['client_status']['client_id'];
$.ajax({
type: "GET",
url: "/admin/getClientConfig?clientId=" + clientId,
dataType:"json",
success: function(jsonClientConfig) {
var htmlContent = "<div class='form-group' id='editor' data-value='" + clientId + "'>" +
"<label for='config'>Config for: " + clientId + "</label>"+
"<textarea class='form-control' rows='20' id='config'>" +
JSON.stringify(jsonClientConfig,undefined, 2) +
"</textarea>" +
"</div>";
$('#minerEditor').find('.modal-body').html(htmlContent);
$('#minerEditor').modal('show');
},
error: function (data) {
setError('<strong>Unable to fetch ' + clientId + '_config.json</strong> - Please make sure that you pulled the config before!');
}
});
});
$('#minerEditorSave').click(function(event) {
var clientId = $('#minerEditor').find('.form-group')["0"].dataset.value;
var clientConfig = $('#config').val();
setClientConfig(clientId, clientConfig);
});
$('#clientStatusList tbody').on( 'click', 'button#LOG', function () {
var data = table.row( $(this).parents('tr') ).data();
var clientId = data['client_status']['client_id'];
var clientIp = data['client_status']['external_ip'];
var log = data['client_status']['log'];
var htmlContent = "<div class='form-group' id='viewer' data-value='" + clientId + "'>" +
"<label for='config'>Log of: " + clientId + " (" + clientIp + ")</label>"+
"<textarea class='form-control' rows='20' id='log'>" + log + "</textarea>" +
"</div>";
$('#minerLog').find('.modal-body').html(htmlContent);
$('#minerLog').modal('show');
});
$('#minerLogRefresh').click(function(event) {
var clientId = $('#minerLog').find('.form-group')["0"].dataset.value;
table.rows().eq(0).each(function (index) {
var row = table.row(index);
var data = row.data();
if (clientId === data.client_status.client_id) {
$('#log').val(data.client_status.log);
}
});
});
$('#multiMinerEditorReplace').click(function(event) {
table.rows({ selected: true }).eq(0).each(function (index) {
var row = table.row(index);
var data = row.data();
var clientId = data['client_status']['client_id'];
var search = $('#search').val();
var replacement = $('#replacement').val();
$.ajax({
type: "GET",
url: "/admin/getClientConfig?clientId=" + clientId,
dataType:"json",
success: function(jsonClientConfig) {
jsonClientConfig = JSON.stringify(jsonClientConfig,undefined, 2);
jsonClientConfig = jsonClientConfig.replace(new RegExp(search.trim(), 'g'), replacement.trim()).trim();
setClientConfig(clientId, jsonClientConfig);
},
error: function (data) {
setError('<strong>Unable to fetch ' + clientId + '_config.json</strong> - Please make sure that you pulled the config before!');
}
});
});
});
$('#selectAllTop,#selectAllBottom').click( function() {
if ($("#selectAllTop").hasClass("fa fa-square-o")) {
$("#selectAllTop").removeClass("fa fa-square-o").addClass("fa fa-check-square-o");
$("#selectAllBottom").removeClass("fa fa-square-o").addClass("fa fa-check-square-o");
table.rows().select();
} else {
$("#selectAllTop").removeClass("fa fa-check-square-o").addClass("fa fa-square-o");
$("#selectAllBottom").removeClass("fa fa-check-square-o").addClass("fa fa-square-o");
table.rows().deselect();
}
});
setInterval(function () {
table.ajax.reload();
}, RELOAD_INTERVAL_IN_MS);
});
function sendAction(action, clientId) {
$.ajax({
type: "POST",
url: "/admin/setClientCommand?clientId=" + clientId,
dataType:"text",
data: '{"control_command":{"command": "' + action + '"}}',
success: function(data){
setSuccess('<strong>Successfully send ' + action + ' to ' + clientId +'</strong> - It can take up to 30s until the command is processed.');
},
error: function (data) {
setError('<strong>Failed to send ' + action + ' to ' + clientId + '</strong> \nError: ' + JSON.stringify(data,undefined, 2));
}
});
}
function resetClientStatusList() {
$.ajax({
type: "POST",
url: "/admin/resetClientStatusList",
dataType:"text",
data: '',
success: function(data){
setSuccess('<strong>Successfully send the reset client status list request to the Server.</strong> - Now just wait for the next refresh.');
},
error: function (data) {
setError('<strong>Failed to send the reset client status list request to the Server.</strong> \nError: ' + JSON.stringify(data,undefined, 2));
}
});
}
function uptime( data, type, row ) {
if (type !== 'sort') {
var lastStatus = row.client_status.last_status_update * 1000;
if (isOnline(lastStatus)) {
return numeral(data/1000).format('00:00:00:00');
} else {
return "";
}
}
return data;
}
function laststatus( data, type, row ) {
if (type !== 'sort') {
var date = new Date(data*1000 - clockDrift);
return '<span data-toggle="tooltip" title="' + date + '">' + jQuery.timeago(date) + '</span>';
}
return data;
}
function algoAndPowVariantName( data, type, row ) {
var algo = row.client_status.current_algo_name;
var powVariant = row.client_status.current_pow_variant_name;
if (powVariant !== "") {
return algo + " / " + powVariant
}
else {
return algo;
}
}
function clientStatus( data, type, row ) {
var lastStatus = row.client_status.last_status_update * 1000;
if (isOnline(lastStatus)) {
return data;
} else {
return "OFFLINE";
}
}
function clientInfo( data, type, row ) {
if (type !== 'sort') {
var lastStatus = row.client_status.last_status_update * 1000;
var online = isOnline(lastStatus);
var tooltip = "CPU: " + row.client_status.cpu_brand + " (" + row.client_status.cpu_sockets + ") [" + row.client_status.cpu_cores + " cores / " + row.client_status.cpu_threads + " threads]";
tooltip += '\n';
tooltip += "CPU Flags: " + (row.client_status.cpu_has_aes ? "AES-NI " : "");
tooltip += (row.client_status.cpu_is_x64 ? "x64" : "");
tooltip += '\n';
tooltip += "CPU Cache L2/L3: " + (row.client_status.cpu_l2 / 1024) + " MB/"+ (row.client_status.cpu_l3 / 1024) + " MB";
tooltip += '\n';
tooltip += "Huge Pages: " + (row.client_status.hugepages_available ? " available, " : " unavailable, ");
tooltip += (row.client_status.hugepages_enabled ? "enabled" : "disabled");
tooltip += '\n';
tooltip += "Used Threads: " + row.client_status.current_threads;
tooltip += (row.client_status.hash_factor > 1 ? " [" + row.client_status.hash_factor + "x multi hash mode]" :"");
tooltip += '\n';
tooltip += "Client IP: " + row.client_status.external_ip;
tooltip += '\n';
tooltip += "Version: " + row.client_status.version;
tooltip += '\n';
tooltip += "Status: " + online ? "Online" : "Offline";
if (online) {
return '<span data-toggle="tooltip" title="'+ tooltip + '"><div class="online">' + data + '</div></span>';
}
else {
return '<span data-toggle="tooltip" title="'+ tooltip + '"><div class="offline">' + data + '</div></span>';
}
}
return data;
}
function round( data, type, row ) {
return Math.round(data * 100) / 100;
}
function isOnline(lastStatus) {
var threshold = currentServerTime - TRESHOLD_IN_MS;
if (lastStatus > threshold) {
return true;
} else {
return false;
}
}
function setSuccess(info) {
$("#statusBar").after('<div class="alert alert-success" role="alert">' +
'<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>' +
info + '</div>');
window.setTimeout(function() {
$(".alert-success").fadeTo(500, 0).slideUp(500, function(){
$(".alert-success").alert('close');
});
}, 5000);
}
function setError(error) {
$("#statusBar").after('<div class="alert alert-danger" role="alert">' +
'<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>' +
error + '</div>');
window.setTimeout(function() {
$(".alert-danger").fadeTo(500, 0).slideUp(500, function(){
$(".alert-danger").alert('close');
});
}, 10000);
}
function setClientConfig(clientId, clientConfig) {
$.ajax({
url: "/admin/setClientConfig?clientId=" + clientId,
type: 'POST',
dataType: "text",
data: clientConfig,
success: function(data){
setSuccess('<strong>Successfully updated config for: ' + clientId + '</strong> - You need push the config to the miner to apply the config.');
},
error: function (data) {
setError('<strong>Failed to update config for: ' + clientId + '</strong> \nError: ' + JSON.stringify(data,undefined, 2));
}
});
}
</script>
</head>
<body>
<br/>
<div style="width: 95%; margin:0 auto;">
<div id="updateNotificationBar"></div>
<div id="notificationBar"></div>
<div id="statusBar"></div>
<div class="center">
<img src="https://root.graef.in:8443/static/xmrigcc/banner.png"/>
</div>
<form style="padding-bottom: 25px; margin-top: -50px">
<label><input id="hideOffline" type="checkbox" checked data-toggle="toggle" data-size="mini" data-onstyle="success" data-offstyle="danger"/><span>Hide offline miners</span></label>
<label><input id="showOfflineNotification" type="checkbox" checked data-toggle="toggle" data-size="mini" data-onstyle="success" data-offstyle="danger" /><span>Notify when miner went offline</span></label>
<br/><button id="resetClientStatusList" type="button" class="btn btn-danger fa fa-trash-o"> Reset ClientStatusList</button>
</form>
<table id="clientStatusList" class="table table-striped table-bordered" cellspacing="0" width="100%">
<thead>
<tr>
<th class="center" width="2%"><i class="fa fa-square-o" id="selectAllTop"></i></th>
<th>Miner Id</th>
<th>Pool</th>
<th>Status</th>
<th>Algo / PoW</th>
<th>Hashrate</th>
<th>Hashrate 1m</th>
<th>Hashrate 15m</th>
<th>Hashrate Highest</th>
<th>Hashes Total</th>
<th>Avg. Time</th>
<th>Shares Good</th>
<th>Shares Total</th>
<th>Uptime</th>
<th>Last Update</th>
<th>Log</th>
<th>Edit</th>
</tr>
</thead>
<tfoot>
<tr>
<th class="center" width="2%"><i class="fa fa-square-o" id="selectAllBottom"></i></th>
<th class="left">Total:</th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
</tr>
</tfoot>
</table>
<br/>
<div class="modal fade" id="minerEditor" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Miner editor</h4>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
<button id="minerEditorSave" type="button" class="btn btn-success" data-dismiss="modal">Save</button>
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="minerLog" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Miner log</h4>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
<button id="minerLogRefresh" type="button" class="btn btn-success">Refresh</button>
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="multiMinerEditor" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Multi miner editor</h4>
</div>
<div class="modal-body">
<div class="alert alert-danger fade in">
<strong>Warning!</strong> - If you don't know what you are doing, [Cancel].
</div>
<h5 class="modal-title">
This will search for <strong>"x"</strong> and replace with <strong>"y"</strong> in all selected miners config<br/><br/>
<div class="alert alert-info fade in">
<strong>If you accidentally pressed [Replace], no worries just PULL again all miner configs. Don't PUSH it!</strong>
</div>
</h5>
<div class='form-group'>
<label for='search'>Search for:</label>
<textarea class='form-control' rows='2' cols="1" id='search'></textarea>
<label for='replacement'>Replace with:</label>
<textarea class='form-control' rows='2' id='replacement'></textarea>
</div>
</div>
<div class="modal-footer">
<button id="multiMinerEditorReplace" type="button" class="btn btn-success" data-dismiss="modal">Replace</button>
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
</div>
</body>
</html>