96 Commits
Author SHA1 Message Date
gth001andGitHub ef1164402a Merge branch 'dev' into master 2023-10-16 09:15:46 -07:00
gth001andGitHub 1f56b15fb2 This fixes the issue of a "stale" CGM value displaying indefinately. It displays "Internet offline." until internet is restored.
This fix addresses the issue that with a lost internet connection, clock view continues to display a stale CGM values forever, with no clue that internet connectivity is lost. This fix shows "Internet offline." for the duration that is it lost, then returns to normal when internet is restored.
2023-10-15 22:06:26 -07:00
Sulka HaroandGitHub e1f75cba6c Change viewport scale to fix layout on iPhone (#7623) 2023-01-01 13:26:46 +02:00
1c349527a1 Update webpack to v5 (#6844)
* upgrade webpack info

* cleanup eslint findings

* fix eslint formatter stylish error

* lazy is invalid option for webpack dev middleware

* upgrade webpack to 5.x

* remove unsupported terser option

* fix missing process polyfill dependency

* try alternate proces fix

* fix css image reference

* add statements to import missing css files to index.html

* TerserPlugin no longer required

* add missing css links

* remove terser

Co-authored-by: Jeremy Cunningham <jpcunningh@gmail.com>
Co-authored-by: Sulka Haro <sulka@sulka.net>
2021-02-07 17:25:19 +02:00
Sulka Haro bc188d9163 * Disabling tests that interfere with other tests
* Fix view include syntax
* Change Slovenian name to correct language
2021-02-06 19:11:36 +02:00
Sulka HaroandGitHub d7e011d8f5 Refactoring organisation, bundling and security improvements (#6765)
* * Simplified bundling to just one bundle
* Removed cache invalidation token from bundling
* Generate strong persistent random string on deploy to use for JWT signing
* WIP: moving api-secret and JWT signing to a separate centralized security component
* Moved some server components away from project root
* Fix issues reported by linter

* Ignore detect-object-injection everywhere but the client

* Make admin message button red

* Remove alarms for some security alerts on code

* api_secret is now fully contained in the enclave
2021-02-02 19:53:30 +02:00
d762694b83 Bolus settings (#6834)
* Add bolus plugin and restructure rendering settings

* Add setting to prevent automated micro boluses from triggering notifications and snoozing alarms

* clean up

* Small change to the bolus-settings branch so it supports flexible configuration that enables the old behavior

* Translations

* Fix settings default

Co-authored-by: Jason Calabrese <jason@cbrese.com>
2021-02-02 19:14:32 +02:00
CalebandGitHub cc873d8127 Typo correction for translation (#6805) 2021-01-29 10:40:34 +02:00
85aea0fec5 Added sensor code transmitter ID fields (#6780)
* Copied #5442 - Duplicated @c-robertson's work

* Added tx id and sensor code to tooltip

* Added swagger docs for the new fields

* Added missing language keys

* Added new fields to sage plugin display

Co-authored-by: Sulka Haro <sulka@sulka.net>
2021-01-26 21:33:10 +02:00
Sulka HaroandGitHub 647ed20de1 Clean statics & bundle more (#6745)
* * Remove unused old version of MFB
* Bundle food, profile editor
* Clean up the static folders

* Fix tests
2021-01-17 12:20:48 +02:00
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 4ace12594e Move localisation to Crowdin (#6518)
* Update Crowdin configuration file

* Update Crowdin configuration file

* Add languages for pushing

* Update Crowdin configuration file

* Update source file en.json

* New translations en.json (Finnish)

* New translations en.json (Finnish)

* New translations en.json (Romanian)

* New translations en.json (Dutch)

* New translations en.json (Croatian)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Swedish)

* New translations en.json (Slovenian)

* New translations en.json (Russian)

* New translations en.json (Polish)

* New translations en.json (Korean)

* New translations en.json (French)

* New translations en.json (Japanese)

* New translations en.json (Italian)

* New translations en.json (Hungarian)

* New translations en.json (Hebrew)

* New translations en.json (Greek)

* New translations en.json (German)

* New translations en.json (Danish)

* New translations en.json (Czech)

* New translations en.json (Bulgarian)

* New translations en.json (Spanish)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* Remove folders

* New translations en.json (Romanian)

* New translations en.json (Korean)

* New translations en.json (Croatian)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Turkish)

* New translations en.json (Swedish)

* New translations en.json (Slovenian)

* New translations en.json (Russian)

* New translations en.json (Polish)

* New translations en.json (Dutch)

* New translations en.json (Japanese)

* New translations en.json (French)

* New translations en.json (Italian)

* New translations en.json (Hungarian)

* New translations en.json (Hebrew)

* New translations en.json (Finnish)

* New translations en.json (Greek)

* New translations en.json (German)

* New translations en.json (Danish)

* New translations en.json (Czech)

* New translations en.json (Bulgarian)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Romanian)

* New translations en.json (Korean)

* New translations en.json (Croatian)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Turkish)

* New translations en.json (Swedish)

* New translations en.json (Slovenian)

* New translations en.json (Russian)

* New translations en.json (Polish)

* New translations en.json (Dutch)

* New translations en.json (Japanese)

* New translations en.json (French)

* New translations en.json (Italian)

* New translations en.json (Hungarian)

* New translations en.json (Hebrew)

* New translations en.json (Finnish)

* New translations en.json (Greek)

* New translations en.json (German)

* New translations en.json (Danish)

* New translations en.json (Czech)

* New translations en.json (Bulgarian)

* New translations en.json (Norwegian Bokmal)

* Update Crowdin configuration file

* New translations en.json (Spanish)

* New translations en.json (Chinese Simplified)

* New translations en.json (Chinese Traditional)

* New translations en.json (Italian)

* New translations en.json (Croatian)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Turkish)

* New translations en.json (Swedish)

* New translations en.json (Slovenian)

* New translations en.json (Russian)

* New translations en.json (Polish)

* New translations en.json (Dutch)

* New translations en.json (Korean)

* New translations en.json (Japanese)

* New translations en.json (Hungarian)

* New translations en.json (Hebrew)

* New translations en.json (Finnish)

* New translations en.json (Greek)

* New translations en.json (German)

* New translations en.json (Danish)

* New translations en.json (Czech)

* New translations en.json (Bulgarian)

* New translations en.json (French)

* New translations en.json (Romanian)

* New translations en.json (Norwegian Bokmal)

* Loading all languages now works

* * Fix unit tests
* Have server load localizations

* Adding some more keys

* New Crowdin updates (#6531)

* New translations en.json (Finnish)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Finnish)

* New translations en.json (Japanese)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Swedish)

* New translations en.json (Slovenian)

* New translations en.json (Russian)

* New translations en.json (Polish)

* New translations en.json (Dutch)

* New translations en.json (Korean)

* New translations en.json (Italian)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Hungarian)

* New translations en.json (Hebrew)

* New translations en.json (Greek)

* New translations en.json (German)

* New translations en.json (Danish)

* New translations en.json (Czech)

* New translations en.json (Bulgarian)

* New translations en.json (Spanish)

* New translations en.json (French)

* New translations en.json (Romanian)

* New translations en.json (Croatian)

* Update source file en.json

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Norwegian Bokmal)

