Skip to content
Permalink
Browse files

fixed # Nodes Chart and expanded to 60 days

  • Loading branch information...
flxn committed Apr 3, 2019
1 parent 88a7865 commit d3a6076fd1b9436c233b190c5f2746b7b0bfd410
Showing with 3 additions and 3 deletions.
  1. +1 −1 TRCStats.php
  2. +2 −2 index.php
@@ -12,7 +12,7 @@ function __construct()
public function getNodesOverTime($days = -1)
{
$data = array();
$limit = $days > 0 ? $days * 12 : -1;
$limit = $days > 0 ? $days + 1 : -1;
try {
$result = $this->db->query("
SELECT measured, count(*)
@@ -18,8 +18,8 @@
Flight::set('combinedUptime', round(intval(fgets($fh, 4069))/60/60) . 'h');
Flight::set('combinedBandwidth', round(intval(fgets($fh, 4069))*8/1000/1000) . 'Mb/s');
Flight::set('currentCommit', trim(exec('git log --pretty="%h" -n1 HEAD')));
Flight::set('bandwidthChartJson', json_encode($stats->getBandwidthOverTime(30)));
Flight::set('nodesChartJson', json_encode($stats->getNodesOverTime(30)));
Flight::set('bandwidthChartJson', json_encode($stats->getBandwidthOverTime(60)));
Flight::set('nodesChartJson', json_encode($stats->getNodesOverTime(60)));
fclose($fh);
}

0 comments on commit d3a6076

Please sign in to comment.
You can’t perform that action at this time.