From 6c5bc216508a66e7a6f16bf63c414d4c902625ec Mon Sep 17 00:00:00 2001 From: bassettb Date: Mon, 29 Jul 2019 11:32:20 -0400 Subject: [PATCH 1/8] Don't show calculated insulin from carbs --- lib/report_plugins/daytoday.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/report_plugins/daytoday.js b/lib/report_plugins/daytoday.js index 3445973402c..72eaf0de3a0 100644 --- a/lib/report_plugins/daytoday.js +++ b/lib/report_plugins/daytoday.js @@ -738,7 +738,6 @@ daytoday.report = function report_daytoday (datastorage, sorteddaystoshow, optio var label = ' ' + treatment.carbs + ' g'; if (treatment.protein) label += ' / ' + treatment.protein + ' g'; if (treatment.fat) label += ' / ' + treatment.fat + ' g'; - label += ' (' + client.utils.toFixedMin((treatment.carbs / ic), 2) + 'U)'; context.append('rect') .attr('y', yCarbsScale(treatment.carbs)) From 4638db55cc556e868a27ad0804891c622b7dad8b Mon Sep 17 00:00:00 2001 From: ireneusz-ptak <31506973+ireneusz-ptak@users.noreply.github.com> Date: Tue, 30 Jul 2019 17:07:34 +0200 Subject: [PATCH 2/8] staleTime div is missing in the clockview --- views/clockviews/shared.html | 1 + 1 file changed, 1 insertion(+) diff --git a/views/clockviews/shared.html b/views/clockviews/shared.html index f7d5f78cd25..247d1d46bb7 100644 --- a/views/clockviews/shared.html +++ b/views/clockviews/shared.html @@ -33,6 +33,7 @@
+
From 98979268647d8e0c3ce189353086d2830c5e8562 Mon Sep 17 00:00:00 2001 From: Sulka Haro Date: Tue, 30 Jul 2019 22:17:25 +0300 Subject: [PATCH 3/8] Bump version to 0.12.4-dev --- npm-shrinkwrap.json | 2 +- package.json | 2 +- swagger.json | 2 +- swagger.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index f54cc8fa3b3..6a92d7e95ee 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -1,6 +1,6 @@ { "name": "nightscout", - "version": "0.12.3-dev", + "version": "0.12.4-dev", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 5adf81960af..ffd8ac9e2f2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nightscout", - "version": "0.12.3", + "version": "0.12.4-dev", "description": "Nightscout acts as a web-based CGM (Continuous Glucose Montinor) to allow multiple caregivers to remotely view a patients glucose data in realtime.", "license": "AGPL-3.0", "author": "Nightscout Team", diff --git a/swagger.json b/swagger.json index 1daf2c45a38..0d07a0bf128 100755 --- a/swagger.json +++ b/swagger.json @@ -8,7 +8,7 @@ "info": { "title": "Nightscout API", "description": "Own your DData with the Nightscout API", - "version": "0.12.3", + "version": "0.12.4-dev", "license": { "name": "AGPL 3", "url": "https://www.gnu.org/licenses/agpl.txt" diff --git a/swagger.yaml b/swagger.yaml index 4591239d8d8..e2555db7460 100755 --- a/swagger.yaml +++ b/swagger.yaml @@ -4,7 +4,7 @@ servers: info: title: Nightscout API description: Own your DData with the Nightscout API - version: 0.12.3 + version: 0.12.4-dev license: name: AGPL 3 url: 'https://www.gnu.org/licenses/agpl.txt' From 1a26b2a3e8997ec97f04e590ba0dcd5e045f8cda Mon Sep 17 00:00:00 2001 From: John Weston Date: Wed, 31 Jul 2019 11:16:02 -0700 Subject: [PATCH 4/8] 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. --- static/profile/js/profileeditor.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/static/profile/js/profileeditor.js b/static/profile/js/profileeditor.js index c57dd4c7eae..c1443e5cade 100644 --- a/static/profile/js/profileeditor.js +++ b/static/profile/js/profileeditor.js @@ -671,13 +671,6 @@ adjustedRecord.defaultProfile = currentprofile; adjustedRecord.units = client.settings.units; - if (record.convertedOnTheFly) { - var result = window.confirm(translate('Profile is going to be saved in newer format used in Nightscout 0.9.0 and above and will not be usable in older versions anymore.\nAre you sure?')); - if (!result) { - return; - } - } - delete record.convertedOnTheFly; delete adjustedRecord.convertedOnTheFly; From 8c9d51fd0a69015c86de7a8e599d13a4c3146e08 Mon Sep 17 00:00:00 2001 From: Erin879 Date: Sat, 3 Aug 2019 15:09:43 +0100 Subject: [PATCH 5/8] Fixed plugin settings being displayed in other settings pages --- lib/client/browser-settings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/client/browser-settings.js b/lib/client/browser-settings.js index d7782170b2a..4f990eb57f3 100644 --- a/lib/client/browser-settings.js +++ b/lib/client/browser-settings.js @@ -104,7 +104,7 @@ function init (client, serverSettings, $) { showPluginsSettings.toggle(hasPluginsToShow); - const bs = $('.browserSettings'); + const bs = $('#browserSettings'); const toggleCheckboxes = []; if (pluginPrefs.length > 0) { From 54ae53152863e3bbe65fe0cea98f2af817156900 Mon Sep 17 00:00:00 2001 From: Bluefox Date: Sat, 3 Aug 2019 21:06:25 +0200 Subject: [PATCH 6/8] 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. --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 05f1d8ff694..5bc8956402b 100644 --- a/app.js +++ b/app.js @@ -254,7 +254,7 @@ function create (env, ctx) { } // Production bundling - var tmpFiles = express.static('tmp', { + var tmpFiles = express.static(__dirname + '/tmp', { maxAge: maxAge }); From 5e883886ee4727aad2e645bc098d58da7d3d7494 Mon Sep 17 00:00:00 2001 From: Bluefox Date: Sat, 3 Aug 2019 21:18:54 +0200 Subject: [PATCH 7/8] Formatting --- app.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app.js b/app.js index 5bc8956402b..bbbb6f4d0cd 100644 --- a/app.js +++ b/app.js @@ -18,12 +18,12 @@ function create (env, ctx) { if (!insecureUseHttp) { console.info('Redirecting http traffic to https because INSECURE_USE_HTTP=', insecureUseHttp); app.use((req, res, next) => { - if (req.header('x-forwarded-proto') == 'https' || req.secure) { + if (req.header('x-forwarded-proto') === 'https' || req.secure) { next(); } else { res.redirect(307, `https://${req.header('host')}${req.url}`); } - }) + }); if (secureHstsHeader) { // Add HSTS (HTTP Strict Transport Security) header console.info('Enabled SECURE_HSTS_HEADER (HTTP Strict Transport Security)'); const helmet = require('helmet'); @@ -61,7 +61,7 @@ function create (env, ctx) { })); app.use(helmet.referrerPolicy({ policy: 'no-referrer' })); app.use(helmet.featurePolicy({ features: { payment: ["'none'"], } })); - app.use(bodyParser.json({ type: ['json', 'application/csp-report'] })) + app.use(bodyParser.json({ type: ['json', 'application/csp-report'] })); app.post('/report-violation', (req, res) => { if (req.body) { console.log('CSP Violation: ', req.body) @@ -84,7 +84,11 @@ function create (env, ctx) { let cacheBuster = 'developmentMode'; if (process.env.NODE_ENV !== 'development') { - cacheBuster = fs.readFileSync(process.cwd() + '/tmp/cacheBusterToken').toString().trim(); + if (fs.existsSync(process.cwd() + '/tmp/cacheBusterToken')) { + cacheBuster = fs.readFileSync(process.cwd() + '/tmp/cacheBusterToken').toString().trim(); + } else { + cacheBuster = fs.readFileSync(__dirname + '/tmp/cacheBusterToken').toString().trim(); + } } app.locals.cachebuster = cacheBuster; From 1c9d5b1409cc089f154041d3d64084ad0b4b346d Mon Sep 17 00:00:00 2001 From: Bluefox Date: Sat, 3 Aug 2019 21:22:14 +0200 Subject: [PATCH 8/8] Use not only from cgm-remote-monitor --- app.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/app.js b/app.js index bbbb6f4d0cd..1461266bbf1 100644 --- a/app.js +++ b/app.js @@ -258,9 +258,16 @@ function create (env, ctx) { } // Production bundling - var tmpFiles = express.static(__dirname + '/tmp', { - maxAge: maxAge - }); + var tmpFiles; + if (fs.existsSync(process.cwd() + '/tmp/cacheBusterToken')) { + tmpFiles = express.static('tmp', { + maxAge: maxAge + }); + } else { + tmpFiles = express.static(__dirname + '/tmp', { + maxAge: maxAge + }); + } // serve the static content app.use('/bundle', tmpFiles);