Commit Graph
100 Commits
Author SHA1 Message Date
Ben West 41fdb8e88f respect per route body-parser configuration
This change allows each route to express policies for interpreting and parsing
the request body.  Before this change uploads to entries or treatments api
would error if they were larger than 100Kb due to the preference being set for
the whole server.  This change removes the global preference in favor of
allowing each route to choose it's own request size limit.

We also refactor usage of body-parser to be more consistent throughout the code
base.  Most routes can use jsonParser, rawPraser, and urlencodedParser provided
by the common wares component.  Anything doing something else should be called
out as such.  For example, treatments, activity, and entries allow uploads up
to 50Mb.  Other v1 endpoints are using the common configuration set to 1Mb.
2021-10-12 22:57:03 -07:00
Ben WestandGitHub 88071b50f9 Merge pull request #7123 from nightscout/wip/bewest/share2nightscout-bridge-update
bump share2nightscout-bridge version
2021-10-07 10:29:21 -07:00
Ben West 8b93cca718 bump share2nightscout-bridge version
Use npm update --save share2nightscout-bridge to update package-lock.json and
package.json.  This should assist in updates intended to help unify Dexcom Account management.
2021-09-30 14:20:58 -07:00
Ben WestandGitHub 8adda71905 Merge pull request #6896 from nightscout/wip/bewest/dev
Wip/bewest/dev
2021-02-18 11:29:01 -08:00
Ben West f45e7b8d6b task: tidy ci test env away from project root
This change moves the ci.test.env file into the tests/ subdirectory in an
effort to reduce the number of files in the project root.  The package.json
metadata is updated to enable continuous integration tools to continue to work
as expected.
2021-02-18 11:15:45 -08:00
Ben West 24dfa43aa7 task: tidy example environment template
Move this away from project root and into docs area.
CONTRIBUTING file updated to match.
2021-02-18 10:53:31 -08:00
Ben West aa4dca7cc7 task: tidy project root: webpack
This change attempts to tidy the project root by moving webpack configuration
into it's own subdirectory.  The metadata has been updated to match this information.

In addition, the configuration file itself is simplified for future maintainers
in some ways. Now the configuration to a projectRoot which is calculated
exactly once, instead of introspecting from __dirname each time.
2021-02-18 10:39:44 -08:00
Ben West 52cca32bf3 task: tidy project root
This change moves the azure deployment script from the root of the project into
the bin subdirectory with a name that makes its purpose more clear.

.deployment file has been updated to execute the new path.
2021-02-18 10:08:34 -08:00
Ben West 3149bf8b95 task: clean project root
setup.sh appears to be a developer utility to assist in bootstrapping a debian
based system.  It is intended to help install the dependencies needed to run
node, and not used in any automated deploy pipeline.

Instructions have been updated to suite this change which simply moves the
developer tool out of the project repo and into the bin subdirectory.
2021-02-18 10:02:00 -08:00
Ben West 5953f082df remove empty file from project root 2021-02-18 09:59:15 -08:00
Ben West 5ae162cc6b task: clean project root
Move update image into docs folder, away from project root.
2021-02-18 09:55:47 -08:00
Ben West 3bb4f6be01 move script for repo maintenance aside
This script is used to help prep release branches and tags.  Since it's not
crucial to the business of remote monitoring and only useful as a maintenance
tool, we're moving it away from the project root.
2021-02-18 09:52:11 -08:00
Ben West a42408b0a7 task: clean repo root
This change seeks to continue tidying up the repo.

* The database_configuration.json file is not used and has not been used since
  the project was published on github.  We remove the ability to look at files
  inside the source tree for database credentials.

*  Move example-profiles.md to the relevant documentation for plugins area and
   update the link to match.
