diff --git a/README.md b/README.md index 23a250e5..298143f5 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Full Windows/Linux compatible, and you can mix Linux and Windows miner on one XM **XMRigCC Dashboard** - + **[Find HELP/HOWTO](https://github.com/Bendr0id/xmrigCC/wiki/)** diff --git a/index.html b/index.html index 152f35bb..d6ac0684 100644 --- a/index.html +++ b/index.html @@ -8,6 +8,7 @@ @@ -55,7 +56,77 @@ $(document).ready(function() { className: "center" } ], - order: [ 12, 'desc' ], + order: [ 0, 'asc' ], + + "footerCallback": function ( row, data, start, end, display ) { + var api = this.api(); + + sumHashrateShort = round(api + .column(4) + .data() + .reduce( function (a, b) { + return a + b; + }, 0 )); + + sumHashrateMedium = round(api + .column(5) + .data() + .reduce( function (a, b) { + return a + b; + }, 0 )); + + sumHashrateLong = round(api + .column(6) + .data() + .reduce( function (a, b) { + return a + b; + }, 0 )); + + sumHashrateHighest = round(api + .column(7) + .data() + .reduce( function (a, b) { + return a + b; + }, 0 )); + + sumHashesTotal = api + .column(8) + .data() + .reduce( function (a, b) { + return a + b; + }, 0 ); + + avgTimeTotal = api + .column(9) + .data() + .reduce( function (a, b) { + return a + b; + }, 0 )/end; + + sumSharesGood = api + .column(10) + .data() + .reduce( function (a, b) { + return a + b; + }, 0 ); + + sumSharedTotal = api + .column(11) + .data() + .reduce( function (a, b) { + return a + b; + }, 0 ); + + // Update footer + $( api.column(4).footer()).html(sumHashrateShort); + $( api.column(5).footer()).html(sumHashrateMedium); + $( api.column(6).footer()).html(sumHashrateLong); + $( api.column(7).footer()).html(sumHashrateHighest); + $( api.column(8).footer()).html(sumHashesTotal); + $( api.column(9).footer()).html(avgTimeTotal); + $( api.column(10).footer()).html(sumSharesGood); + $( api.column(11).footer()).html(sumSharedTotal); + } }); $('#clientStatusList tbody').on( 'click', 'button', function () { @@ -78,16 +149,24 @@ $(document).ready(function() { }); } else { - $.get("/admin/getClientConfig?clientId="+clientId, function (jsonClientConfig) { - var htmlContent = "
Client Id | +Pool | +Status | +Algo | + +Hashrate | +Hashrate 5m | +Hashrate 60m | + +Hashrate Highest | +Hashes Total | +Avg. Time | + +Shares Good | +Shares Total | +Last Update | +Action | +|||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Client Id | -Pool | -Status | -Algo | - -Hashrate | -Hashrate 5m | -Hashrate 60m | - -Hashrate Highest | -Hashes Total | -Avg. Time | - -Shares Good | -Shares Total | -Last Update | -Action | +Total: | ++ | + | + | + | + | + | + | + | + | + | + | + |