Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update #4

Merged
merged 318 commits into from
Oct 7, 2020
Merged

update #4

merged 318 commits into from
Oct 7, 2020

Conversation

njmo
Copy link
Owner

@njmo njmo commented Oct 7, 2020

No description provided.

inventor96 and others added 30 commits October 21, 2019 13:29
* * Fix reporting test to match the new output
* Fix number formatter to return the expected 0 when data is NaN
* Remove excessive logging during test runs from cob plugin

* Run all tests in one go

* Fixes D3 invocations for tests. Note this also removes transition timers (most of which seemed to be timed so fast they actually had no effect as the timer was faster than what it takes to draw a frame in Nightscout)

* Run tests independently

* Try not running tap-set-exit

* Remove tap-set-exit
* Further fixes to profile data fetches, change the client to not create excessive amount of date objects

* Sort entries once on load and then rely on the sorting to find out the largest and smallest value

* Make the renderer reuse Date objects instead of instantiating a huge amount of dates all the time
* Fix layouting and load data in one go. Bonus points if you can fix the rendering for this

* fix focus target lines and high and low lines

* Remove debug logging. Change profile functions to clear the cache on new data, instead of calculating heavy hashes

* Remove unused code

* Fix tests

* Have Travis run tests on Node 10 and 12, not 13
* fix forecast limit logic

(cherry picked from commit e88ce7e5d1f5fb12c71ae67da4131ff1a50940c9)

* fix minimum focus forecast time

* make min forecast 30 min
* stop focus circles from eating entries

* fix forecastCircles remove

* resolve possible key collision

* Fixes a major bug where plugins were ran against a sandbox twice, causing issues with predictions. Fixes the look ahead timings.
* stop focus circles from eating entries

* fix forecastCircles remove

* resolve possible key collision

* Fixes a major bug where plugins were ran against a sandbox twice, causing issues with predictions. Fixes the look ahead timings.

* Refactor of how prediction data is collected
* Turkish language updates

* in to Languages Part Turkish added

* in to Languages Part Turkish added
* Fix continuous suspension of the timeago alerts

The default hearbeat-setting is 60 seconds, so the delta between two
timeago-checks will always be >15 seconds and the timeago-alarms will
always be suspended (that's what Papertrail also shows).

To fix this, make the delta-check heartbeat-setting-dependant and also simplify
the code by using just 1 variable.

* Add test that verifies the hibernation detection behaviour

The real-world test would be to actually wait for a couple of minutes (with 2 *
heartbeat of default settings) in the unit test, but this is not feasible, so
just modify the heartbeat-setting to a lower value.

I tested it by only running tests inside `tests/timeago.test.js` and by actually
deploying this code and testing the alarms with Pushover and reading the logs in
Papertrail.

Before this change, I saw a 'Hibernation detected' log every minute. After this
change, I didn't see it anymore, probably because the app wasn't actually
hibernated (yet).

* Take sulkaharo's feedback into account and differentiate
between client and server (by introducing it in sandbox.js).

On the client the behaviour is different from the server:

> On client, the issue is browsers stop the execution of JS if the window is not
> visible and the alarm is falsely triggered immediately when the execution is
> resumed, so we need to suspend the alarm for ~10 seconds after the execution has
> resumed to give the client time to update the data to prevent false alarms.

While on the server, the default heartbeat from 60s needs to be taken
into account to prevent the timeago alarm from falsely triggering.
So detect hibernation there if the last check was more than 2 heartbeats ago.

* Fix the tests by adding settings to the context,
which is now required by timeago.

Also, change the timeago test a bit so that it both succeeds
when testing in isolation as when testing it along with the other tests.
* Remove the validation for created_at in REST API ;(
Nightscout 14.0.4 Liquorice
* Change boot and caching to expose Mongo connection errors
* Fix a memory leak in 14.0.4
* Fix linter error in ddata.js
* Move data retention periods to caching
* Update _id of inserted entries and device status so merging to cache works correctly
* Reset the data in ddata before updating
* Fix typo on entry cache retention period
* Have device status cache retention period follow configuration
* Fix _id injection in treatments
Nightscout 14.0.5 Liquorice
* Support uploading device statuses in batches
* Correctly report batch insertion results
… flush and data insert happening concurrently
Nightscout release 14.0.6 Liquorice
Explicitly link to the application template in Github
@njmo
Copy link
Owner Author

njmo commented Oct 7, 2020

rebase

@njmo njmo merged commit 103cfd4 into njmo:master Oct 7, 2020
njmo pushed a commit that referenced this pull request Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.