From 511a8e62e936b9d931079d9b79b346ab76315a91 Mon Sep 17 00:00:00 2001 From: osmarks Date: Sun, 25 Apr 2021 22:28:36 +0100 Subject: [PATCH] hotfix for new sites --- src/onstat.nim | 2 +- src/style.css | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/onstat.nim b/src/onstat.nim index 13e7334..7585e99 100644 --- a/src/onstat.nim +++ b/src/onstat.nim @@ -55,7 +55,7 @@ type proc fetchLatest(ctx: Ctx, row: ResultRow): Option[SiteStatus] = let weekAgo = getTime() + initTimeInterval(weeks= -1) - let (site, url, rollingTotalPings, rollingSuccessfulPings, rollingLatency, rollingDataSince) = row.unpack((int, string, int64, int64, int64, int64)) + let (site, url, rollingTotalPings, rollingSuccessfulPings, rollingLatency, rollingDataSince) = row.unpack((int, string, int64, int64, int64, Option[int64])) # work around bizarre SQLite query planner issue - it appears that if it has a literal value to compare site against it generates very fast VM code # but if it has a prepared state parameter it somehow refuses to use the index let row = ctx.db.one("SELECT timestamp, status, latency FROM reqs WHERE site = -1 OR site = ? ORDER BY timestamp DESC LIMIT 1", site) diff --git a/src/style.css b/src/style.css index 8e6cbf2..e1ac6c0 100644 --- a/src/style.css +++ b/src/style.css @@ -8,7 +8,6 @@ body { h1, h2 { font-weight: normal; - max-width: 100%; margin: 0; }