* Revert "change default back to 3HR"
This reverts commit e60ff3aa9d.
* shorten HR to H to avoid line-wrapping on mobile
* try larger label font: 35 instead of 25 (vs. 40)
* add comma
* deviceInfo.recent null check
* default back to 3, w/ 4 as an option
* re-add H to single-digit hours
* * Don't use cache manifest all all for development
* Add 4 hours option to view and change the labelling to remove language issues
* Have page scale the minor pill widths more gracefully
* skeleton code
* publishing
* Activating remote override
* Fix event types refresh, and fix custom duration
* Don't create treatment record; loop will
* Additional override details for treatment tooltip
* Pass client from careportal
* attempt at moving endpoint to api/v2
* Add bodyParser to v2/notifications
* Remove notifications api from v1
* Remove unused var
* Better error handling and reporting
* Add documentation for new loop plugin vars
* Handle indefinite duration overrides
* Move label of indeterminate duration override to now line when start is offscreen
* test
* Use separate representation for indefinite duration treatments
* fix display for finite duration treatments
* Fix re-use of elements when treatment ordering changes
* Handle more rect transition() updates
* Add check for LOOP_DEVELOPER_TEAM_ID
* Support configuration of aps-environment via environment variable.
* Fix expiration date math; was essentially preventing retries
* extended .gitignore for Visual Studio 2017
* creating a lib for api3 and exposing it's swagger file
* adding pilot test (for /swagger.yaml)
* implementing public GET /version
* setting api version to 3.0.0-alpha
* creating authorization skeleton + fetching some API env variables
* reusing authorization library
* implementing security
* forcing HTTPS and removing x-powered-by from response
* moving messages to constants, creating https instance fixture
* testing HTTPS requiring
* testing Date header
* testing permission check
* testing allowed operation
* refactoring + storage stub
* create architecture for generic operations
* beginning of READ operation
* tidying the code up
* basic READ part
* going further with READ operation
* DELETE operation
* handling fields parameter
* refactoring to classes
* going further with SEARCH operation
* refactoring file structure
* filtering for SEARCH operation
* preparations for fallback deduplication
* CREATE operation
* UPDATE operation
* PATCH operation
* HISTORY operation
* creating more precise variant of HISTORY operation
* autopruning
* long for timestamps in swagger
* bug fix (when search fields=srvCreated)
* creating skeleton for generic collection API test
* specific HISTORY skeleton
* distinguish between collection logical and storage name
* renaming operation to LAST MODIFIED and getting it to work
* fallback for LAST MODIFIED operation
* tidying a bit
* LAST MODIFIED documentation
* bugfix + emitting data-received
* adding some validations
* bugfix - remove 'token' parameter from filtering
* testing and debugging generic workflow
* test fix for empty db
* fixing security test fixture
* trying to fix Travis CI testing DB problem
* multiple auth callback bugfix + adding user field on authed create/update
* messages for Travis CI debugging
* messages for Travis CI debugging
* messages for Travis CI debugging
* test fix (to be prepared for future dates in db)
* test fix
* adding fallback created_at filling on each create/update
* STATUS operation with API permissions
* querying srvDate from storage + include storage version info
* bugfix of missing apiConst require
* getting mongo version with read-only user rights
* getting mongo current date with read-only user rights
* trying to diagnose travis CI timeout
* refactoring storage version caching (due to some environments problems)
* making VERSION work on empty database
* more fixes
* skipping API HTTPS test for node 8
* making code more readable using ES6 (Promises, async + await)
* extending treatments collection docs by inspecting the careportal code
* tidying existing API3 tests up to allow further grow
* tidying the authorization code up to increase readability and performance a bit
* more refactoring to ES6 and making APIv3 files structure more extendable
* normalizing incoming dates to UTC and storing utcOffset
* fixing srvDate to be of node.js server, not the mongo DB
* preparing test fixtures for permissions testing + skeleton for CREATE operation test
* intensive CREATE operation testing + minor bug fixes
* correcting the deduplication test
* more deduplication testing of CREATE operation
* adding test skeletons for other generic operations
* added variability in filtering by date, created_at, srvModified, srvCreated fields
* fixing test accordingly to previous commit
* adding new collection settings for centralized apps' settings storage
* trying to solve travis CI testing problem - adding default collections names
* another attempt to travis CI test fix
* adding some tests for READ operation
* adding custom error handler (overriding bodyparser's errors)
* securing settings collection more and updating swagger accordingly
* making HISTORY timestamp parameter more flexible + updating swagger documentation
* more testing and bug fixing
* sending only HTTP status with empty body, when there is no message + minor bug fixing
* more refactoring and testing (especially of UPDATE operation)
* PATCH testing + adding userModified field for troubleshooting purposes
* basic SEARCH operation testing
* more SEARCH operation testing
* adding alternative 'now' query parameter to 'Date' header to make GET easier
* adding 'now' to reserved query parameters for SEARCH operation
* more testing
* renaming field user to subject (and modifiedBy)
* bugfix - fixing RFC 2822 constant for moment parsing
* storageSocket: creating skeleton for new Socket.IO namespace
* storageSocket: authentication by accessToken
* storageSocket: authorizing to subscribe rooms
* storageSocket: emitting create, update and delete events
* APIv3: adding support for swagger UI at /api/v3/swagger-ui-dist
* solving some problems detected by eslint
* solving some problems detected by eslint
* APIv3: testing and debugging Socket.IO
* APIv3: testing and debugging Socket.IO
* APIv3: Socket.IO documentation
* APIv3: making the sample real
* APIv3: starting to create a simple tutorial MD file
* APIv3: small corrections
* APIv3: minor corrections after dev merge
* APIv3: adding CREATE and READ operations to the tutorial.md
* APIv3: adding SEARCH, LAST MODIFIED, UPDATE operations to the tutorial.md
* APIv3: finishing the tutorial.md
* APIv3: minor bugfix (bad location after upsert)
* APIv3: refactoring SEARCH complexity
* APIv3: refactoring mongoCollection complexity
* APIv3: refactoring complexity
* APIv3: tidying up a bit
* APIv3: refactoring security (start)
* APIv3: refactoring lastModified
* APIv3: refactoring create (start)
* APIv3: refactoring create (finish)
* APIv3: refactoring delete
* APIv3: refactoring history
* APIv3: refactoring update
* APIv3: refactoring patch
* APIv3: refactoring read
* APIv3: refactoring search + removing deprecated authorizationBuilder
* APIv3: adding best practise for identifier constructing
* APIv3: refactoring and enhancing the validation (immutable fields)
* APIv3: adding security.md documentation file
* APIv3: refactoring - splitting index.js into multiple files
* APIv3: calculating identifier on server side + deduplicating
* APIv3: refactoring cosmetics
* APIv3: updating the documentation
* APIv3: making basic and security tests more readable using async/await
* APIv3: making the rest of tests more readable using async/await
* APIv3: adapting test of previous API
* APIv3: adapting test of previous API
* Fix clock if authentication is enabled
Add .npmignore file
* Add time to clock view back
* Formatting
* Select browser language for authentication dialog
Make authentication dialog bigger to suit for other languages.
* Update hashauth.js
* Update hashauth.js
* Update hashauth.js
* Update hashauth.js
* Select language from localStorage
And get suitable language for the very first auth dialog (before the settings were read from server or user can select language in the configuration)
* remove extra `/ ` from clockview, otherwise bundle will not load and search for domain `bundle`
fixes https://github.com/nightscout/cgm-remote-monitor/pull/4860#pullrequestreview-277209223
* remove .npmignore for now.
should be merged in seperated PR
* small fixes
If I start nightscout from other path, e.g. from `/opt` and nightscout is in `/opt/cgm-remote-monitor`, it tries to find `/opt/tmp` what does not exist.
* Use moment.js to parse dates, with better error messaging for unparseable dates
* Oops fix a bug here
* Add logging for unparseable dates
* Output a better error
* * Re-enabled heap dumps
* Improved API documentation
302 and 307 basically do the same thing with just one important difference:
The default 302 redirect from express.js tells the browser to repeat the request with the new URL using the GET verb.
When using the 307 status code manually, this tells the browser to repeat the very same request against the new URL using all the same parameters, headers and most important HTTP verbs.
In practice this is important every time you want to change settings or flip a switch or enter your API key (that information will never arrive at the server)
It's even more important when you get to the site through a reverse proxy that doesn't properly set the X-Forwarded-Proto header.
* * 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
* 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.
* 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
* upgrade mocha from 3.5.3 to 5.0.5
This resolves these security issues
Low Regular Expression Denial of Service
Package debug
Dependency of mocha [dev]
Path mocha > debug
More info https://nodesecurity.io/advisories/534
Critical Command Injection
Package growl
Dependency of mocha [dev]
Path mocha > growl
More info https://nodesecurity.io/advisories/146
* upgrade mocha and start modularizing lodash to make sure tests pass
* more lodash modularization
* upgrade mqtt to 2.18.3
* allow npm 6.2
* upgrade share2nightscout-bridge
* incorporate express-extension-to-accept into Nightscout
the packages seems not maintained (github page is 404) and has a security issue with mime package. so upgraded and included into Nightscout code.
if somebody knows a more efficient way of programming this with express4 please PR
* update jsdom for security fixes
* prevent wrapping of hour labels by removing the space
* Revert "update jsdom for security fixes"
This reverts commit 04f1f39d636d8d79c6b01b5f298f9a6cea3dc645.
* Revert "more lodash modularization"
This reverts commit c4fa5304db9f16b94f15c2b44793a5a11d595885.
* remove forever dependency
* Revert "Revert "more lodash modularization""
This reverts commit b13c274ebff0b5c3a48ffc0e610ca85a9f8d25bc.
* fix report.test.js with newer packages
sometimes a fix is very easy. This is to prevent:
```
Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
Arguments:
[0] _isAMomentObject: true, _isUTC: true, _useUTC: true, _l: undefined, _i: T00:00:00, _f: undefined, _strict: undefined, _locale: [object Object]
Error
at Function.createFromInputFallback (XXX\cgm-remote-monitor\tmp\js\bundle.js:117408:98)
at configFromString (XXX\cgm-remote-monitor\tmp\js\bundle.js:119456:15)
```
We must use ISO8601 formatted strings and not use slashes in dates, see https://github.com/moment/moment/issues/1407#issuecomment-155630060
* upgrade webpack to 4.16.2
* Update package.json
* 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
* Added calculation for GVI, PGS and Total Absolute Change calculation
* Refactored the server to use Webpack for the bundle generation instead of Browserify (since browserify-express seems to not work with Node 8 and is not maintained)
* Improved caching & compression of JS and CSS resources
* If NODE_ENV="development”, don’t cache resources for more than 10 seconds & generate a report about Bundle size