Skip to content
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

Wip/add options app json #748

Closed
wants to merge 638 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
638 commits
Select commit Hold shift + click to select a range
33655aa
fix a bug that caused auto ack'd messaages to be sent over and over
jasoncalabrese Jul 3, 2015
3179a04
Merge pull request #673 from nightscout/wip/autoack-once-fix
jasoncalabrese Jul 3, 2015
251eb8f
send notifications over mqtt, some refactoring
jasoncalabrese Jul 3, 2015
66fe33d
added rest ack and simple test
jasoncalabrese Jul 3, 2015
f2d3e4a
clean up
jasoncalabrese Jul 3, 2015
23c2b68
fix order of current raw bg line for raw ar2 predictions
jasoncalabrese Jul 3, 2015
ab47161
convert ack'd level to a number, log mqtt publish error if any
jasoncalabrese Jul 4, 2015
c9ecaa0
set response code to 200
jasoncalabrese Jul 4, 2015
ea8659c
make codacy happier
jasoncalabrese Jul 4, 2015
89c6745
Merge pull request #675 from nightscout/wip/ar2-push-format
jasoncalabrese Jul 4, 2015
d709bbf
Merge branch 'dev' into wip/mqtt-notifications
jasoncalabrese Jul 4, 2015
64d1280
Notify user of cannula age upon 48 and 72 hours
sulkaharo Jun 26, 2015
4374bb7
Load warning times from CAGE_WARN and CAGE_URGENT, don't alert if eit…
sulkaharo Jun 26, 2015
ceacdd0
Replace custom title with alert notification text during alarm state.…
sulkaharo Jun 29, 2015
5ce0659
profile time zone support with excessive logging for testing
sulkaharo Jul 2, 2015
84226a3
Fixed time conversion. No fancy logic needed.
sulkaharo Jul 3, 2015
c4aaa94
Remove excessive logging
sulkaharo Jul 3, 2015
54a3b39
Remove double-conversion of BG from AR2 reporting
sulkaharo Jul 3, 2015
2154f35
One more debug line gone.
sulkaharo Jul 3, 2015
1a785d1
Fix merge conflict
sulkaharo Jul 4, 2015
19b4268
set an ar2 property, use that to add an extra line to push message, m…
jasoncalabrese Jul 4, 2015
8da3489
stop passing displaySGV to the sandbox message/line functions; more c…
jasoncalabrese Jul 4, 2015
41870f7
more bug fixing, cleanup, and refactoring
jasoncalabrese Jul 4, 2015
1784ba6
better warnings and debuging
jasoncalabrese Jul 4, 2015
16df091
Merge commit '1784ba6b138af3001cd8b9b1ec7acb4dce214d7f' into wip/alar…
sulkaharo Jul 5, 2015
f80bb57
Cleaning and a bug fix from Codacy
sulkaharo Jul 5, 2015
6dfd9d2
Remove double scaling from Sandbox
sulkaharo Jul 5, 2015
5754d50
Cleanup for better readabiity
sulkaharo Jul 5, 2015
ac0face
Formatting fixes to make Codacy happy
sulkaharo Jul 5, 2015
7d51d22
README notes for cannula age warnings. Cleaner implementation of age …
sulkaharo Jul 5, 2015
d531d9e
Further formatting / structure fixes suggested by Codacy
sulkaharo Jul 5, 2015
ec1b84d
Formatting, structure fixes
sulkaharo Jul 5, 2015
47ab5ac
More math in BWP mouseover
sulkaharo Jul 5, 2015
142673f
Trying to figure out this cyclomatic complexity thing
sulkaharo Jul 5, 2015
2f3b82f
Codacy formatting catch
sulkaharo Jul 5, 2015
81f352b
Added a test for cannula age alarm. Fix for wrong alert level when al…
sulkaharo Jul 5, 2015
e4b23ff
fix, so tests pass when localtime isn't utc time
jasoncalabrese Jul 5, 2015
77c6f80
show muteed notice on the right to make room for alarm message; adjus…
jasoncalabrese Jul 5, 2015
4452d10
Merge branch 'dev' into wip/mqtt-notifications
jasoncalabrese Jul 6, 2015
556091b
don't let future data block the current
jasoncalabrese Jul 6, 2015
4cfa776
make sure we don't use future data for the other plugins; some refact…
jasoncalabrese Jul 6, 2015
4d2263a
with the new functions some plugins don't nee lodash
jasoncalabrese Jul 6, 2015
f70cf8d
refactor ar2 property display; improve notification logging
jasoncalabrese Jul 6, 2015
3f41d1d
on server entry time is 'x' on the client it's 'date'
jasoncalabrese Jul 6, 2015
0287655
added test for sbx.entryMills
jasoncalabrese Jul 6, 2015
3e51d49
removed the usingRawForecast param in the few places it was still used
jasoncalabrese Jul 6, 2015
e8efd8d
Add basal profile time zone to pill. Test for basal profile pill
sulkaharo Jul 6, 2015
e49fdce
Removed unused code from test
sulkaharo Jul 6, 2015
00f2927
Merge pull request #686 from sulkaharo/wip/basalprofiletest
sulkaharo Jul 6, 2015
adeb2b0
Merge branch 'dev' into wip/ar2-notify-refactor
jasoncalabrese Jul 6, 2015
df8f42b
Merge branch 'dev' into wip/filter-future
jasoncalabrese Jul 6, 2015
e3edc5a
Merge pull request #684 from nightscout/wip/filter-future
jasoncalabrese Jul 6, 2015
2d24075
Merge branch 'dev' into wip/ar2-notify-refactor
jasoncalabrese Jul 6, 2015
09ea5c5
need lodash again
jasoncalabrese Jul 6, 2015
5bd5fac
added TODO:OnlyOneCal, since only 1 cal entry is loaded we can't igno…
jasoncalabrese Jul 7, 2015
995af03
Merge pull request #685 from nightscout/wip/ar2-notify-refactor
jasoncalabrese Jul 7, 2015
8afdef4
delete require-ssl since it's not used
jasoncalabrese Jul 7, 2015
6fcec46
Merge pull request #693 from nightscout/wip/remove-dead
jasoncalabrese Jul 7, 2015
e95f4f7
Merge pull request #674 from nightscout/wip/mqtt-notifications
jasoncalabrese Jul 7, 2015
f6ef1c6
fix server start for case when mqtt hasn't been enabled
jasoncalabrese Jul 7, 2015
91bea3a
initial pass at moving AR2 cone to the plugin
jasoncalabrese Jul 7, 2015
61d94a0
remove some unused vars
jasoncalabrese Jul 7, 2015
bc2529f
don't emit an notifications if it's snoozed; some tests and logging t…
jasoncalabrese Jul 7, 2015
8238c95
;'s
jasoncalabrese Jul 7, 2015
b3f41dd
convert x and date fields to mills and get rid of some conversion
jasoncalabrese Jul 8, 2015
48fb534
treatment.created_at -> mills; less new Date's and less .getTime()'s
jasoncalabrese Jul 8, 2015
7917c10
fix some css warnings
jasoncalabrese Jul 8, 2015
8a748d1
use existing ar2 property instead of calculating it again; add suppor…
jasoncalabrese Jul 8, 2015
76f5001
Fixed the maintainer to a generic name.
Fokko Jul 8, 2015
ff355c8
refactor ar2 cone using _.reduce
jasoncalabrese Jul 8, 2015
7099732
update readme to include AR2_CONE_FACTOR; a little more cleanup
jasoncalabrese Jul 8, 2015
997ad84
Merge pull request #659 from Fokko/wip/docker-compose-2
jasoncalabrese Jul 8, 2015
796f405
use more Date's since d3 wants me too
jasoncalabrese Jul 9, 2015
642e2af
prevent snoozes from stacking; get DIA by time for iob cals; more tests
jasoncalabrese Jul 9, 2015
9232902
when looking for a snooze to cover an alarm, don't worry about alarm …
jasoncalabrese Jul 9, 2015
d53736c
added basic bwp pill text
jasoncalabrese Jul 9, 2015
c457c8e
make the current/stale bg states render correctly
jasoncalabrese Jul 9, 2015
ae33305
Merge branch 'wip/forecast-plugins' into wip/treatmentnotify-cleanup
jasoncalabrese Jul 9, 2015
5de4c41
some refactoring for treatmentnotify.checkNotifications
jasoncalabrese Jul 9, 2015
43274eb
easy css cleanup
jasoncalabrese Jul 9, 2015
4d698c8
Merge pull request #698 from nightscout/wip/drawer-css-cleanup
jasoncalabrese Jul 9, 2015
ab2b133
update pebble endpoint to use ctx.data and the delta plugin
jasoncalabrese Jul 10, 2015
d46ddbe
cleanup, thanks codacy
jasoncalabrese Jul 10, 2015
1a05647
pebble tests for iob and mmol
jasoncalabrese Jul 10, 2015
18e8d10
BWP pill/tooltip improvements
jasoncalabrese Jul 10, 2015
4602a40
some cleanup and refactoring
jasoncalabrese Jul 10, 2015
2c1b05d
damn you, cyclomatic complexity
jasoncalabrese Jul 10, 2015
4aa0c0c
Merge pull request #694 from nightscout/wip/forecast-plugins
jasoncalabrese Jul 10, 2015
2ff612c
merged dev into wip/snooze-fix
jasoncalabrese Jul 10, 2015
8d407a7
Merge pull request #695 from nightscout/wip/snooze-fix
jasoncalabrese Jul 10, 2015
7bd9923
Merge branch 'dev' into wip/treatmentnotify-cleanup
jasoncalabrese Jul 10, 2015
9639f03
fix a few more css warnings
jasoncalabrese Jul 10, 2015
9311b56
Merge pull request #697 from nightscout/wip/treatmentnotify-cleanup
jasoncalabrese Jul 10, 2015
90b3e6b
some rawbg refactoring
jasoncalabrese Jul 10, 2015
e695d9f
Merge pull request #696 from nightscout/wip/stuck-stale
jasoncalabrese Jul 10, 2015
21b8f0b
Merge pull request #700 from nightscout/wip/rawbg-cleanup
jasoncalabrese Jul 10, 2015
0541282
step 1: rename the y field to mgdl everywhere
jasoncalabrese Jul 11, 2015
4a99dfd
rename more names to make units more clear
jasoncalabrese Jul 11, 2015
9a9e137
major ar2 refactoring; lots more unit/scaling/naming changes
jasoncalabrese Jul 11, 2015
24d40fe
only need 6 points for calculating the avgLoss
jasoncalabrese Jul 11, 2015
bac0570
a little more clean up
jasoncalabrese Jul 11, 2015
8c1d14f
there's always some more refactoring to do
jasoncalabrese Jul 11, 2015
c62500c
move interpolating delta from ar2 to the delta plugin; more tests
jasoncalabrese Jul 11, 2015
94bb60f
added * and tooltip info to delta when interpolated
jasoncalabrese Jul 11, 2015
4755e79
some cleanup
jasoncalabrese Jul 11, 2015
ae3a172
only start interpolating when time between points > 10m
jasoncalabrese Jul 11, 2015
de0caef
Ensure mgdl is a number upon load
sulkaharo Jul 11, 2015
7e65949
adjust retro window a little
jasoncalabrese Jul 11, 2015
d857b4c
update interpolation to start when gap is > 9min, set interpolated fl…
jasoncalabrese Jul 11, 2015
b2de481
Merge pull request #13 from nightscout/dev
someoneAnyone Jul 12, 2015
a94f9ed
moved treatment display bg calculation to the server; sorrt entries a…
jasoncalabrese Jul 12, 2015
8def8d6
try to handle and debug some bad data with stale tabs
jasoncalabrese Jul 12, 2015
ba1ec9d
cleanup, added test for data.updateTreatmentDisplayBGs
jasoncalabrese Jul 12, 2015
a874b3a
some fixes for the pebble endpoint with raw only
jasoncalabrese Jul 12, 2015
388ca68
if raw is enabled and we only have raw use it to set the treatment bg…
jasoncalabrese Jul 12, 2015
a5e4bb9
improve tooltip info check
jasoncalabrese Jul 13, 2015
f16ccc2
revert change to retro data filter
jasoncalabrese Jul 13, 2015
9c60c67
better checks before trying to forecast
jasoncalabrese Jul 13, 2015
95d7b07
move errorCodeToDisplay from client.js to errorcodes.js, chiping away…
jasoncalabrese Jul 13, 2015
ed31945
only show notificatoin title in header, move muted warning back to th…
jasoncalabrese Jul 13, 2015
bd7a4a3
better formatting
jasoncalabrese Jul 13, 2015
033940e
tweek for ar2 /w raw alarms to prevent some false alarms
jasoncalabrese Jul 13, 2015
177e291
some minor fixes to alarm title display; also now ack'ing time ago al…
jasoncalabrese Jul 13, 2015
67c3294
errorcodes clean up, more tests
jasoncalabrese Jul 13, 2015
3f922e4
Adds getUnits() method to profile, using 'units' property in the profile
sulkaharo Jul 13, 2015
8cc3e7c
Warn user if profile doesn't contain a time zone
sulkaharo Jul 13, 2015
5412c74
Added display math to show the carb equivalent of calculated insulin …
sulkaharo Jul 13, 2015
7ab4658
Profile now defaults to local time zone. Works in the client but will…
sulkaharo Jul 13, 2015
ca773ba
split notification levels out for easier use
jasoncalabrese Jul 13, 2015
26a0d40
Adds getUnits() method to profile, using 'units' property in the profile
sulkaharo Jul 13, 2015
f3c6339
Warn user if profile doesn't contain a time zone
sulkaharo Jul 13, 2015
34daa67
Added display math to show the carb equivalent of calculated insulin …
sulkaharo Jul 13, 2015
78328dc
Profile now defaults to local time zone. Works in the client but will…
sulkaharo Jul 13, 2015
06972f2
Merge branch 'wip/data-cleanup' of https://github.com/sulkaharo/cgm-r…
sulkaharo Jul 13, 2015
689143d
cleanup
jasoncalabrese Jul 13, 2015
cb4f05e
Merge branch 'wip/data-cleanup' of https://github.com/sulkaharo/cgm-r…
jasoncalabrese Jul 13, 2015
a209fbe
Merge commit '689143df50f94f150ced16cf10613e61374c1ee9' into wip/data…
sulkaharo Jul 13, 2015
e6c9e04
Added getUnits() call test
sulkaharo Jul 13, 2015
b6a8864
grams -> g for consistency
jasoncalabrese Jul 13, 2015
2b1e402
whitespace cleanup
jasoncalabrese Jul 13, 2015
b511044
Merge branch 'wip/data-cleanup' of https://github.com/sulkaharo/cgm-r…
jasoncalabrese Jul 13, 2015
288f257
when alarming show the error title in yellow/red to match the bgStatu…
jasoncalabrese Jul 13, 2015
1018f66
css fix for toolbar buttons
jasoncalabrese Jul 13, 2015
f156918
Treatment drawer update
MilosKozak Jul 13, 2015
0be552c
bind pushPoint to sbx
jasoncalabrese Jul 13, 2015
712e077
changes for codacy
MilosKozak Jul 13, 2015
d309879
added some debug to try tracking down the intermitant retro mode when…
jasoncalabrese Jul 14, 2015
15c8f40
remove false warning
jasoncalabrese Jul 14, 2015
4940e27
add timestamps to notification event logging
jasoncalabrese Jul 14, 2015
d86a270
simplify ar2 timing init/increment
jasoncalabrese Jul 14, 2015
6b2e095
new look for the forecast points
jasoncalabrese Jul 14, 2015
466ca38
scale the thresholds for now, need to be able to set them in either u…
jasoncalabrese Jul 14, 2015
a48ccff
Revert older Pebble API behavior, where bgDelta was a string
sulkaharo Jul 14, 2015
b1b8390
Show basal calculation in case basal can be set to exact zero or +100%
sulkaharo Jul 14, 2015
16c85ad
Calculate IOB for treatments that match the current timestamp
sulkaharo Jul 14, 2015
d6d767a
More comprehensive test for BWP, including a test in MMOL
sulkaharo Jul 14, 2015
9fd0ebb
One more MMOL test for BWP
sulkaharo Jul 14, 2015
326d9d3
Show the BG target in BWP, when above or below
sulkaharo Jul 14, 2015
84b1ab9
Data.prototype.. converted to Nightscout.utils. treatment post split …
MilosKozak Jul 14, 2015
fb6758e
Merge pull request #706 from sulkaharo/wip/bwpfix
sulkaharo Jul 14, 2015
7e46a08
removed unused code
MilosKozak Jul 14, 2015
623ff90
removed jquery from utils.js. lowered code complexity
MilosKozak Jul 14, 2015
cbb5c45
Dockerfile needs to be in a different repo
jasoncalabrese Jul 15, 2015
2c28b2a
Merge pull request #707 from nightscout/wip/remove-dockerfile
jasoncalabrese Jul 15, 2015
469983f
Merge branch 'dev' into wip/data-cleanup
jasoncalabrese Jul 15, 2015
be3a2e7
more specific check to enable forecast using raw data
jasoncalabrese Jul 15, 2015
832fbb7
fixed a couple warnings
jasoncalabrese Jul 15, 2015
d958cd2
better check of useRaw option
jasoncalabrese Jul 15, 2015
7a02ce6
hopefully fix some mmol bugs with /pebble
jasoncalabrese Jul 15, 2015
657f7d2
;
jasoncalabrese Jul 15, 2015
2550ea5
another check to see if we should try using raw for ar2
jasoncalabrese Jul 15, 2015
09ba13d
Merge branch 'wip/treatmentdrawer' of https://github.com/MilosKozak/c…
jasoncalabrese Jul 16, 2015
91d2c0c
use moment.js for all date parsing+manipulation; add test; wrap in cl…
jasoncalabrese Jul 16, 2015
adee6c9
refactoring to lower complexity; also a little jquery optimization
jasoncalabrese Jul 16, 2015
5b59afb
one more shot to try making codacy happy
jasoncalabrese Jul 16, 2015
8ba2861
Merge pull request #702 from nightscout/wip/data-cleanup
jasoncalabrese Jul 16, 2015
5107cb0
Merge branch 'dev' into wip/treatmentdrawer
jasoncalabrese Jul 16, 2015
5e99519
always a little more refactoring to do
jasoncalabrese Jul 16, 2015
0637dc7
one more try to clear the codacy warning, seems a little cleaner anyway
jasoncalabrese Jul 16, 2015
9a29a9d
;...
jasoncalabrese Jul 16, 2015
89b901a
Fixes old CAGE notes being displayed on newer site change events, as …
sulkaharo Jul 16, 2015
0cf1018
Added a test for the site change event notes
sulkaharo Jul 16, 2015
2b548fb
Merge pull request #709 from sulkaharo/wip/cagefix
sulkaharo Jul 16, 2015
5de6669
Merge pull request #708 from nightscout/wip/treatmentdrawer
jasoncalabrese Jul 16, 2015
7c4092f
add errorcodes to the special plugins list
jasoncalabrese Jul 17, 2015
aadc7fa
refactor env.js, auto enable treatmentnotify if careportal, pushover,…
jasoncalabrese Jul 17, 2015
fe02f99
some env test to cover areas not covered already
jasoncalabrese Jul 17, 2015
af3a67b
Merge pull request #711 from nightscout/wip/env-cleanup
jasoncalabrese Jul 17, 2015
243d3f8
alias subscription to /downloads/$username/protobuf
bewest Jul 17, 2015
f897e0d
common throw-away vms/docker containers needs root
bewest Jul 17, 2015
7c44512
fix logic error
bewest Jul 17, 2015
dec5a0f
fix the mqtt test so the mqtt uri is defined
jasoncalabrese Jul 18, 2015
29fdaf7
add an =
jasoncalabrese Jul 18, 2015
f19774d
try to limit mongo queries in null finds
bewest Jul 18, 2015
2bf40c0
Merge branch 'wip/shared-mqtt' of github.com:nightscout/cgm-remote-mo…
bewest Jul 18, 2015
a69eac5
try to ensure all finds have a date query
bewest Jul 18, 2015
99ea9fa
throttle updateData to prevent loading way too many times
jasoncalabrese Jul 18, 2015
02995a0
;
jasoncalabrese Jul 18, 2015
d00f87d
also check for dateString
jasoncalabrese Jul 19, 2015
19b5004
updated entries api test to use date filters for retro data and added…
jasoncalabrese Jul 19, 2015
224dfb2
quotes
jasoncalabrese Jul 19, 2015
9643cce
more clean up
jasoncalabrese Jul 19, 2015
c96035b
added some basic tests for the treatment api and loading
jasoncalabrese Jul 19, 2015
f37da2c
removed unused _
jasoncalabrese Jul 19, 2015
413e7c9
use jsdom to be able to create a test for pluginbase using jquery
jasoncalabrese Jul 19, 2015
8992963
revert bower change
jasoncalabrese Jul 19, 2015
97add14
Merge pull request #720 from nightscout/wip/jsdom-tests
jasoncalabrese Jul 19, 2015
f50a17e
Merge pull request #718 from nightscout/wip/treatment-tests
jasoncalabrese Jul 19, 2015
003ea68
codacy clean up
jasoncalabrese Jul 19, 2015
2672c6b
date field too short on eurpean style of date
MilosKozak Jul 20, 2015
1bf4e42
selecting now resets time to current
MilosKozak Jul 20, 2015
53ae38f
Merge pull request #723 from MilosKozak/wip/cssdateupdate
jasoncalabrese Jul 21, 2015
1a3a59b
basic translation module
MilosKozak Jul 21, 2015
4464e29
date locale fix
MilosKozak Jul 21, 2015
a3d6fcc
codacy fix 1
MilosKozak Jul 21, 2015
540b578
codacy fix 2
MilosKozak Jul 21, 2015
e4b0e82
codacy fix 3
MilosKozak Jul 21, 2015
00b936a
Merge pull request #726 from MilosKozak/wip/datefix
jasoncalabrese Jul 21, 2015
047cfa6
some examples added
MilosKozak Jul 21, 2015
9205bca
move serverSettings outside bundle
MilosKozak Jul 21, 2015
e0e6643
codacy fix 4
MilosKozak Jul 21, 2015
5b8882b
Merge pull request #713 from nightscout/wip/shared-mqtt
jasoncalabrese Jul 22, 2015
157486d
Merge pull request #725 from MilosKozak/wip/language
jasoncalabrese Jul 22, 2015
2c489dd
ns translation
MilosKozak Jul 22, 2015
423538f
fr translation from pierre
MilosKozak Jul 22, 2015
60fcb98
Merge pull request #729 from MilosKozak/wip/language
jasoncalabrese Jul 22, 2015
1897b9a
Merge pull request #1 from nightscout/dev
dougtakeuti Jul 22, 2015
a031cff
Update language.js
dougtakeuti Jul 22, 2015
edfa8e5
Update language.js
dougtakeuti Jul 22, 2015
fa200f1
Merge pull request #731 from juliatakeuti/wip/portuguese
jasoncalabrese Jul 22, 2015
6a5dd50
Update language.js
dougtakeuti Jul 22, 2015
270c025
Update language.js
dougtakeuti Jul 23, 2015
71d19c6
Merge pull request #732 from juliatakeuti/wip/portuguese
jasoncalabrese Jul 23, 2015
d0dab4d
Merge pull request #4 from nightscout/dev
bogdangorescu Jul 23, 2015
2500037
Added RO
bogdangorescu Jul 23, 2015
6598c13
Merge pull request #733 from bogdangorescu/ROtranslation
jasoncalabrese Jul 23, 2015
26d08c9
adjust treatment form css so labels have a fixed width and longer tex…
jasoncalabrese Jul 24, 2015
dd9344d
lets not sneek in negative pre-bolus times yet
jasoncalabrese Jul 24, 2015
f28cedc
Merge pull request #735 from nightscout/wip/align-treatment-form
jasoncalabrese Jul 24, 2015
cb80462
Stupid IE doesn't like function.name, didn't need those functions anyway
jasoncalabrese Jul 24, 2015
9559548
prebolus handling
MilosKozak Jul 24, 2015
55100a0
Merge branch 'dev' into wip/plugin-name
jasoncalabrese Jul 24, 2015
e572f17
removed unused translation
MilosKozak Jul 24, 2015
900da1b
Merge pull request #737 from nightscout/wip/plugin-name
jasoncalabrese Jul 24, 2015
dc62702
Merge pull request #738 from MilosKozak/test
jasoncalabrese Jul 24, 2015
c60be1b
fix issue with windows scrolling the truncated labels for Chrome and IE
jasoncalabrese Jul 24, 2015
6a31f87
Merge pull request #739 from nightscout/wip/winblows-scroll
jasoncalabrese Jul 24, 2015
23cb12b
Merge pull request #14 from nightscout/dev
someoneAnyone Jul 24, 2015
4b97322
Updating Heroku app.json
someoneAnyone Jul 27, 2015
243e591
removed generator
someoneAnyone Jul 27, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents**

