Navigation Menu

Skip to content

Commit

Permalink
fix sharerate precision and reduce graphics page size
Browse files Browse the repository at this point in the history
  • Loading branch information
r4sas committed May 12, 2018
1 parent e09db5c commit 30668ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/classes/statistics.class.php
Expand Up @@ -470,7 +470,7 @@ public function fetchAllUserMiningStats($interval=180) {
a.username AS account,
COUNT(DISTINCT t1.username) AS workers,
IFNULL(SUM(t1.difficulty), 0) AS shares,
ROUND(SUM(t1.difficulty) / ?, 2) AS sharerate,
ROUND(SUM(t1.difficulty) / ?, " . $this->coin->getShareDifficultyPrecision() . ") AS sharerate,
IFNULL(AVG(IF(difficulty=0, pow(2, (" . $this->config['difficulty'] . " - 16)), difficulty)), 0) AS avgsharediff
FROM (
SELECT
Expand Down
7 changes: 4 additions & 3 deletions templates/bootstrap/statistics/graphs/default.tpl
@@ -1,8 +1,9 @@
<script>
$(function () {
var miningstats = {$YOURMININGSTATS nofilter};
var hashChart = Morris.Line({
element: 'hashrate-area-chart',
data: {$YOURMININGSTATS nofilter},
data: miningstats,
xkey: 'time',
ykeys: ['hashrate'],
labels: ['Hashrate'],
Expand All @@ -17,7 +18,7 @@ $(function () {
var workersChart = Morris.Line({
element: 'workers-area-chart',
data: {$YOURMININGSTATS nofilter},
data: miningstats,
xkey: 'time',
ykeys: ['workers'],
labels: ['Workers'],
Expand All @@ -32,7 +33,7 @@ $(function () {
var shareCharts= Morris.Line({
element: 'sharerate-area-chart',
data: {$YOURMININGSTATS nofilter},
data: miningstats,
xkey: 'time',
ykeys: ['sharerate'],
labels: ['Sharerate'],
Expand Down

0 comments on commit 30668ed

Please sign in to comment.