Commit Graph
50 Commits
Author SHA1 Message Date
Sulka HaroandGitHub 914ba78f36 Security improvement batch (#6622)
* Adds a new method for the server to push notifies to the client, which require administration privileges from the user. If there are messages in queue but user is not privileged, she is notified of pending messages

* Fix unit tests

* Increase timeouts on tests

* Add translations

* * Aggregate admin messages
* Send admin message on auth fail
* Sending messages over bus
* XSS filtering of objects sent over the REST API

* Warn users if their instance is world readable

* Fix adminnotifies init()

* Fix couple issues from Codacy
2021-01-07 22:46:55 +02:00
Sulka Haro 8c59de8d2d * More small localization fixes
* Change link to point to github.io docs
2020-12-17 23:13:48 +02:00
Sulka Haro 0a2fee8fe2 Various fixes to localization - #6516 #6523 #6524 2020-12-15 17:50:33 +02:00
Sulka HaroandGitHub 7fe8e32152 Refactor core auth (#6596)
* Auth resolve now supports async/await
* Read only tokens can be used for authentication and the UI shows privileges for these accounts correctly
* Failed attempt at authenticating an API_SECRET or token delays subsequent auth attempt by 5000 ms
2020-12-11 00:23:25 +02:00
Sulka HaroandGitHub b762ade017 Fix batch (#6248)
* Use the delta plugin data to show the delta in the clock views
* Update Node checks
* Fix disabling the BG alarms for simple alarms
* Load battery and other rare events up to two months back
* Possibly fixes compatibility with ios9 - needs testing
* Unified black and color clock layouts
* Update clock data every 20 seconds
* Update clock time every second
* Fix how CSP policy is set for Helmet, fixes #6260
* Authorization fix for misformatted URLs
* Added unit test for batch upload of CGM entries
* Improved / removed some logging
* Test if user is in read only mode when Nightscout starts and give an error if so
2020-11-10 18:02:28 +02:00
0ee36282c3 Bug fixes for Service Worker (#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 https://github.com/nightscout/cgm-remote-monitor/issues/5920
*    Fixes https://github.com/nightscout/cgm-remote-monitor/issues/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>
2020-09-09 17:32:13 +03:00
Sulka HaroandGitHub fd90f4e58b CSP and service worker improvements (#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
2020-08-20 17:15:29 +03:00
ireneusz-ptakandGitHub 7283560e07 Fix for boluscalc issue (#5729)
Boluscalc fix & remove integer validation from BG input field
2020-07-02 12:11:38 +03:00
josep1972andGitHub 5698ae28c1 Add remote bolus/carbs + otp entry for loop (#5598)
Add a remote bolus entry field for users on Loop, along with support for an OTP field
2020-06-12 17:33:17 +03:00
ireneusz-ptakandGitHub 3d6f488eda Configurable clock views (#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
2020-06-12 17:29:15 +03:00
Andrew DixonandGitHub 17eb4ae7bc Option to switch off bolus amount outputs (#5522)
* Option to switch off bolus amount outputs (#5514)

* Fixing issue with carb value not be output when set to "none" (#5514)

* Adding additional output options (#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.
2020-04-14 10:20:35 +03:00
Sulka HaroandGitHub 82f00763d6 Move app caching to a service worker (#5504)
* Move app caching to a webworker

* Code cleanup

* Code cleanup

* Make Codacy happy

* More parentheses
2020-02-05 08:16:25 +02:00
Bartłomiej SzubertandSulka Haro ddbda15c0a Move toolbar and authentication status to partial and include on each page (#5393)
* Move authentication status to partial and include on each page

* Move toolbar to partial

Co-authored-by: Sulka Haro <sulka@sulka.net>
2020-01-06 19:31:03 +02:00
Sulka HaroandGitHub 04b47f6109 Add 4 hour option to view (#5289)
* Revert "change default back to 3HR"

This reverts commit e60ff3aa9d.

* shorten HR to H to avoid line-wrapping on mobile

* try larger label font: 35 instead of 25 (vs. 40)

* add comma

* deviceInfo.recent null check

* default back to 3, w/ 4 as an option

* re-add H to single-digit hours

* * Don't use cache manifest all all for development
* Add 4 hours option to view and change the labelling to remove language issues
* Have page scale the minor pill widths more gracefully
2019-12-14 16:07:47 +00:00
John WestonandSulka Haro 06e3d6a23e Clock cleanup (#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
2019-10-21 10:01:19 +03:00
Erin879andSulka Haro 112bfff0d0 Append token parameter in URL to side menu links (#5020) 2019-10-09 23:07:31 +03:00
BluefoxandSulka Haro 196bcd65bd Fixed error if latestSGV not filled (#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
2019-09-17 20:47:30 +03:00
Sulka HaroandGitHub cdc7669abb 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 (#4824) 2019-07-29 16:30:16 +03:00
Sulka Haro 6499480c27 Merge branch 'dev' into plugin_pref_ui 2019-07-26 12:49:59 +03:00
Sulka Haro 2b0b19d6df 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. 2019-07-25 21:33:42 +03:00
Sulka Haro 7503512bbe Merge branch 'dev' into less_obtrusive_clock_close 2019-07-24 21:33:34 +03:00
John WestonandPieterGit a39b245baa fix: Temp basal input fix for browsers that don't follow standards (Samsung phones, Kindle Fire) 2019-07-24 19:37:53 +02:00
Sulka Haro 3373c27bef * 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
2019-07-24 10:57:36 +03:00
Sulka Haro 561f42af91 Fix main view button alignment 2019-07-21 11:58:24 +03:00
Sulka Haro 8653d492f2 * Package reporting plugins separately into another bundle to reduce main bundle size
* Use moment timezone webpack plugin to load less time zone data
* When server is run in development mode, hot reload code changes without restart
2019-06-30 20:58:04 +03:00
Jason CalabreseandSulka Haro 5953613a21 move BG span style to css and include rawbg (#4670) 2019-06-20 08:58:24 +03:00
Sulka HaroandGitHub 6ed5ee0ec0 feat: clock view code refactor (#4639)
* * Full refactor of the clockface code. Clocks now get their own small javascript bundle that contains the bare minimum client (from /lib/client/clock-client.js)
* Clocks no longer have separate HTML files but each has unique CSS definitions
* Fixed the bug where a finger measurement showed NaN in the clock

* Update shrinkwrap to match package.json

* Revert accidental index.html changes

* Bunch of minor fixes (#4641)

* Add triple arrows

* remove time

* grey arrows on bgclock

* try again on arrow fill

* Update bgclock.css

* fix double-mmol-conversion

* Update clock-client.js

* tabs to spaces everywhere

* Refactors based on Jason's comments

* Remove the clock bundle generation from app.js
2019-06-20 08:55:52 +03:00
Sulka HaroandGitHub 5ac49cda73 Fix BG data wrapping issue with Chrome (#4667) 2019-05-30 22:50:09 +03:00
Sulka HaroandPieterGit d73958de1b Fix CSP handling (#4449)
* Change incompatible module and fix a memory leak in the process

* Fix fonts, allow websocket

* Oops fix a brainfart with using the hostname

* Don't inlude null hostname

* Update the shrinkwrap

* Instantiate new cache if new instance of profile code is created. Calculate IOB with three digit precision to keep tests happy (and this is roughly the precision we're operating at anyway).

* - implement @jweismann suggestions https://github.com/nightscout/cgm-remote-monitor/pull/4449#issuecomment-469868508
- add frameAncestors, baseUri and formAction protection

* update README and run doctoc

* fix reportOnly

* add objectSrc

* Use modern CSS loading

* Change CSS to use the "official" async loading across the board (which hopefully plays nicer with CSP)

* first release candiate for 0.11.2 with Minimed EU Server and Guardian Connect integration

- integrates https://github.com/mddub/minimed-connect-to-nightscout/pull/11 into Nightscout

* bump node 10 LTS version

* increase logging, fix /swagger.yaml

* fix typo

* set version to rc2, update mongodb to 3.2.2

* add SECURE_CSP_REPORT_ONLY (default false).

* npm update and revert to requiring Node versions without security issues.
2019-04-06 17:02:05 +02:00
John WestonandPieterGit 83321faeaa Remove profile toggle and always show Profile Editor link (#4448)
* Remove Profile Editor toggle

`profile` isn't an optional plugin anymore; doesn't need this display toggle. (Plus it was erroneously toggling off in the absence of the `basal` plugin — see #4442.)

* Remove profilecontrol class
2019-03-05 22:02:32 +01:00
Sulka HaroandGitHub ad338bfdb7 Protein and Fat logging support (#3830)
* Add protein and fat logging to CarePortal, simple sums to day to day reporting, grams in graphs

* Add fat and protein to swagger

* Fix aggregate report sometimes considering logged carbs, protein and fat as a string. Add editing of protein and fat to reports. Show protein and carbs on daily reports
2019-03-03 12:20:05 +02:00
Sulka HaroandGitHub 3acd7c8445 Fix auth button ui & update cache busting for App Cache (#4270)
* small doc fix to comments on Node versions

* Update README.md

* * Fixes authentication dialog UI on Mobile Safari
* Improves app cache busting, so after deploy the app is guaranteed to notice it has to reload content
* Small fix to Finnish language related to auth UI
2019-02-07 22:14:34 +02:00
PieterGitandSulka Haro 1769f2d837 speech and Warning, Pump Battery Low Alarm issue during Clock testing... (#3709)
* Fix Warning, Pump Battery Low Alarm cannot be disabled

* fix Clock Views language.js

* see if this will solve the problems with the speech plugin detection at the client

* fix dutch spelling

* translate Clock Views:

* disable again

* Update language.js
2018-07-26 11:02:46 +03:00
PieterGit 0a9487a604 Merge branch 'more-clock-options' of https://github.com/unsoluble/cgm-remote-monitor into 201807_clock2 2018-07-19 23:31:32 +02:00
John WestonandGitHub d8ce6234e9 Add translate tag to "Clock Views: 2018-07-18 18:52:13 -07:00
Sulka Haro 8aae73d84e Fixes #3679 2018-07-10 17:06:04 +03:00
PieterGitandGitHub 71c6bb44a8 Merge branch 'dev' into more-clock-options 2018-06-25 23:15:01 +02:00
David BolandandPieterGit 751b28c00e Fix "dispalyed" typo
Fix typo for hover tip for "Raw BG" display in the settings drawer.
2018-02-18 13:49:37 +01:00
John Weston 7cbc60523f Add clock view structure to nav 2018-02-11 18:23:20 -08:00
John WestonandSulka Haro ab3289f6d3 Add "Check for Updates" link (#3206)
Link to http://nightscout.github.io/pages/update-fork/ added to the
main info panel.
2018-01-02 22:53:14 +02:00
John Weston 526be8cd8c Links for both Clock Views 2017-12-31 16:17:55 -08:00
Sulka Haro 26dd8584ff * Update Finnish localization
* Change SMB visualization to be more friendly
* Add BG Clock to navigation
* Updated release version
2017-12-01 15:08:27 +02:00
Scott e60ff3aa9d change default back to 3HR 2017-10-16 18:06:54 -07:00
Scott 6c86a6d404 replace 3HR with 2HR and (default) 4HR views 2017-10-16 18:01:11 -07:00
John Weston 4e1837d21c Remove pattern regex from basal change field
Having the regex require integers means that only the numeric keypad
will pop on iOS. This prevents the entry of negative values, which is
pretty critical for temp basals.
2017-10-09 11:05:35 -07:00
Sulka Haro 33e9304b82 Implements #2456 2017-09-11 22:40:20 +03:00
Sulka Haro fc0bd46946 Move all html files to views folder, update to use the rendered cache buster 2017-09-11 19:49:05 +03:00
Sulka Haro 0c12c10d84 Separate messages for loading the client and connecting to server 2017-08-27 17:42:37 +03:00
Sulka Haro 1b24449afe Upgrade Travis to build with Node 8.4, update package.json to 8.4 2017-08-27 16:15:19 +03:00
Sulka Haro 4d0a3728cc Use ejs to render the app cache and cache buster tokens 2017-08-27 14:34:46 +03:00