Skip to content

Commit 30668ed

Browse files
committed
fix sharerate precision and reduce graphics page size
1 parent e09db5c commit 30668ed

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

include/classes/statistics.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ public function fetchAllUserMiningStats($interval=180) {
470470
a.username AS account,
471471
COUNT(DISTINCT t1.username) AS workers,
472472
IFNULL(SUM(t1.difficulty), 0) AS shares,
473-
ROUND(SUM(t1.difficulty) / ?, 2) AS sharerate,
473+
ROUND(SUM(t1.difficulty) / ?, " . $this->coin->getShareDifficultyPrecision() . ") AS sharerate,
474474
IFNULL(AVG(IF(difficulty=0, pow(2, (" . $this->config['difficulty'] . " - 16)), difficulty)), 0) AS avgsharediff
475475
FROM (
476476
SELECT

templates/bootstrap/statistics/graphs/default.tpl

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<script>
22
$(function () {
3+
var miningstats = {$YOURMININGSTATS nofilter};
34
var hashChart = Morris.Line({
45
element: 'hashrate-area-chart',
5-
data: {$YOURMININGSTATS nofilter},
6+
data: miningstats,
67
xkey: 'time',
78
ykeys: ['hashrate'],
89
labels: ['Hashrate'],
@@ -17,7 +18,7 @@ $(function () {
1718
1819
var workersChart = Morris.Line({
1920
element: 'workers-area-chart',
20-
data: {$YOURMININGSTATS nofilter},
21+
data: miningstats,
2122
xkey: 'time',
2223
ykeys: ['workers'],
2324
labels: ['Workers'],
@@ -32,7 +33,7 @@ $(function () {
3233
3334
var shareCharts= Morris.Line({
3435
element: 'sharerate-area-chart',
35-
data: {$YOURMININGSTATS nofilter},
36+
data: miningstats,
3637
xkey: 'time',
3738
ykeys: ['sharerate'],
3839
labels: ['Sharerate'],

0 commit comments

Comments
 (0)