* Remove old translation status tool

* Update CONTRIBUTING
2020-11-17 14:17:17 +02:00
Sulka Haro a9692d19b7 * Added basal and careportal to default plugins
* Changed report BG target to allow fractional numbers
2020-11-15 10:30:29 +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
Sulka Haro 0670c5a913 Add error cat to error page 2020-09-27 17:23:49 +03:00
Sulka Haro eec131bc3b Add file missing from last commit 2020-09-25 18:43:51 +03:00
Sulka Haro f8461655bc * Fix security test
* Change boot and caching to expose Mongo connection errors
2020-09-25 12:53:31 +03: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
Sulka HaroandGitHub 9b048dddb7 Fix audit errors, button order (#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
2020-07-12 12:46:06 +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 77795cae5a Split view (#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
2020-02-16 14:15:27 +02: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
Sulka Haro baad198bd5 Fix earlier merge error with predictions having moved to the report bundle 2020-01-18 13:37:53 +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
Bartłomiej SzubertandSulka Haro 5e47c4d0ed Fix #5188 - move predictions to bundle and don't render chart on predictions offset change (#5395)
* Fix #5188 - move predictions to bundle and don't render chart on predictions offset change

* Fix predictions show for day to day
2020-01-06 19:24:45 +02:00
Andrew DixonandSulka Haro f7922a6bd7 Basic report page style fixes and updates (#5387) 2020-01-01 11:20:48 +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
ireneusz-ptakandSulka Haro d3bd77b514 Extra info (delta and last measurement time) on clock view. (#5151)
* Parametrized clock view

* Parametrized clock view
2019-11-10 21:51:19 +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
Sulka Haro 18788337a8 Change a let to var in clock views to allow running on old devices 2019-09-18 09:49:03 +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 7c0a00537b Wip/clock hide state management (#4944)
* Add tap-to-show close buttons

* oops, small typos

* remove unused class

* Add state management to the clock close button hiding
2019-09-15 19:01:29 +03:00
PieterGitandGitHub d0e14de83d Fix clock if authentication is enabled (#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 https://github.com/nightscout/cgm-remote-monitor/pull/4860#pullrequestreview-277209223

* remove .npmignore for now.

should be merged in seperated PR

* small fixes
2019-08-22 20:50:51 +02:00
ireneusz-ptakandGitHub 4638db55cc staleTime div is missing in the clockview 2019-07-30 17:07:34 +02: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 4626156a2b Add close buttons to all views accessible from the main menu, to prevent users on iOS getting stuck 2019-07-20 18:23:35 +03:00