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; }