diff --git a/public/include/pages/api/getdashboarddata.inc.php b/public/include/pages/api/getdashboarddata.inc.php index 98cbded1..eca64c3e 100644 --- a/public/include/pages/api/getdashboarddata.inc.php +++ b/public/include/pages/api/getdashboarddata.inc.php @@ -49,16 +49,17 @@ $dPersonalSharerate = $statistics->getUserSharerate($id, $interval); $statistics->setGetCache(true); // Apply pool modifiers -$dPersonalHashrate = $dPersonalHashrate * $dPersonalHashrateModifier; -$dPoolHashrate = $dPoolHashrate * $dPoolHashrateModifier; -$dNetworkHashrate = $dNetworkHashrate / 1000 * $dNetworkHashrateModifier; +$dPersonalHashrateAdjusted = $dPersonalHashrate * $dPersonalHashrateModifier; +$dPoolHashrateAdjusted = $dPoolHashrate * $dPoolHashrateModifier; +$dNetworkHashrateAdjusted = $dNetworkHashrate / 1000 * $dNetworkHashrateModifier; // Output JSON format echo json_encode(array($_REQUEST['action'] => array( 'runtime' => (microtime(true) - $dTimeStart) * 1000, - 'personal' => array ( 'hashrate' => $dPersonalHashrate, 'sharerate' => $dPersonalSharerate ), - 'pool' => array( 'hashrate' => $dPoolHashrate ), - 'network' => array( 'hashrate' => $dNetworkHashrate ), + 'raw' => array( 'personal' => array( 'hashrate' => $dPersonalHashrate ), 'pool' => array( 'hashrate' => $dPoolHashrate ), 'network' => array( 'hashrate' => $dNetworkHashrate / 1000 ) ), + 'personal' => array ( 'hashrate' => $dPersonalHashrateAdjusted, 'sharerate' => $dPersonalSharerate ), + 'pool' => array( 'hashrate' => $dPoolHashrateAdjusted ), + 'network' => array( 'hashrate' => $dNetworkHashrateAdjusted ), ))); // Supress master template diff --git a/public/templates/test/dashboard/default.tpl b/public/templates/test/dashboard/default.tpl index bf0918a8..f6d2adeb 100644 --- a/public/templates/test/dashboard/default.tpl +++ b/public/templates/test/dashboard/default.tpl @@ -3,4 +3,5 @@ {include file="dashboard/graph.tpl"} {include file="dashboard/default_$payout_system.tpl"} {include file="dashboard/gauges.tpl"} + {include file="dashboard/js.tpl"} {/if} diff --git a/public/templates/test/dashboard/gauges.tpl b/public/templates/test/dashboard/gauges.tpl index 77d4fef1..b2e69386 100644 --- a/public/templates/test/dashboard/gauges.tpl +++ b/public/templates/test/dashboard/gauges.tpl @@ -11,49 +11,3 @@ - - diff --git a/public/templates/test/dashboard/graph.tpl b/public/templates/test/dashboard/graph.tpl index 57711180..324c212e 100644 --- a/public/templates/test/dashboard/graph.tpl +++ b/public/templates/test/dashboard/graph.tpl @@ -1,70 +1,9 @@ - - - - - - -

Graphs

-
+
- - diff --git a/public/templates/test/dashboard/js.tpl b/public/templates/test/dashboard/js.tpl new file mode 100644 index 00000000..27c5dac0 --- /dev/null +++ b/public/templates/test/dashboard/js.tpl @@ -0,0 +1,102 @@ + + + + + + + + +