2021-02-18 09:46:29 -08:00
Ben West be183f5d1b include standard header for server.js at root. 2021-02-18 09:09:02 -08:00
Ben West 22f4336e7f re-install server.js at root
This continues to allow using server.js programmatically from the root of the
project.
2021-02-18 09:05:15 -08:00
Ben West 76f198a8cf Merge branch 'wip/bewest/mmconnect' of github.com:nightscout/cgm-remote-monitor into wip/bewest/mmconnect 2020-12-30 14:00:51 -08:00
Ben WestandGitHub e3784ea44c Merge branch 'dev' into wip/bewest/mmconnect 2020-12-30 14:00:01 -08:00
Ben West fc9fd3425b upgrade minimed-connect-to-nightscout 1.5.0
Update to version available in npm.
2020-12-30 13:56:40 -08:00
Ben WestandGitHub 4b98d355e0 Merge branch 'dev' into wip/bewest/mmconnect 2020-12-22 09:50:45 -08:00
Ben WestandGitHub 2eb9cf80b1 Merge branch 'dev' into wip/bewest/mmconnect 2020-12-17 17:49:33 -08:00
Ben West b09e463c1f Test new dev version of minimed-connect-to-nightscout
Try out plugin with recent fixes, thanks to @fredmk.
2020-12-15 16:05:57 -08:00
Ben West 26ebdbd9a7 Bump share2nightscout-bridge plugin
Use latest update from share2nightscout bridge to
make things easier.  It contains an updated
default for OUS users.
2020-08-28 11:32:08 -07:00
Ben West 46e3d8f37a Merge remote-tracking branch 'official/hotfix/2020-06-28/carelink' into wip/bridge-plugins/update
This is output of npm install --save.
2020-08-28 11:29:16 -07:00
5ffa5ebf9f Wip/bewest/mmconnect eu (#5731)
* prepare hotfix for MMConnect/EU - 2020-06-28

Prepare to handle issue #5719.  This patch adjusts dependencies to
target a community edition fork of minimed-connect-to-nightscout.  The
new dependency targets information provided to begin addressing
changes to Medtronic Carelink services starting late June 2020.

* bump pointing at right tag

* hotfix attempt 2 - carelink 2020 sso updates

* hotfix 3 - attempt 3 at carelink 2020 sso updates

* attempt 4 at hotfix for nightscout

Based on more reliable version of minimed-connect-to-nightscout....
This is testing the hotfix.  When it works, we will bump this one more
time with the newly released version.

Co-authored-by: Sulka Haro <sulka@sulka.net>
2020-08-18 12:01:53 +03:00
Ben West 9528b79f0e npm install --save minimed-connect-to-nightscout@^1.4.0 2020-07-02 12:08:52 -07:00
Ben West 8fba311ddc hotfix 5 - incorporates latest axios changes 2020-07-01 10:59:17 -07:00
Ben West 93c84472c5 attempt 4 at hotfix for nightscout
Based on more reliable version of minimed-connect-to-nightscout....
This is testing the hotfix.  When it works, we will bump this one more
time with the newly released version.
2020-07-01 09:42:20 -07:00
Ben West 06982d7af2 hotfix 3 - attempt 3 at carelink 2020 sso updates 2020-06-30 16:33:35 -07:00
Ben West acf0d39052 hotfix attempt 2 - carelink 2020 sso updates 2020-06-30 16:32:44 -07:00
Ben WestandGitHub cc1edf2e7c Merge pull request #5721 from nightscout/wip/bewest/mmconnect-eu
Confirmed working for US user as well.

prepare hotfix for MMConnect/EU - 2020-06-28
2020-06-30 11:10:35 -07:00
Ben West bcd6df2e17 bump pointing at right tag 2020-06-29 13:35:30 -07:00
Ben West 1062a0d66a prepare hotfix for MMConnect/EU - 2020-06-28
Prepare to handle issue #5719.  This patch adjusts dependencies to
target a community edition fork of minimed-connect-to-nightscout.  The
new dependency targets information provided to begin addressing
changes to Medtronic Carelink services starting late June 2020.
2020-06-29 13:35:30 -07:00
Ben West f611f1b0da bump pointing at right tag 2020-06-29 13:32:33 -07:00
Ben West 0ae6431648 prepare hotfix for MMConnect/EU - 2020-06-28
Prepare to handle issue #5719.  This patch adjusts dependencies to
target a community edition fork of minimed-connect-to-nightscout.  The
new dependency targets information provided to begin addressing
changes to Medtronic Carelink services starting late June 2020.
2020-06-28 11:38:09 -07:00
Ben WestandGitHub db0e08c522 do not redirect to profile editor by default (#5671)
In a default configuration, there is no treatment data.  The code to redirect
the UI to the profile editor is buried deep within the chart rendering code for
basals.  This plugin is only supposed to go into action when enabled via
ENABLE=basal.  This commit fixes first-use experience for the default
configuration intended to draw real-time CGM traces and no basal information is
expected.  Since no basal information is expected unless plugin is enabled via
ENABLE=basal, this allows skipping instead of redirecting to the profile editor.
2020-06-12 17:17:38 +03:00
Ben West 86073c7511 faster 2016-08-13 18:04:36 -07:00
Ben West 1efbcb015e louder faster 2016-08-13 17:55:46 -07:00
Ben West 810302c961 little louder ;-) 2016-08-13 17:50:48 -07:00
Ben West b17985d757 tweaks? 2016-08-13 17:40:45 -07:00
Ben West 3ca2fee288 lower volume? 2016-08-13 17:27:21 -07:00
Ben West 8b71dcd269 try to make only one at a time 2016-08-13 17:25:46 -07:00
Ben West bf02dc2de7 tweak 2016-08-13 17:11:44 -07:00
Ben West 5045df96d2 try audio 2016-08-13 17:07:45 -07:00
Ben West de0ff7f1eb Allow aggregating/counting via REST api 2016-08-11 13:36:52 -07:00
Ben West 8492a5aa98 ensure lastUpdated is always in ms 2016-08-10 16:04:41 -07:00
Ben West 09248bf4a1 actually turn on feature... 2016-08-10 15:49:19 -07:00
Ben West da22e593b9 reduce logging 2016-08-10 15:38:25 -07:00
Ben West f367cd0a7a allow framing the data into pages
set both $lte and $gte query terms
2016-08-10 15:30:38 -07:00
Ben West 9a3d80b67f don't forget dependencies 2016-08-10 15:11:04 -07:00
Ben West 26125c315b introduce new ddata api 2016-08-10 15:06:56 -07:00
Ben West b4c755d795 Merge branch 'wip/import-boot-config' into wip/bewest/2-days-temps 2016-08-10 12:19:00 -07:00
Ben West 96a0e8896d Merge branch 'wip/tokens' into wip/bewest/2-days-temps 2016-08-10 12:18:51 -07:00
Ben West 0f42e69269 env: off/on are truthy sometimes
Provide readENVTruthy, and mapTruthy, to explicitly handle
the cases where on/off or similar should result in a
Boolean value.  Here, they should be mapped correctly,
eliminating a problem @miloskozak experienced when setting
AUTH_DEFAULT_ROLES=bad, there is an exception becaue the
value is a literal `true` instead of the string `"bad"`.

Intended to be a no-op, preserving the intended effects
from previous commit
dbe29bd4be from
@jasoncalabrese.
2016-08-09 12:43:43 -07:00
Ben West 28ba2a8c65 css tweak for codacy
important shouldn't be needed?
2016-08-08 17:57:38 -07:00
Ben West 2f0bbcaa07 make codacy happier 2016-08-08 17:12:55 -07:00
Ben West 7a3032e641 make codacy happier 2016-08-08 17:10:44 -07:00
Ben WestandGitHub dfc2b1093d Merge pull request #1876 from ps2/tokens
Set static serverSettings
2016-08-08 14:13:29 -07:00
Ben West c2ff3065fb add slightly more authorized/unauthorized tests
This affects the POST to /entries/preview.
2016-08-08 13:59:47 -07:00
Ben West 980112cd99 Merge branch 'wip/tokens' of github.com:nightscout/cgm-remote-monitor into wip/tokens 2016-08-08 13:48:13 -07:00
Ben West e39ab7ad17 isolate effects of middleware from other routers
Using all(...) in this manner allows middleware from router A to
not affect router B.

As a result, sendJSONStatus and ability to optionally end in
.json disappeared, which this patch also restores.

CC: @jasoncalabrese
With this change, I can successfully restrict reads to entries
vs status vs other things without the middleware leakage we
observed earlier.
2016-08-08 13:45:31 -07:00
Ben West dd2d0aee24 import many settings on boot from remote URL
Allows sharing commonly used configurations amongst folks.
CC @jasoncalabrese.
2016-08-07 15:12:54 -07:00
Ben West 00dc91538b Merge branch 'wip/tokens' into wip/bewest/2-days-temps 2016-08-06 17:25:12 -07:00
Ben West 0a77b90ecf allow UI tests to re-use/share more code
Tighten up the boilerplate a bit.
2016-08-06 16:56:03 -07:00
Ben West 30e9507dae comment out code for codacy 2016-08-06 13:36:14 -07:00
Ben West 46834c811c cleanup ddata tests a bit 2016-08-06 13:32:08 -07:00
Ben West 7ff9f42209 add slightly more tests for ddata
TODO: ensure partition function gets called for better coverage.
2016-08-06 13:30:56 -07:00
Ben West 73269128f7 Merge branch 'wip/tokens' of github.com:nightscout/cgm-remote-monitor into wip/tokens 2016-08-06 12:21:12 -07:00
Ben West c005b40e69 broken test
For some reason, when I go to add a new test, I can't get should to
work as expected, which is getting me stuck on adding new tests.
2016-08-06 12:20:28 -07:00
Ben West 0d88b1b877 tweak missing semicolon 2016-08-05 13:24:43 -07:00
Ben West 69e6be52ed increase tests of status api a tad 2016-08-05 13:07:21 -07:00
Ben West 37cde4125a make codacy be quieter
tweak some lint notes: missing semicolons, mixed double vs single
quote, unused variables (it's still unused...)
2016-08-05 12:51:43 -07:00
Ben West 9ab886179c teach tests about readable default role
Allows tests to pass naively.  In future this can be augmented
to more thoroughly test security.
2016-08-04 18:02:17 -07:00
Ben West abc847b434 Revert "Revert "allow temp basals for last two days""
This reverts commit 683cb3be63.
2016-08-04 16:33:26 -07:00
Ben West 835dcea887 allow accessToken in query params to grant perms
CC @jasoncalabrese, this is debatable, I think this is what you were referring
to, I'd prefer to use the sha1sum (which is fewer bytes) and use that as the id
to lookup/store in mongo instead of this, but not sure.
2016-08-04 16:30:45 -07:00
Ben West 0f735d0af5 implement read-access against token, mod default
Could see an endpoint changing the global server variable, `defaultRoles` as well.
Seems to work well to disable/enable access really quickly.
2016-08-04 15:40:02 -07:00
Ben West 5abb480548 assign authorized token object to serverSettings
Something about the concat/eval wasn't quite working for me.
2016-08-04 13:06:14 -07:00
Ben West 683cb3be63 Revert "allow temp basals for last two days"
This reverts commit fb73906f31.
2016-08-03 16:33:13 -07:00
Ben West fb73906f31 allow temp basals for last two days 2016-08-03 16:26:53 -07:00
Ben West 2539392e90 Fix swagger rendering 2016-07-21 12:04:57 -07:00
Ben West 8c66d63fe6 Merge branch 'wip/report/range-compare' of github.com:nightscout/cgm-remote-monitor into wip/report/range-compare 2016-05-29 14:46:04 -07:00
Ben West f963bb45f0 fix race condition, noticed by @jasoncalabrese
When data loads quickly, it can triggr a render before the elements have been
added to the canvas.
This nixes rendering dots until after init has run.
2016-05-29 14:44:55 -07:00
Ben West 3b2dfc0ab4 Merge branch 'dev' of github.com:nightscout/cgm-remote-monitor into wip/report/range-compare 2016-05-22 00:45:07 -07:00
Ben West f961af6033 Merge branch 'dev' of github.com:nightscout/cgm-remote-monitor into wip/report/range-compare
Conflicts:
	package.json
2016-05-12 03:37:18 -07:00
Ben West 7df885d702 Merge pull request #1420 from skjelland/dev
Add serverTimeEpoch, needed for wifi uploader
2016-04-04 17:00:29 -07:00
Ben West 38019dc09b Merge pull request #1434 from davidebbo/dev
Add Deploy To Azure button and ARM template
2016-04-03 00:42:13 -07:00
Ben West 25cec4d505 Merge pull request #1581 from jontelm/dev
Added node 4 and 5 to travis
2016-04-03 00:40:33 -07:00
Ben West ff6212adbd Merge pull request #1584 from ericmarkmartin/wip/clean/style
Fixed more style problems
2016-04-03 00:39:16 -07:00
Ben West 103516b5d2 Merge pull request #1540 from nightscout/wip/text/api
fix text endpoints of API
2016-04-03 00:37:15 -07:00
Ben West 3e84032d7a Merge pull request #1583 from ericmarkmartin/wip/text/api
Fixed pr issues from codacy
2016-04-03 00:27:17 -07:00
Ben West c52b034c54 Merge branch 'wip/text/api' into wip/report/range-compare 2016-03-03 13:41:35 -08:00
Ben West 3f0b6be53a fix text endpoints of API
This allows fetching 10k+ records as text.
2016-03-03 13:41:15 -08:00
Ben West dc8e6c4fcc Merge branch 'dev' of github.com:nightscout/cgm-remote-monitor into wip/report/range-compare 2016-03-03 13:01:55 -08:00
Ben West c26bdbb074 Merge branch 'dev' of github.com:nightscout/cgm-remote-monitor into wip/report/range-compare
resolved Conflicts:
	package.json
2016-02-08 15:27:27 -08:00
Ben West b7d24b2439 put x axis at bottom 2015-11-22 20:01:25 -08:00
Ben West 3b5b844796 attempt faster data loading, crossfilter, transitions 2015-11-22 19:58:30 -08:00
Ben West 1ac1cd56b1 fix gridlines 2015-11-21 12:23:22 -08:00
Ben West 9385ffcd75 round queries to whole days 2015-11-18 14:41:55 -08:00
Ben West 8f88a24615 don't munge height 2015-11-18 13:33:46 -08:00
Ben West 888d4d49e0 correct gridlines? 2015-11-18 13:29:24 -08:00
Ben West 05e057bab4 tweak heights? 2015-11-18 13:23:06 -08:00