Commit graph

33 commits

Author SHA1 Message Date
Pēteris Caune
5e051bfc30
Fix AJAX views to better handle user logging out
Rather than redirecting to login page, return HTTP 403 Forbidden
2024-08-20 10:57:36 +03:00
Pēteris Caune
44b163cc52
Fix JS formatting 2024-06-17 14:14:36 +03:00
NKETIAH53
0874ced368 format dates in logs to include year unless they are from current year
fixes: #1008
2024-06-17 14:07:18 +03:00
Pēteris Caune
da90d33d38
Fix a bug in the log page that caused log events to sometimes load twice 2024-05-10 10:27:40 +03:00
Pēteris Caune
27c065230a
Switch back to using integer timestamps in the log page
The live-updating code still needs float timestamps, but
we only need them for the most recent event (so we know
the lower threshold for fetching new events). We now send
the float timestamp separately:

* in the `/log/` view, we put it in HTML content, in a <script> tag
* in the `/log_events/` view we put it in response header

The main benefit of this is smaller response sizes for the
`/log/` and `/log_events/` views.
2024-04-09 14:24:43 +03:00
Pēteris Caune
bc5e9fde80
Fix the filtering code to handle 0 hits 2024-03-21 15:43:17 +02:00
Pēteris Caune
b9e788b9c6
Change log_events response content type from JSON to HTML 2024-03-21 13:21:09 +02:00
Pēteris Caune
855fac0973
Implement filtering by event type in the Log page
Fixes: #873
2024-03-21 11:04:45 +02:00
Pēteris Caune
df6895ed1f
Fix regression in log auto-updating code
Also switch back to using integers for the slider min and max
values, and for the hc.front.forms.LogFilterForm.
2024-03-19 19:11:46 +02:00
Pēteris Caune
47894f6add
Rearrange the log page to make room for more filters
* Switch from nouislider to simpler <input type="range">
* Move it to a sidebar

Also, fix a bug in _get_events where the "start" local variable
got clobbered, and made the date range for the Notification
query wrong.
2024-03-19 18:47:13 +02:00
Michael Boateng
9770bc1ea0
Add auto-refresh functionality to log page (#963)
Add auto-refresh functionality to log page

Fixes: #957

---------

Co-authored-by: Pēteris Caune <cuu508@gmail.com>
2024-02-23 11:36:31 +02:00
Pēteris Caune
dba356c5d4
For cron checks, change default display timezone to check's timezone
In the "Details" and "Log" pages Healthchecks displays a list
of events (incoming pings and sent alerts). At the top of the
events list is a two- or three-way selector for selecting
the timezone for formatting event dates and times. The selector
options are "UTC", check's configured timezone, and "Browser's
time zone". The "Browser's time zone" used to be default, initial
selection for all checks.

With this change, for checks that use cron schedule, the default
selected timezone will be the check's configured timezone.
The "Browser's time zone" option is of course still there and the
user can switch to it to see dates and times in their local time.

Rationale: I semi-regularly get support requests about unexpected
or missing alerts, where the problem boil downs to a timezone
mismatch between the client and the Healthchecks server. Sometimes
the confusion seems to be caused by the user seeing ping arrival
times in  their local time zone, comparing them to their cron
expression, and not realizing their server may be using a different
timezone. By switching the default display timezone to the check's
configured timezone, I hope users will be more likely to notice
discrepancies between ping arrival times, the cron schedule,
and their local clock.

For checks using simple schedules (timeout and grace), we still
default to browser's timezone for display.
2023-06-29 12:12:54 +03:00
Pēteris Caune
7d625a6844
Tweak variable names in slider initialization JS 2022-09-12 11:49:32 +03:00
Pēteris Caune
37bbe5a9c7
Add date filters in the Log page 2022-09-09 14:16:17 +03:00
Pēteris Caune
1b7bdea9e9
Optimize HTML output of the events log some more 2022-09-05 19:45:11 +03:00
Pēteris Caune
1b2defa6ee
Optimize HTML output in /checks/<uuid>/log/ 2022-04-04 11:11:55 +03:00
Pēteris Caune
580eaceeb5
Optimize HTML output in /checks/<uuid>/log/
* Don't use 'date' and 'time' CSS classes in HTML output
* Replace the span.ua-body CSS class with code tags
2022-04-04 10:24:31 +03:00
Pēteris Caune
1d20be94ff
Optimize HTML output in /checks/<uuid>/log/
* Simplify the "n" cell
* Don't send details URLs, construct them on client side
* Strip microseconds in timestamps
2022-04-04 09:51:07 +03:00
Pēteris Caune
fd15302d2a
Improve the loading state of the "Ping Details" dialog
If the "Ping details" dialog takes more than ~300ms to load,
show an animated progress indicator.

Also, move the loading code to a ping_details.js file
to reduce code repetition.
2022-03-16 13:51:26 +02:00
Pēteris Caune
57336187a7
Fix HTML email preview in the checks list 2021-03-10 12:29:20 +02:00
Pēteris Caune
d4fc314696
Set iframe's charset to utf8 2021-02-26 16:36:45 +02:00
Pēteris Caune
46bc7d8306
Improve HTML email display in the "Ping Details" dialog 2021-02-26 16:25:39 +02:00
Pēteris Caune
9474006d83
Support informal time zones. 2019-08-22 11:41:08 +03:00
Pēteris Caune
dfd449b101
Three choices in timezone switcher (UTC / check's timezone / browser's timezone). Fixes #278 2019-08-22 11:17:27 +03:00
Pēteris Caune
7e56eb883e
Fetch ping details using HTTP GET, not HTTP POST. 2018-08-19 18:18:25 +03:00
Pēteris Caune
a883fe38aa
Log auto-refreshes in the details page. 2018-08-19 12:32:03 +03:00
Pēteris Caune
04fede0897
Auto-refresh current status in log page. 2018-08-17 20:53:50 +03:00
Pēteris Caune
458c4cfeeb
Hook up buttons in the log page. 2018-08-17 15:09:36 +03:00
Pēteris Caune
cbd755585a Layout tweaks for the "Log" page. 2018-03-18 23:01:24 +02:00
Pēteris Caune
02f6853d4c Save request body for every ping, not just the last one. 2018-03-18 14:55:41 +02:00
Di Wu
7f52d8c98e fix some markup and be more explicit about date time format 2016-05-23 16:59:00 -07:00
Pēteris Caune
f4939f4c91 Use local timezone for dates and times in ping log. 2016-05-18 12:33:25 +03:00
Pēteris Caune
36f0e7c82a Transport column (http, https, email) in log 2015-08-01 20:52:58 +03:00