... and pass it to Transport.notify_flip().
This allows us to pass flip-specific information (the flip timestamp,
the new status) to transport classes.
If timestamps are equal, put flips chronologically after pings.
We are showing events in reverse chronological order (newer
events at the top), so the flips will now display
*above* the pings that caused them.
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.
log_events was using Check.created as the lower bound.
If a check has many pings, we need to use the oldest
visible ping's date as the lower bound, otherwise
we may return notifications older than the oldest visible
ping.
* 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.
If AuthenticatedHttpRequest lives in the hc.lib.typealias
module then hc.lib.typealias imports User and Profile,
and so needs configured Django settings. Most of the stuff
in hc.lib is intended to work standalone, and not rely on Django.
In requests, "params" is a positional argument for the get function:
requests.get(url, params=None, **kwargs)
So I made params positional here too.
In requests, "data" is a positional argument for the post function:
requests.post(url, data=None, json=None, **kwargs)
So I data positional here too.
This results in changes in other places too:
* curl.post() does not accept `data` as positional arg,
it must now be a keyword argument
* we need asserts and if clauses in a few places to make sure
we are not passing `None` in the arguments to hc.lib.curl.request
* MVP for notification groups.
* Addressed review comments.
* Push notification group to the front.
* Updated icons.
* Reduce code duplication.
* Show groups at the top.
* Add label to group forms.
* Add checkboxes for integration selection.
* CSS for checkboxes.
* Added tests for group notify.