- [Contributing to cgm-remote-monitor](#contributing-to-cgm-remote-monitor)
- [Design](#design)
- [Develop on `dev`](#develop-on-dev)
- [Style Guide](#style-guide)
- [Create a prototype](#create-a-prototype)
- [Submit a pull request](#submit-a-pull-request)
- [Comments and issues](#comments-and-issues)
- [Co-ordination](#co-ordination)
- [Other Dev Tips](#other-dev-tips)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->


# Contributing to cgm-remote-monitor

Expand Down Expand Up @@ -30,6 +46,24 @@ design.
We develop on the `dev` branch.
You can get the dev branch checked out using `git checkout dev`.

## Style Guide

Some simple rules, that will make it easier to maintain our codebase:

* All indenting should use 2 space where possible (js, css, html, etc)
* A space before function parameters, such as: `function boom (name, callback) { }`, this makes searching for calls easier
* Name your callback functions, such as `boom('the name', function afterBoom ( result ) { }`
* Don't include author names in the header of your files, if you need to give credit to someone else do it in the commit comment.
* Use the comma first style, for example:

```javascript
var data = {
value: 'the value'
, detail: 'the details...'
, time: Date.now()
};
```

## Create a prototype

Fork cgm-remote-monitor and create a branch.
Expand Down Expand Up @@ -77,3 +111,13 @@ the version correctly. See sem-ver for versioning strategy.
Every commit is tested by travis. We encourage adding tests to
validate your design. We encourage discussing your use cases to help
everyone get a better understanding of your design.

## Other Dev Tips

* Join the [Gitter chat][gitter-url]
* Get a local dev environment setup if you haven't already
* Try breaking up big features/improvements into small parts. It's much easier to accept small PR's
* Create tests for your new code, and for the old code too. We are aiming for a full test coverage.
* If your going to be working in old code that needs lots of reformatting consider doing the clean as a separate PR.
* If you can find others to help test your PR is will help get them merged in sooner.

10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ MONGO_CONNECTION?=mongodb://localhost/test_db
CUSTOMCONNSTR_mongo_settings_collection?=test_settings
CUSTOMCONNSTR_mongo_collection?=test_sgvs
MONGO_SETTINGS=MONGO_CONNECTION=${MONGO_CONNECTION} \
CUSTOMCONNSTR_mongo_collection=${CUSTOMCONNSTR_mongo_collection} \
CUSTOMCONNSTR_mongo_settings_collection=${CUSTOMCONNSTR_mongo_settings_collection}
CUSTOMCONNSTR_mongo_collection=${CUSTOMCONNSTR_mongo_collection}

# XXX.bewest: Mocha is an odd process, and since things are being
# wrapped and transformed, this odd path needs to be used, not the
Expand All @@ -23,6 +22,7 @@ MOCHA=./node_modules/mocha/bin/_mocha
# Pinned from dependency list.
ISTANBUL=./node_modules/.bin/istanbul
ANALYZED=./coverage/lcov.info
export CODACY_REPO_TOKEN=e29ae5cf671f4f918912d9864316207c

all: test

Expand All @@ -34,6 +34,12 @@ report:
test -f ${ANALYZED} && \
(npm install coveralls && cat ${ANALYZED} | \
./node_modules/.bin/coveralls) || echo "NO COVERAGE"
test -f ${ANALYZED} && \
(npm install codecov.io && cat ${ANALYZED} | \
./node_modules/codecov.io/bin/codecov.io.js) || echo "NO COVERAGE"
test -f ${ANALYZED} && \
(npm install codacy-coverage && cat ${ANALYZED} | \
YOURPACKAGE_COVERAGE=1 ./node_modules/codacy-coverage/bin/codacy-coverage.js) || echo "NO COVERAGE"

test:
${MONGO_SETTINGS} ${MOCHA} -R tap ${TESTS}
Expand Down
230 changes: 212 additions & 18 deletions README.md

Large diffs are not rendered by default.

15 changes: 0 additions & 15 deletions Release.md

This file was deleted.

23 changes: 7 additions & 16 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,18 @@ function create (env, ctx) {
///////////////////////////////////////////////////
// api and json object variables
///////////////////////////////////////////////////
var api = require('./lib/api/')(env, ctx.entries, ctx.settings, ctx.treatments, ctx.profiles, ctx.devicestatus);
var pebble = ctx.pebble;
var api = require('./lib/api/')(env, ctx);

var app = express();
app.entries = ctx.entries;
app.treatments = ctx.treatments;
app.profiles = ctx.profiles;
app.devicestatus = ctx.devicestatus;
var appInfo = env.name + ' ' + env.version;
app.set('title', appInfo);
app.enable('trust proxy'); // Allows req.secure test on heroku https connections.

app.use(compression({filter: shouldCompress}));

function shouldCompress(req, res) {
//TODO: return false here if we find a condition where we don't want to compress
// fallback to standard filter function
return compression.filter(req, res);
}
app.use(compression({filter: function shouldCompress(req, res) {
//TODO: return false here if we find a condition where we don't want to compress
// fallback to standard filter function
return compression.filter(req, res);
}}));

//if (env.api_secret) {
// console.log("API_SECRET", env.api_secret);
Expand All @@ -32,7 +25,7 @@ function create (env, ctx) {


// pebble data
app.get('/pebble', pebble(ctx.entries, ctx.treatments, ctx.profiles, ctx.devicestatus, env));
app.get('/pebble', ctx.pebble);

//app.get('/package.json', software);

Expand All @@ -46,8 +39,6 @@ function create (env, ctx) {
var bundle = require('./bundle')();
app.use(bundle);

// Handle errors with express's errorhandler, to display more readable error messages.

// Handle errors with express's errorhandler, to display more readable error messages.
var errorhandler = require('errorhandler');
//if (process.env.NODE_ENV === 'development') {
Expand Down
129 changes: 72 additions & 57 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,64 +2,79 @@
"name": "CGM Remote Monitor",
"repository": "https://github.com/nightscout/cgm-remote-monitor",
"env": {
"MONGO_COLLECTION": {
"description": "REQUIRED: The mongo collection used for CGM data. Default value is 'entries'. Most users should use the default.",
"value": "entries",
"required": true
},
"API_SECRET": {
"description": "REQUIRED: User generated password used for REST API and optional features (12 character minimum).",
"value": "",
"required": true
},
"DISPLAY_UNITS": {
"description": "Server display units for BG values. Default null value implies 'mg/dl'. Set to 'mmol' to change the server to mmol mode.",
"value": "",
"required": false
},
"ENABLE": {
"description": "Space delimited list of optional features to enable, such as 'careportal'.",
"value": "",
"required": false
},
"ALARM_TYPES": {
"description": "Nightscout alarm behavior control. Default null value implies 'predict'. For adjustable alarm thresholds (set below), set to 'simple'.",
"value": "",
"required": false
},
"BG_HIGH": {
"description": "Urgent high BG alarm. Default null value implies 260. Must be set in mg/dL. Only used with simple alarms.",
"value": "",
"required": false
},
"BG_TARGET_TOP": {
"description": "Non-urgent high BG alarm, the top of your target range. Default null value implies 180. Must be set in mg/dL. Only used with simple alarms.",
"value": "",
"required": false
},
"BG_TARGET_BOTTOM": {
"description": "Non urgent low BG alarm, the bottom of your target range. Default null value implies 80. Must be set in mg/dL. Only used with simple alarms.",
"value": "",
"required": false
},
"BG_LOW": {
"description": "Urgent Low BG alarm. Default null value implies 55. Must be set in mg/dL. Only used with simple alarms.",
"value": "",
"required": false
},
"PUSHOVER_API_TOKEN": {
"description": "Pushover API token, required for Pushover notifications. Leave blank if not using Pushover.",
"value": "",
"required": false
},
"PUSHOVER_USER_KEY": {
"description": "Pushover user key, required for Pushover notifications. Leave blank if not using Pushover.",
"value": "",
"required": false
}
"MONGO_COLLECTION": {
"description": "REQUIRED: The mongo collection used for CGM data. Default value is 'entries'. Most users should use the default.",
"value": "entries",
"required": true
},
"API_SECRET": {
"description": "REQUIRED: User generated password used for REST API and optional features (12 character minimum).",
"value": "",
"required": true
},
"DISPLAY_UNITS": {
"description": "Server display units for BG values. Default null value implies 'mg/dl'. Set to 'mmol' to change the server to mmol mode.",
"value": "",
"required": false
},
"ENABLE": {
"description": "Space delimited list of optional features to enable, such as 'careportal'.",
"value": "",
"required": false
},
"ALARM_TYPES": {
"description": "Nightscout alarm behavior control. Default null value implies 'predict'. For adjustable alarm thresholds (set below), set to 'simple'.",
"value": "",
"required": false
},
"BG_HIGH": {
"description": "Urgent high BG alarm. Default null value implies 260. Must be set in mg/dL. Only used with simple alarms.",
"value": "",
"required": false
},
"BG_TARGET_TOP": {
"description": "Non-urgent high BG alarm, the top of your target range. Default null value implies 180. Must be set in mg/dL. Only used with simple alarms.",
"value": "",
"required": false
},
"BG_TARGET_BOTTOM": {
"description": "Non urgent low BG alarm, the bottom of your target range. Default null value implies 80. Must be set in mg/dL. Only used with simple alarms.",
"value": "",
"required": false
},
"BG_LOW": {
"description": "Urgent Low BG alarm. Default null value implies 55. Must be set in mg/dL. Only used with simple alarms.",
"value": "",
"required": false
},
"PUSHOVER_API_TOKEN": {
"description": "Pushover API token, required for Pushover notifications. Leave blank if not using Pushover.",
"value": "",
"required": false
},
"PUSHOVER_USER_KEY": {
"description": "Pushover user key, required for Pushover notifications. Leave blank if not using Pushover.",
"value": "",
"required": false
},
"CUSTOM_TITLE": {
"description": "Customize the name of the website, usually the name of T1.",
"value": "",
"required": false
},
"THEME": {
"description": "Possible values default or colors",
"value": "",
"required": false
},
"SHOW_RAWBG": {
"description": "Possible values always, never or noise",
"value": "",
"required": false
}
},
"addons": [
"mongolab:sandbox",
"papertrail"
"mongolab:sandbox",
"papertrail"
]
}
9 changes: 9 additions & 0 deletions bin/post-sgv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
# "date": "1413782506964"

curl -H "Content-Type: application/json" -H "api-secret: $API_SECRET" -XPOST 'http://localhost:1337/api/v1/entries/' -d '{
"sgv": 100,
"type": "sgv",
"direction": "Flat",
"date": "1415950912800"
}'
6 changes: 3 additions & 3 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"dependencies": {
"angularjs": "1.3.0-beta.19",
"bootstrap": "~3.2.0",
"d3": "3.4.3",
"d3": "~3.5.5",
"jquery": "2.1.0",
"jQuery-Storage-API": "~1.7.2",
"tipsy-jmalonzo": "~1.0.1",
"jsSHA": "~1.5.0"
"jsSHA": "~1.5.0",
"tipsy-jmalonzo": "~1.0.1"
},
"resolutions": {
"jquery": "2.1.0"
Expand Down
19 changes: 13 additions & 6 deletions bundle/bundle.source.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
(function () {

window.Nightscout = window.Nightscout || {};
window._ = require('lodash');
window.$ = window.jQuery = require('jquery');
window.moment = require('moment-timezone');
window.Nightscout = window.Nightscout || {};

window.Nightscout = {
iob: require('../lib/iob')()
, units: require('../lib/units')()
};
window.Nightscout = {
units: require('../lib/units')(),
utils: require('../lib/utils')(),
profile: require('../lib/profilefunctions')(),
language: require('../lib/language')(),
plugins: require('../lib/plugins/')().registerClientDefaults(),
sandbox: require('../lib/sandbox')()
};

console.info("Nightscout bundle ready", window.Nightscout);
console.info('Nightscout bundle ready', window.Nightscout);

})();

Loading