diff options
author | Kristian Lyngstol <kly@kly.no> | 2016-03-31 20:44:38 +0200 |
---|---|---|
committer | Kristian Lyngstol <kly@kly.no> | 2016-03-31 20:44:38 +0200 |
commit | 51e9872f4ac5db633c12862dec951e0b91b1b132 (patch) | |
tree | ff156c63ba964357e955bfcf4634f0d02ea12609 /web/nms.gathering.org/api | |
parent | 37d9d6b9d78fcda093dfc37dc36ed8eb0eb09cd2 (diff) |
NMS: Fix historic review, part one
The actual replay might still be bugged, but fixed-point review works.
Diffstat (limited to 'web/nms.gathering.org/api')
-rwxr-xr-x | web/nms.gathering.org/api/public/ping | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/web/nms.gathering.org/api/public/ping b/web/nms.gathering.org/api/public/ping index 5d1037c..811708d 100755 --- a/web/nms.gathering.org/api/public/ping +++ b/web/nms.gathering.org/api/public/ping @@ -6,7 +6,7 @@ use nms::web; nms::web::setwhen('15s'); -my $q = $nms::web::dbh->prepare("SELECT DISTINCT ON (sysname) (now() - time) as age,sysname, latency_ms FROM ping NATURAL JOIN switches WHERE time in (select max(time) from ping where " +my $q = $nms::web::dbh->prepare("SELECT DISTINCT ON (sysname) (" . $nms::web::now . " - time) as age,sysname, latency_ms FROM ping NATURAL JOIN switches WHERE time in (select max(time) from ping where " . $nms::web::when . " group by switch)"); $q->execute(); |