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

Nightscout Release 13.0.0 #5113

Merged
merged 149 commits into from
Dec 17, 2019
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
d767102
Merge pull request #1 from nightscout/master
inventor96 Jul 30, 2019
202402f
Copied work done by mdomox
inventor96 Sep 6, 2019
e36a6f1
Updates and fixes to CONTRIBUTING.md
inventor96 Sep 6, 2019
93f8eb9
Spacing unification
inventor96 Sep 7, 2019
3b183a2
One more fix for CONTRIBUTING.md
inventor96 Sep 7, 2019
a7bf320
Minor code formatting improvements
inventor96 Sep 7, 2019
ce00c94
One more time...
inventor96 Sep 7, 2019
efa35c4
Renamed Alexa stuff to virtAsst for generic-ness
inventor96 Sep 7, 2019
51c8d2c
Corrected missed translate() text
inventor96 Sep 8, 2019
58162c2
Updated googlehome plugin to mimic the alexa plugin
inventor96 Sep 8, 2019
b39eb8f
Changed order of operations
inventor96 Sep 8, 2019
8a20015
Fixed parameter referencing in googlehome
inventor96 Sep 8, 2019
90562a3
Yet another CONTRIBUTING fix
inventor96 Sep 8, 2019
855b64d
Removed extra google stuff
inventor96 Sep 8, 2019
2238067
Migrated standalone intents to MetricNow intent
inventor96 Sep 8, 2019
b3a47b3
Simplified route handling
inventor96 Sep 8, 2019
79f0217
Added logging
inventor96 Sep 8, 2019
cc56ef8
Added forgotten path selector
inventor96 Sep 8, 2019
0b1ce34
Separated instructions for adding virtual assistant support in a plugin
inventor96 Sep 8, 2019
0d85439
A few typo fixes
inventor96 Sep 8, 2019
f74d6a8
Improved logging
inventor96 Sep 8, 2019
c266cab
Updated Google Home plugin instructions
inventor96 Sep 9, 2019
895407d
Attempt to trigger download of template file
inventor96 Sep 9, 2019
478b25b
Small wording tweaks
inventor96 Sep 9, 2019
c562e7d
Updated Alexa plugin documentation
inventor96 Sep 10, 2019
3563158
Updated test files
inventor96 Sep 10, 2019
0a48c1d
Re-added handler count tests so devs are prompted to write tests for …
inventor96 Sep 10, 2019
658ca16
Updated Alexa documentation
inventor96 Sep 10, 2019
2b3d783
Small typo fix
inventor96 Sep 10, 2019
73d4e04
Clarification
inventor96 Sep 10, 2019
f946f4f
Further clarifications and typos
inventor96 Sep 10, 2019
6ff8aa3
Added language info to Google Home plugin doc
inventor96 Sep 12, 2019
92d2f70
URL correction
inventor96 Sep 12, 2019
41c0335
URL fix v2
inventor96 Sep 12, 2019
f188f4f
Wording clarification
inventor96 Sep 12, 2019
071d980
Ugh...
inventor96 Sep 12, 2019
313bb60
Minor instruction fix
inventor96 Sep 12, 2019
67ae84d
Sub steps fix
inventor96 Sep 12, 2019
dd6e691
Fixed Alexa references in Google Home
inventor96 Sep 12, 2019
6032aab
Added a couple steps for improved user experience
inventor96 Sep 12, 2019
87261af
One more forgotten step
inventor96 Sep 12, 2019
450fbc2
Updated pump reservoir handler to handle undefined values
inventor96 Sep 16, 2019
bf57dfe
Updated titles and unknown-value responses
inventor96 Sep 16, 2019
ddd8f63
Modified forecast responses to use translate()
inventor96 Sep 16, 2019
d3346fe
Updated tests
inventor96 Sep 16, 2019
6dee062
Improved training phrases
inventor96 Sep 16, 2019
dfbcf62
Update release to 0.12.6-dev
sulkaharo Oct 6, 2019
2dd576a
API V3 (#4250)
PetrOndrusek Oct 9, 2019
7a02048
Add BrowserStack badge to the Readme (#5001)
unsoluble Oct 9, 2019
adb1385
Fix black OpenAPS COB forecast dots (#5057)
p5nbTgip0r Oct 9, 2019
112bfff
Append token parameter in URL to side menu links (#5020)
Erin879 Oct 9, 2019
5663dc5
Chore: Typo cleanup in CONTRIBUTING.md (#5053)
BergFulton Oct 9, 2019
7e36580
Parse target top and bottom as integers (#5019)
p5nbTgip0r Oct 9, 2019
d729b0e
Remote Loop overrides (#5043)
ps2 Oct 16, 2019
61884f2
Wording improvements
inventor96 Oct 16, 2019
c11eb82
fix: Support a wider range of unit strings for profiles (#5102)
sulkaharo Oct 18, 2019
0fc121c
Google Home setup instruction corrections
inventor96 Oct 19, 2019
3cb3f47
Corrected how metric selection is found
inventor96 Oct 20, 2019
f33bd55
Fix value caching in the profile functions. Looks like when Circadian…
sulkaharo Oct 20, 2019
a9f89aa
changed gitter shield to discord (#5121)
OpossumGit Oct 21, 2019
bdd3473
Use tap-set-exit to make failing tests actually fail CI (#5109)
aredridel Oct 21, 2019
06e3d6a
Clock cleanup (#5018)
unsoluble Oct 21, 2019
b8f28b0
fix(d3): D3 libarry upgrade (lib for visualizing data such as main vi…
jpcunningh Oct 21, 2019
30b88f6
fix/feat: Update Alexa integration and add Google Home support (#4980)
inventor96 Oct 21, 2019
36de82b
Revert "fix/feat: Update Alexa integration and add Google Home suppor…
PieterGit Oct 21, 2019
7770ff9
Improved logic to handle Alexa intents
inventor96 Oct 21, 2019
8b1bbb5
Clarification
inventor96 Oct 21, 2019
376a712
Logic correction
inventor96 Oct 21, 2019
e10d483
Fix tests failing in dev (#5127)
sulkaharo Oct 21, 2019
67e6cdd
Merge branch 'update-virtual-assistants' into update-virtual-assistan…
inventor96 Oct 21, 2019
2d07c54
Performance fixes (#5134)
sulkaharo Oct 22, 2019
fab2453
Don't load retro data if not needed. Merge retro data faster if it's …
sulkaharo Oct 22, 2019
bda8793
Updated Alexa template to comply with new requirements
inventor96 Oct 22, 2019
85b8a9e
Merge branch 'update-virtual-assistants-fix-alexa-rollup' into update…
inventor96 Oct 22, 2019
243ff2e
Load data in one pass (#5142)
sulkaharo Oct 23, 2019
4fd2843
D3 Upgrade Residual Cleanup (#5140)
jpcunningh Oct 23, 2019
4131080
fix forecast time max to client focusRangeMS instead of 30 min (#5143)
jpcunningh Oct 23, 2019
afd12fd
Fix initial forecast point display
sulkaharo Oct 23, 2019
8d33c6e
Fix forecast time randomly resetting to 30 minutes for openaps users
sulkaharo Oct 23, 2019
c1244ea
Stop Focus Circles from Eating Entries (#5145)
jpcunningh Oct 25, 2019
28b892e
Fix forecast behaviour (#5160)
sulkaharo Oct 28, 2019
9c42fed
Update node pushover library to fix crash in case Pushover service is…
sulkaharo Oct 30, 2019
5c5821a
adding list of supported APIs versions (GET /api/versions)
PetrOndrusek Oct 30, 2019
13dd0fa
Fixed a few missing definitions
inventor96 Nov 1, 2019
164ea06
API3: add locking documents using isReadOnly flag
PetrOndrusek Nov 2, 2019
c6e2b58
Translation improvements
inventor96 Nov 5, 2019
98b222c
Defined `translate()` in upbat plugin
inventor96 Nov 5, 2019
b9dc376
Migrated titles to use translate()
inventor96 Nov 5, 2019
c33aebb
Migrated static intent titles to use translate()
inventor96 Nov 5, 2019
43a32b3
Misc fixes for tests (even though they didn't fail 🤔)
inventor96 Nov 5, 2019
51a7c12
API3: testing isReadOnly feature
PetrOndrusek Nov 7, 2019
2050ddc
API3: more readonly field name variants
PetrOndrusek Nov 7, 2019
f0fb480
Added instructions on how to update skills/agents
inventor96 Nov 10, 2019
c4ee62b
fix devicestatus retro merge (#5193)
jpcunningh Nov 10, 2019
fcfc209
Turkish language updates (#5192)
XP2025A Nov 10, 2019
c6e7635
Fix falsely suspended timeago alarms (#5170)
fibbers Nov 10, 2019
1b8dc27
Adding to #5121 (#5126)
unsoluble Nov 10, 2019
d3bd77b
Extra info (delta and last measurement time) on clock view. (#5151)
ireneusz-ptak Nov 10, 2019
9877a51
Wording tweaks to go with #4810 (#4866)
unsoluble Nov 10, 2019
5bc6799
GitHub actions build (#5168)
sulkaharo Nov 10, 2019
dfd99fc
Merge branch 'master' into dev
sulkaharo Nov 10, 2019
d55b2d0
Move the units configuration detection to a place where it's guarante…
sulkaharo Nov 10, 2019
2e36813
Fix the check for environments without the units setting
sulkaharo Nov 10, 2019
f7750b3
Rename xdrip-js to xdripjs (#4959)
jpcunningh Nov 10, 2019
013300a
Added customization step for Alexa skill updates
inventor96 Nov 11, 2019
0c6929f
Language Update: added missing German Translations (#5172)
herzogmedia Nov 11, 2019
534c443
Don't use dynamic scale unless entries in database (#5195)
jpcunningh Nov 12, 2019
4342eaa
Language Matters: change "Normal" to "In Range" in glucose distributi…
sulkaharo Nov 13, 2019
78c0778
Added/updated TOC's
inventor96 Nov 15, 2019
beda457
set auth dialog width to client width if smaller than default width
Nov 15, 2019
4e48952
More hebrew translations
Nov 17, 2019
ba012f9
Added note regarding the use of the Alexa online simulator
inventor96 Nov 19, 2019
22c889d
fix focus scale hour format
Nov 22, 2019
ace12ca
trip open-top size to fit
Nov 23, 2019
b5b2f2a
fix clearing alarming when clearning CurrentSGV
Nov 23, 2019
73667f9
do not set direction if not current
Nov 23, 2019
c449d39
Handled 0 for pump reservoir
inventor96 Nov 23, 2019
72a89b6
rollback npm-shrinkwrap.json
Nov 28, 2019
b7ab2ad
Fix for distributionpage
whooze Nov 29, 2019
1e2e948
Russian translation update edit
apanasef Dec 4, 2019
c4f5ffa
Use default entries count instead of distributed number literals
Dec 5, 2019
3170345
Handle mmol to mgdl conversions with a constant reference (#5274)
jakobsandberg Dec 6, 2019
25a6345
Use default entries count instead of distributed number literals (#5273)
sulkaharo Dec 6, 2019
7db7167
Merge pull request #5236 from jpcunningh/d3-cleanup
sulkaharo Dec 6, 2019
301181c
Merge pull request #5249 from whooze/dev
sulkaharo Dec 6, 2019
dde86b0
Merge pull request #5233 from jpcunningh/fix-hour-format-on-focus-scale
sulkaharo Dec 6, 2019
915d1aa
Merge pull request #5211 from jpcunningh/dynamic-auth-width
sulkaharo Dec 6, 2019
8b19c53
Merge pull request #5169 from PetrOndrusek/api-prev-versions
sulkaharo Dec 6, 2019
c153a96
Merge pull request #5137 from inventor96/update-virtual-assistants-v2
sulkaharo Dec 6, 2019
57a3f2d
Merge pull request #5186 from PetrOndrusek/api3-readonly-documents
sulkaharo Dec 6, 2019
dc414b7
Merge pull request #5213 from jakebloom/hebrew
sulkaharo Dec 6, 2019
7790f5c
Merge branch 'dev' into patch-25
sulkaharo Dec 6, 2019
7f21e5a
Merge pull request #5267 from apanasef/patch-25
sulkaharo Dec 6, 2019
6abd6be
Added sanity check for the bridge interval value (#4717)
ahaarrestad Dec 6, 2019
7b58a22
Use auth tokens in api-secret (#5214)
sulkaharo Dec 6, 2019
d05c160
Fix dependency vulnerabilities
sulkaharo Dec 6, 2019
149ca1a
Added basal and bolus averages besides TDD and carbs (#4216)
lixgbg Dec 6, 2019
8194a87
Remove the leading 0 from the version, so we can comply to how versio…
sulkaharo Dec 6, 2019
0ea36ab
Removed unsused var ic (#5288)
hgreving Dec 14, 2019
de70aa2
Use constants instead of number literals for http status codes (#5276)
jakobsandberg Dec 14, 2019
a764412
Updated release name and number (#5280)
inventor96 Dec 14, 2019
5cc19ae
Allow use cgm-remote-monitor as npm package. (#4847)
GermanBluefox Dec 14, 2019
04b47f6
Add 4 hour option to view (#5289)
sulkaharo Dec 14, 2019
51781f7
[Clock] Fix incorrect delta calculation (#5286)
ireneusz-ptak Dec 14, 2019
1d005f9
Hide unit suffix for SMBs issued by AndroidAPS (#4771)
cascer1 Dec 14, 2019
1375870
Fix issues from `npm audit`
sulkaharo Dec 14, 2019
83c22f9
Read BG targets in using mmol when server is in mmol mode (#5291)
sulkaharo Dec 15, 2019
1312256
Unbreak JSON serialization failing on the /properties API due to circ…
sulkaharo Dec 16, 2019
07b528c
Bump version to 13.0.0
sulkaharo Dec 16, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ module.exports = {
"commonjs": true,
"es6": true,
"node": true,
"mocha": true,
"jquery": true
},
"rules": {
"no-unused-vars": [
"error",
{
"varsIgnorePattern": "should|expect"
}
]
}
};
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,9 @@ npm-debug.log
*.heapsnapshot

/tmp
/.vs
/cgm-remote-monitor.njsproj
/cgm-remote-monitor.sln
/obj/Debug
/bin
/*.bat
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ matrix:
include:
- node_js: "10"
<<: *node_js-steps
- node_js: "node" # Latest Node is not supported, and recommend, but we'll test it to know incompatibility issues
- node_js: "12" # Latest Node is not supported, and recommend, but we'll test it to know incompatibility issues
<<: *node_js-steps
19 changes: 9 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,19 @@ Nightscout is a Node.js application. The basic installation of the software for

1. Clone the software to your local machine using git
2. Install Node from https://nodejs.org/en/download/
2. Use `npm` to install Nightscout dependencies by invokin `npm install` in the project directory. Note the
dependency installation has to be done usign a non-root user - _do not use root_ for development and hosting
2. Use `npm` to install Nightscout dependencies by invoking `npm install` in the project directory. Note the
dependency installation has to be done using a non-root user - _do not use root_ for development and hosting
the software!
3. Get a Mongo database by either installing Mongo locally, or get a free cloud account from mLab or Mongodb Atlas.
4. Configure nightscout by copying `my.env.template` to `my.env` and run it - see the next chapter in the instructions
3. Get a Mongo database by either installing Mongo locally, or get a free cloud account from mLab or MongoDB Atlas.
4. Configure Nightscout by copying `my.env.template` to `my.env` and run it - see the next chapter in the instructions

## Develop on `dev`

We develop on the `dev` branch. All new pull requests should be targeted to `dev`. The `master` branch is only used for distributing the latest version of the tested sources.

You can get the `dev` branch checked out using `git checkout dev`.

Once checked out, install the dependencies using `npm install`, then copy the included `my.env.template`file to `my.env` and edit the file to include your settings (like the Mongo URL). Leave the `NODE_ENV=development` line intact. Once set, run the site using `npm run dev`. This will start Nigthscout in the development mode, with different code packaging rules and automatic restarting of the server using nodemon, when you save changed files on disk. The client also hot-reloads new code in, but it's recommended to reload the the website after changes due to the way the plugin sandbox works.
Once checked out, install the dependencies using `npm install`, then copy the included `my.env.template`file to `my.env` and edit the file to include your settings (like the Mongo URL). Leave the `NODE_ENV=development` line intact. Once set, run the site using `npm run dev`. This will start Nightscout in the development mode, with different code packaging rules and automatic restarting of the server using nodemon, when you save changed files on disk. The client also hot-reloads new code in, but it's recommended to reload the website after changes due to the way the plugin sandbox works.

Note the template sets `INSECURE_USE_HTTP` to `true` to enable the site to work over HTTP in local development.

Expand All @@ -72,15 +72,14 @@ for the API, run Nightscout locally and load the documentation from /api-docs (o
files locally).

Note all dates used to access the API and dates stored in the objects are expected to comply with the ISO-8601 format and
be deserializable by the Javascript Date class. Of note here is the dates can contain a plus sign which has a special meaning in
URL encoding, so when issuing requests that place dates to the URL, take special care to ensure the data is properly URL
be deserializable by the Javascript Date class. Of note here is the dates can contain a plus sign which has a special meaning in URL encoding, so when issuing requests that place dates to the URL, take special care to ensure the data is properly URL
encoded.

## Design & new features

If you intend to add a new feature, please allow the community to participate in the design process by creating an issue to discuss your design. For new features, the issue should describe what use cases the new feature intends to solve, or which existing use cases are being improved.

Note Nighscout has a plugin architecture for adding new features. We expect most code for new features live inside a Plugin, so the code retains a clear separation of concerns. If the Plugin API doesn't implement all features you need to implement your feature, please discuss with us on adding those features to the API. Note new features should under almost no circumstances require changes to the existing plugins.
Note Nightscout has a plugin architecture for adding new features. We expect most code for new features live inside a Plugin, so the code retains a clear separation of concerns. If the Plugin API doesn't implement all features you need to implement your feature, please discuss with us on adding those features to the API. Note new features should under almost no circumstances require changes to the existing plugins.

## Style Guide

Expand Down Expand Up @@ -118,7 +117,7 @@ Now that the commits are available on github, you can click on the compare butto
We assume all new Pull Requests are at least smoke tested by the author and all code in the PR actually works.
Please include a description of what the features do and rationalize why the changes are needed.

If you add any new NPM module dependencies, you have to rationalize why there are needed - we prefer pull requests that reduce dependencies, not add them.
If you add any new NPM module dependencies, you have to rationalize why they are needed - we prefer pull requests that reduce dependencies, not add them.
Before releasing a a new version, we check with `npm audit` if our dependencies don't have known security issues.

When adding new features that add configuration options, please ensure the `README` document is amended with information on the new configuration.
Expand Down Expand Up @@ -258,7 +257,7 @@ Languages with less than 90% coverage will be removed in a future Nightscout ver
| Suomi (`fi`)|[@sulkaharo] |OK|
| Français (`fr`)|Please volunteer|OK|
| עברית (`he`)|Please volunteer|OK|
| Hrvatski (`hr`)|[@OpossumGit]|Needs attention: 47.8% - committed 100% to dev|
| Hrvatski (`hr`)|[@OpossumGit]|OK|
| Italiano (`it`)|Please volunteer|OK|
| 日本語 (`ja`)|[@LuminaryXion]|Working on this|
| 한국어 (`ko`)|Please volunteer|Needs attention: 80.6%|
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ report:

test_onebyone:
python -c 'import os,sys,fcntl; flags = fcntl.fcntl(sys.stdout, fcntl.F_GETFL); fcntl.fcntl(sys.stdout, fcntl.F_SETFL, flags&~os.O_NONBLOCK);'
$(foreach var,$(wildcard tests/*.js),${MONGO_SETTINGS} ${MOCHA} --timeout 30000 --exit --bail -R tap $(var);)
for var in tests/*.js; do ${MONGO_SETTINGS} ${MOCHA} --timeout 30000 --exit --bail -R tap $$var; done | tap-set-exit

test:
${MONGO_SETTINGS} ${MOCHA} --timeout 30000 --exit --bail -R tap ${TESTS}
Expand All @@ -52,7 +52,7 @@ travis:
python -c 'import os,sys,fcntl; flags = fcntl.fcntl(sys.stdout, fcntl.F_GETFL); fcntl.fcntl(sys.stdout, fcntl.F_SETFL, flags&~os.O_NONBLOCK);'
# NODE_ENV=test ${MONGO_SETTINGS} \
# ${ISTANBUL} cover ${MOCHA} --report lcovonly -- --timeout 5000 -R tap ${TESTS}
$(foreach var,$(wildcard tests/*.js),${MONGO_SETTINGS} ${MOCHA} --timeout 30000 --exit --bail -R tap $(var);)
for var in tests/*.js; do ${MONGO_SETTINGS} ${MOCHA} --timeout 30000 --exit --bail -R tap $$var; done

docker_release:
# Get the version from the package.json file
Expand Down
45 changes: 28 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Nightscout Web Monitor (a.k.a. cgm-remote-monitor)
[![Dependency Status][dependency-img]][dependency-url]
[![Coverage Status][coverage-img]][coverage-url]
[![Codacy Badge][codacy-img]][codacy-url]
[![Gitter chat][gitter-img]][gitter-url]
[![Discord chat][discord-img]][discord-url]

[![Deploy to Azure](http://azuredeploy.net/deploybutton.png)](https://azuredeploy.net/) [![Deploy to Heroku][heroku-img]][heroku-url] [![Update your site][update-img]][update-fork]

Expand Down Expand Up @@ -35,8 +35,8 @@ Community maintained fork of the
[coverage-url]: https://coveralls.io/github/nightscout/cgm-remote-monitor?branch=master
[codacy-img]: https://www.codacy.com/project/badge/f79327216860472dad9afda07de39d3b
[codacy-url]: https://www.codacy.com/app/Nightscout/cgm-remote-monitor
[gitter-img]: https://img.shields.io/badge/Gitter-Join%20Chat%20%E2%86%92-1dce73.svg
[gitter-url]: https://gitter.im/nightscout/public
[discord-img]: https://img.shields.io/discord/629952586895851530?label=discord%20chat
[discord-url]: https://discordapp.com/channels/629952586895851530/629952669967974410
[heroku-img]: https://www.herokucdn.com/deploy/button.png
[heroku-url]: https://heroku.com/deploy
[update-img]: update.png
Expand Down Expand Up @@ -119,7 +119,7 @@ Community maintained fork of the
If you plan to use Nightscout, we recommend using [Heroku](http://www.nightscout.info/wiki/welcome/set-up-nightscout-using-heroku), as Nightscout can reach the usage limits of the free Azure plan and cause it to shut down for hours or days. If you end up needing a paid tier, the $7/mo Heroku plan is also much cheaper than the first paid tier of Azure. Currently, the only added benefit to choosing the $7/mo Heroku plan vs the free Heroku plan is a section showing site use metrics for performance (such as response time). This has limited benefit to the average Nightscout user. In short, Heroku is the free and best option for Nightscout hosting.

- [Nightscout Setup with Heroku](http://www.nightscout.info/wiki/welcome/set-up-nightscout-using-heroku) (recommended)
- [Nightscout Setup with Microsoft Azure](http://www.nightscout.info/wiki/faqs-2/azure-2) (not recommended, please
- [Nightscout Setup with Microsoft Azure](http://www.nightscout.info/wiki/faqs-2/azure-2) (not recommended, please
[switch from Azure to Heroku](http://openaps.readthedocs.io/en/latest/docs/While%20You%20Wait%20For%20Gear/nightscout-setup.html#switching-from-azure-to-heroku) )
- Linux based install (Debian, Ubuntu, Raspbian) install with own Node.JS and MongoDB install (see software requirements below)
- Windows based install with own Node.JS and MongoDB install (see software requirements below)
Expand Down Expand Up @@ -155,15 +155,15 @@ $ npm install
- HTTP Strict Transport Security (HSTS) headers are enabled by default, use settings `SECURE_HSTS_HEADER` and `SECURE_HSTS_HEADER_*`
- See [Predefined values for your server settings](#predefined-values-for-your-server-settings-optional) for more details

## Installation notes for Microsoft Azure, Windows:
## Installation notes for Microsoft Azure, Windows:

- If deploying the software to Microsoft Azure, you must set ** in the app settings for *WEBSITE_NODE_DEFAULT_VERSION* and *SCM_COMMAND_IDLE_TIMEOUT* **before** you deploy the latest Nightscout or the site deployment will likely fail. Other hosting environments do not require this setting. Additionally, if using the Azure free hosting tier, the installation might fail due to resource constraints imposed by Azure on the free hosting. Please set the following settings to the environment in Azure:
```
WEBSITE_NODE_DEFAULT_VERSION=10.15.2
SCM_COMMAND_IDLE_TIMEOUT=300
```
- See [install MongoDB, Node.js, and Nightscouton a single Windows system](https://github.com/jaylagorio/Nightscout-on-Windows-Server). if you want to host your Nightscout outside of the cloud. Although the instructions are intended for Windows Server the procedure is compatible with client versions of Windows such as Windows 7 and Windows 10.
- If you deploy to Windows and want to develop or test you need to install [Cygwin](https://www.cygwin.com/) (use [setup-x86_64.exe](https://www.cygwin.com/setup-x86_64.exe) and make sure to install `build-essential` package. Test your configuration by executing `make` and check if all tests are ok.
- If you deploy to Windows and want to develop or test you need to install [Cygwin](https://www.cygwin.com/) (use [setup-x86_64.exe](https://www.cygwin.com/setup-x86_64.exe) and make sure to install `build-essential` package. Test your configuration by executing `make` and check if all tests are ok.

# Development

Expand Down Expand Up @@ -304,14 +304,13 @@ To learn more about the Nightscout API, visit https://YOUR-SITE.com/api-docs/ or
* `SECURE_HSTS_HEADER_PRELOAD` (`false`) - ask for preload in browsers for HSTS. Possible values `false`, or `true`.
* `SECURE_CSP` (`false`) - Add Content Security Policy headers. Possible values `false`, or `true`.
* `SECURE_CSP_REPORT_ONLY` (`false`) - If set to `true` allows to experiment with policies by monitoring (but not enforcing) their effects. Possible values `false`, or `true`.

### Views

There are a few alternate web views available from the main menu that display a simplified BG stream. (If you launch one of these in a fullscreen view in iOS, you can use a left-to-right swipe gesture to exit the view.)
* `Clock` - Shows current BG, trend arrow, and time of day. Grey text on a black background.
* `Color` - Shows current BG and trend arrow. White text on a background that changes color to indicate current BG threshold (green = in range; blue = below range; yellow = above range; red = urgent below/above).
* `Simple` - Shows current BG. Grey text on a black background.
* Optional configuration: set `SHOW_CLOCK_CLOSEBUTTON` to `false` to never show the small X button in clock views. For bookmarking a clock view without the close box but have it appear when navigating to a clock from the Nightscout menu, don't change the settng, but remove the `showClockClosebutton=true` parameter from the clock view URL.

### Plugins

Expand Down Expand Up @@ -481,9 +480,9 @@ To learn more about the Nightscout API, visit https://YOUR-SITE.com/api-docs/ or
* `OPENAPS_URGENT` (`60`) - The number of minutes since the last loop that needs to be exceed before an urgent alarm is triggered
* `OPENAPS_FIELDS` (`status-symbol status-label iob meal-assist rssi`) - The fields to display by default. Any of the following fields: `status-symbol`, `status-label`, `iob`, `meal-assist`, `freq`, and `rssi`
* `OPENAPS_RETRO_FIELDS` (`status-symbol status-label iob meal-assist rssi`) - The fields to display in retro mode. Any of the above fields.
* `OPENAPS_PRED_IOB_COLOR` (`#1e88e5`) - The color to use for IOB prediction lines. Colors can be in either `#RRGGBB` or `#RRGGBBAA` format.
* `OPENAPS_PRED_COB_COLOR` (`#FB8C00FF`) - The color to use for COB prediction lines. Same format as above.
* `OPENAPS_PRED_ACOB_COLOR` (`#FB8C0080`) - The color to use for ACOB prediction lines. Same format as above.
* `OPENAPS_PRED_IOB_COLOR` (`#1e88e5`) - The color to use for IOB prediction lines. Colors can be in `#RRGGBB` format, but [other CSS color units](https://www.w3.org/TR/css-color-3/#colorunits) may be used as well.
* `OPENAPS_PRED_COB_COLOR` (`#FB8C00`) - The color to use for COB prediction lines. Same format as above.
* `OPENAPS_PRED_ACOB_COLOR` (`#FB8C00`) - The color to use for ACOB prediction lines. Same format as above.
* `OPENAPS_PRED_ZT_COLOR` (`#00d2d2`) - The color to use for ZT prediction lines. Same format as above.
* `OPENAPS_PRED_UAM_COLOR` (`#c9bd60`) - The color to use for UAM prediction lines. Same format as above.
* `OPENAPS_COLOR_PREDICTION_LINES` (`true`) - Enables / disables the colored lines vs the classic purple color.
Expand All @@ -499,6 +498,12 @@ To learn more about the Nightscout API, visit https://YOUR-SITE.com/api-docs/ or
* `LOOP_URGENT` (`60`) - The number of minutes since the last loop that needs to be exceeded before an urgent alarm is triggered
* Add `loop` to `SHOW_FORECAST` to show forecasted BG.

For remote overrides, the following extended settings must be configured:
* `LOOP_APNS_KEY` - Apple Push Notifications service (APNs) Key, created in the Apple Developer website.
* `LOOP_APNS_KEY_ID` - The Key ID for the above key.
* `LOOP_DEVELOPER_TEAM_ID` - Your Apple developer team ID.
* `LOOP_PUSH_SERVER_ENVIRONMENT` - (optional) Set this to `production` if you are using a provisioning profile that specifies production aps-environment, such as when distributing builds via TestFlight.

##### `override` (Override Mode)
Additional monitoring for DIY automated insulin delivery systems to display real-time overrides such as Eating Soon or Exercise Mode:
* Requires `DEVICESTATUS_ADVANCED="true"` to be set
Expand Down Expand Up @@ -545,13 +550,13 @@ To learn more about the Nightscout API, visit https://YOUR-SITE.com/api-docs/ or
* `PUSHOVER_ANNOUNCEMENT_KEY` - An optional Pushover user/group key, will be used for system wide user generated announcements. If not defined this will fallback to `PUSHOVER_USER_KEY` or `PUSHOVER_ALARM_KEY`. This also support a space delimited list of keys. To disable Announcement pushes set this to `off`.
* `BASE_URL` - Used for pushover callbacks, usually the URL of your Nightscout site, use https when possible.
* `API_SECRET` - Used for signing the pushover callback request for acknowledgments.

If you never want to get info level notifications (treatments) use `PUSHOVER_USER_KEY="off"`
If you never want to get an alarm via pushover use `PUSHOVER_ALARM_KEY="off"`
If you never want to get an announcement via pushover use `PUSHOVER_ANNOUNCEMENT_KEY="off"`

If only `PUSHOVER_USER_KEY` is set it will be used for all info notifications, alarms, and announcements

For testing/development try [localtunnel](http://localtunnel.me/).

#### IFTTT Maker
Expand Down Expand Up @@ -632,6 +637,12 @@ Feel free to [post an issue][issues], but read the [wiki][wiki] first.
[issues]: https://github.com/nightscout/cgm-remote-monitor/issues
[wiki]: https://github.com/nightscout/cgm-remote-monitor/wiki

### Browser testing suite provided by
[![BrowserStack][browserstack-img]][browserstack-url]

[browserstack-img]: /static/images/browserstack-logo.png
[browserstack-url]: https://www.browserstack.com/

License
---------------

Expand All @@ -641,16 +652,16 @@ License
Copyright (C) 2017 Nightscout contributors. See the COPYRIGHT file
at the root directory of this distribution and at
https://github.com/nightscout/cgm-remote-monitor/blob/master/COPYRIGHT

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
9 changes: 9 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ function create (env, ctx) {
// api and json object variables
///////////////////////////////////////////////////
var api = require('./lib/api/')(env, ctx);
var api3 = require('./lib/api3/')(env, ctx);
var ddata = require('./lib/data/endpoints')(env, ctx);
var notificationsV2 = require('./lib/api/notifications-v2')(app, ctx)

app.use(compression({
filter: function shouldCompress (req, res) {
Expand Down Expand Up @@ -168,9 +170,16 @@ function create (env, ctx) {
limit: 1048576 * 50
}), api);

app.use('/api/v2', bodyParser({
limit: 1048576 * 50
}), api);

app.use('/api/v2/properties', ctx.properties);
app.use('/api/v2/authorization', ctx.authorization.endpoints);
app.use('/api/v2/ddata', ddata);
app.use('/api/v2/notifications', notificationsV2);

app.use('/api/v3', api3);

// pebble data
app.get('/pebble', ctx.pebble);
Expand Down
Loading