- edited description
Statistics Graph showing up empty
Hi!
I see this has been reported already a couple of times, but didn’t come to a conclusion…
I just started out testing “piler” for a couple of days (compiled piler 1.3.7 / Ubuntu 18.04), but as of right now about 500 emails already have been archived.
The table counter_stats is fully populated and the data is shown via route=accounting/accounting&view=email as well. The graph route=stat/stat×pan=daily (and monthly as well) however is empty.
Running /usr/bin/php /usr/local/libexec/piler/generate_stats.php -a --webui /var/piler/www/ manually as the user piler always gives me something like:
Finished Executing Statistics Generation
Start Date: 2019.11.11
Stop Date: 2019.11.12
Removed 14 records
Added 14 records
Completed Run in 0.021323919296265 seconds
I think the query responsible for the graph is not correct - maybe some leftover function?
--- /var/piler/www/model/stat/chart.php.old 2019-11-12 12:33:35.518894207 +0100
+++ /var/piler/www/model/stat/chart.php 2019-11-12 12:33:21.378860361 +0100
@@ -43,9 +43,9 @@
if($q) { $q .= ",?"; } else { $q = "?"; }
}
reset($auditdomains);
- $query = $this->db->query("select ANY_VALUE(arrived-(arrived%$delta)) as ts, count(*) as num from " . VIEW_MESSAGES . " where arrived > $range AND todomain IN ($q) $domains $grouping ORDER BY ts DESC limit $limit", $auditdomains);
+ $query = $this->db->query("select (arrived-(arrived%$delta)) as ts, count(*) as num from " . VIEW_MESSAGES . " where arrived > $range AND todomain IN ($q) $domains $grouping ORDER BY ts DESC limit $limit", $auditdomains);
} else {
- $query = $this->db->query("select ANY_VALUE(arrived-(arrived%$delta)) as ts, count(*) as num from " . TABLE_META . " where arrived > $range $grouping ORDER BY ts DESC limit $limit");
+ $query = $this->db->query("select (arrived-(arrived%$delta)) as ts, count(*) as num from " . TABLE_META . " where arrived > $range $grouping ORDER BY ts DESC limit $limit");
}
Comments (3)
-
Account Deleted reporter -
Account Deleted reporter - edited description
-
repo owner - changed status to resolved
Thanks for the fix. I’ve committed it to the master branch.
- Log in to comment