* Cherry picks the ES language changes from #4690
* Fix small issues found in linting
* * Fix all but one eslint complaint in the bundled code
* Add eslint and js-beautify rc files into the repo
* Normalize Treatment object dates to be all in UTC Strings, as expected by the codebase
* Also normalize the device status data
* Sort the results so results with mixed dates are returned in correct order
* Use MomentJS to correctly parse the offsets & output the offset to objects at all times
* Removing a debug console log message causing excessive logging
* Use UTC date values for queries even if client asks for zoned dates
* Remove extra sorting based on date. Code clarifications
* * Add missing parseZone() call to treatments
* Check isValid() date on entries
* Use isValid() to check date validity for device status data
* * Package reporting plugins separately into another bundle to reduce main bundle size
* Use moment timezone webpack plugin to load less time zone data
* When server is run in development mode, hot reload code changes without restart
* Run code through a linter when in dev mode
* Remove a couple unnecessary logging lines
* Fix tests
* Reduce the amount of days we load treatments for and load the latest entry of each type we need from last month, to have the site load faster
* Clamp treatments fit to the BG curve at 22
* Distribution totals were miscalculated due to data interpolation. This also adds filtering for non-sgv dexcom entries - we need a new feature so user can define what CGM system she's on and set the lower bound of acceptable CGM values appropriately
* Remove debug logging
* * Full refactor of the clockface code. Clocks now get their own small javascript bundle that contains the bare minimum client (from /lib/client/clock-client.js)
* Clocks no longer have separate HTML files but each has unique CSS definitions
* Fixed the bug where a finger measurement showed NaN in the clock
* Update shrinkwrap to match package.json
* Revert accidental index.html changes
* Bunch of minor fixes (#4641)
* Add triple arrows
* remove time
* grey arrows on bgclock
* try again on arrow fill
* Update bgclock.css
* fix double-mmol-conversion
* Update clock-client.js
* tabs to spaces everywhere
* Refactors based on Jason's comments
* Remove the clock bundle generation from app.js
* Suspend TimeAgo reports for 15 seconds if the app has been sleeping. Add a BACK link to reports (due to iOS now not resetting springboard web apps, so it's impossible to go back to the main view)
* Move detection to another plugin call
* Fix typoed millsecond multiplier and drop the alarm suspend to 10 seconds
* Suspend TimeAgo reports for 15 seconds if the app has been sleeping. Add a BACK link to reports (due to iOS now not resetting springboard web apps, so it's impossible to go back to the main view)
* Move detection to another plugin call
* Change incompatible module and fix a memory leak in the process
* Fix fonts, allow websocket
* Oops fix a brainfart with using the hostname
* Don't inlude null hostname
* Update the shrinkwrap
* Instantiate new cache if new instance of profile code is created. Calculate IOB with three digit precision to keep tests happy (and this is roughly the precision we're operating at anyway).
* - implement @jweismann suggestions https://github.com/nightscout/cgm-remote-monitor/pull/4449#issuecomment-469868508
- add frameAncestors, baseUri and formAction protection
* update README and run doctoc
* fix reportOnly
* add objectSrc
* Use modern CSS loading
* Change CSS to use the "official" async loading across the board (which hopefully plays nicer with CSP)
* first release candiate for 0.11.2 with Minimed EU Server and Guardian Connect integration
- integrates https://github.com/mddub/minimed-connect-to-nightscout/pull/11 into Nightscout
* bump node 10 LTS version
* increase logging, fix /swagger.yaml
* fix typo
* set version to rc2, update mongodb to 3.2.2
* add SECURE_CSP_REPORT_ONLY (default false).
* npm update and revert to requiring Node versions without security issues.
* Add protein and fat logging to CarePortal, simple sums to day to day reporting, grams in graphs
* Add fat and protein to swagger
* Fix aggregate report sometimes considering logged carbs, protein and fat as a string. Add editing of protein and fat to reports. Show protein and carbs on daily reports
Draft release notes for upcoming 0.11 release (currently release candidate phase).
# Changes
Over 360 commits, 89 files changed, +8,428 / −6,569 lines of changes (full list of changes here:
https://github.com/nightscout/cgm-remote-monitor/pull/4022/commits )
## New features
- Fully secure by default out of the box. Unsecure access via http is not allowed anymore by default. This might force you to re-authenticate with your `API_SECRET` or token if you were using unsecure access. (@PieterGit )
- No outdated packages with vulnerabilities are being used anymore (@PieterGit )
- Add Week to Week report (@jpcunningh, https://github.com/nightscout/cgm-remote-monitor/pull/4123 )
- Add Loopalyzer report to analyse looping. Visualize your loop (@lixgbg, https://github.com/nightscout/cgm-remote-monitor/pull/3629https://github.com/nightscout/cgm-remote-monitor/pull/4235 )
- Add predictions support to Day to Day report (@lixgbg, https://github.com/nightscout/cgm-remote-monitor/pull/3179 )
- Add cgm sensor stop to Careportal (@jpcunningh, https://github.com/nightscout/cgm-remote-monitor/pull/4060)
## Removed features
- remove `mqtt` module, because it had a security issue and was not used
- remove `sgvdata` module, because it had a security issue, added a lot of complexity and wasn't needed (@PieterGit ). Replacement implementation for CSV and TSV export (@sulkaharo ).
## Improvements
- Fix MongoDB database insert handling. Log error on inserts and don't crash in case the MongoDB disk is full or MongoDB quota is reached (@sulkaharo and @jpcunningh)
- Upgrade packages to recent version, fixing all known security issues with dependencies (@PieterGit)
- Redirect redirect HTTP to HTTPS and implement HSTS (@jweismann, @PieterGit, https://github.com/nightscout/cgm-remote-monitor/pull/4044 and https://github.com/nightscout/cgm-remote-monitor/issues/4010 and https://github.com/nightscout/cgm-remote-monitor/pull/4253 )
- Technical improvement: Migrate from `uglify-js` to `terser-webpack-plugin` (@PieterGit)
- Streamlined Heroku deployment template with more descriptive text and more appropriate defaults for new users (@unsoluble, https://github.com/nightscout/cgm-remote-monitor/pull/4116 )
## Bug fixes
- Fix CGM voltageb battery warning level to match xDrip+ (@jpcunningh, https://github.com/nightscout/cgm-remote-monitor/pull/3954 )
- Fix daylight saving and reloading bug in profile editor, (@DigitalDan1, @Kywalh https://github.com/nightscout/cgm-remote-monitor/pull/4029 and https://github.com/nightscout/cgm-remote-monitor/pull/4074 )
- Reduce the amount of Profile Switch treatments being loaded to fix UI slowdown and Nightscout home screen losing AAPS data from >3 hours ago, (@sulkaharo, @vickster1, https://github.com/nightscout/cgm-remote-monitor/issues/4055 )
- Upgrade to [share2nightscout 0.2.0](https://github.com/nightscout/share2nightscout-bridge/releases/tag/0.2.0). Prevent Nightscout server crashes in case Dexcom server does not respond (@PieterGit, @veryfancy)
- Fix UI so pills are updated immediately after new data is loaded (@sulkaharo)
- Fixes to If-Modified-Since HTTP header handling for BG data (@sulkaharo)
## Documentation and language updates
- Language updates for Danish, Dutch, German, Hebrew, Norwegian, Russian
- New languages: Japanese, Turkish
- Update Alexa documentation. Note that some Alexa improvements are postponed to Nightscout 0.12 because the Alexa plugin needs refactoring, see https://github.com/nightscout/cgm-remote-monitor/issues/4168#issuecomment-451701994
- Update IFTTT maker-setup.md docs (@Dave9111, @unsoluble, https://github.com/nightscout/cgm-remote-monitor/pull/4206 )
- Updated various docs, including [CONTRIBUTING](https://github.com/nightscout/cgm-remote-monitor/blob/dev/CONTRIBUTING.md) documentation
# Upgrade notes
- We only allow Nightscout to start with a secure Node JS.
- Latest Node 8 LTS (8.15.0 or later) and Latest Node 10 LTS (10.15.1 or later) are recommended and supported.
- Latest Node version on Azure (currently 10.14.0) is tolerated, but not recommended
- Other versions will not start
- The [rawbg](https://github.com/nightscout/cgm-remote-monitor#rawbg-raw-bg) settings are converted to a single setting tri-state variable.
- We improved security and added several new environment variables such as [INSECURE_USE_HTTP and SECURE_HSTS_HEADER](https://github.com/nightscout/cgm-remote-monitor/#predefined-values-for-your-server-settings-optional)
- Your site redirects to https by default. If you don't want that or use a Nginx or Apache proxy, set `INSECURE_USE_HTTP` to `true`.
- We enabled [HTTP Strict Transport Security (HSTS)](https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security) headers by default, settings `SECURE_HSTS_HEADER` and `SECURE_HSTS_HEADER_*`
## Upgrade notes for Azure users
We recommend Azure users consider migrating their hosting to Heroku, as we've observed Heroku users have significantly less issues with having their sites work reliably. If you want to continue using Azure, change the following configuration variables in Azure before updating to the latest Nightscout version:
```
WEBSITE_NODE_DEFAULT_VERSION=10.14.1
SCM_COMMAND_IDLE_TIMEOUT=300
```
# Install instructions
Install instructions can be found: https://github.com/nightscout/cgm-remote-monitor/blob/master/README.md#install
# Contributors to this release
The release coordination for this release was done by @PieterGit
We would like to thank the following people for their contribution (in alphabetical order):
@anderser, @apanasef, @balshor, @bewest, @blocklist_twitter, @CaroGo, @cascer1, @cluckj, @danamlewis, @Dave9111, @diabetlum, @herzogmedia, @janrpn, @jasoncalabrese, @jpcunningh, @jweismann, @kenstack, @Kywalh, @lixgbg, @LuminaryXion, @MilosKozak, @mitrei, @PaperT1D, @PieterGit, @unsoluble, @rarneson, @renegadeandy, @scottleibrand, @sulkaharo, @T-o-b-i-a-s, @tynbendad, @unsoluble, @veryfancy, @viq, @wootmasterslick
(if I forgot somebody, please respond)
# TODO
TODO: Translations, Languages with less than 80% will be removed in a future Nightscout version. Currently the following languages are at risk:
中文(繁體) (zh_tw), Hrvatski (hr), Ελληνικά (el), 한국어 (ko)
See https://gitter.im/nightscout/public?at=5bef2f34de42d46bba766f66
TODO: Fix Codacy errors, https://app.codacy.com/app/Nightscout/cgm-remote-monitor/issues?bid=2452379&filters=W3siaWQiOiJDYXRlZ29yeSIsInZhbHVlcyI6WyJFcnJvciBQcm9uZSJdfV0=
TODO: test dev after all new features are merged for at least two weeks
* small doc fix to comments on Node versions
* Update README.md
* * Fixes authentication dialog UI on Mobile Safari
* Improves app cache busting, so after deploy the app is guaranteed to notice it has to reload content
* Small fix to Finnish language related to auth UI
* Adds back the support for loading Entries with CSV and TEXT formats
* Add default JSON processing MIME type to request formatting
* Cleanly return a blank string if no entries are found
* Restore TSV output extension, better logging
* Adds API to plugin manager that calls plugins to visualize alarms
* Refactoring how the translation object is managed after discovering every server-side plugin had it's own instance of the translations and the language code wasn't propagated to any code that generated alarms
* Add more missing translations
* Some more localization fixes
Update Finnish to 100% localized
Change Mongo connection to not stop retrying connecting
* Better scaling for mmol
Fix bug in detecting new BG values
* Delta calculation was the wrong way round :D
* add missing dutch translations
* Have tests bail early & tell Mocha to exit at the end of the run
* Try if Travis likes running tests one by one better
* Enable blocking IO for Travis
* Fixes issue https://github.com/nightscout/cgm-remote-monitor/issues/3660
* Fix OpenAPS temporary targets using mg/dl on mmol users
* Fixes a bug with saving
* Fix changed entry data order in API
* Clean formatting
* Fix mmol conversion on treatment save
* First pass at adding a new activity data collection & API to Nightscout
* Attempt of fixing /api-docs.html
Converted swagger.yaml to OpenAPI 3.0 format using:
https://github.com/Mermade/swagger2openapihttps://mermade.org.uk/openapi-converter
Conversion / Validation engine v2.11.5
Web frontend version v1.3.8
* add swagger-ui-dist and exported swagger.json
* add swagger-config.yaml
* move swagger-ui to static folder, update static/api-docs.html (based on swagger-ui-dist, without bower)
* move swagger.json to static
* add tokenbased authentication
* token based authentication
* add json webtokens for swagger
* npm update, add swagger-ui-dist and expose that to webroot swagger-ui-dist
* remove swagger-config.yaml (not needed)
* Fix swagger and upgrade to openapi3 (and npm update) (#3366)
* fix swagger and upgrade to openapi3, reapply changes of issue https://github.com/nightscout/cgm-remote-monitor/pull/3345
* use nightscout icon for swagger ui
* Comment out deprecated API call
* Smarter formatting based on amount of data, to make sure the rendering works for both SMB and non-SMB users
* Move comment to where it belongs, changed math so first 10 treatments don't reduce scaling