[FIX] JS compatible time field
This commit is contained in:
parent
77c6abed05
commit
db41c1a331
@ -704,6 +704,7 @@ class Statistics extends Base {
|
|||||||
$stmt = $this->mysqli->prepare("
|
$stmt = $this->mysqli->prepare("
|
||||||
SELECT
|
SELECT
|
||||||
timestamp,
|
timestamp,
|
||||||
|
FROM_UNIXTIME(timestamp, '%Y-%m-%d %T') AS time,
|
||||||
hashrate
|
hashrate
|
||||||
FROM " . $this->getUserStatsTableName() . "
|
FROM " . $this->getUserStatsTableName() . "
|
||||||
WHERE
|
WHERE
|
||||||
@ -727,6 +728,7 @@ class Statistics extends Base {
|
|||||||
$stmt = $this->mysqli->prepare("
|
$stmt = $this->mysqli->prepare("
|
||||||
SELECT
|
SELECT
|
||||||
timestamp,
|
timestamp,
|
||||||
|
FROM_UNIXTIME(timestamp, '%Y-%m-%d %T') AS time,
|
||||||
SUM(hashrate) AS hashrate
|
SUM(hashrate) AS hashrate
|
||||||
FROM " . $this->getUserStatsTableName() . "
|
FROM " . $this->getUserStatsTableName() . "
|
||||||
GROUP BY timestamp");
|
GROUP BY timestamp");
|
||||||
|
|||||||
@ -13,7 +13,7 @@ $(function () {
|
|||||||
// ID of the element in which to draw the chart.
|
// ID of the element in which to draw the chart.
|
||||||
element: 'mine-area-chart',
|
element: 'mine-area-chart',
|
||||||
data: {$YOURHASHRATES},
|
data: {$YOURHASHRATES},
|
||||||
xkey: 'timestamp',
|
xkey: 'time',
|
||||||
ykeys: ['hashrate'],
|
ykeys: ['hashrate'],
|
||||||
labels: ['Hashrate'],
|
labels: ['Hashrate'],
|
||||||
pointSize: 2,
|
pointSize: 2,
|
||||||
@ -29,7 +29,7 @@ $(function () {
|
|||||||
// ID of the element in which to draw the chart.
|
// ID of the element in which to draw the chart.
|
||||||
element: 'pool-area-chart',
|
element: 'pool-area-chart',
|
||||||
data: {$POOLHASHRATES},
|
data: {$POOLHASHRATES},
|
||||||
xkey: 'timestamp',
|
xkey: 'time',
|
||||||
ykeys: ['hashrate'],
|
ykeys: ['hashrate'],
|
||||||
labels: ['Hashrate'],
|
labels: ['Hashrate'],
|
||||||
pointSize: 2,
|
pointSize: 2,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user