Commit Graph
154 Commits
Author SHA1 Message Date
JakobandSulka Haro 3170345731 Handle mmol to mgdl conversions with a constant reference (#5274) 2019-12-06 11:42:16 +02:00
Sulka HaroandGitHub 28b892e46c Fix forecast behaviour (#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
2019-10-28 10:38:02 +02:00
Jeremy CunninghamandSulka Haro c1244eae12 Stop Focus Circles from Eating Entries (#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.
2019-10-25 20:08:03 +03:00
Sulka Haro afd12fd7f0 Fix initial forecast point display 2019-10-23 23:50:41 +03:00
Jeremy CunninghamandGitHub 41310808b2 fix forecast time max to client focusRangeMS instead of 30 min (#5143) 2019-10-23 08:02:32 -05:00
Jeremy CunninghamandGitHub 4fd28434c1 D3 Upgrade Residual Cleanup (#5140)
* fix forecast limit logic

(cherry picked from commit e88ce7e5d1f5fb12c71ae67da4131ff1a50940c9)

* fix minimum focus forecast time

* make min forecast 30 min
2019-10-23 07:21:25 -05:00
Sulka HaroandGitHub 2d07c5488a Performance fixes (#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
2019-10-22 08:37:47 +03:00
Sulka HaroandGitHub e10d4838a8 Fix tests failing in dev (#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
2019-10-22 00:10:06 +03:00
Jeremy CunninghamandPieterGit b8f28b0586 fix(d3): D3 libarry upgrade (lib for visualizing data such as main view, graphs, etc.) (#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 3445eeeedd1c0d863ca5210d4cd32994a9da4d49)

* d3 upgrade axis

(cherry picked from commit 06a8a9283100a980ccb5bed7920bce96a5b138cc)

* d3 upgrade axis

(cherry picked from commit 1ac583ce2b1d0796f8d8f0d5f9b5ee29a051af1e)

* 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
2019-10-21 14:06:05 +02:00
Sulka HaroandPieterGit c11eb826f0 fix: Support a wider range of unit strings for profiles (#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)
2019-10-18 10:05:18 +02:00
Pete SchwambandSulka Haro d729b0eb00 Remote Loop overrides (#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
2019-10-16 12:35:22 +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
Erin879andSulka Haro db6520fb95 fixed unit conversion in basal pill, openaps pill, temporary targets, and treatments (#4923) 2019-09-15 19:06:16 +03:00
John WestonandGitHub 23e9db90c7 Rewording of the "wrong profile" dialog 2019-07-31 11:21:38 -07:00
Sulka HaroandGitHub 8f25a6e7a4 Fix all issues from ESLint (#4730)
* Cherry picks the ES language changes from #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
2019-07-17 15:04:57 +03: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
PieterGit ddbbfe2e17 Merge branch 'wip/fix-rawbg-calculations' of https://github.com/jpcunningh/cgm-remote-monitor into 201812_needs_testing 2018-12-31 12:39:56 +01:00
Jeremy Cunningham f246c858db rawbg needs withextendedsettings in renderer. 2018-08-16 22:22:49 -05:00
Jason CalabreseandPieterGit ebc43bf9dd hide forecast type if no value 2018-07-29 08:44:19 +02:00
James BabcockandSulka Haro c6f3d2860a Fix a memory leak in Nightscout chart (#3500)
The chart would create SVG objects for treatment event records, then
later recreate them without deleting the old ones. This resulted in a
huge number of duplicates accumulating, which (in my setup) would cause
a crash due to excessive memory usage and DOM size in about a day.
2018-05-07 20:10:13 +03:00
Sulka Haro 051576056a Moved server-specific sources to their own folder. Removed some unused code as per Codacy reports 2017-12-28 19:15:52 +02: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
Sulka HaroandGitHub 55f8fa5621 Smarter formatting based on amount of data (#3086)
* Smarter formatting based on amount of data, to make sure the rendering works for both SMB and non-SMB users

* Move comment to where it belongs, changed math so first 10 treatments don't reduce scaling
2017-11-29 22:50:33 +02:00
Scott 8ebfd94800 Merge branch '201710_pieterg_zt' of https://github.com/PieterGit/cgm-remote-monitor into PieterGit-201710_pieterg_zt
Conflicts:
	lib/client/renderer.js
	npm-shrinkwrap.json
2017-10-31 15:44:41 -07:00
Scott 6607729904 Merge remote-tracking branch 'origin/dev' into rendering
Conflicts:
	npm-shrinkwrap.json
2017-10-31 15:40:17 -07:00
PieterGit 0c171d6fa3 bring back the ' U' for non-SMB's (> 1U insulin and with carbs) 2017-10-27 22:43:58 +02:00
PieterGit 8f874904e7 Revert "bring back the ' U' for non-SMB's (> 1U insulin and with carbs)"
This reverts commit edbf22b67e.
2017-10-27 21:40:02 +02:00
PieterGit edbf22b67e bring back the ' U' for non-SMB's (> 1U insulin and with carbs) 2017-10-27 21:18:32 +02:00
PieterGit 2f33b74efb fix merge errors, up version and fix test
fix merge errros by reverting views/index.html and lib/client/renderer.js,
up version in bower.json, npm-shrinkwrap.json and package.json
fix test/client.renderer.test.js
2017-10-27 20:46:23 +02:00
ScottandPieterGit d2a8d50a0a merge rendering 2017-10-27 16:26:10 +02:00
ScottandPieterGit 3f01d323d8 cherry pick 33f16f4439 2017-10-27 16:21:24 +02:00
PieterGit 55c0a38f2b Update to node 8.8.1. Merge branch 'dev' of https://github.com/nightscout/cgm-remote-monitor into 201710_pieterg_zt 2017-10-27 15:47:39 +02:00
MilosKozak 532d766002 handle AAPS profile switches well 2017-10-20 17:11:08 +02:00
Scott 8f66f09f3a back to smaller treatment dots 2017-10-19 20:12:53 -07:00
Scott fa7c74b12a change font size back to default in this branch 2017-10-17 17:18:39 -07:00
Scott 33f16f4439 allow treatment bubbles to scale up past 1U/20g size 2017-10-17 17:15:13 -07:00
Scott fb4e74e916 try larger label font: 35 instead of 25 (vs. 40) 2017-10-17 14:16:30 -07:00
Scott e60ff3aa9d change default back to 3HR 2017-10-16 18:06:54 -07:00
Scott e433cc813f only show focusHours' worth of predictions; strip leading zero from bolus amounts 2017-10-16 18:02:46 -07:00
Scott ae5a5d42f9 comments 2017-10-15 14:14:18 -07:00
Scott 08e4aa9e03 make R3/R4 elements into very short arcs to reposition labels 2017-10-09 08:28:34 -07:00
Scott 0d222d4ca3 remove extra-big tooltip target around treatments; reduce font sizes 2017-10-09 07:55:51 -07:00
Scott 15702d7780 display ZT PredBGs, and forecast tooltips 2017-10-09 06:14:48 -07:00
Pete Schwamb f1f7a2375c Add food type string to carb entry on graph, and show Absorption Time in tooltip 2017-06-29 11:41:20 -05:00
Jason Calabrese 5c9c082a44 remove clipping path that wasn't needed and caused problems on iOS 2017-04-22 00:18:34 -07:00
Jason Calabrese 0e1894c74b merge in dev, fix conflicts in .travis.yml and package.json 2017-03-14 22:38:51 -07:00
MilosKozak f978481f5b fix editing treatments vs nsclient 2017-02-25 19:40:55 +01:00
MilosKozak dd76a69f69 Merge branch 'dev' of https://github.com/nightscout/cgm-remote-monitor into dev 2017-02-20 08:38:19 +01:00
Chris O bc523d94f6 Improve BG text rendering 2017-02-07 17:38:35 +00:00
MilosKozak 753c6efd4a profile switch with duration 2017-01-23 00:34:25 +01:00