-
Notifications
You must be signed in to change notification settings - Fork 71.8k
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
Wording tweaks to go with #4810 #4866
Conversation
Dev update
Dev sync
sync Dev
Dev sync
sync Dev
sync dev
Dev sync
Dev sync
Dev sync
Dev sync
@@ -221,15 +215,15 @@ To learn more about the Nightscout API, visit https://YOUR-SITE.com/api-docs.htm | |||
|
|||
### Required | |||
|
|||
* `MONGO_CONNECTION` - Your mongo uri, for example: `mongodb://sally:sallypass@ds099999.mongolab.com:99999/nightscout` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you delete MONGO_CONNECTION on purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Far as I could tell, MONGO_CONNECTION
has been deprecated; we use MONGODB_URI
now. No?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MONGODB_URI should be listed here. Also the MONGODB_COLLECTION is not a required variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is required, per the Heroku template.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added MONGODB_URI to the Required section.
* `TIME_FORMAT` (`12`)- possible values `12` or `24` | ||
* `NIGHT_MODE` (`off`) - possible values `on` or `off` | ||
* `SHOW_RAWBG` (`never`) - possible values `always`, `never` or `noise` | ||
* `CUSTOM_TITLE` (`Nightscout`) - Usually name of T1 | ||
* `THEME` (`default`) - possible values `default`, `colors`, or `colorblindfriendly` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
according to source default
is still the default, see
cgm-remote-monitor/views/index.html
Line 259 in f81298f
<dd><input type="radio" name="theme-browser" id="theme-default-browser" value="default" checked /><label for="theme-default-browser" class="translate">Default</label></dd> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yes. colors
has been the de facto default for quite a while, as it's pre-populated in the Heroku deployment template. Should update the index.html to reflect this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing defaults should not be done in a patch release. @sulkaharo: can you reflect your view on this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was changed as the pre-populated default in the template back in early February after data gathering and consultation in the FB groups — vast majority of end users switch to colors
, so made sense to default it.
@unsoluble @sulkaharo setting this for the 0.12.4 release. Let's have a look at these doc updates in the next coming days. |
I put it there because |
Ran some proper browser test suites, determined actual minimum specs for the main site.
These changes really should have gone in with 0.12.4, but I forgot to mention it at the time. Can we resolve the outstanding concerns? Happy to make tweaks. |
* Normalize Treatment, Entry and Device Status object dates to be all in UTC Strings (nightscout#4658) * 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 * Fix all issues from ESLint (nightscout#4730) * Cherry picks the ES language changes from nightscout#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 * Add eslint ignores to a false positive * Fix issues found with linting in the server code & update module versions based on npm audit * * Bump version to 0.12.0 for release * update package.json and nvmrc to point to latest 10 series LTS node * Add my.env.template, referred to in dev docs * BUGFIX: Fix the clock to load the javascript bundle from the right place * Bump version number to 0.12.1 * Add small close button to the clock views * allow Node 12 * Add close buttons to all views accessible from the main menu, to prevent users on iOS getting stuck * Bump version to 0.12.2 * Fix main view button alignment * allow Azure with Node ^10.15.2 and allow Node 12 * drop Node `^12.6.0` from package.json, because it is not recommended yet (but it works) * up WEBSITE_NODE_DEFAULT_VERSION to 10.15.2 * Update browser requirements * Perform HTTP to HTTPS redirect using 307 status 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. * Only set INSECURE_USE_HTTP as last resort I've changed the explanation for the `INSECURE_USE_HTTP` environment variable. The old first line describing this setting in just one sentence was wrong and the next line basically suggested turning this security feature off in situations where it's not needed. In the nightscout code you check if either the connection is secure by itself or if the X-Forwarded-Proto header is set (which it should be by default in all major reverse proxy applications). It should be unnecessary to change that setting even in a reverse proxy environment. * Update clock view notes * * Close button color is much dimmer and changes color appropriately in the color view * HIDE_CLOCK_CLOSEBUTTON setting to hide the button altogether (set to TRUE or ON to hide buttons altogether) * Fix CSS for toolbar positioning in the main view * Fix documentation on the clock URLs and add mention of the setting * Load the latest 'Sensor Stop' event in case user has a Start and Stop event that are both outside the 2-day full data load window * Renamed the config variable and inverted the boolean logic * feat: Add support for different color prediction lines (nightscout#4792) * add support for different color prediction lines * changed quotation marks to better fit guidelines * corrected and standardized variable names * added support for colored ACOB prediction and changed default prediction line colors * added default colour for 'Values' prediction * fix: Temp basal input fix for browsers that don't follow standards (Samsung phones, Kindle Fire) * Adds a new feature for plugins, where plugin extended settings can be changed in the client. Needs expanding on later - currently only supports booleans as checkboxes. * Add the new setting to README * Only show plugin settings in in client if the plugin is visible * Remove debug logging * Assume any string in DISPLAY_UNITS that contains "mmol" indicates mmo… (nightscout#4810) * Assume any string in DISPLAY_UNITS that contains "mmol" indicates mmol and ensure mg/dl is right if the setting is not mmol * Add startup logging for the value * feat: validate temp target in Careportal (nightscout#4812) * Adds data validation function to the careportal * Validate temporary targets define both low and high target and sanitize the values for obvious issues * Removes unused logging from openaps pill * Fixes a bug with undefined setting * Changed logic for the Clock Close button: 1) The show now defaults to false. When enabled, the close X always appears, 2) The views also accept this parameter from a GET parameter, which is set when navigating to the view from the menu, so users can bookmark the page without the parameter (nightscout#4824) * Clock-color arrow wasn't reverting from its stale state (nightscout#4821) * Small fix for if-modified-since header parsing (nightscout#4827) * New utils.toFixed() for cleaner labels (nightscout#4822) * Updated utils.toFixed * tabs to spaces * Rename the new function toFixedMin * fix tests * Simpler, more robust check See https://stackoverflow.com/questions/6003884/how-do-i-check-for-null-values-in-javascript * feat: API improvements (nightscout#4806) * 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 * * Allow users to set `DE_NORMALIZE_DATES=false` to have the REST API denormalize UTC dates to zoned ISO dates in the API (nightscout#4826) * Don't show calculated insulin from carbs * Update README.md Updated README to reflect all changes from the release * Update CONTRIBUTING.md Added a mention of INSECURE_USE_HTTP for development * Bump version to 0.12.3 * One more clock change - the SHOW_CLOCK_CLOSEBUTTON setting can now be used to disable the X from appearing in the clocks at any time. The default is to show it when the GET parameter is set, allowing bookmarking a clock without the X, but retaining it when navigating to the page * staleTime div is missing in the clockview * Bump version to 0.12.4-dev * Remove profile conversion warning This modal dialog about converting the profile to a format that 0.9.0 or earlier won't support is still popping on fresh installs, shouldn't be required at this point. * Rewording of the "wrong profile" dialog * Fixed plugin settings being displayed in other settings pages * Allow start nightscout from other directories but cgm-remote-monitor 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. * Formatting * Use not only from cgm-remote-monitor * Update language.js per nightscout#4837 and nightscout#4838 * fixed issue with incorrect target validation * Fix clock if authentication is enabled (nightscout#4914) * 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 nightscout#4860 (review) * remove .npmignore for now. should be merged in seperated PR * small fixes * German language updates (nightscout#4895) * Updated german Languague for nightscout#4851 * added new translations * upgrade minimed-connect-to-nightscout to fix GuardianConnect for US servers (and update npm dependencies) (nightscout#4915) * upgrade minimed-connect-to-nightscout to 1.30to fix GuardianConnect for US servers, see mddub/minimed-connect-to-nightscout#13 * npm update to fix security issue fixes https://nodesecurity.io/advisories/1118 (Arbitrary Code Execution in eslint-utils * update to minimed-connect-to-nightscout 1.3.1 * fix typo and make more clear we don't release with insecure dependencies * Copied work done by mdomox * Updates and fixes to CONTRIBUTING.md * Spacing unification * One more fix for CONTRIBUTING.md * Minor code formatting improvements * One more time... * Renamed Alexa stuff to virtAsst for generic-ness * Corrected missed translate() text * Updated googlehome plugin to mimic the alexa plugin * Changed order of operations * Fixed parameter referencing in googlehome * Yet another CONTRIBUTING fix * Removed extra google stuff * Migrated standalone intents to MetricNow intent * Simplified route handling * Added logging * Added forgotten path selector * Separated instructions for adding virtual assistant support in a plugin * A few typo fixes * Improved logging * Updated Google Home plugin instructions * Attempt to trigger download of template file * Small wording tweaks * Updated Alexa plugin documentation * Updated test files * Re-added handler count tests so devs are prompted to write tests for new handlers * Updated Alexa documentation * Small typo fix * Clarification * Further clarifications and typos * Added language info to Google Home plugin doc * URL correction * URL fix v2 * Wording clarification * Ugh... * Minor instruction fix * Sub steps fix * Fixed Alexa references in Google Home * Added a couple steps for improved user experience * One more forgotten step * Wip/clock hide state management (nightscout#4944) * Add tap-to-show close buttons * oops, small typos * remove unused class * Add state management to the clock close button hiding * api-docs.html -> /api-docs/ (nightscout#4942) `/api-docs/` seems to be the correct path for the swagger UI. - change `/api-docs.html` reference to `/api-docs/` - also change `/api-docs` to `/api-docs/` as it is more exact * mongolab -> mLab (nightscout#4926) * fixed unit conversion in basal pill, openaps pill, temporary targets, and treatments (nightscout#4923) * Updated pump reservoir handler to handle undefined values * Updated titles and unknown-value responses * Modified forecast responses to use translate() * Updated tests * Improved training phrases * Use Babel to transpile the client bundle to be compatible with old browsers (tested with iOS 9) (nightscout#4932) * Rewording the "store hash" label (nightscout#4930) * Rewording the "store hash" label (Nobody in the public knows what a "hash" is; this setting is constantly misunderstood.) * Update languge.js to match * Russian translation proofreading minor corrections, up to line 8000 (nightscout#4950) * Fixed error if latestSGV not filled (nightscout#4919) * (bluefox) add npmignore * Make it runnable as npm package * (bluefox) use absolute path for static folder * Allow start not only from cgm-remote-monitor * (bluefox) add polling option to make it possible the communication without socket.io * 0.12.3-2 Allow slow communication without socket.io * (bluefox) fix errors * (bluefox) fix clock with authentication * (bluefox) fix clock * fix time * Formatting * Fix clock if authentication is enabled Add .npmignore file * Add time to clock view back * Formatting * Fix authentication dialog Take browser language for auth dialog * 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 * (bluefox) fix chart if no latestSGV defined * 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) * Fix language selection * Charts were fixed if no latestSGV value found HTML formatting for "TDD average" and so on * Remove .npmignore * Some code formatting. No relevant changes * Show "-?-" in clock mode if no measured value found. * Small CSS Formatting * Change a let to var in clock views to allow running on old devices * Bump version to 0.12.4 for release * Updated the browser requirements in README * Bump version to 0.12.5-dev, remove Node 8 from Travis to speed up builds * Point release to help users upgrade to the new minimed connect version * Update release to 0.12.6-dev * API V3 (nightscout#4250) * 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 * Add BrowserStack badge to the Readme (nightscout#5001) * Create robots.txt * Update robots.txt * Delete robots.txt * add browserstack logo image * add BrowserStack badge/link to readme * add resized BrowserStack logo * Delete browserstack-logo-600x315.png * Fix black OpenAPS COB forecast dots (nightscout#5057) * Removed alpha from COB hex colors * Updated README for default COB/ACOB hex values * Added link to W3C CSS color specifications * Append token parameter in URL to side menu links (nightscout#5020) * Chore: Typo cleanup in CONTRIBUTING.md (nightscout#5053) * Parse target top and bottom as integers (nightscout#5019) * Remote Loop overrides (nightscout#5043) * 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 * Wording improvements * fix: Support a wider range of unit strings for profiles (nightscout#5102) * Support a wider range of unit strings for profiles * Fix one more incorrect units detection of units (& remove unrelated line that was not used and caused linting errors) * Google Home setup instruction corrections * Corrected how metric selection is found * Fix value caching in the profile functions. Looks like when Circadian profile support was added, the caching of value fetches broke, causing the calls to get profile data to be > 100x slower than before. Additionally, this changes the COB plugin to not calculate COB locally at all if a recent value is available from status uploads (nightscout#5123) * changed gitter shield to discord (nightscout#5121) * changed gitter shield to discord * changed discord shield text to discord chat instead of just chat * changed gitter shield to discord * need to fix my md error * Use tap-set-exit to make failing tests actually fail CI (nightscout#5109) * Clock cleanup (nightscout#5018) * Create robots.txt * Update robots.txt * Delete robots.txt * refactor clock css * swap css import order * Update README.md * Update index.html * Update bgclock.css * Update shared.html * Update clock-shared.css * Update settings.js * Update clock-shared.css * Update clock-shared.css * Update robots.txt * fix(d3): D3 libarry upgrade (lib for visualizing data such as main view, graphs, etc.) (nightscout#5081) * initial commit for d3 upgrade * d3 v5 mostly working except brush * more work on the brush * brush and layout mostly working now * make open-right and open-left lines visible * make brush selection hidden * fix open-right, open-top, and now-line in retro mode * fix setting brush to now * fix updateBrushToNow to set start correctly * add extent to updateBrushToNow * fix inRetro to use dataExtent instead of domain * move a debug log message to better location * debug for brush movements * cleanup adjusted range vs. brushed range * fix syntax error * remove transitions for brush movements * log message for dataUpdate * fix updating brush range when new data arrives * fix keeping up with data when not in retro * keep brush range at focusRangeMS during update * fix variable name error * keep chart in sync with current time when not in retro * use short transition time * test no opacity changes * remove one more highlight and use small transition duration * fix race condition * fix for uncommanded going to retro * fix syntax error * update chart scales when new data arrives in retro mode * Use consistent transition for scroll * clean chart.updateContext * comment out debug messages * remove unused variable * update renderer to account for no structure arg for d3 attr * fix syntax error * one more syntax error * use requestAnimationFrame (cherry picked from commit b610485597b2e9ecf46471994980136d3c17deec) * forgot to update current scroll data (cherry picked from commit 1ab26522cd4abd3fb77a76964469200fc50dc555) * remove extra treatment circles * try using class for selection (cherry picked from commit 92f678c6fe8e2bb700dc61ab56a71d483c5a9988) * reduce update required for focus circles (cherry picked from commit 46aab643125c2a083807627b9fb6052faef2134f) * reduce update required for focus treatments (cherry picked from commit 23ba5c4bea4bf2ff75f2296e1edc606f311ef7fe) * fix update prepare treat circles (cherry picked from commit afcbbab40fe0c93e26e97152513845cf2c5ecf6f) * use _id for treatments key * do not use opacity for past entry circles * replace scale.linear with scaleLinear see https://github.com/d3/d3/blob/master/CHANGES.md#scales-d3-scale (cherry picked from commit 3445eee) * d3 upgrade axis (cherry picked from commit 06a8a92) * d3 upgrade axis (cherry picked from commit 1ac583c) * fix tooltip location * fix plugin tooltip location * update reports for d3 v5 * fix inner radius default for insulin distribution pie * fix dynamic scaling issues * fix single click scroll * Fix font size on axis labels * Render ticks on top of everything * fix click to scroll jankiness * move loading finished to the bottom of updateHeader * fix/feat: Update Alexa integration and add Google Home support (nightscout#4980) * Copied work done by mdomox * Updates and fixes to CONTRIBUTING.md * Spacing unification * One more fix for CONTRIBUTING.md * Minor code formatting improvements * One more time... * Renamed Alexa stuff to virtAsst for generic-ness * Corrected missed translate() text * Updated googlehome plugin to mimic the alexa plugin * Changed order of operations * Fixed parameter referencing in googlehome * Yet another CONTRIBUTING fix * Removed extra google stuff * Migrated standalone intents to MetricNow intent * Simplified route handling * Added logging * Added forgotten path selector * Separated instructions for adding virtual assistant support in a plugin * A few typo fixes * Improved logging * Updated Google Home plugin instructions * Attempt to trigger download of template file * Small wording tweaks * Updated Alexa plugin documentation * Updated test files * Re-added handler count tests so devs are prompted to write tests for new handlers * Updated Alexa documentation * Small typo fix * Clarification * Further clarifications and typos * Added language info to Google Home plugin doc * URL correction * URL fix v2 * Wording clarification * Ugh... * Minor instruction fix * Sub steps fix * Fixed Alexa references in Google Home * Added a couple steps for improved user experience * One more forgotten step * Updated pump reservoir handler to handle undefined values * Updated titles and unknown-value responses * Modified forecast responses to use translate() * Updated tests * Improved training phrases * Wording improvements * Google Home setup instruction corrections * Corrected how metric selection is found * Revert "fix/feat: Update Alexa integration and add Google Home support (nightscout#4980)" (nightscout#5131) This reverts commit 30b88f6. * Improved logic to handle Alexa intents * Clarification * Logic correction * Fix tests failing in dev (nightscout#5127) * * 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 * Performance fixes (nightscout#5134) * 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 * Don't load retro data if not needed. Merge retro data faster if it's present. (nightscout#5141) * Updated Alexa template to comply with new requirements * Load data in one pass (nightscout#5142) * 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 * D3 Upgrade Residual Cleanup (nightscout#5140) * fix forecast limit logic (cherry picked from commit e88ce7e5d1f5fb12c71ae67da4131ff1a50940c9) * fix minimum focus forecast time * make min forecast 30 min * fix forecast time max to client focusRangeMS instead of 30 min (nightscout#5143) * Fix initial forecast point display * Fix forecast time randomly resetting to 30 minutes for openaps users * Stop Focus Circles from Eating Entries (nightscout#5145) * 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. * Fix forecast behaviour (nightscout#5160) * 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 * Update node pushover library to fix crash in case Pushover service is down * adding list of supported APIs versions (GET /api/versions) * Fixed a few missing definitions * API3: add locking documents using isReadOnly flag * Translation improvements * Defined `translate()` in upbat plugin * Migrated titles to use translate() * Migrated static intent titles to use translate() * Misc fixes for tests (even though they didn't fail 🤔) * API3: testing isReadOnly feature * API3: more readonly field name variants * Added instructions on how to update skills/agents * fix devicestatus retro merge (nightscout#5193) * Turkish language updates (nightscout#5192) * Turkish language updates * in to Languages Part Turkish added * in to Languages Part Turkish added * Fix falsely suspended timeago alarms (nightscout#5170) * 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. * Adding to nightscout#5121 (nightscout#5126) * changed gitter shield to discord * changed discord shield text to discord chat instead of just chat * changed gitter shield to discord * need to fix my md error * Update CONTRIBUTING.md Few more tweaks * Update CONTRIBUTING.md * Update CONTRIBUTING.md * Update README.md Change Discord URL to be an invite link instead of a direct link to the channel (which doesn't work if you're not already in it). * Extra info (delta and last measurement time) on clock view. (nightscout#5151) * Parametrized clock view * Parametrized clock view * Wording tweaks to go with nightscout#4810 (nightscout#4866) * mmol/L wording tweak in Readme * Various wording & clarity tweaks in the Readme * Heroku template update to reflect mmol allowance tweak * Update README.md * Update minimum device requirements Ran some proper browser test suites, determined actual minimum specs for the main site. * GitHub actions build (nightscout#5168) * Run tests using GitHub Actions * Node 10 * Test CI fails * Use npm to run tests * Fix package json to run tests * Enable v3 TEST api for both development env and CI * Run CI on both Node 10 and 12 * Allow downgrading Mongo * Move the units configuration detection to a place where it's guaranteed to catch all invocations * Fix the check for environments without the units setting * Rename xdrip-js to xdripjs (nightscout#4959) * rename xdrip-js to xdripjs * update readme for xdrip-js name change * update from CGM to XDRIPJS label * change label from all caps to mixed case for xDripJS * change pill label back to CGM * Added customization step for Alexa skill updates * Language Update: added missing German Translations (nightscout#5172) * language Update devicestatus collection * language Update Admin-Tools * changed wording for admin authorization * typo corrected (admin auth) * language Updates for Admin Tools database cleanups * Don't use dynamic scale unless entries in database (nightscout#5195) * don't use dynamic scale unless have entries * fix report crash when no entries * set forecastTime correctly when no entries present * Language Matters: change "Normal" to "In Range" in glucose distribution reports * Added/updated TOC's * set auth dialog width to client width if smaller than default width * More hebrew translations * Added note regarding the use of the Alexa online simulator * fix focus scale hour format * trip open-top size to fit * fix clearing alarming when clearning CurrentSGV * do not set direction if not current * Handled 0 for pump reservoir * rollback npm-shrinkwrap.json * Fix for distributionpage bug that caused hour 23 to always be active even after uncheck * Russian translation update edit * Use default entries count instead of distributed number literals * Handle mmol to mgdl conversions with a constant reference (nightscout#5274) * Added sanity check for the bridge interval value (nightscout#4717) * Added sanity check for the bridge interval value, setting minimum allowed value to 30 seconds and maximum to 5 minutes. This is to avoid input of very low values which might overload the dexcom servers. * Added missin ';' * Fixed typoe in comment * Added test for default interval (not set in config) * Set lower limit to 1 second * Use auth tokens in api-secret (nightscout#5214) * Allow auth tokens to be passed in the api-secret header and used in the client in place of the API secret * Fix unit test * Fix admin test * Reload page when token is used as a secret * Fix dependency vulnerabilities * Added basal and bolus averages besides TDD and carbs (nightscout#4216) * Remove the leading 0 from the version, so we can comply to how version numbering should really work * Removed unsused var ic (nightscout#5288) * Use constants instead of number literals for http status codes (nightscout#5276) * Updated release name and number (nightscout#5280) * Allow use cgm-remote-monitor as npm package. (nightscout#4847) To use cgm-remote-monitor as npm package, the main attribute is required. * Add 4 hour option to view (nightscout#5289) * Revert "change default back to 3HR" This reverts commit e60ff3a. * 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 * [Clock] Fix incorrect delta calculation (nightscout#5286) * Fix !delta check for delta == 0 * Fixed delta comparison * Hide unit suffix for SMBs issued by AndroidAPS (nightscout#4771) * Fix issues from `npm audit` * Read BG targets in using mmol when server is in mmol mode (nightscout#5291) * Read BG targets in using mmol when server is in mmol mode * Change the Heroku template to match the new logic * Deal with mmol targets being set using commas * Unbreak JSON serialization failing on the /properties API due to circular data reference * Bump version to 13.0.0 * Release 13.0.1 (nightscout#5329) * Release ref update v2 (nightscout#5301) * Updated release name and number * Added missing version number * Added missing version number * Fix auth dialog sizing error (nightscout#5315) * Fix auth dialog sizing error (nightscout#5314) * Fix auth dialog sizing error * Fix Client Init After Auth (cherry picked from commit 1bf416c) * update NS minor version Co-authored-by: Sulka Haro <sulka@sulka.net> Co-authored-by: PieterGit <pieterg@gmail.com> Co-authored-by: John Weston <unsoluble@me.com> Co-authored-by: Benedikt Bauer <benedikt.bauer@bbauer.eu> Co-authored-by: Erin879 <53097574+Erin879@users.noreply.github.com> Co-authored-by: bassettb <bryanbassett@gmail.com> Co-authored-by: ireneusz-ptak <31506973+ireneusz-ptak@users.noreply.github.com> Co-authored-by: Caleb <inventor96@users.noreply.github.com> Co-authored-by: Erin879 <erin.lindsay2@outlook.com> Co-authored-by: Bluefox <dogafox@gmail.com> Co-authored-by: PieterGit <6500826+PieterGit@users.noreply.github.com> Co-authored-by: Lukas Herzog <git@lukasherzog.de> Co-authored-by: inventor96 <inventor96@gmail.com> Co-authored-by: Alexandre Viau <alexandre@alexandreviau.net> Co-authored-by: fedor apanasenko <apanasef@gmail.com> Co-authored-by: Petr Ondrusek <34578008+PetrOndrusek@users.noreply.github.com> Co-authored-by: p5nbTgip0r <cb3f02c5@opayq.com> Co-authored-by: Tracey Berg-Fulton <traceyberg@gmail.com> Co-authored-by: Pete Schwamb <pete@schwamb.net> Co-authored-by: OpossumGit <OpossumGit@users.noreply.github.com> Co-authored-by: Aria Stewart <aredridel@dinhe.net> Co-authored-by: Jeremy Cunningham <34543464+jpcunningh@users.noreply.github.com> Co-authored-by: PetrOndrusek <petr-ondrusek@seznam.cz> Co-authored-by: Diabetlum <44998140+diabetlum@users.noreply.github.com> Co-authored-by: Willem Fibbe <fibbers@gmail.com> Co-authored-by: Jeremy Cunningham <jpcunningh@gmail.com> Co-authored-by: Jake Bloom <jake@steady.health> Co-authored-by: David Jansson <david.jansson81@gmail.com> Co-authored-by: Jakob Sandberg <jakobs@zillowgroup.com> Co-authored-by: Jakob <jakobsandberg95@gmail.com> Co-authored-by: Asbjørn Aarrestad <asbjorn@aarrestad.com> Co-authored-by: lixgbg <henrik.sjostrand@gmail.com> Co-authored-by: Harmjan Greving <harmjan@dynasign.nl> Co-authored-by: Cas Eliëns <cas.eliens@gmail.com>
* dev: (33 commits) Language Matters: change "Normal" to "In Range" in glucose distribution reports Don't use dynamic scale unless entries in database (nightscout#5195) Language Update: added missing German Translations (nightscout#5172) Rename xdrip-js to xdripjs (nightscout#4959) Fix the check for environments without the units setting Move the units configuration detection to a place where it's guaranteed to catch all invocations GitHub actions build (nightscout#5168) Wording tweaks to go with nightscout#4810 (nightscout#4866) Extra info (delta and last measurement time) on clock view. (nightscout#5151) Adding to nightscout#5121 (nightscout#5126) Fix falsely suspended timeago alarms (nightscout#5170) Turkish language updates (nightscout#5192) fix devicestatus retro merge (nightscout#5193) Update node pushover library to fix crash in case Pushover service is down Fix forecast behaviour (nightscout#5160) Stop Focus Circles from Eating Entries (nightscout#5145) Fix forecast time randomly resetting to 30 minutes for openaps users Fix initial forecast point display fix forecast time max to client focusRangeMS instead of 30 min (nightscout#5143) D3 Upgrade Residual Cleanup (nightscout#5140) ...
* Logic correction * Fix tests failing in dev (nightscout#5127) * * 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 * Performance fixes (nightscout#5134) * 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 * Don't load retro data if not needed. Merge retro data faster if it's present. (nightscout#5141) * Updated Alexa template to comply with new requirements * Load data in one pass (nightscout#5142) * 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 * D3 Upgrade Residual Cleanup (nightscout#5140) * fix forecast limit logic (cherry picked from commit e88ce7e5d1f5fb12c71ae67da4131ff1a50940c9) * fix minimum focus forecast time * make min forecast 30 min * fix forecast time max to client focusRangeMS instead of 30 min (nightscout#5143) * Fix initial forecast point display * Fix forecast time randomly resetting to 30 minutes for openaps users * Stop Focus Circles from Eating Entries (nightscout#5145) * 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. * Fix forecast behaviour (nightscout#5160) * 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 * Update node pushover library to fix crash in case Pushover service is down * adding list of supported APIs versions (GET /api/versions) * Fixed a few missing definitions * API3: add locking documents using isReadOnly flag * Translation improvements * Defined `translate()` in upbat plugin * Migrated titles to use translate() * Migrated static intent titles to use translate() * Misc fixes for tests (even though they didn't fail 🤔) * API3: testing isReadOnly feature * API3: more readonly field name variants * Added instructions on how to update skills/agents * fix devicestatus retro merge (nightscout#5193) * Turkish language updates (nightscout#5192) * Turkish language updates * in to Languages Part Turkish added * in to Languages Part Turkish added * Fix falsely suspended timeago alarms (nightscout#5170) * 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. * Adding to nightscout#5121 (nightscout#5126) * changed gitter shield to discord * changed discord shield text to discord chat instead of just chat * changed gitter shield to discord * need to fix my md error * Update CONTRIBUTING.md Few more tweaks * Update CONTRIBUTING.md * Update CONTRIBUTING.md * Update README.md Change Discord URL to be an invite link instead of a direct link to the channel (which doesn't work if you're not already in it). * Extra info (delta and last measurement time) on clock view. (nightscout#5151) * Parametrized clock view * Parametrized clock view * Wording tweaks to go with nightscout#4810 (nightscout#4866) * mmol/L wording tweak in Readme * Various wording & clarity tweaks in the Readme * Heroku template update to reflect mmol allowance tweak * Update README.md * Update minimum device requirements Ran some proper browser test suites, determined actual minimum specs for the main site. * GitHub actions build (nightscout#5168) * Run tests using GitHub Actions * Node 10 * Test CI fails * Use npm to run tests * Fix package json to run tests * Enable v3 TEST api for both development env and CI * Run CI on both Node 10 and 12 * Allow downgrading Mongo * Move the units configuration detection to a place where it's guaranteed to catch all invocations * Fix the check for environments without the units setting * Rename xdrip-js to xdripjs (nightscout#4959) * rename xdrip-js to xdripjs * update readme for xdrip-js name change * update from CGM to XDRIPJS label * change label from all caps to mixed case for xDripJS * change pill label back to CGM * Added customization step for Alexa skill updates * Language Update: added missing German Translations (nightscout#5172) * language Update devicestatus collection * language Update Admin-Tools * changed wording for admin authorization * typo corrected (admin auth) * language Updates for Admin Tools database cleanups * Don't use dynamic scale unless entries in database (nightscout#5195) * don't use dynamic scale unless have entries * fix report crash when no entries * set forecastTime correctly when no entries present * Language Matters: change "Normal" to "In Range" in glucose distribution reports * Added/updated TOC's * set auth dialog width to client width if smaller than default width * More hebrew translations * Added note regarding the use of the Alexa online simulator * fix focus scale hour format * trip open-top size to fit * fix clearing alarming when clearning CurrentSGV * do not set direction if not current * Handled 0 for pump reservoir * rollback npm-shrinkwrap.json * Fix for distributionpage bug that caused hour 23 to always be active even after uncheck * Russian translation update edit * Use default entries count instead of distributed number literals * Handle mmol to mgdl conversions with a constant reference (nightscout#5274) * Added sanity check for the bridge interval value (nightscout#4717) * Added sanity check for the bridge interval value, setting minimum allowed value to 30 seconds and maximum to 5 minutes. This is to avoid input of very low values which might overload the dexcom servers. * Added missin ';' * Fixed typoe in comment * Added test for default interval (not set in config) * Set lower limit to 1 second * Use auth tokens in api-secret (nightscout#5214) * Allow auth tokens to be passed in the api-secret header and used in the client in place of the API secret * Fix unit test * Fix admin test * Reload page when token is used as a secret * Fix dependency vulnerabilities * Added basal and bolus averages besides TDD and carbs (nightscout#4216) * Remove the leading 0 from the version, so we can comply to how version numbering should really work * Removed unsused var ic (nightscout#5288) * Use constants instead of number literals for http status codes (nightscout#5276) * Updated release name and number (nightscout#5280) * Allow use cgm-remote-monitor as npm package. (nightscout#4847) To use cgm-remote-monitor as npm package, the main attribute is required. * Add 4 hour option to view (nightscout#5289) * Revert "change default back to 3HR" This reverts commit e60ff3a. * 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 * [Clock] Fix incorrect delta calculation (nightscout#5286) * Fix !delta check for delta == 0 * Fixed delta comparison * Hide unit suffix for SMBs issued by AndroidAPS (nightscout#4771) * Fix issues from `npm audit` * Read BG targets in using mmol when server is in mmol mode (nightscout#5291) * Read BG targets in using mmol when server is in mmol mode * Change the Heroku template to match the new logic * Deal with mmol targets being set using commas * Unbreak JSON serialization failing on the /properties API due to circular data reference * Bump version to 13.0.0 * Release ref update v2 (nightscout#5301) * Updated release name and number * Added missing version number * Added missing version number * Fix auth dialog sizing error (nightscout#5315) * Fix auth dialog sizing error (nightscout#5314) * Fix auth dialog sizing error * Fix Client Init After Auth (cherry picked from commit 1bf416c) * update NS minor version * Release 13.0.1 (nightscout#5329) * Release ref update v2 (nightscout#5301) * Updated release name and number * Added missing version number * Added missing version number * Fix auth dialog sizing error (nightscout#5315) * Fix auth dialog sizing error (nightscout#5314) * Fix auth dialog sizing error * Fix Client Init After Auth (cherry picked from commit 1bf416c) * update NS minor version * Bump version to 13.0.2-dev * fix some random test failures (nightscout#5341) * fix some random test failures * use typeof to test for existence * Added support for asking delta * Added time reference * Made delta reading more informative * Corrected time reference * Try shortening the response * Revert attempt * Updated templates and documentation * Minor improvement in response when delta is 0 * German translations improved and added (nightscout#5360) * Fix Alexa Launch and SessionEnded Requests (nightscout#5377) * Fix Alexa Launch Request * Allow LaunchRequest to handle intent if set, change shouldEndSession from string to bool * Fix SessionEndedRequest * Fix nightscout#5149 - discord link on CONTRIBUTING.md doesn't do anything (nightscout#5380) * Fix nightscout#5146 - display of treatment with only Fat and Protein set (nightscout#5381) * Basic report page style fixes and updates (nightscout#5387) * Add missing Polish translations and improve existing (nightscout#5382) * Add missing Polish translations and improve existing * Improve translations * Addressed virtual assistant usage with Authentication Roles (nightscout#5388) * Fix nightscout#5347 - Addressed auth roles * Unification * Fix timeago alarms (again). The changes to the rendered had an unintended consequence of triggering the timeago detection less frequently, causing the code to think the client has been hibernating, thus suppressing the alarms. The update changes the clock to be updated more frequently (this updating the hibernation detection), fixing the issue * Remove the server side test * Fix Graph Display Without Recent Devicestatus (nightscout#5409) * Update Russian (nightscout#5415) Corrected major and minor misprints and mistakes - particularly in variables, new translations added * Add server teardown ability (nightscout#5410) * adding teardown event to ctx.bus * adding teardown support for mmconnect and bridge plugins * Additional German Translations and corrections (nightscout#5405) * Cleaned up changed translations * Added Virtual Assistant Translations * Fix nightscout#5188 - move predictions to bundle and don't render chart on predictions offset change (nightscout#5395) * Fix nightscout#5188 - move predictions to bundle and don't render chart on predictions offset change * Fix predictions show for day to day * Move toolbar and authentication status to partial and include on each page (nightscout#5393) * Move authentication status to partial and include on each page * Move toolbar to partial Co-authored-by: Sulka Haro <sulka@sulka.net> * Virtual assistant code simplification (nightscout#5400) * Moved duplicate plugin code to single location, and small improvements * Defined _each() * Pr/5379 (nightscout#5441) * Release 13.0.1 (nightscout#5329) * Release ref update v2 (nightscout#5301) * Updated release name and number * Added missing version number * Added missing version number * Fix auth dialog sizing error (nightscout#5315) * Fix auth dialog sizing error (nightscout#5314) * Fix auth dialog sizing error * Fix Client Init After Auth (cherry picked from commit 1bf416c) * update NS minor version * Added handlers and translations for CGM info * Defined translate() * Fixed sensor state reference * Improved wording for tx age response * Improved wording for session duration response * Updated documentation and templates * Updated README.md TOC and a reference to it * Added CGM battery info * Added unit reference to CGM battery levels * Added handlers and translations for CGM info * Defined translate() * Fixed sensor state reference * Improved wording for tx age response * Improved wording for session duration response * Updated documentation and templates * Updated README.md TOC and a reference to it * Added CGM battery info * Added unit reference to CGM battery levels * Updated API reference in Google Home template Co-authored-by: Caleb <inventor96@users.noreply.github.com> * Volunteer for Polish translations (nightscout#5396) * Api3 output renderers (nightscout#5425) * APIv3: adding framework for various output renderers * APIv3: adding xml output renderer * APIv3: adding csv output renderer * APIv3: documenting supported output renderers * APIv3: testing output renderers * Restore glucose distribution test (nightscout#5434) * Increase coverage of tests on units utility and clean up timeago test (nightscout#5435) * Increase coverage of tests on units utility * clean up timeago test * Refactor to encapsulate duplicated settings logic (nightscout#5426) * Encapsulate duplicate settings checks inside functions * Simplify settings::isAlarmEventEnabled() * Send coverage reports to Codacy (nightscout#5444) * Send coverage reports to Codacy * Action secrets may not be read from forks :( * Let's see if this fixes the path & key passing * Ok one more try for the Actions env * Run tests and coverage separately * Try increasing the admintools test runtime for Node 10 * Run tests only once * Resolve unnecessary uses of eslint-ignore (nightscout#5436) * Resolve unnecessary disabling of no-undef eslint rule * Resolve unnecessary disabling of no-prototype-builtins eslint rule * Resolve unnecessary disabling of no-unused-vars eslint rule * Resolve unnecessary disabling of no-empty eslint rule * Fix eslint errors and add npm script for eslint (nightscout#5427) * re-enable auth check for device status routes * Resolve eslint errors * Add npm script for eslint * Correct regex for express extension middleware and add tests for expected behaviour * Resolve lint error in virtual assistant base * Update index.js * Update index.js * Remove redundant checks on entry ID (nightscout#5440) * Run CI Action for Pull Requests * Update DayToDay report for Loop Overrides (nightscout#5452) Add Loop override name/reason as text to the grey bar at the top of the graph. * Fix earlier merge error with predictions having moved to the report bundle * fix brushing loop (nightscout#5499) * Update README.md (nightscout#5480) Clarified that the "bridge" plugin is for Dexcom Share ("Dexcom" didn't appear at all in the read me), fixed a few typos, and added line 444 about the BRIDGE_SERVER variable. * Added period of days into headline of glucose distribution and percen… (nightscout#5428) * Added period of days into headline of glucose distribution and percentil chart report I make screencopies of the glucose distribution and percential chart report for my diabtes consultant and had to manually add the period of days to the report everytime because it was not shown in the report itself. I added the period of days this with a small number of lines of code and think this is helpful for other too. * removed comments as requested removed comments as requested * Camelcase for new variables reportPlugins, firstDay, lastDay, countDays * forget to save the change of reportPlugins in percentile.js * Move app caching to a service worker (nightscout#5504) * Move app caching to a webworker * Code cleanup * Code cleanup * Make Codacy happy * More parentheses * Added indexes to 'entries' and 'treatments' along with other updates (nightscout#5463) * Added compound indexes for treatments and entries collections. Updated ensureIndex to createIndex in mongo-strage.js as ensureIndex has been deprecated. Finally, updated testing/populate.js to be compatible with more recent versions of the node driver, as well as fixing a path issue. * Fixed missing end quote in lib/server/treatments.js. Changed all newly added double quotes to single quote to match style guide. * Removed indexes that referenced key600. * Fix: Round interporlated mg/dL value to an integer * Plugin to show database size (% of available space or in MiB) (nightscout#5496) * Database size plugin - pill that displays current mongoDB database size * Enabled dbsize by default * Fixed bug with dbsize not shownig when size is (rounded) 0% but real bytes > 0 * Cleanup & update to iconfont generation manual * Changed how warning/urgent levels are configured - from absolute MiB to percentage of DBSIZE_MAX * Trying to fix random fail of APIv3 tests (nightscout#5519) * APIv3: isolating documents from tests (not allowing clashes of calculated identifiers) * removing unused async keyword * client - mobile - Axis label font is scaled on small screens (nightscout#5512) On phones or other small screens, the axis labels (especially x axis) were previously an unreadable jumble of too-close letters * Split view (nightscout#5518) * Adds a 2, 3, 4 and 8 way split view option * Updated description * Generate the table on demand, so any number of sites from 1 to 8 generates a sensible layout * Update readme & don't crash if a name is missing * Allow flagging specific settings to be not exposed the /properties and /status APIs (nightscout#5525) * Add more variables to the special list * [DEV][FIX] Fix dbsize plugin to make it hideable again (nightscout#5529) * [FIX] Making dbsize plugin default but hideable - removed its forced show state * Removed unused lodash dependency * Removed duplicate if statement (nightscout#5531) Removed the additional if statement checking for the loop specific developer team id. This since the exact same if statement existed just above it. * Update Dutch translations (nightscout#5532) * Fix settings test * Update version to 13.1.0 * Fix topbar collapse on small screens (nightscout#5562) * Fix top bar collapsing on small screens * Fix wide button array overflowing the button bar * Option to switch off bolus amount outputs (nightscout#5522) * Option to switch off bolus amount outputs (nightscout#5514) * Fixing issue with carb value not be output when set to "none" (nightscout#5514) * Adding additional output options (nightscout#5514) * Adding environment variable option for 'x U and Over' option. This option is BOLUS_RENDER_OVER with a default value of 1 and the value can be an integer or a float, e.g. 0.3, 1.5, 2, etc... * Adding change to change the font size depending on the bolus value. * Merge two "all" options to create an option that displays as SMB had. * Fix d3 portrait to landscape brush failure (nightscout#5638) * fix d3 portrait to landscape brush failure * fix client.renderer.test for highlighBrushPoints function prototype change * fix highlightBrush * move brush reset inside check for valid brush * Sanitize data from manual careportal entries so only fields with actual data are sent to the server (nightscout#5619) * do not redirect to profile editor by default (nightscout#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. * Fix Issue nightscout#5486 - Device Status Days Feature (nightscout#5651) * Device Status Days Feature * Edits per review from @sulkaharo * Configurable clock views (nightscout#5625) * Configurable clock views * Configurable clock views * Configurable clock views * Configurable clock views * Configurable clock views * Configurable clock views * Update README.md * Update README.md * Configurable clock views * Add remote bolus/carbs + otp entry for loop (nightscout#5598) Add a remote bolus entry field for users on Loop, along with support for an OTP field * Sometimes at the very start no profiles provided. (nightscout#5591) At the first start the nightscout is crashed if profile not full. * Fixes nightscout#4991 - Now selects basal profile based day by day (nightscout#5572) * Test profile settings * NPM Version change * Use console log * Use console log for client * Use console log for client.sbx * Use console log for client.ddata * Use console log for client again * revert * Added multi-profile reporting capabilities Co-authored-by: VIS TFS Admin <liveid@visualsolution.co.uk> * prepare hotfix for MMConnect/EU - 2020-06-28 Prepare to handle issue nightscout#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 * prepare hotfix for MMConnect/EU - 2020-06-28 Prepare to handle issue nightscout#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. * hotfix 5 - incorporates latest axios changes * Fix for boluscalc issue (nightscout#5729) Boluscalc fix & remove integer validation from BG input field * npm install --save minimed-connect-to-nightscout@^1.4.0 * Change DISPLAY_UNITS to use readENV's default value and added several tests for DISPLAY_UNITS (nightscout#5708) readENV() was hard coding the default value of DISPLAY_UNITS, and ignoring the default value for no particular reason. Fixed that. Also, I added a full test suite for DISPLAY_UNITS environment settings to make sure that it works as intended. Finally, I've added the console log for the DISPLAY_UNITS since there's no particular reason why we log that setting and not others. * Fix audit errors, button order (nightscout#5694) * * Update packages giving npm audit errors * Fix Mongo test that broke after update (now uses async/await on getting the connection) * Restore original navigation bar button order * Disable Node 10 tests * Fix temporary target cancellation * Added documentation on the use of Alpha Testing (nightscout#5784) * Wip/bewest/mmconnect eu (nightscout#5731) * prepare hotfix for MMConnect/EU - 2020-06-28 Prepare to handle issue nightscout#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> * * Updated several packages to remove issues from NPM audit * Fix excess logging in settings.js * Removed heapdump package, which was causing issues for some users * * Limit the default number of profiles returned by the API to fix issues with users who are syncing a large amount of profiles from an APS. * Fix profile reporting * Upgrade Helmet to 4.0.0 * CSP and service worker improvements (nightscout#5856) * Add connectSrc for Safari compatibiity * Add new font URL for Google Fonts compatibility * Reload on re-registering the worker * Change Mongo version in github to fix builds * Serve the CSP to everyone * Split view CSP support (nightscout#5864) * Parse split view frames into frameAncestors * Re-enable CSP configuration (nightscout#5867) * Re-enable CSP configuration * Bump share2nightscout-bridge plugin Use latest update from share2nightscout bridge to make things easier. It contains an updated default for OUS users. * feat Add robots.txt to disallow site crawling * Fix dbsize for usage with Atlas (nightscout#5962) * Openaps performance improvement (nightscout#5945) * improve openaps plugin performance * more performance improvements (cherry picked from commit 076a2dd) * correct setting notEnacted variable * remove unnecessary debug logging * Adapt to MongoDB Atlas (nightscout#5893) * Fix Issue nightscout#5763 - Change $.ajax to /api/v1/profile (nightscout#5704) * Bug fixes for Service Worker (nightscout#5970) * Fix service worker refresh for Firefox * Improve logging for service worker initialisation * Skip browser cache for service worker precaching * Prevent `Partial Content` responses in `fetch` by stripping `Range` header * Prevent calling `filter` on an undefined property when service worker cache is empty * Bug fixes for Service Worker * Fixes nightscout#5920 * Fixes nightscout#5943 * Update service-worker.js Removed the MP3 files from the preload to fix issues with webkit-based browsers Co-authored-by: p5nbTgip0r <cb3f02c5@opayq.com> Co-authored-by: Sulka Haro <sulka@sulka.net> * Optimize Nightscout database usage (nightscout#5947) * On periodic polls, only load delta for CGM data, treatments and device statuses * Serve basic CGM data API queries from in-memory cache. Increases the Nightscout memory footprint but should significantly reduce the Mongo load * Serve device status, CGM and treatment records from memory cache * Support count parameter in /profile * Bumping version to 14.0.0 given this is a relatively large update and we want people on Atlas to all migrate to this version * Remove logging statements * fix brushing recursion * Normalize treatments to support absolute doses from the amount field * Add Loop Carbs foodType, absorptionTime to Reports for ISSUE nightscout#5701 (nightscout#5702) * add carb foodType, absorptionTime to reports * Update README to point to new docs * Fix `Treatments` report for `mmol/L` users Fixed a typo to a client function name * Bump version to 14.0.1 * Bump dev to 14.0.2 * Serve Last-Modified header for the service worker to help with some browsers misdetecting caching * Cleaned old appcache references * * Remove unnecessary logging to help with Papertrail limits * Load more treatments and entries to fix caching issues (need to add better cache invalidation to really fix this) * When merging inserts and updates from the database, ensure we always use the new data over the old data * Bump treatment delta loading to four hours * One more increase to treatment load time to cover long overrides * * Bump version to 14.0.3 * Fix a bug in the REST API query for profiles * Bumped up the number of treatments loaded / day for reporting * Fix reports unit test * Bump treatments default limit default to 1000 objects for queries that include other query parameters * * Require created_at for Treatments on insert * Refactoring the cache: moved to another file and support flushing from bus events * Add support for CGM data and device statuses. Refactor dataloader to use the new model and reduce queries back down * Fix data order for REST API * * Add cache update events to websocket API * Remove the validation for created_at in REST API ;( * Remove excess logging * Bump version to .4 * Bump version to 14.0.5 and fix nightscout#6050 * Fix Pebble API detecting mmol units from settings * Make settings parsing whitespace tolerant * * Fix security test * Change boot and caching to expose Mongo connection errors * Don't report an error on every reconnect * Less intimidating error page on start, which also checks for api_secret * Add file missing from last commit * Fix tests * Remove require statement breaking deploys * Update --feature-request--.md * Update --bug-report.md * Update --individual-troubleshooting-help.md * Fix memory leak and cache update issues in 14.0.4 (nightscout#6133) * 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 * Add error cat to error page * Fix MONGODB_URI reference in error message * Bump version to 14.0.6 * Support uploading device statuses in batches (nightscout#6147) * Support uploading device statuses in batches * Correctly report batch insertion results * Make empty cache detection a bit more aggressive to account for cache flush and data insert happening concurrently * Update README.md Explicitly link to the application template in Github Co-authored-by: inventor96 <inventor96@gmail.com> Co-authored-by: Sulka Haro <sulka@sulka.net> Co-authored-by: Jeremy Cunningham <34543464+jpcunningh@users.noreply.github.com> Co-authored-by: PetrOndrusek <petr-ondrusek@seznam.cz> Co-authored-by: Caleb <inventor96@users.noreply.github.com> Co-authored-by: Diabetlum <44998140+diabetlum@users.noreply.github.com> Co-authored-by: Willem Fibbe <fibbers@gmail.com> Co-authored-by: John Weston <unsoluble@me.com> Co-authored-by: ireneusz-ptak <31506973+ireneusz-ptak@users.noreply.github.com> Co-authored-by: Lukas Herzog <git@lukasherzog.de> Co-authored-by: Jeremy Cunningham <jpcunningh@gmail.com> Co-authored-by: Jake Bloom <jake@steady.health> Co-authored-by: David Jansson <david.jansson81@gmail.com> Co-authored-by: fedor apanasenko <apanasef@gmail.com> Co-authored-by: Jakob Sandberg <jakobs@zillowgroup.com> Co-authored-by: Jakob <jakobsandberg95@gmail.com> Co-authored-by: Asbjørn Aarrestad <asbjorn@aarrestad.com> Co-authored-by: lixgbg <henrik.sjostrand@gmail.com> Co-authored-by: Harmjan Greving <harmjan@dynasign.nl> Co-authored-by: Bluefox <dogafox@gmail.com> Co-authored-by: Cas Eliëns <cas.eliens@gmail.com> Co-authored-by: Tanja <7403966+tanja3981@users.noreply.github.com> Co-authored-by: Bartłomiej Szubert <bartlomiejszubert@gmail.com> Co-authored-by: Andrew Dixon <andrew@andrewdixon.co.uk> Co-authored-by: Petr Ondrusek <34578008+PetrOndrusek@users.noreply.github.com> Co-authored-by: Lukas Herzog <mail@lukasherzog.de> Co-authored-by: jonfawcett <38429455+jonfawcett@users.noreply.github.com> Co-authored-by: Jonas Hummelstrand <jonas@hummelstrand.com> Co-authored-by: peterleimbach <peterleimbach@icloud.com> Co-authored-by: Adam Harrison <adamaharrison@gmail.com> Co-authored-by: Dominik Dzienia <dlvoy@users.noreply.github.com> Co-authored-by: stephencmorton <17858976+stephencmorton@users.noreply.github.com> Co-authored-by: Simon Persson <simon@akep.se> Co-authored-by: Cas Eliëns <cas.eliens@isaac.nl> Co-authored-by: Ben West <bewest@gmail.com> Co-authored-by: Matthew <mtfoley.mae@gmail.com> Co-authored-by: josep1972 <joseangelparedesd@gmail.com> Co-authored-by: fromorbonia <3193811+fromorbonia@users.noreply.github.com> Co-authored-by: VIS TFS Admin <liveid@visualsolution.co.uk> Co-authored-by: joracine <joracine@users.noreply.github.com> Co-authored-by: Alexandre Viau <alexandre@alexandreviau.net> Co-authored-by: Lennart Goedhart <lennart@omnibase.com.au> Co-authored-by: p5nbTgip0r <cb3f02c5@opayq.com> Co-authored-by: kskandispersonal <kskandis@live.com>
* Performance fixes (nightscout#5134) * 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 * Don't load retro data if not needed. Merge retro data faster if it's present. (nightscout#5141) * Updated Alexa template to comply with new requirements * Load data in one pass (nightscout#5142) * 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 * D3 Upgrade Residual Cleanup (nightscout#5140) * fix forecast limit logic (cherry picked from commit e88ce7e5d1f5fb12c71ae67da4131ff1a50940c9) * fix minimum focus forecast time * make min forecast 30 min * fix forecast time max to client focusRangeMS instead of 30 min (nightscout#5143) * Fix initial forecast point display * Fix forecast time randomly resetting to 30 minutes for openaps users * Stop Focus Circles from Eating Entries (nightscout#5145) * 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. * Fix forecast behaviour (nightscout#5160) * 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 * Update node pushover library to fix crash in case Pushover service is down * adding list of supported APIs versions (GET /api/versions) * Fixed a few missing definitions * API3: add locking documents using isReadOnly flag * Translation improvements * Defined `translate()` in upbat plugin * Migrated titles to use translate() * Migrated static intent titles to use translate() * Misc fixes for tests (even though they didn't fail 🤔) * API3: testing isReadOnly feature * API3: more readonly field name variants * Added instructions on how to update skills/agents * fix devicestatus retro merge (nightscout#5193) * Turkish language updates (nightscout#5192) * Turkish language updates * in to Languages Part Turkish added * in to Languages Part Turkish added * Fix falsely suspended timeago alarms (nightscout#5170) * 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. * Adding to nightscout#5121 (nightscout#5126) * changed gitter shield to discord * changed discord shield text to discord chat instead of just chat * changed gitter shield to discord * need to fix my md error * Update CONTRIBUTING.md Few more tweaks * Update CONTRIBUTING.md * Update CONTRIBUTING.md * Update README.md Change Discord URL to be an invite link instead of a direct link to the channel (which doesn't work if you're not already in it). * Extra info (delta and last measurement time) on clock view. (nightscout#5151) * Parametrized clock view * Parametrized clock view * Wording tweaks to go with nightscout#4810 (nightscout#4866) * mmol/L wording tweak in Readme * Various wording & clarity tweaks in the Readme * Heroku template update to reflect mmol allowance tweak * Update README.md * Update minimum device requirements Ran some proper browser test suites, determined actual minimum specs for the main site. * GitHub actions build (nightscout#5168) * Run tests using GitHub Actions * Node 10 * Test CI fails * Use npm to run tests * Fix package json to run tests * Enable v3 TEST api for both development env and CI * Run CI on both Node 10 and 12 * Allow downgrading Mongo * Move the units configuration detection to a place where it's guaranteed to catch all invocations * Fix the check for environments without the units setting * Rename xdrip-js to xdripjs (nightscout#4959) * rename xdrip-js to xdripjs * update readme for xdrip-js name change * update from CGM to XDRIPJS label * change label from all caps to mixed case for xDripJS * change pill label back to CGM * Added customization step for Alexa skill updates * Language Update: added missing German Translations (nightscout#5172) * language Update devicestatus collection * language Update Admin-Tools * changed wording for admin authorization * typo corrected (admin auth) * language Updates for Admin Tools database cleanups * Don't use dynamic scale unless entries in database (nightscout#5195) * don't use dynamic scale unless have entries * fix report crash when no entries * set forecastTime correctly when no entries present * Language Matters: change "Normal" to "In Range" in glucose distribution reports * Added/updated TOC's * set auth dialog width to client width if smaller than default width * More hebrew translations * Added note regarding the use of the Alexa online simulator * fix focus scale hour format * trip open-top size to fit * fix clearing alarming when clearning CurrentSGV * do not set direction if not current * Handled 0 for pump reservoir * rollback npm-shrinkwrap.json * Fix for distributionpage bug that caused hour 23 to always be active even after uncheck * Russian translation update edit * Use default entries count instead of distributed number literals * Handle mmol to mgdl conversions with a constant reference (nightscout#5274) * Added sanity check for the bridge interval value (nightscout#4717) * Added sanity check for the bridge interval value, setting minimum allowed value to 30 seconds and maximum to 5 minutes. This is to avoid input of very low values which might overload the dexcom servers. * Added missin ';' * Fixed typoe in comment * Added test for default interval (not set in config) * Set lower limit to 1 second * Use auth tokens in api-secret (nightscout#5214) * Allow auth tokens to be passed in the api-secret header and used in the client in place of the API secret * Fix unit test * Fix admin test * Reload page when token is used as a secret * Fix dependency vulnerabilities * Added basal and bolus averages besides TDD and carbs (nightscout#4216) * Remove the leading 0 from the version, so we can comply to how version numbering should really work * Removed unsused var ic (nightscout#5288) * Use constants instead of number literals for http status codes (nightscout#5276) * Updated release name and number (nightscout#5280) * Allow use cgm-remote-monitor as npm package. (nightscout#4847) To use cgm-remote-monitor as npm package, the main attribute is required. * Add 4 hour option to view (nightscout#5289) * Revert "change default back to 3HR" This reverts commit e60ff3a. * 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 * [Clock] Fix incorrect delta calculation (nightscout#5286) * Fix !delta check for delta == 0 * Fixed delta comparison * Hide unit suffix for SMBs issued by AndroidAPS (nightscout#4771) * Fix issues from `npm audit` * Read BG targets in using mmol when server is in mmol mode (nightscout#5291) * Read BG targets in using mmol when server is in mmol mode * Change the Heroku template to match the new logic * Deal with mmol targets being set using commas * Unbreak JSON serialization failing on the /properties API due to circular data reference * Bump version to 13.0.0 * Release ref update v2 (nightscout#5301) * Updated release name and number * Added missing version number * Added missing version number * Fix auth dialog sizing error (nightscout#5315) * Fix auth dialog sizing error (nightscout#5314) * Fix auth dialog sizing error * Fix Client Init After Auth (cherry picked from commit 1bf416c) * update NS minor version * Release 13.0.1 (nightscout#5329) * Release ref update v2 (nightscout#5301) * Updated release name and number * Added missing version number * Added missing version number * Fix auth dialog sizing error (nightscout#5315) * Fix auth dialog sizing error (nightscout#5314) * Fix auth dialog sizing error * Fix Client Init After Auth (cherry picked from commit 1bf416c) * update NS minor version * Bump version to 13.0.2-dev * fix some random test failures (nightscout#5341) * fix some random test failures * use typeof to test for existence * Added support for asking delta * Added time reference * Made delta reading more informative * Corrected time reference * Try shortening the response * Revert attempt * Updated templates and documentation * Minor improvement in response when delta is 0 * German translations improved and added (nightscout#5360) * Fix Alexa Launch and SessionEnded Requests (nightscout#5377) * Fix Alexa Launch Request * Allow LaunchRequest to handle intent if set, change shouldEndSession from string to bool * Fix SessionEndedRequest * Fix nightscout#5149 - discord link on CONTRIBUTING.md doesn't do anything (nightscout#5380) * Fix nightscout#5146 - display of treatment with only Fat and Protein set (nightscout#5381) * Basic report page style fixes and updates (nightscout#5387) * Add missing Polish translations and improve existing (nightscout#5382) * Add missing Polish translations and improve existing * Improve translations * Addressed virtual assistant usage with Authentication Roles (nightscout#5388) * Fix nightscout#5347 - Addressed auth roles * Unification * Fix timeago alarms (again). The changes to the rendered had an unintended consequence of triggering the timeago detection less frequently, causing the code to think the client has been hibernating, thus suppressing the alarms. The update changes the clock to be updated more frequently (this updating the hibernation detection), fixing the issue * Remove the server side test * Fix Graph Display Without Recent Devicestatus (nightscout#5409) * Update Russian (nightscout#5415) Corrected major and minor misprints and mistakes - particularly in variables, new translations added * Add server teardown ability (nightscout#5410) * adding teardown event to ctx.bus * adding teardown support for mmconnect and bridge plugins * Additional German Translations and corrections (nightscout#5405) * Cleaned up changed translations * Added Virtual Assistant Translations * Fix nightscout#5188 - move predictions to bundle and don't render chart on predictions offset change (nightscout#5395) * Fix nightscout#5188 - move predictions to bundle and don't render chart on predictions offset change * Fix predictions show for day to day * Move toolbar and authentication status to partial and include on each page (nightscout#5393) * Move authentication status to partial and include on each page * Move toolbar to partial Co-authored-by: Sulka Haro <sulka@sulka.net> * Virtual assistant code simplification (nightscout#5400) * Moved duplicate plugin code to single location, and small improvements * Defined _each() * Pr/5379 (nightscout#5441) * Release 13.0.1 (nightscout#5329) * Release ref update v2 (nightscout#5301) * Updated release name and number * Added missing version number * Added missing version number * Fix auth dialog sizing error (nightscout#5315) * Fix auth dialog sizing error (nightscout#5314) * Fix auth dialog sizing error * Fix Client Init After Auth (cherry picked from commit 1bf416c) * update NS minor version * Added handlers and translations for CGM info * Defined translate() * Fixed sensor state reference * Improved wording for tx age response * Improved wording for session duration response * Updated documentation and templates * Updated README.md TOC and a reference to it * Added CGM battery info * Added unit reference to CGM battery levels * Added handlers and translations for CGM info * Defined translate() * Fixed sensor state reference * Improved wording for tx age response * Improved wording for session duration response * Updated documentation and templates * Updated README.md TOC and a reference to it * Added CGM battery info * Added unit reference to CGM battery levels * Updated API reference in Google Home template Co-authored-by: Caleb <inventor96@users.noreply.github.com> * Volunteer for Polish translations (nightscout#5396) * Api3 output renderers (nightscout#5425) * APIv3: adding framework for various output renderers * APIv3: adding xml output renderer * APIv3: adding csv output renderer * APIv3: documenting supported output renderers * APIv3: testing output renderers * Restore glucose distribution test (nightscout#5434) * Increase coverage of tests on units utility and clean up timeago test (nightscout#5435) * Increase coverage of tests on units utility * clean up timeago test * Refactor to encapsulate duplicated settings logic (nightscout#5426) * Encapsulate duplicate settings checks inside functions * Simplify settings::isAlarmEventEnabled() * Send coverage reports to Codacy (nightscout#5444) * Send coverage reports to Codacy * Action secrets may not be read from forks :( * Let's see if this fixes the path & key passing * Ok one more try for the Actions env * Run tests and coverage separately * Try increasing the admintools test runtime for Node 10 * Run tests only once * Resolve unnecessary uses of eslint-ignore (nightscout#5436) * Resolve unnecessary disabling of no-undef eslint rule * Resolve unnecessary disabling of no-prototype-builtins eslint rule * Resolve unnecessary disabling of no-unused-vars eslint rule * Resolve unnecessary disabling of no-empty eslint rule * Fix eslint errors and add npm script for eslint (nightscout#5427) * re-enable auth check for device status routes * Resolve eslint errors * Add npm script for eslint * Correct regex for express extension middleware and add tests for expected behaviour * Resolve lint error in virtual assistant base * Update index.js * Update index.js * Remove redundant checks on entry ID (nightscout#5440) * Run CI Action for Pull Requests * Update DayToDay report for Loop Overrides (nightscout#5452) Add Loop override name/reason as text to the grey bar at the top of the graph. * Fix earlier merge error with predictions having moved to the report bundle * fix brushing loop (nightscout#5499) * Update README.md (nightscout#5480) Clarified that the "bridge" plugin is for Dexcom Share ("Dexcom" didn't appear at all in the read me), fixed a few typos, and added line 444 about the BRIDGE_SERVER variable. * Added period of days into headline of glucose distribution and percen… (nightscout#5428) * Added period of days into headline of glucose distribution and percentil chart report I make screencopies of the glucose distribution and percential chart report for my diabtes consultant and had to manually add the period of days to the report everytime because it was not shown in the report itself. I added the period of days this with a small number of lines of code and think this is helpful for other too. * removed comments as requested removed comments as requested * Camelcase for new variables reportPlugins, firstDay, lastDay, countDays * forget to save the change of reportPlugins in percentile.js * Move app caching to a service worker (nightscout#5504) * Move app caching to a webworker * Code cleanup * Code cleanup * Make Codacy happy * More parentheses * Added indexes to 'entries' and 'treatments' along with other updates (nightscout#5463) * Added compound indexes for treatments and entries collections. Updated ensureIndex to createIndex in mongo-strage.js as ensureIndex has been deprecated. Finally, updated testing/populate.js to be compatible with more recent versions of the node driver, as well as fixing a path issue. * Fixed missing end quote in lib/server/treatments.js. Changed all newly added double quotes to single quote to match style guide. * Removed indexes that referenced key600. * Fix: Round interporlated mg/dL value to an integer * Plugin to show database size (% of available space or in MiB) (nightscout#5496) * Database size plugin - pill that displays current mongoDB database size * Enabled dbsize by default * Fixed bug with dbsize not shownig when size is (rounded) 0% but real bytes > 0 * Cleanup & update to iconfont generation manual * Changed how warning/urgent levels are configured - from absolute MiB to percentage of DBSIZE_MAX * Trying to fix random fail of APIv3 tests (nightscout#5519) * APIv3: isolating documents from tests (not allowing clashes of calculated identifiers) * removing unused async keyword * client - mobile - Axis label font is scaled on small screens (nightscout#5512) On phones or other small screens, the axis labels (especially x axis) were previously an unreadable jumble of too-close letters * Split view (nightscout#5518) * Adds a 2, 3, 4 and 8 way split view option * Updated description * Generate the table on demand, so any number of sites from 1 to 8 generates a sensible layout * Update readme & don't crash if a name is missing * Allow flagging specific settings to be not exposed the /properties and /status APIs (nightscout#5525) * Add more variables to the special list * [DEV][FIX] Fix dbsize plugin to make it hideable again (nightscout#5529) * [FIX] Making dbsize plugin default but hideable - removed its forced show state * Removed unused lodash dependency * Removed duplicate if statement (nightscout#5531) Removed the additional if statement checking for the loop specific developer team id. This since the exact same if statement existed just above it. * Update Dutch translations (nightscout#5532) * Fix settings test * Update version to 13.1.0 * Fix topbar collapse on small screens (nightscout#5562) * Fix top bar collapsing on small screens * Fix wide button array overflowing the button bar * Option to switch off bolus amount outputs (nightscout#5522) * Option to switch off bolus amount outputs (nightscout#5514) * Fixing issue with carb value not be output when set to "none" (nightscout#5514) * Adding additional output options (nightscout#5514) * Adding environment variable option for 'x U and Over' option. This option is BOLUS_RENDER_OVER with a default value of 1 and the value can be an integer or a float, e.g. 0.3, 1.5, 2, etc... * Adding change to change the font size depending on the bolus value. * Merge two "all" options to create an option that displays as SMB had. * Fix d3 portrait to landscape brush failure (nightscout#5638) * fix d3 portrait to landscape brush failure * fix client.renderer.test for highlighBrushPoints function prototype change * fix highlightBrush * move brush reset inside check for valid brush * Sanitize data from manual careportal entries so only fields with actual data are sent to the server (nightscout#5619) * do not redirect to profile editor by default (nightscout#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. * Fix Issue nightscout#5486 - Device Status Days Feature (nightscout#5651) * Device Status Days Feature * Edits per review from @sulkaharo * Configurable clock views (nightscout#5625) * Configurable clock views * Configurable clock views * Configurable clock views * Configurable clock views * Configurable clock views * Configurable clock views * Update README.md * Update README.md * Configurable clock views * Add remote bolus/carbs + otp entry for loop (nightscout#5598) Add a remote bolus entry field for users on Loop, along with support for an OTP field * Sometimes at the very start no profiles provided. (nightscout#5591) At the first start the nightscout is crashed if profile not full. * Fixes nightscout#4991 - Now selects basal profile based day by day (nightscout#5572) * Test profile settings * NPM Version change * Use console log * Use console log for client * Use console log for client.sbx * Use console log for client.ddata * Use console log for client again * revert * Added multi-profile reporting capabilities Co-authored-by: VIS TFS Admin <liveid@visualsolution.co.uk> * prepare hotfix for MMConnect/EU - 2020-06-28 Prepare to handle issue nightscout#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 * prepare hotfix for MMConnect/EU - 2020-06-28 Prepare to handle issue nightscout#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. * hotfix 5 - incorporates latest axios changes * Fix for boluscalc issue (nightscout#5729) Boluscalc fix & remove integer validation from BG input field * npm install --save minimed-connect-to-nightscout@^1.4.0 * Change DISPLAY_UNITS to use readENV's default value and added several tests for DISPLAY_UNITS (nightscout#5708) readENV() was hard coding the default value of DISPLAY_UNITS, and ignoring the default value for no particular reason. Fixed that. Also, I added a full test suite for DISPLAY_UNITS environment settings to make sure that it works as intended. Finally, I've added the console log for the DISPLAY_UNITS since there's no particular reason why we log that setting and not others. * Fix audit errors, button order (nightscout#5694) * * Update packages giving npm audit errors * Fix Mongo test that broke after update (now uses async/await on getting the connection) * Restore original navigation bar button order * Disable Node 10 tests * Fix temporary target cancellation * Added documentation on the use of Alpha Testing (nightscout#5784) * Wip/bewest/mmconnect eu (nightscout#5731) * prepare hotfix for MMConnect/EU - 2020-06-28 Prepare to handle issue nightscout#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> * * Updated several packages to remove issues from NPM audit * Fix excess logging in settings.js * Removed heapdump package, which was causing issues for some users * * Limit the default number of profiles returned by the API to fix issues with users who are syncing a large amount of profiles from an APS. * Fix profile reporting * Upgrade Helmet to 4.0.0 * CSP and service worker improvements (nightscout#5856) * Add connectSrc for Safari compatibiity * Add new font URL for Google Fonts compatibility * Reload on re-registering the worker * Change Mongo version in github to fix builds * Serve the CSP to everyone * Split view CSP support (nightscout#5864) * Parse split view frames into frameAncestors * Re-enable CSP configuration (nightscout#5867) * Re-enable CSP configuration * Bump share2nightscout-bridge plugin Use latest update from share2nightscout bridge to make things easier. It contains an updated default for OUS users. * feat Add robots.txt to disallow site crawling * Fix dbsize for usage with Atlas (nightscout#5962) * Openaps performance improvement (nightscout#5945) * improve openaps plugin performance * more performance improvements (cherry picked from commit 076a2dd) * correct setting notEnacted variable * remove unnecessary debug logging * Adapt to MongoDB Atlas (nightscout#5893) * Fix Issue nightscout#5763 - Change $.ajax to /api/v1/profile (nightscout#5704) * Bug fixes for Service Worker (nightscout#5970) * Fix service worker refresh for Firefox * Improve logging for service worker initialisation * Skip browser cache for service worker precaching * Prevent `Partial Content` responses in `fetch` by stripping `Range` header * Prevent calling `filter` on an undefined property when service worker cache is empty * Bug fixes for Service Worker * Fixes nightscout#5920 * Fixes nightscout#5943 * Update service-worker.js Removed the MP3 files from the preload to fix issues with webkit-based browsers Co-authored-by: p5nbTgip0r <cb3f02c5@opayq.com> Co-authored-by: Sulka Haro <sulka@sulka.net> * Optimize Nightscout database usage (nightscout#5947) * On periodic polls, only load delta for CGM data, treatments and device statuses * Serve basic CGM data API queries from in-memory cache. Increases the Nightscout memory footprint but should significantly reduce the Mongo load * Serve device status, CGM and treatment records from memory cache * Support count parameter in /profile * Bumping version to 14.0.0 given this is a relatively large update and we want people on Atlas to all migrate to this version * Remove logging statements * fix brushing recursion * Normalize treatments to support absolute doses from the amount field * Add Loop Carbs foodType, absorptionTime to Reports for ISSUE nightscout#5701 (nightscout#5702) * add carb foodType, absorptionTime to reports * Update README to point to new docs * Fix `Treatments` report for `mmol/L` users Fixed a typo to a client function name * Bump version to 14.0.1 * Bump dev to 14.0.2 * Serve Last-Modified header for the service worker to help with some browsers misdetecting caching * Cleaned old appcache references * * Remove unnecessary logging to help with Papertrail limits * Load more treatments and entries to fix caching issues (need to add better cache invalidation to really fix this) * When merging inserts and updates from the database, ensure we always use the new data over the old data * Bump treatment delta loading to four hours * One more increase to treatment load time to cover long overrides * * Bump version to 14.0.3 * Fix a bug in the REST API query for profiles * Bumped up the number of treatments loaded / day for reporting * Fix reports unit test * Bump treatments default limit default to 1000 objects for queries that include other query parameters * * Require created_at for Treatments on insert * Refactoring the cache: moved to another file and support flushing from bus events * Add support for CGM data and device statuses. Refactor dataloader to use the new model and reduce queries back down * Fix data order for REST API * * Add cache update events to websocket API * Remove the validation for created_at in REST API ;( * Remove excess logging * Bump version to .4 * Bump version to 14.0.5 and fix nightscout#6050 * Fix Pebble API detecting mmol units from settings * Make settings parsing whitespace tolerant * * Fix security test * Change boot and caching to expose Mongo connection errors * Don't report an error on every reconnect * Less intimidating error page on start, which also checks for api_secret * Add file missing from last commit * Fix tests * Remove require statement breaking deploys * Update --feature-request--.md * Update --bug-report.md * Update --individual-troubleshooting-help.md * Fix memory leak and cache update issues in 14.0.4 (nightscout#6133) * 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 * Add error cat to error page * Fix MONGODB_URI reference in error message * Bump version to 14.0.6 * Support uploading device statuses in batches (nightscout#6147) * Support uploading device statuses in batches * Correctly report batch insertion results * Make empty cache detection a bit more aggressive to account for cache flush and data insert happening concurrently * Update README.md Explicitly link to the application template in Github * Create config.yml * Delete --individual-troubleshooting-help.md * Update config.yml Co-authored-by: Sulka Haro <sulka@sulka.net> Co-authored-by: inventor96 <inventor96@gmail.com> Co-authored-by: Jeremy Cunningham <34543464+jpcunningh@users.noreply.github.com> Co-authored-by: PetrOndrusek <petr-ondrusek@seznam.cz> Co-authored-by: Caleb <inventor96@users.noreply.github.com> Co-authored-by: Diabetlum <44998140+diabetlum@users.noreply.github.com> Co-authored-by: Willem Fibbe <fibbers@gmail.com> Co-authored-by: John Weston <unsoluble@me.com> Co-authored-by: ireneusz-ptak <31506973+ireneusz-ptak@users.noreply.github.com> Co-authored-by: Lukas Herzog <git@lukasherzog.de> Co-authored-by: Jeremy Cunningham <jpcunningh@gmail.com> Co-authored-by: Jake Bloom <jake@steady.health> Co-authored-by: David Jansson <david.jansson81@gmail.com> Co-authored-by: fedor apanasenko <apanasef@gmail.com> Co-authored-by: Jakob Sandberg <jakobs@zillowgroup.com> Co-authored-by: Jakob <jakobsandberg95@gmail.com> Co-authored-by: Asbjørn Aarrestad <asbjorn@aarrestad.com> Co-authored-by: lixgbg <henrik.sjostrand@gmail.com> Co-authored-by: Harmjan Greving <harmjan@dynasign.nl> Co-authored-by: Bluefox <dogafox@gmail.com> Co-authored-by: Cas Eliëns <cas.eliens@gmail.com> Co-authored-by: Tanja <7403966+tanja3981@users.noreply.github.com> Co-authored-by: Bartłomiej Szubert <bartlomiejszubert@gmail.com> Co-authored-by: Andrew Dixon <andrew@andrewdixon.co.uk> Co-authored-by: Petr Ondrusek <34578008+PetrOndrusek@users.noreply.github.com> Co-authored-by: Lukas Herzog <mail@lukasherzog.de> Co-authored-by: jonfawcett <38429455+jonfawcett@users.noreply.github.com> Co-authored-by: Jonas Hummelstrand <jonas@hummelstrand.com> Co-authored-by: peterleimbach <peterleimbach@icloud.com> Co-authored-by: Adam Harrison <adamaharrison@gmail.com> Co-authored-by: Dominik Dzienia <dlvoy@users.noreply.github.com> Co-authored-by: stephencmorton <17858976+stephencmorton@users.noreply.github.com> Co-authored-by: Simon Persson <simon@akep.se> Co-authored-by: Cas Eliëns <cas.eliens@isaac.nl> Co-authored-by: Ben West <bewest@gmail.com> Co-authored-by: Matthew <mtfoley.mae@gmail.com> Co-authored-by: josep1972 <joseangelparedesd@gmail.com> Co-authored-by: fromorbonia <3193811+fromorbonia@users.noreply.github.com> Co-authored-by: VIS TFS Admin <liveid@visualsolution.co.uk> Co-authored-by: joracine <joracine@users.noreply.github.com> Co-authored-by: Alexandre Viau <alexandre@alexandreviau.net> Co-authored-by: Lennart Goedhart <lennart@omnibase.com.au> Co-authored-by: p5nbTgip0r <cb3f02c5@opayq.com> Co-authored-by: kskandispersonal <kskandis@live.com>
plus a few general cleanups in the Readme