From d126fe0bce046e1cd81d58e6d07f6bbc5e20f3cb Mon Sep 17 00:00:00 2001 From: Raj Nandan Sharma Date: Thu, 23 Jan 2025 09:36:37 +0530 Subject: [PATCH] fix: fix for #212, data interpolation introduced --- docs/concepts.md | 4 ++ docs/custom-js-css-guide.md | 12 +++++- docs/theme.md | 14 +++++++ src/lib/components/monitor.svelte | 5 +-- src/lib/i18n/client.js | 3 +- src/lib/server/controllers/controller.js | 27 ++++++++++++- src/lib/server/db/dbimpl.js | 10 +++++ src/lib/server/page.js | 39 +++++++++++-------- src/routes/(docs)/+layout.svelte | 2 +- src/routes/(kener)/api/today/+server.js | 9 ++++- .../(kener)/api/today/aggregated/+server.js | 21 +++++++--- 11 files changed, 116 insertions(+), 30 deletions(-) diff --git a/docs/concepts.md b/docs/concepts.md index 59bf291..df63750 100644 --- a/docs/concepts.md +++ b/docs/concepts.md @@ -27,6 +27,10 @@ DNS Monitor is used to check the status of a DNS server. It can be configured to Ping Monitor is used to check the status of a server. It can be configured to check the status of the server at different intervals. +### Data Interpolation + +Kener interpolates the data for missing intervals. For example, suppose if you have a cron monitor of 5 minutes and it has run twice at 10AM and 10:05AM and the monitor is `DOWN` at 10AM. Kener will interpolate the data for 10:01AM, 10:02AM, 10:03AM and 10:04AM as `DOWN`. Similarly, if the monitor is UP at 10:05AM, Kener will interpolate the data for 10:06AM, 10:07AM, 10:08AM and 10:09AM as UP. Similarly for missing data points it will consider the previous data point. If there is no previous data point, it will consider it as `UP`. + --- ## Triggers diff --git a/docs/custom-js-css-guide.md b/docs/custom-js-css-guide.md index 7526bd4..67253e1 100644 --- a/docs/custom-js-css-guide.md +++ b/docs/custom-js-css-guide.md @@ -29,4 +29,14 @@ Do not forget to add the base path if you are using a subpath. For example, if y ### Inline CSS -To add inline css go to Manage kener -> Theme -> Custom CSS and add your CSS there. Do not include `