mirror of
https://github.com/bckelley/cgm-remote-monitor.git
synced 2026-08-24 03:14:12 -05:00
+3
-2
@@ -57,7 +57,7 @@ Nightscout is a Node.js application. The basic installation of the software for
|
||||
|
||||
We develop on the `dev` branch. All new pull requests should be targeted to `dev`. The `master` branch is only used for distributing the latest version of the tested sources.
|
||||
|
||||
You can get the dev branch checked out using `git checkout dev`.
|
||||
You can get the `dev` branch checked out using `git checkout dev`.
|
||||
|
||||
Once checked out, install the dependencies using `npm install`, then copy the included `my.env.template`file to `my.env` and edit the file to include your settings (like the Mongo URL). Leave the `NODE_ENV=development` line intact. Once set, run the site using `npm run dev`. This will start Nigthscout in the development mode, with different code packaging rules and automatic restarting of the server using nodemon, when you save changed files on disk. The client also hot-reloads new code in, but it's recommended to reload the the website after changes due to the way the plugin sandbox works.
|
||||
|
||||
@@ -119,8 +119,9 @@ We assume all new Pull Requests are at least smoke tested by the author and all
|
||||
Please include a description of what the features do and rationalize why the changes are needed.
|
||||
|
||||
If you add any new NPM module dependencies, you have to rationalize why there are needed - we prefer pull requests that reduce dependencies, not add them.
|
||||
Before releasing a a new version, we check with `npm audit` if our dependencies don't have known security issues.
|
||||
|
||||
When adding new features that add confugration options, please ensure the `README` document is amended with information on the new configuration.
|
||||
When adding new features that add configuration options, please ensure the `README` document is amended with information on the new configuration.
|
||||
|
||||
## Bug fixing
|
||||
|
||||
|
||||
@@ -124,7 +124,9 @@ If you plan to use Nightscout, we recommend using [Heroku](http://www.nightscout
|
||||
- Linux based install (Debian, Ubuntu, Raspbian) install with own Node.JS and MongoDB install (see software requirements below)
|
||||
- Windows based install with own Node.JS and MongoDB install (see software requirements below)
|
||||
|
||||
## Minimum browser requirements for viewing the site:
|
||||
## Recommended minimum browser versions for using Nightscout:
|
||||
|
||||
Older versions of the browsers might work, but are untested.
|
||||
|
||||
- Android 4
|
||||
- Chrome 68
|
||||
@@ -170,9 +172,9 @@ Wanna help with development, or just see how Nigthscout works? Great! See [CONTR
|
||||
# Usage
|
||||
|
||||
The data being uploaded from the server to the client is from a
|
||||
MongoDB server such as [mongolab][mongodb].
|
||||
MongoDB server such as [mLab][mLab].
|
||||
|
||||
[mongodb]: https://mongolab.com
|
||||
[mLab]: https://mlab.com/
|
||||
[autoconfigure]: https://nightscout.github.io/pages/configure/
|
||||
[mongostring]: https://nightscout.github.io/pages/mongostring/
|
||||
|
||||
@@ -200,7 +202,7 @@ The server status and settings are available from `/api/v1/status.json`.
|
||||
By default the `/entries` and `/treatments` APIs limit results to the the most recent 10 values from the last 2 days.
|
||||
You can get many more results, by using the `count`, `date`, `dateString`, and `created_at` parameters, depending on the type of data you're looking for.
|
||||
|
||||
Once you've installed Nightscout, you can access API documentation by loading `/api-docs` URL in your instance.
|
||||
Once you've installed Nightscout, you can access API documentation by loading `/api-docs/` URL in your instance.
|
||||
|
||||
#### Example Queries
|
||||
|
||||
@@ -213,7 +215,7 @@ Once you've installed Nightscout, you can access API documentation by loading `/
|
||||
* Boluses over 2U: `http://localhost:1337/api/v1/treatments.json?find[insulin][$gte]=2`
|
||||
|
||||
The API is Swagger enabled, so you can generate client code to make working with the API easy.
|
||||
To learn more about the Nightscout API, visit https://YOUR-SITE.com/api-docs.html or review [swagger.yaml](swagger.yaml).
|
||||
To learn more about the Nightscout API, visit https://YOUR-SITE.com/api-docs/ or review [swagger.yaml](swagger.yaml).
|
||||
|
||||
## Environment
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -254,9 +258,16 @@ function create (env, ctx) {
|
||||
}
|
||||
|
||||
// Production bundling
|
||||
var tmpFiles = express.static('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);
|
||||
|
||||
@@ -104,7 +104,7 @@ function init (client, serverSettings, $) {
|
||||
|
||||
showPluginsSettings.toggle(hasPluginsToShow);
|
||||
|
||||
const bs = $('.browserSettings');
|
||||
const bs = $('#browserSettings');
|
||||
const toggleCheckboxes = [];
|
||||
|
||||
if (pluginPrefs.length > 0) {
|
||||
|
||||
@@ -265,7 +265,7 @@ function init (client, $) {
|
||||
|
||||
console.log('Validating careportal entry: ', data.eventType);
|
||||
|
||||
if (data.eventType == 'Temporary Target') {
|
||||
if (data.duration !== 0 && data.eventType == 'Temporary Target') {
|
||||
if (isNaN(data.targetTop) || isNaN(data.targetBottom) || !data.targetBottom || !data.targetTop) {
|
||||
console.log('Bottom or Top target missing');
|
||||
allOk = false;
|
||||
|
||||
+45
-12
@@ -11,10 +11,27 @@ client.settings = browserSettings(client, window.serverSettings, $);
|
||||
|
||||
client.query = function query () {
|
||||
console.log('query');
|
||||
$.ajax('/api/v1/entries.json?count=3', {
|
||||
var parts = (location.search || '?').substring(1).split('&');
|
||||
var token = '';
|
||||
parts.forEach(function (val) {
|
||||
if (val.startsWith('token=')) {
|
||||
token = val.substring('token='.length);
|
||||
}
|
||||
});
|
||||
|
||||
var secret = localStorage.getItem('apisecrethash');
|
||||
var src = '/api/v1/entries.json?count=3&t=' + new Date().getTime();
|
||||
|
||||
if (secret) {
|
||||
src += '&secret=' + secret;
|
||||
} else if (token) {
|
||||
src += '&token=' + token;
|
||||
}
|
||||
|
||||
$.ajax(src, {
|
||||
success: client.render
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
client.render = function render (xhr) {
|
||||
console.log('got data', xhr);
|
||||
@@ -28,11 +45,27 @@ client.render = function render (xhr) {
|
||||
}
|
||||
});
|
||||
|
||||
let $errorMessage = $('#errorMessage');
|
||||
|
||||
// If no one measured value found => show "-?-"
|
||||
if (!rec) {
|
||||
if (!$errorMessage.length) {
|
||||
$('#arrowDiv').append('<div id="errorMessage" title="No data found in DB">-?-</div>');
|
||||
$('#arrow').hide();
|
||||
} else {
|
||||
$errorMessage.show();
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
$errorMessage.length && $errorMessage.hide();
|
||||
$('#arrow').show();
|
||||
}
|
||||
|
||||
let last = new Date(rec.date);
|
||||
let now = new Date();
|
||||
|
||||
// Convert BG to mmol/L if necessary.
|
||||
if (window.serverSettings.settings.units == 'mmol') {
|
||||
if (window.serverSettings.settings.units === 'mmol') {
|
||||
var displayValue = window.Nightscout.units.mgdlToMMOL(rec.sgv);
|
||||
} else {
|
||||
displayValue = rec.sgv;
|
||||
@@ -42,7 +75,7 @@ client.render = function render (xhr) {
|
||||
$('#bgnow').html(displayValue);
|
||||
|
||||
// Insert the trend arrow.
|
||||
$('#arrow').attr('src', '/images/' + rec.direction + '.svg');
|
||||
$('#arrow').attr('src', '/images/' + (!rec.direction || rec.direction === 'NOT COMPUTABLE' ? 'NONE' : rec.direction) + '.svg');
|
||||
|
||||
// Time before data considered stale.
|
||||
let staleMinutes = 13;
|
||||
@@ -52,13 +85,13 @@ client.render = function render (xhr) {
|
||||
$('#bgnow').toggleClass('stale', (now - last > threshold));
|
||||
|
||||
// Generate and insert the clock.
|
||||
let timeDivisor = (client.settings.timeFormat) ? client.settings.timeFormat : 12;
|
||||
let timeDivisor = parseInt(client.settings.timeFormat ? client.settings.timeFormat : 12, 10);
|
||||
let today = new Date()
|
||||
, h = today.getHours() % timeDivisor;
|
||||
if (timeDivisor == 12) {
|
||||
h = (h == 0) ? 12 : h; // In the case of 00:xx, change to 12:xx for 12h time
|
||||
if (timeDivisor === 12) {
|
||||
h = (h === 0) ? 12 : h; // In the case of 00:xx, change to 12:xx for 12h time
|
||||
}
|
||||
if (timeDivisor == 24) {
|
||||
if (timeDivisor === 24) {
|
||||
h = (h < 10) ? ("0" + h) : h; // Pad the hours with a 0 in 24h time
|
||||
}
|
||||
let m = today.getMinutes();
|
||||
@@ -67,14 +100,14 @@ client.render = function render (xhr) {
|
||||
|
||||
var queryDict = {};
|
||||
location.search.substr(1).split("&").forEach(function(item) { queryDict[item.split("=")[0]] = item.split("=")[1] });
|
||||
|
||||
|
||||
if (!window.serverSettings.settings.showClockClosebutton || !queryDict['showClockClosebutton']) {
|
||||
$('#close').css('display', 'none');
|
||||
}
|
||||
|
||||
// defined in the template this is loaded into
|
||||
// eslint-disable-next-line no-undef
|
||||
if (clockFace == 'clock-color') {
|
||||
if (clockFace === 'clock-color') {
|
||||
|
||||
var bgHigh = window.serverSettings.settings.thresholds.bgHigh;
|
||||
var bgLow = window.serverSettings.settings.thresholds.bgLow;
|
||||
@@ -138,12 +171,12 @@ client.render = function render (xhr) {
|
||||
$('#arrow').css('filter', 'brightness(100%)');
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
client.init = function init () {
|
||||
console.log('init');
|
||||
client.query();
|
||||
setInterval(client.query, 1 * 60 * 1000);
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = client;
|
||||
|
||||
+16
-4
@@ -1,5 +1,4 @@
|
||||
'use strict';
|
||||
'use strict';
|
||||
|
||||
var _ = require('lodash');
|
||||
var $ = (global && global.$) || require('jquery');
|
||||
@@ -64,7 +63,7 @@ client.init = function init (callback) {
|
||||
}).fail(function fail (jqXHR, textStatus, errorThrown) {
|
||||
|
||||
// check if we couldn't reach the server at all, show offline message
|
||||
if (jqXHR.readyState == 0) {
|
||||
if (!jqXHR.readyState) {
|
||||
console.log('Application appears to be OFFLINE');
|
||||
$('#loadingMessageText').html('Connecting to Nightscout server failed, retrying every 2 seconds');
|
||||
window.setTimeout(window.Nightscout.client.init(), 2000);
|
||||
@@ -76,7 +75,20 @@ client.init = function init (callback) {
|
||||
console.log('Already tried to get settings after auth, but failed');
|
||||
} else {
|
||||
client.settingsFailed = true;
|
||||
language.set('en');
|
||||
|
||||
// detect browser language
|
||||
var lang = Storages.localStorage.get('language') || (navigator.language || navigator.userLanguage).toLowerCase();
|
||||
if (lang !== 'zh_cn' && lang !== 'zh-cn' && lang !== 'zh_tw' && lang !== 'zh-tw') {
|
||||
lang = lang.substring(0, 2);
|
||||
} else {
|
||||
lang = lang.replace('-', '_');
|
||||
}
|
||||
if (language.languages.find(l => l.code === lang)) {
|
||||
language.set(lang);
|
||||
} else {
|
||||
language.set('en');
|
||||
}
|
||||
|
||||
client.translate = language.translate;
|
||||
// auth failed, hide loader and request for key
|
||||
$('#centerMessagePanel').hide();
|
||||
@@ -993,7 +1005,7 @@ client.load = function load (serverSettings, callback) {
|
||||
socket.on('notification', function(notify) {
|
||||
console.log('notification from server:', notify);
|
||||
|
||||
if (notify.timestamp && previousNotifyTimestamp != notify.timestamp) {
|
||||
if (notify.timestamp && previousNotifyTimestamp !== notify.timestamp) {
|
||||
previousNotifyTimestamp = notify.timestamp;
|
||||
client.plugins.visualizeAlarm(client.sbx, notify, notify.title + ' ' + notify.message);
|
||||
} else {
|
||||
|
||||
+26
-10
@@ -53,7 +53,7 @@ function init (client, d3) {
|
||||
|
||||
// get the desired opacity for context chart based on the brush extent
|
||||
renderer.highlightBrushPoints = function highlightBrushPoints (data) {
|
||||
if (data.mills >= chart().brush.extent()[0].getTime() && data.mills <= chart().brush.extent()[1].getTime()) {
|
||||
if (client.latestSGV && data.mills >= chart().brush.extent()[0].getTime() && data.mills <= chart().brush.extent()[1].getTime()) {
|
||||
return chart().futureOpacity(data.mills - client.latestSGV.mills);
|
||||
} else {
|
||||
return 0.5;
|
||||
@@ -111,7 +111,7 @@ function init (client, d3) {
|
||||
return d.type === 'forecast' ? 'none' : d.color;
|
||||
})
|
||||
.attr('opacity', function(d) {
|
||||
return d.noFade ? 100 : chart().futureOpacity(d.mills - client.latestSGV.mills);
|
||||
return d.noFade || !client.latestSGV ? 100 : chart().futureOpacity(d.mills - client.latestSGV.mills);
|
||||
})
|
||||
.attr('stroke-width', function(d) {
|
||||
return d.type === 'mbg' ? 2 : d.type === 'forecast' ? 2 : 0;
|
||||
@@ -173,13 +173,21 @@ function init (client, d3) {
|
||||
|
||||
renderer.addTreatmentCircles = function addTreatmentCircles () {
|
||||
function treatmentTooltip (d) {
|
||||
var targetBottom = d.targetBottom;
|
||||
var targetTop = d.targetTop;
|
||||
|
||||
if (client.settings.units === 'mmol') {
|
||||
targetBottom = Math.round(targetBottom / 18.0 * 10) / 10;
|
||||
targetTop = Math.round(targetTop / 18.0 * 10) / 10;
|
||||
}
|
||||
|
||||
return '<strong>' + translate('Time') + ':</strong> ' + client.formatTime(new Date(d.mills)) + '<br/>' +
|
||||
(d.eventType ? '<strong>' + translate('Treatment type') + ':</strong> ' + translate(client.careportal.resolveEventName(d.eventType)) + '<br/>' : '') +
|
||||
(d.reason ? '<strong>' + translate('Reason') + ':</strong> ' + translate(d.reason) + '<br/>' : '') +
|
||||
(d.glucose ? '<strong>' + translate('BG') + ':</strong> ' + d.glucose + (d.glucoseType ? ' (' + translate(d.glucoseType) + ')' : '') + '<br/>' : '') +
|
||||
(d.enteredBy ? '<strong>' + translate('Entered By') + ':</strong> ' + d.enteredBy + '<br/>' : '') +
|
||||
(d.targetTop ? '<strong>' + translate('Target Top') + ':</strong> ' + d.targetTop + '<br/>' : '') +
|
||||
(d.targetBottom ? '<strong>' + translate('Target Bottom') + ':</strong> ' + d.targetBottom + '<br/>' : '') +
|
||||
(d.targetTop ? '<strong>' + translate('Target Top') + ':</strong> ' + targetTop + '<br/>' : '') +
|
||||
(d.targetBottom ? '<strong>' + translate('Target Bottom') + ':</strong> ' + targetBottom + '<br/>' : '') +
|
||||
(d.duration ? '<strong>' + translate('Duration') + ':</strong> ' + Math.round(d.duration) + ' min<br/>' : '') +
|
||||
(d.notes ? '<strong>' + translate('Notes') + ':</strong> ' + d.notes : '');
|
||||
}
|
||||
@@ -517,6 +525,14 @@ function init (client, d3) {
|
||||
}
|
||||
|
||||
function treatmentTooltip () {
|
||||
var glucose = treatment.glucose;
|
||||
if (client.settings.units != client.ddata.profile.data[0].units) {
|
||||
glucose *= (client.settings.units === 'mmol' ? 0.055 : 18);
|
||||
var decimals = (client.settings.units === 'mmol' ? 10 : 1);
|
||||
|
||||
glucose = Math.round(glucose * decimals) / decimals;
|
||||
}
|
||||
|
||||
client.tooltip.transition().duration(TOOLTIP_TRANS_MS).style('opacity', .9);
|
||||
client.tooltip.html('<strong>' + translate('Time') + ':</strong> ' + client.formatTime(new Date(treatment.mills)) + '<br/>' + '<strong>' + translate('Treatment type') + ':</strong> ' + translate(client.careportal.resolveEventName(treatment.eventType)) + '<br/>' +
|
||||
(treatment.carbs ? '<strong>' + translate('Carbs') + ':</strong> ' + treatment.carbs + '<br/>' : '') +
|
||||
@@ -525,7 +541,7 @@ function init (client, d3) {
|
||||
(treatment.absorptionTime > 0 ? '<strong>' + translate('Absorption Time') + ':</strong> ' + (Math.round(treatment.absorptionTime / 60.0 * 10) / 10) + 'h' + '<br/>' : '') +
|
||||
(treatment.insulin ? '<strong>' + translate('Insulin') + ':</strong> ' + treatment.insulin + '<br/>' : '') +
|
||||
(treatment.enteredinsulin ? '<strong>' + translate('Combo Bolus') + ':</strong> ' + treatment.enteredinsulin + 'U, ' + treatment.splitNow + '% : ' + treatment.splitExt + '%, ' + translate('Duration') + ': ' + treatment.duration + '<br/>' : '') +
|
||||
(treatment.glucose ? '<strong>' + translate('BG') + ':</strong> ' + treatment.glucose + (treatment.glucoseType ? ' (' + translate(treatment.glucoseType) + ')' : '') + '<br/>' : '') +
|
||||
(treatment.glucose ? '<strong>' + translate('BG') + ':</strong> ' + glucose + (treatment.glucoseType ? ' (' + translate(treatment.glucoseType) + ')' : '') + '<br/>' : '') +
|
||||
(treatment.enteredBy ? '<strong>' + translate('Entered By') + ':</strong> ' + treatment.enteredBy + '<br/>' : '') +
|
||||
(treatment.notes ? '<strong>' + translate('Notes') + ':</strong> ' + treatment.notes : '') +
|
||||
boluscalcTooltip(treatment)
|
||||
@@ -897,7 +913,7 @@ function init (client, d3) {
|
||||
, treatments: treatmentCount
|
||||
}, client.sbx.data.profile.getCarbRatio(new Date()));
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
renderer.drawTreatment = function drawTreatment (treatment, opts, carbratio) {
|
||||
if (!treatment.carbs && !treatment.insulin) {
|
||||
@@ -920,7 +936,7 @@ function init (client, d3) {
|
||||
var arc = prepareArc(treatment, radius);
|
||||
var treatmentDots = appendTreatments(treatment, arc);
|
||||
appendLabels(treatmentDots, arc, opts);
|
||||
}
|
||||
};
|
||||
|
||||
renderer.addBasals = function addBasals (client) {
|
||||
|
||||
@@ -938,7 +954,7 @@ function init (client, d3) {
|
||||
var lastbasal = 0;
|
||||
|
||||
if (!profile.activeProfileToTime(from)) {
|
||||
window.alert(translate('Wrong profile setting.\nNo profile defined to displayed time.\nRedirecting to profile editor to create new profile.'));
|
||||
window.alert(translate('Redirecting you to the Profile Editor to create a new profile.'));
|
||||
try {
|
||||
window.location.href = '/profile';
|
||||
} catch (err) {
|
||||
@@ -1009,7 +1025,7 @@ function init (client, d3) {
|
||||
.attr('stroke', '#0099ff')
|
||||
.attr('stroke-width', 1)
|
||||
.attr('fill', 'none')
|
||||
.attr('d', valueline(linedata))
|
||||
.attr('d', valueline(linedata));
|
||||
|
||||
g.append('path')
|
||||
.attr('class', 'line notempline')
|
||||
@@ -1017,7 +1033,7 @@ function init (client, d3) {
|
||||
.attr('stroke-width', 1)
|
||||
.attr('stroke-dasharray', ('3, 3'))
|
||||
.attr('fill', 'none')
|
||||
.attr('d', valueline(notemplinedata))
|
||||
.attr('d', valueline(notemplinedata));
|
||||
|
||||
g.append('path')
|
||||
.attr('class', 'area basalarea')
|
||||
|
||||
+12
-10
@@ -55,7 +55,7 @@ hashauth.init = function init(client, $) {
|
||||
});
|
||||
return hashauth;
|
||||
};
|
||||
|
||||
|
||||
hashauth.removeAuthentication = function removeAuthentication(event) {
|
||||
|
||||
Storages.localStorage.remove('apisecrethash');
|
||||
@@ -74,16 +74,18 @@ hashauth.init = function init(client, $) {
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
|
||||
hashauth.requestAuthentication = function requestAuthentication (eventOrNext) {
|
||||
var translate = client.translate;
|
||||
hashauth.injectHtml();
|
||||
$( '#requestauthenticationdialog' ).dialog({
|
||||
width: 350
|
||||
, height: 240
|
||||
width: 400
|
||||
, height: 270
|
||||
, closeText: ''
|
||||
, buttons: [
|
||||
{
|
||||
text: translate('Update')
|
||||
id: 'requestauthenticationdialog-btn'
|
||||
, text: translate('Update')
|
||||
, click: function() {
|
||||
var dialog = this;
|
||||
hashauth.processSecret($('#apisecret').val(), $('#storeapisecret').is(':checked'), function done (close) {
|
||||
@@ -102,9 +104,9 @@ hashauth.init = function init(client, $) {
|
||||
}
|
||||
]
|
||||
, open: function open ( ) {
|
||||
$('#requestauthenticationdialog').keypress(function pressed (e) {
|
||||
$('#apisecret').off('keyup').on('keyup' ,function pressed (e) {
|
||||
if (e.keyCode === $.ui.keyCode.ENTER) {
|
||||
$(this).parent().find('button.ui-button-text-only').trigger('click');
|
||||
$('#requestauthenticationdialog-btn').trigger('click');
|
||||
}
|
||||
});
|
||||
$('#apisecret').val('').focus();
|
||||
@@ -117,7 +119,7 @@ hashauth.init = function init(client, $) {
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
|
||||
hashauth.processSecret = function processSecret(apisecret, storeapisecret, callback) {
|
||||
var translate = client.translate;
|
||||
|
||||
@@ -170,9 +172,9 @@ hashauth.init = function init(client, $) {
|
||||
var html =
|
||||
'<div id="requestauthenticationdialog" style="display:none" title="'+translate('Device authentication')+'">'+
|
||||
'<label for="apisecret">'+translate('Your API secret')+': </label>'+
|
||||
'<input type="password" id="apisecret" size="20" />'+
|
||||
'<input type="password" id="apisecret" size="20" style="width: 100%;"/>'+
|
||||
'<br>'+
|
||||
'<input type="checkbox" id="storeapisecret" /> <label for="storeapisecret">'+translate('Store hash on this computer (Use only on private computers)')+'</label>'+
|
||||
'<input type="checkbox" id="storeapisecret" /> <label for="storeapisecret">'+translate('Remember the API Secret on this device. (Do not enable this on public computers.)')+'</label>'+
|
||||
'<div id="apisecrethash">'+
|
||||
(hashauth.apisecrethash ? translate('Hash') + ' ' + hashauth.apisecrethash: '')+
|
||||
'</div>'+
|
||||
|
||||
+74
-85
@@ -1010,7 +1010,7 @@ function init() {
|
||||
,nb: 'Leser status'
|
||||
,he: 'טוען סטטוס'
|
||||
,pl: 'Status załadowania'
|
||||
,ru: 'Загрузка статус'
|
||||
,ru: 'Загрузка состояния'
|
||||
,sk: 'Nahrávam status'
|
||||
,nl: 'Laadstatus'
|
||||
,ko: '상태 로딩'
|
||||
@@ -1060,7 +1060,7 @@ function init() {
|
||||
,nb: 'Vises ikke'
|
||||
,he: 'לא מוצג'
|
||||
,pl: 'Nie jest wyświetlany'
|
||||
,ru: 'Не изображено'
|
||||
,ru: 'Не отражено'
|
||||
,sk: 'Nie je zobrazené'
|
||||
,nl: 'Niet weergegeven'
|
||||
,ko: '출력되지 않음'
|
||||
@@ -1135,7 +1135,7 @@ function init() {
|
||||
,nb: 'Behandler data for'
|
||||
,he: 'מעבד נתונים של'
|
||||
,pl: 'Przetwarzanie danych'
|
||||
,ru: 'Обработка данных'
|
||||
,ru: 'Обработка данных от'
|
||||
,sk: 'Spracovávam dáta'
|
||||
,nl: 'Gegevens verwerken van'
|
||||
,ko: '데이터 처리 중'
|
||||
@@ -1210,7 +1210,7 @@ function init() {
|
||||
,nb: '(ingen)'
|
||||
,he: '(ללא)'
|
||||
,pl: '(brak)'
|
||||
,ru: '(отсутствует)'
|
||||
,ru: '(нет)'
|
||||
,sk: '(žiadny)'
|
||||
,nl: '(geen)'
|
||||
,ko: '(없음)'
|
||||
@@ -1236,7 +1236,7 @@ function init() {
|
||||
,nb: 'ingen'
|
||||
,he: 'ללא'
|
||||
,pl: 'brak'
|
||||
,ru: 'Отсутствует'
|
||||
,ru: 'Нет'
|
||||
,sk: 'Žiadny'
|
||||
,nl: 'geen'
|
||||
,ko: '없음'
|
||||
@@ -1262,7 +1262,7 @@ function init() {
|
||||
,nb: '<ingen>'
|
||||
,he: '<ללא>'
|
||||
,pl: '<brak>'
|
||||
,ru: '<отсутствует>'
|
||||
,ru: '<нет>'
|
||||
,sk: '<žiadny>'
|
||||
,nl: '<Geen>'
|
||||
,ko: '<없음>'
|
||||
@@ -1312,7 +1312,7 @@ function init() {
|
||||
,nb: 'Dag til dag'
|
||||
,he: 'יום ביומו'
|
||||
,pl: 'Dzień po dniu'
|
||||
,ru: 'Ежедневно'
|
||||
,ru: 'По дням'
|
||||
,sk: 'Deň po dni'
|
||||
,nl: 'Dag tot Dag'
|
||||
,ko: '일별 그래프'
|
||||
@@ -1336,7 +1336,7 @@ function init() {
|
||||
,nb: 'Week to week'
|
||||
,he: 'Week to week'
|
||||
,pl: 'Week to week'
|
||||
,ru: 'Week to week'
|
||||
,ru: 'По неделям'
|
||||
,sk: 'Week to week'
|
||||
,nl: 'Week to week'
|
||||
,ko: '주별 그래프'
|
||||
@@ -1385,7 +1385,7 @@ function init() {
|
||||
,nb: 'Prosentgraf'
|
||||
,he: 'טבלת עשירונים'
|
||||
,pl: 'Wykres percentyl'
|
||||
,ru: 'Перцентильная диаграмма'
|
||||
,ru: 'Процентильная диаграмма'
|
||||
,sk: 'Percentil'
|
||||
,nl: 'Procentuele grafiek'
|
||||
,ko: '백분위 그래프'
|
||||
@@ -1451,7 +1451,7 @@ function init() {
|
||||
,fi: 'netIOB tilasto'
|
||||
,bg: 'netIOB татистика'
|
||||
,hr: 'netIOB statistika'
|
||||
,ru: 'статистика netIOB'
|
||||
,ru: 'статистика нетто активн инс netIOB'
|
||||
,tr: 'netIOB istatistikleri'
|
||||
}
|
||||
,'temp basals must be rendered to display this report': { //hourlystats.js
|
||||
@@ -1462,7 +1462,7 @@ function init() {
|
||||
,bg: 'временните базали трябва да са показани за да се покаже тази това'
|
||||
,hr: 'temp bazali moraju biti prikazani kako bi se vidio ovaj izvještaj'
|
||||
,he: 'חובה לאפשר רמה בזלית זמנית כדי לרות דוח זה'
|
||||
,ru: 'Для этого отчета требуется показать данные о врем базалах'
|
||||
,ru: 'для этого отчета требуется прорисовка врем базалов'
|
||||
,tr: 'Bu raporu görüntülemek için geçici bazal oluşturulmalıdır'
|
||||
}
|
||||
,'Weekly success' : {
|
||||
@@ -1508,7 +1508,7 @@ function init() {
|
||||
,nb: 'Mangler data'
|
||||
,he: 'אין מידע זמין'
|
||||
,pl: 'Brak danych'
|
||||
,ru: 'Нет доступных данных'
|
||||
,ru: 'Нет данных'
|
||||
,sk: 'Žiadne dostupné dáta'
|
||||
,nl: 'Geen gegevens beschikbaar'
|
||||
,ko: '활용할 수 있는 데이터 없음'
|
||||
@@ -1533,7 +1533,7 @@ function init() {
|
||||
,nb: 'Lav'
|
||||
,he: 'נמוך'
|
||||
,pl: 'Niski'
|
||||
,ru: 'Низкий СК'
|
||||
,ru: 'Низкая ГК'
|
||||
,sk: 'Nízka'
|
||||
,nl: 'Laag'
|
||||
,ko: '낮음'
|
||||
@@ -1608,7 +1608,7 @@ function init() {
|
||||
,nb: 'Høy'
|
||||
,he: 'גבוה'
|
||||
,pl: 'Wysoki'
|
||||
,ru: 'Высокий СК'
|
||||
,ru: 'Высокая ГК'
|
||||
,sk: 'Vysoká'
|
||||
,nl: 'Hoog'
|
||||
,ko: '높음'
|
||||
@@ -1633,7 +1633,7 @@ function init() {
|
||||
,nb: 'Gjennomsnitt'
|
||||
,he: 'ממוצע'
|
||||
,pl: 'Średnia'
|
||||
,ru: 'Усредненный СК'
|
||||
,ru: 'Средняя'
|
||||
,sk: 'Priemer'
|
||||
,nl: 'Gemiddeld'
|
||||
,ko: '평균'
|
||||
@@ -1808,7 +1808,7 @@ function init() {
|
||||
,nb: 'Avlesning'
|
||||
,he: 'קריאות'
|
||||
,pl: 'Odczyty'
|
||||
,ru: 'Измерения'
|
||||
,ru: 'Значения'
|
||||
,sk: 'Záznamy'
|
||||
,nl: 'Metingen'
|
||||
,ko: '혈당'
|
||||
@@ -1883,7 +1883,7 @@ function init() {
|
||||
,nb: 'Glukoserapport i prosent'
|
||||
,he: 'דוח אחוזון סוכר'
|
||||
,pl: 'Tabela centylowa glikemii'
|
||||
,ru: 'Процентиль'
|
||||
,ru: 'Процентильная ГК'
|
||||
,sk: 'Report percentilu glykémií'
|
||||
,nl: 'Glucose percentiel rapport'
|
||||
,ko: '혈당 백분위 보고서'
|
||||
@@ -1908,7 +1908,7 @@ function init() {
|
||||
,nb: 'Glukosefordeling'
|
||||
,he: 'התפלגות סוכר'
|
||||
,pl: 'Rozkład glikemii'
|
||||
,ru: 'Распределение СК'
|
||||
,ru: 'Распределение ГК'
|
||||
,sk: 'Rozloženie glykémie'
|
||||
,nl: 'Glucose verdeling'
|
||||
,ko: '혈당 분포'
|
||||
@@ -2207,7 +2207,7 @@ function init() {
|
||||
,nb: 'Ukeresultat'
|
||||
,he: 'הצלחה שבועית'
|
||||
,pl: 'Wyniki tygodniowe'
|
||||
,ru: 'Результаты недели'
|
||||
,ru: 'Итоги недели'
|
||||
,sk: 'Týždenná úspešnosť'
|
||||
,nl: 'Wekelijks succes'
|
||||
,ko: '주간 통계'
|
||||
@@ -2359,7 +2359,7 @@ function init() {
|
||||
,fi: 'Error'
|
||||
,pl: 'Error'
|
||||
,pt: 'Error'
|
||||
,ru: 'Error'
|
||||
,ru: 'Ошибка'
|
||||
,sk: 'Error'
|
||||
,nl: 'Error'
|
||||
,ko: 'Error'
|
||||
@@ -2763,7 +2763,7 @@ function init() {
|
||||
,fi: 'Muokkaa ruokia'
|
||||
,nb: 'Mat editor'
|
||||
,pl: 'Edytor posiłków'
|
||||
,ru: 'Редактор еды'
|
||||
,ru: 'Редактор епродуктов'
|
||||
,sk: 'Editor jedál'
|
||||
,nl: 'Voeding beheer'
|
||||
,ko: '음식 편집'
|
||||
@@ -2972,7 +2972,7 @@ function init() {
|
||||
,zh_cn: 'API密钥'
|
||||
,zh_tw: 'API密鑰'
|
||||
}
|
||||
,'Store hash on this computer (Use only on private computers)' : {
|
||||
,'Remember the API Secret on this device. (Do not enable this on public computers.)' : {
|
||||
cs: 'Ulož hash na tomto počítači (používejte pouze na soukromých počítačích)'
|
||||
,he: 'אחסן את הסיסמא הסודית שלך על מחשב זה.מומלץ לעשות כן רק אם המחשב בשימושך הפרטי'
|
||||
,de: 'Speichere Prüfsumme auf diesem Computer (nur auf privaten Computern verwenden)'
|
||||
@@ -3092,7 +3092,7 @@ function init() {
|
||||
,nb: 'Blodsukker'
|
||||
,he: 'סוכר בדם'
|
||||
,pl: 'Glikemia z krwi'
|
||||
,ru: 'Сахар крови'
|
||||
,ru: 'Гликемия'
|
||||
,sk: 'Glykémia'
|
||||
,nl: 'Bloed glucose'
|
||||
,ko: '혈당'
|
||||
@@ -3142,7 +3142,7 @@ function init() {
|
||||
,nb: 'Slett denne hendelsen?'
|
||||
,he: 'למחוק רשומה זו?'
|
||||
,pl: 'Usunąć te leczenie?'
|
||||
,ru: 'Удалить эту запись лечения'
|
||||
,ru: 'Удалить это событие?'
|
||||
,sk: 'Vymazať toto ošetrenie?'
|
||||
,nl: 'Verwijder'
|
||||
,ko: '이 대처를 지울까요?'
|
||||
@@ -3267,7 +3267,7 @@ function init() {
|
||||
,fi: 'VS'
|
||||
,nb: 'BS'
|
||||
,pl: 'BG'
|
||||
,ru: 'Гликемия'
|
||||
,ru: 'ГК'
|
||||
,sk: 'Glykémia'
|
||||
,nl: 'BG'
|
||||
,ko: '혈당'
|
||||
@@ -3292,7 +3292,7 @@ function init() {
|
||||
,fi: 'Käytä korjausannosta laskentaan'
|
||||
,nb: 'Bruk blodsukkerkorrigering i beregning'
|
||||
,pl: 'Użyj BG w obliczeniach korekty'
|
||||
,ru: 'При расчете проводите коррекцию на СК'
|
||||
,ru: 'При расчете учитывать коррекцию ГК'
|
||||
,sk: 'Použite korekciu na glykémiu'
|
||||
,nl: 'Gebruik BG in berekeningen'
|
||||
,ko: '계산에 보정된 혈당을 사용하세요.'
|
||||
@@ -3317,7 +3317,7 @@ function init() {
|
||||
,fi: 'VS sensorilta (päivitetty automaattisesti)'
|
||||
,nb: 'BS fra CGM (automatisk)'
|
||||
,pl: 'Wartość BG z CGM (automatycznie)'
|
||||
,ru: 'СК с сенсора (автообновление)'
|
||||
,ru: 'ГК с сенсора (автообновление)'
|
||||
,sk: 'Glykémia z CGM (automatická aktualizácia) '
|
||||
,nl: 'BG van CGM (automatische invoer)'
|
||||
,ko: 'CGM 혈당(자동 업데이트)'
|
||||
@@ -3342,7 +3342,7 @@ function init() {
|
||||
,fi: 'VS mittarilta'
|
||||
,nb: 'BS fra blodsukkerapparat'
|
||||
,pl: 'Wartość BG z glukometru'
|
||||
,ru: 'СК по глюкометру'
|
||||
,ru: 'ГК по глюкометру'
|
||||
,sk: 'Glykémia z glukomeru'
|
||||
,nl: 'BG van meter'
|
||||
,ko: '혈당 측정기에서의 혈당'
|
||||
@@ -3367,7 +3367,7 @@ function init() {
|
||||
,fi: 'Käsin syötetty VS'
|
||||
,nb: 'Manuelt BS'
|
||||
,pl: 'Ręczne wprowadzenie BG'
|
||||
,ru: 'ввести данные СК вручную'
|
||||
,ru: 'ручной ввод ГК'
|
||||
,sk: 'Ručne zadaná glykémia'
|
||||
,nl: 'Handmatige BG'
|
||||
,ko: '수동 입력 혈당'
|
||||
@@ -3467,7 +3467,7 @@ function init() {
|
||||
,fi: 'Käytä hiilihydraattikorjausta laskennassa'
|
||||
,nb: 'Bruk karbohydratkorrigering i beregning'
|
||||
,pl: 'Użyj wartość węglowodanów w obliczeniach korekty'
|
||||
,ru: 'Пользуйтесь коррекцией углеводов при расчете'
|
||||
,ru: 'Пользуйтесь коррекцией на углеводы при расчете'
|
||||
,sk: 'Použite korekciu na sacharidy'
|
||||
,nl: 'Gebruik KH correctie in berekening'
|
||||
,ko: '계산에 보정된 탄수화물을 사용하세요.'
|
||||
@@ -3492,7 +3492,7 @@ function init() {
|
||||
,fi: 'Käytä aktiivisia hiilihydraatteja laskennassa'
|
||||
,nb: 'Benytt aktive karbohydrater i beregning'
|
||||
,pl: 'Użyj COB do obliczenia korekty'
|
||||
,ru: 'Учитывайте активные углеводы при расчете (COB)'
|
||||
,ru: 'Учитывайте активные углеводы COB при расчете'
|
||||
,sk: 'Použite korekciu na COB'
|
||||
,nl: 'Gebruik ingenomen KH in berekening'
|
||||
,ko: '계산에 보정된 COB를 사용하세요.'
|
||||
@@ -3517,7 +3517,7 @@ function init() {
|
||||
,fi: 'Käytä aktiviivista insuliinia laskennassa'
|
||||
,nb: 'Bruk aktivt insulin i beregningen'
|
||||
,pl: 'Użyj IOB w obliczeniach'
|
||||
,ru: 'Учитывайте активный инсулин при расчете (IOB)'
|
||||
,ru: 'Учитывайте активный инсулин IOB при расчете'
|
||||
,sk: 'Použite IOB vo výpočte'
|
||||
,nl: 'Gebruik IOB in berekening'
|
||||
,ko: '계산에 IOB를 사용하세요.'
|
||||
@@ -3717,7 +3717,7 @@ function init() {
|
||||
,fi: '60 minuuttia aiemmin'
|
||||
,nb: '60 min tidligere'
|
||||
,pl: '60 minut wcześniej'
|
||||
,ru: 'на 60 минут раньше'
|
||||
,ru: 'на 60 минут ранее'
|
||||
,sk: '60 min. pred'
|
||||
,nl: '60 minuten eerder'
|
||||
,ko: '60분 더 일찍'
|
||||
@@ -3742,7 +3742,7 @@ function init() {
|
||||
,fi: '45 minuuttia aiemmin'
|
||||
,nb: '45 min tidligere'
|
||||
,pl: '45 minut wcześniej'
|
||||
,ru: 'на 45 минут раньше'
|
||||
,ru: 'на 45 минут ранее'
|
||||
,sk: '45 min. pred'
|
||||
,nl: '45 minuten eerder'
|
||||
,ko: '45분 더 일찍'
|
||||
@@ -3767,7 +3767,7 @@ function init() {
|
||||
,fi: '30 minuuttia aiemmin'
|
||||
,nb: '30 min tidigere'
|
||||
,pl: '30 minut wcześniej'
|
||||
,ru: 'на 30 минут раньше'
|
||||
,ru: 'на 30 минут ранее'
|
||||
,sk: '30 min. pred'
|
||||
,nl: '30 minuten eerder'
|
||||
,ko: '30분 더 일찍'
|
||||
@@ -3792,7 +3792,7 @@ function init() {
|
||||
,fi: '20 minuuttia aiemmin'
|
||||
,nb: '20 min tidligere'
|
||||
,pl: '20 minut wcześniej'
|
||||
,ru: 'на 20 минут раньше'
|
||||
,ru: 'на 20 минут ранее'
|
||||
,sk: '20 min. pred'
|
||||
,nl: '20 minuten eerder'
|
||||
,ko: '20분 더 일찍'
|
||||
@@ -3817,7 +3817,7 @@ function init() {
|
||||
,fi: '15 minuuttia aiemmin'
|
||||
,nb: '15 min tidligere'
|
||||
,pl: '15 minut wcześniej'
|
||||
,ru: 'на 15 минут раньше'
|
||||
,ru: 'на 15 минут ранее'
|
||||
,sk: '15 min. pred'
|
||||
,nl: '15 minuten eerder'
|
||||
,ko: '15분 더 일찍'
|
||||
@@ -4193,7 +4193,7 @@ function init() {
|
||||
,fi: 'Lataa tietokanta uudelleen'
|
||||
,nb: 'Last inn databasen på nytt'
|
||||
,pl: 'Odśwież bazę danych'
|
||||
,ru: 'Перезагрузить базу данных'
|
||||
,ru: 'Перезагрузите базу данных'
|
||||
,sk: 'Obnoviť databázu'
|
||||
,nl: 'Database opnieuw laden'
|
||||
,ko: '데이터베이스 재로드'
|
||||
@@ -4218,7 +4218,7 @@ function init() {
|
||||
,fi: 'Lisää'
|
||||
,nb: 'Legg til'
|
||||
,pl: 'Dodaj'
|
||||
,ru: 'Добавить'
|
||||
,ru: 'Добавьте'
|
||||
,sk: 'Pridať'
|
||||
,nl: 'Toevoegen'
|
||||
,ko: '추가'
|
||||
@@ -4294,7 +4294,7 @@ function init() {
|
||||
,fi: 'Laite autentikoitu'
|
||||
,nb: 'Enhet godkjent'
|
||||
,pl: 'Urządzenie uwierzytelnione'
|
||||
,ru: 'Устройство определено'
|
||||
,ru: 'Устройство авторизовано'
|
||||
,sk: 'Zariadenie overené'
|
||||
,nl: 'Apparaat geauthenticeerd'
|
||||
,ko: '기기 인증'
|
||||
@@ -4320,7 +4320,7 @@ function init() {
|
||||
,fi: 'Laite ei ole autentikoitu'
|
||||
,nb: 'Enhet ikke godkjent'
|
||||
,pl: 'Urządzenie nieuwierzytelnione'
|
||||
,ru: 'Устройство не определено'
|
||||
,ru: 'Устройство не авторизовано'
|
||||
,sk: 'Zariadenie nieje overené'
|
||||
,nl: 'Apparaat niet geauthenticeerd'
|
||||
,ko: '미인증 기기'
|
||||
@@ -4424,7 +4424,7 @@ function init() {
|
||||
,fi: 'Laitettasi ei ole vielä autentikoitu'
|
||||
,nb: 'Din enhet er ikke godkjent enda'
|
||||
,pl: 'Twoje urządzenie nie jest jeszcze uwierzytelnione'
|
||||
,ru: 'Ваше устройство не опознано '
|
||||
,ru: 'Ваше устройство еще не авторизовано '
|
||||
,sk: 'Toto zariadenie zatiaľ nebolo overené'
|
||||
,nl: 'Uw apparaat is nog niet geauthenticeerd'
|
||||
,ko: '당신의 기기는 아직 인증되지 않았습니다.'
|
||||
@@ -4681,7 +4681,7 @@ function init() {
|
||||
,sv: 'Boluskalkylator (BWP)'
|
||||
,pl: 'Kalkulator Bolusa (BWP)'
|
||||
,pt: 'Ajuda de bolus'
|
||||
,ru: 'Предпросмотр мастера болюса'
|
||||
,ru: 'Калькулятор болюса'
|
||||
,sk: 'Bolus Wizard'
|
||||
,nl: 'Bolus Wizard Preview (BWP)'
|
||||
,ko: 'Bolus 마법사 미리보기'
|
||||
@@ -4733,7 +4733,7 @@ function init() {
|
||||
,sv: 'Kanylålder (CAGE)'
|
||||
,pl: 'Czas wkłucia (CAGE)'
|
||||
,pt: 'Idade da Cânula (ICAT)'
|
||||
,ru: 'Возраст канюли'
|
||||
,ru: 'Канюля отработала'
|
||||
,sk: 'Zavedenie kanyly (CAGE)'
|
||||
,nl: 'Canule leeftijd (CAGE)'
|
||||
,ko: '캐뉼라 사용기간'
|
||||
@@ -5147,7 +5147,7 @@ function init() {
|
||||
,nb: 'Logg en hendelse'
|
||||
,he: 'הזן רשומה'
|
||||
,pl: 'Wprowadź leczenie'
|
||||
,ru: 'Лог лечения'
|
||||
,ru: 'Журнал лечения'
|
||||
,sk: 'Záznam ošetrenia'
|
||||
,nl: 'Registreer een behandeling'
|
||||
,ko: 'Treatment 로그'
|
||||
@@ -5172,7 +5172,7 @@ function init() {
|
||||
,nb: 'Blodsukkerkontroll'
|
||||
,he: 'בדיקת סוכר'
|
||||
,pl: 'Pomiar glikemii'
|
||||
,ru: 'Контроль СК'
|
||||
,ru: 'Контроль ГК'
|
||||
,sk: 'Kontrola glykémie'
|
||||
,nl: 'Bloedglucose check'
|
||||
,ko: '혈당 체크'
|
||||
@@ -5372,7 +5372,7 @@ function init() {
|
||||
,nb: 'Pumpebytte'
|
||||
,he: 'החלפת צינורית משאבה'
|
||||
,pl: 'Zmiana miejsca wkłucia pompy'
|
||||
,ru: 'Смена места помпы'
|
||||
,ru: 'Смена места катетора помпы'
|
||||
,sk: 'Výmena setu'
|
||||
,nl: 'Nieuwe pomp infuus'
|
||||
,ko: '펌프 위치 변경'
|
||||
@@ -5422,7 +5422,7 @@ function init() {
|
||||
,nb: 'CGM Sensor Stop'
|
||||
,he: 'CGM Sensor Stop'
|
||||
,pl: 'CGM Sensor Stop'
|
||||
,ru: 'CGM Sensor Stop'
|
||||
,ru: 'Остановка сенсора'
|
||||
,sk: 'CGM Sensor Stop'
|
||||
,nl: 'CGM Sensor Stop'
|
||||
,ko: 'CGM Sensor Stop'
|
||||
@@ -5447,7 +5447,7 @@ function init() {
|
||||
,nb: 'Sensorbytte'
|
||||
,he: 'החלפת חיישן סוכר'
|
||||
,pl: 'Zmiana sensora'
|
||||
,ru: 'Замена сенсора'
|
||||
,ru: 'Установка сенсора'
|
||||
,sk: 'Výmena senzoru'
|
||||
,nl: 'CGM sensor wissel'
|
||||
,ko: 'CGM 센서 삽입'
|
||||
@@ -5571,7 +5571,7 @@ function init() {
|
||||
,nb: 'Blodsukkermåling'
|
||||
,he: 'מדידת סוכר'
|
||||
,pl: 'Odczyt glikemii'
|
||||
,ru: 'Сахар крови'
|
||||
,ru: 'Значение ГК'
|
||||
,sk: 'Hodnota glykémie'
|
||||
,nl: 'Glucose meting'
|
||||
,ko: '혈당 읽기'
|
||||
@@ -5721,7 +5721,7 @@ function init() {
|
||||
,nb: 'Vis behandlinger'
|
||||
,he: 'הצג את כל הטיפולים'
|
||||
,pl: 'Pokaż całość leczenia'
|
||||
,ru: 'Показать все события по уходу'
|
||||
,ru: 'Показать все события'
|
||||
,sk: 'Zobraziť všetky ošetrenia'
|
||||
,nl: 'Bekijk alle behandelingen'
|
||||
,ko: '모든 treatments 보기'
|
||||
@@ -6097,7 +6097,7 @@ function init() {
|
||||
,fi: 'Näytä raaka VS tieto'
|
||||
,nb: 'Vis rådata'
|
||||
,pl: 'Wyświetl surowe dane RAW'
|
||||
,ru: 'Показывать необработанные данные RAW'
|
||||
,ru: 'Показывать необработанные RAW данные'
|
||||
,sk: 'Zobraziť RAW dáta'
|
||||
,nl: 'Laat ruwe data zien'
|
||||
,ko: 'Raw 혈당 데이터 보기'
|
||||
@@ -6337,7 +6337,7 @@ function init() {
|
||||
,zh_tw: '色盲患者可辨識的顏色'
|
||||
,pl: 'Kolory dla niedowidzących'
|
||||
,tr: 'Renk körü dostu görünüm'
|
||||
,ru: 'Цветовая гамма для людей с дальтонизмом'
|
||||
,ru: 'Цветовая гамма для людей с нарушениями восприятия цвета'
|
||||
}
|
||||
,'Reset, and use defaults' : {
|
||||
cs: 'Vymaž a nastav výchozí hodnoty'
|
||||
@@ -6486,7 +6486,7 @@ function init() {
|
||||
,fi: 'aikaa sitten'
|
||||
,nb: 'tid siden'
|
||||
,pl: 'czas temu'
|
||||
,ru: 'в прошлом'
|
||||
,ru: 'времени назад'
|
||||
,sk: 'čas pred'
|
||||
,nl: 'tijd geleden'
|
||||
,ko: '시간 전'
|
||||
@@ -6616,7 +6616,7 @@ function init() {
|
||||
,fi: 'päivä sitten'
|
||||
,nb: 'dag siden'
|
||||
,pl: 'dzień temu'
|
||||
,ru: 'день назад'
|
||||
,ru: 'дн назад'
|
||||
,sk: 'deň pred'
|
||||
,nl: 'dag geleden'
|
||||
,ko: '일 전'
|
||||
@@ -6819,7 +6819,7 @@ function init() {
|
||||
,fi: 'Raaka VS'
|
||||
,nb: 'RAW-BS'
|
||||
,pl: 'Raw BG'
|
||||
,ru: 'необработанные данные СК'
|
||||
,ru: 'необработанные данные ГК'
|
||||
,sk: 'RAW dáta glykémie'
|
||||
,nl: 'Ruwe BG data'
|
||||
,ko: 'Raw 혈당'
|
||||
@@ -6995,7 +6995,7 @@ function init() {
|
||||
,nb: 'Karbohydrattid'
|
||||
,he: 'זמן פחמימה'
|
||||
,pl: 'Czas posiłku'
|
||||
,ru: 'Время действия углеводов'
|
||||
,ru: 'Время приема углеводов'
|
||||
,sk: 'Čas jedla'
|
||||
,nl: 'Koolhydraten tijd'
|
||||
,ko: '탄수화물 시간'
|
||||
@@ -7168,7 +7168,7 @@ function init() {
|
||||
,fi: 'Hoidot'
|
||||
,pl: 'Care Portal'
|
||||
,pt: 'Care Portal'
|
||||
,ru: 'Портал назначений'
|
||||
,ru: 'Портал лечения'
|
||||
,sk: 'Portál starostlivosti'
|
||||
,nl: 'Zorgportaal'
|
||||
,ko: 'Care Portal'
|
||||
@@ -7868,15 +7868,19 @@ function init() {
|
||||
}
|
||||
,'Delete all documents from devicestatus collection older than 30 days' : {
|
||||
hr: 'Obriši sve statuse starije od 30 dana'
|
||||
,ru: 'Удалить все записи коллекции devicestatus'
|
||||
}
|
||||
,'Number of Days to Keep:' : {
|
||||
hr: 'Broj dana za sačuvati:'
|
||||
,ru: 'Оставить дней'
|
||||
}
|
||||
,'This task removes all documents from devicestatus collection that are older than 30 days. Useful when uploader battery status is not properly updated.' : {
|
||||
hr: 'Ovo uklanja sve statuse starije od 30 dana. Korisno kada se status baterije uploadera ne osvježava ispravno.'
|
||||
,ru: 'Это удалит все документы коллекции devicestatus которым более 30 дней. Полезно, когда статус батареи не обновляется или обновляется неверно.'
|
||||
}
|
||||
,'Delete old documents from devicestatus collection?' : {
|
||||
hr: 'Obriši stare statuse'
|
||||
|
||||
}
|
||||
,'Clean Mongo entries (glucose entries) database' : {
|
||||
hr: 'Obriši GUK zapise iz baze'
|
||||
@@ -7910,6 +7914,7 @@ function init() {
|
||||
}
|
||||
,'Delete old documents from treatments collection?' : {
|
||||
hr: 'Obriši stare tretmane?'
|
||||
,ru: 'Удалить старые документы из коллекции лечения?'
|
||||
}
|
||||
,'Admin Tools' : {
|
||||
cs: 'Nástroje pro správu'
|
||||
@@ -9735,36 +9740,12 @@ function init() {
|
||||
,tr: 'Veri profili değişikliği yükleniyor'
|
||||
,zh_cn: '载入配置文件交换数据'
|
||||
}
|
||||
,'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?' : {
|
||||
cs: 'Profil bude uložen v novějším formátu používaném v Nightscoutu 0.9.0 a novějších. Již nebude použitelný se starší verzí.\nJste si jistý?'
|
||||
,he: 'הפרופיל עומד להישמר בתבנית חדשה יותר בשימוש ב- Nightscout 0.9.0 ומעלה ולא יהיה ניתן להשתמש בו בגרסאות ישנות יותר. \n האם אתה בטוח? '
|
||||
,el: 'Το προφίλ πρόκειται να αποθηκευτεί με τη νέα του μορφή (έκδοση Nighscout 0.9.0 και πάνω) και δεν πρόκειται να μπορεί να χρησιμοποιηθεί σε παλαιότερες εκδόσεις. \nΕίστε σίγουροι?'
|
||||
,fr: 'Le profil va être sauvegardé dans un nouveau format utilisé par Nightscout 0.9.0 et suivants, et il ne pourra plus être utilisé par les versions antérieures. \nÊtes-vous sûr?'
|
||||
,ro: 'Profilul va fi salvat într-un format nou, folosit în Nightscout 0.9.0 și superior și nu va mai fi posibilă folosirea pentru versiunile mai vechi.\nSunteți de acord?'
|
||||
,de: 'Profil wird in einem neuem Format für Nightscout 0.9.0 und höher gespeichert und ist in älteren Versionen nicht mehr nutzbar. Sind Sie sicher?'
|
||||
,dk: 'Profilen gemmes i et nyere format som ikke kommer til at virke med tidligere versioner af Nightscout (<0.9.0). \nEr du sikker?'
|
||||
,es: 'El perfil se guarda en un nuevo formato para Nightscout 0.9.0 y superior y ya no se puede usar en versiones anteriores. Estas seguro?'
|
||||
,sv: 'Profilen sparas i ett nyare format som ej kommer fungera i tidigare versioner av Nightscout (<0.9.0). \nÄr du säker?'
|
||||
,nb: 'Profilen lagres i ett nyere format som ikke kommer til å fungera i tidigere versioner av Nightscout (<0.9.0). \nEr du sikker?'
|
||||
,bg: 'Профилът ще бъде запаметен в нов формат, който се ползва от Nightscout 0.9.0 и нагоре и няма да бъде съвместим с по-стари версии. \nСигурен ли си ?'
|
||||
,hr: 'Profil će biti spremljen u novijem formatu korištenom u Nightscout 0.9.0 i kasnije te neće više biti upotrebljiv u starijim verzijama.\nJeste li sigurni?'
|
||||
,fi: 'Profiili tallennetaan uuteen Nightscout 0.9.0 käyttämään muotoon, eikä sitä voi enää käyttää vanhempien versioiden kanssa.\nOletko varma?'
|
||||
,ru: 'Профиль будет сохранен в более позднем формате Nightscout 0.9.0 и выше и не сможет более использоваться в старых версиях. Вы согласны? '
|
||||
,sk: 'Profil bude uložený v novšom formáte používanom od verzie Nightscout 0.9.0 a novších. Nebude už použiteľný v starších verziách.\nSte si istý?'
|
||||
,pl: 'Dane profilu będą zapisane w nowym formacie Nighscout 0.9.0 i wyższym. Dane te nie będa mogły być użyte w starszych wersjach.\nJesteś pewien?'
|
||||
,pt: 'O perfil será salvo no novo format usado no Nightscout 0.9.0 e acima e não será mais utilizado em versões mais antigas. \nTem certeza de que quer fazer isso?'
|
||||
,ko: '프로파일은 Nightscout 0.9.0 에서 새로운 형식으로 저장될 예정입니다. 구버전은 더이상 사용되지 않을 예정입니다. 확인 하셨습니까?'
|
||||
,it: 'Profilo sta per essere salvato nel formato più recente utilizzato in Nightscout 0.9.0 e/o superiori e non sarà più possibile utilizzarlo nelle versioni precedenti. \nSei sicuro?'
|
||||
,nl: 'Profiel wordt opgeslagen in een nieuw formaat dat gebruikt wordt vanaf Nightscout 0.9.0 hierdoor is deze niet meer bruikbaar voor oudere versies. \nWil je doorgaan?'
|
||||
,tr: 'Profil, Nightscout 0.9.0 ve sonraki sürümlerinde kullanılan daha yeni bir formatta kaydedilecek ve artık eski sürümlerde kullanılamayacaktır.\nemin misiniz?'
|
||||
,zh_cn: '配置文件将使用0.9.0版本之后的新格式保存,旧版本程序将无法使用。\n你确定吗?'
|
||||
}
|
||||
,'Wrong profile setting.\nNo profile defined to displayed time.\nRedirecting to profile editor to create new profile.' : {
|
||||
,'Redirecting you to the Profile Editor to create a new profile.' : {
|
||||
cs: 'Chybě nastavený profil.\nNení definovaný žádný platný profil k času zobrazení.\nProvádím přesměrování na editor profilu.'
|
||||
,he: 'הגדרת פרופיל שגוי. \n פרופיל מוגדר לזמן המוצג. מפנה מחדש לעורך פרופיל כדי ליצור פרופיל חדש. '
|
||||
,el: 'Λάθος προφίλ. Παρακαλώ δημιουργήστε ένα νέο προφίλ'
|
||||
,fr: 'Erreur de réglage de profil. \nAucun profil défini pour indiquer l\'heure. \nRedirection vers la création d\'un nouveau profil. '
|
||||
,de: 'Falsche Profileinstellung.\nKein Profil festgelegt zur angezeigten Zeit.\n Weiter zum Profileditor, um ein neues Profil zu erstellen.'
|
||||
,de: 'Sie werden zum Profil-Editor weitergeleitet, um ein neues Profil anzulegen.'
|
||||
,dk: 'Forkert profilindstilling.\nIngen profil defineret til at vise tid.\nOmdirigere til profil editoren for at lave en ny profil.'
|
||||
,es: 'Configuración incorrecta del perfil. \n No establecido ningún perfil en el tiempo mostrado. \n Continuar en editor de perfil para crear perfil nuevo.'
|
||||
,bg: 'Грешни настройки на профила. \nНяма определен профил към избраното време. \nПрепращане към редактора на профила, за създаване на нов профил.'
|
||||
@@ -14066,24 +14047,32 @@ function init() {
|
||||
},
|
||||
'Protein': {
|
||||
fi: 'Proteiini'
|
||||
, de: 'Protein'
|
||||
},
|
||||
'Fat': {
|
||||
fi: 'Rasva'
|
||||
, de: 'Fett'
|
||||
},
|
||||
'Protein average': {
|
||||
fi: 'Proteiini keskiarvo'
|
||||
, de: 'Proteine Durchschnitt'
|
||||
},
|
||||
'Fat average': {
|
||||
fi: 'Rasva keskiarvo'
|
||||
, de: 'Fett Durchschnitt'
|
||||
|
||||
},
|
||||
'Total carbs': {
|
||||
fi: 'Hiilihydraatit yhteensä'
|
||||
, de: 'Kohlenhydrate gesamt'
|
||||
},
|
||||
'Total protein': {
|
||||
fi: 'Proteiini yhteensä'
|
||||
, de: 'Protein gesamt'
|
||||
},
|
||||
'Total fat': {
|
||||
fi: 'Rasva yhteensä'
|
||||
, de: 'Fett gesamt'
|
||||
}
|
||||
};
|
||||
|
||||
@@ -14143,7 +14132,7 @@ function init() {
|
||||
language.lang = newlang;
|
||||
|
||||
language.languages.forEach(function (l) {
|
||||
if (l.code == language.lang && l.speechCode) language.speechCode = l.speechCode;
|
||||
if (l.code === language.lang && l.speechCode) language.speechCode = l.speechCode;
|
||||
});
|
||||
|
||||
return language();
|
||||
|
||||
@@ -61,8 +61,17 @@ function init (ctx) {
|
||||
|
||||
var tzMessage = profile.getTimezone() ? profile.getTimezone() : 'Timezone not set in profile';
|
||||
|
||||
var sensitivity = profile.getSensitivity(sbx.time);
|
||||
|
||||
if (sbx.settings.units != profile.data[0].units) {
|
||||
sensitivity *= (sbx.settings.units === 'mmol' ? 0.055 : 18);
|
||||
var decimals = (sbx.settings.units === 'mmol' ? 10 : 1);
|
||||
|
||||
sensitivity = Math.round(sensitivity * decimals) / decimals;
|
||||
}
|
||||
|
||||
var info = [{label: translate('Current basal'), value: prop.display}
|
||||
, {label: translate('Sensitivity'), value: profile.getSensitivity(sbx.time) + ' ' + sbx.settings.units + ' / U'}
|
||||
, {label: translate('Sensitivity'), value: sensitivity + ' ' + sbx.settings.units + ' / U'}
|
||||
, {label: translate('Current Carb Ratio'), value: '1 U / ' + profile.getCarbRatio(sbx.time) + 'g'}
|
||||
, {label: translate('Basal timezone'), value: tzMessage}
|
||||
, {label: '------------', value: ''}
|
||||
|
||||
@@ -348,9 +348,13 @@ function init (ctx) {
|
||||
|
||||
function addSuggestion () {
|
||||
if (prop.lastSuggested) {
|
||||
var bg = prop.lastSuggested.bg;
|
||||
if (sbx.data.profile.data[0].units === 'mmol') {
|
||||
bg = Math.round(bg / 18 * 10) / 10;
|
||||
}
|
||||
|
||||
var valueParts = [
|
||||
valueString('BG: ', prop.lastSuggested.bg)
|
||||
valueString('BG: ', bg)
|
||||
, valueString(', ', prop.lastSuggested.reason)
|
||||
, prop.lastSuggested.sensitivityRatio ? ', <b>Sensitivity Ratio:</b> ' + prop.lastSuggested.sensitivityRatio : ''
|
||||
];
|
||||
|
||||
@@ -102,10 +102,11 @@ daytoday.report = function report_daytoday (datastorage, sorteddaystoshow, optio
|
||||
var fatAverage = fatSum / datastorage.alldays;
|
||||
|
||||
if (options.insulindistribution)
|
||||
$('#daytodaycharts').append('<br><br><b>' + translate('TDD average') + ':</b> ' + tddAverage.toFixed(1) + 'U <b>' +
|
||||
translate('Carbs average') + ':</b> ' + carbsAverage.toFixed(0) + 'g' +
|
||||
translate('Protein average') + ':</b> ' + proteinAverage.toFixed(0) + 'g' +
|
||||
translate('Fat average') + ':</b> ' + fatAverage.toFixed(0) + 'g'
|
||||
$('#daytodaycharts').append('<br><br>' +
|
||||
'<b>' + translate('TDD average') + ':</b> ' + tddAverage.toFixed(1) + 'U ' +
|
||||
'<b>' + translate('Carbs average') + ':</b> ' + carbsAverage.toFixed(0) + 'g ' +
|
||||
'<b>' + translate('Protein average') + ':</b> ' + proteinAverage.toFixed(0) + 'g ' +
|
||||
'<b>' + translate('Fat average') + ':</b> ' + fatAverage.toFixed(0) + 'g'
|
||||
);
|
||||
|
||||
function timeTicks (n, i) {
|
||||
@@ -738,7 +739,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))
|
||||
|
||||
Generated
+2712
-2854
File diff suppressed because it is too large
Load Diff
+29
-25
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "nightscout",
|
||||
"version": "0.12.3",
|
||||
"version": "0.12.4",
|
||||
"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",
|
||||
@@ -57,73 +57,77 @@
|
||||
"npm": "^6.4.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.5.5",
|
||||
"@babel/preset-env": "^7.5.5",
|
||||
"async": "^0.9.2",
|
||||
"body-parser": "^1.18.3",
|
||||
"babel-loader": "^8.0.6",
|
||||
"body-parser": "^1.19.0",
|
||||
"bootevent": "0.0.1",
|
||||
"braces": "^3.0.2",
|
||||
"compression": "^1.7.4",
|
||||
"css-loader": "^1.0.1",
|
||||
"cssmin": "^0.4.3",
|
||||
"d3": "^3.5.17",
|
||||
"ejs": "^2.6.1",
|
||||
"errorhandler": "^1.5.0",
|
||||
"ejs": "^2.6.2",
|
||||
"errorhandler": "^1.5.1",
|
||||
"event-stream": "3.3.4",
|
||||
"expose-loader": "^0.7.5",
|
||||
"express": "^4.16.4",
|
||||
"express": "^4.17.1",
|
||||
"express-minify": "^1.0.0",
|
||||
"file-loader": "^3.0.1",
|
||||
"flot": "^0.8.3",
|
||||
"heapdump": "^0.3.14",
|
||||
"helmet": "^3.16.0",
|
||||
"jquery": "^3.3.1",
|
||||
"helmet": "^3.20.0",
|
||||
"jquery": "^3.4.1",
|
||||
"jquery-ui-bundle": "^1.12.1-migrate",
|
||||
"jquery.tooltips": "^1.0.0",
|
||||
"js-storage": "^1.0.4",
|
||||
"js-storage": "^1.1.0",
|
||||
"jsdom": "~11.11.0",
|
||||
"jsonwebtoken": "^8.5.1",
|
||||
"lodash": "^4.17.15",
|
||||
"memory-cache": "^0.2.0",
|
||||
"mime": "^2.4.0",
|
||||
"minimed-connect-to-nightscout": "^1.2.2",
|
||||
"mime": "^2.4.4",
|
||||
"minimed-connect-to-nightscout": "^1.3.1",
|
||||
"moment": "^2.24.0",
|
||||
"moment-locales-webpack-plugin": "^1.0.7",
|
||||
"moment-timezone": "^0.5.23",
|
||||
"moment-locales-webpack-plugin": "^1.1.0",
|
||||
"moment-timezone": "^0.5.26",
|
||||
"moment-timezone-data-webpack-plugin": "^1.1.0",
|
||||
"mongodb": "^3.2.2",
|
||||
"mongodb": "^3.3.0",
|
||||
"mongomock": "^0.1.2",
|
||||
"node-cache": "^4.2.0",
|
||||
"node-cache": "^4.2.1",
|
||||
"parse-duration": "^0.1.1",
|
||||
"pushover-notifications": "^1.2.0",
|
||||
"random-token": "0.0.8",
|
||||
"request": "^2.88.0",
|
||||
"semver": "^6.0.0",
|
||||
"semver": "^6.3.0",
|
||||
"share2nightscout-bridge": "^0.2.1",
|
||||
"shiro-trie": "^0.4.8",
|
||||
"simple-statistics": "^0.7.0",
|
||||
"socket.io": "~2.1.1",
|
||||
"style-loader": "^0.23.1",
|
||||
"swagger-ui-dist": "^3.22.0",
|
||||
"swagger-ui-dist": "^3.23.5",
|
||||
"swagger-ui-express": "^4.0.7",
|
||||
"terser": "^3.17.0",
|
||||
"traverse": "^0.6.6",
|
||||
"webpack": "^4.29.6",
|
||||
"webpack-cli": "^3.3.0"
|
||||
"webpack": "^4.39.2",
|
||||
"webpack-cli": "^3.3.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"nodemon": "^1.19.0",
|
||||
"babel-eslint": "^10.0.2",
|
||||
"benv": "^3.3.0",
|
||||
"env-cmd": "^8.0.2",
|
||||
"eslint": "^6.0.1",
|
||||
"eslint-loader": "^2.1.2",
|
||||
"eslint": "^6.2.1",
|
||||
"eslint-loader": "^2.2.1",
|
||||
"istanbul": "^0.4.5",
|
||||
"mocha": "^5.2.0",
|
||||
"nyc": "^14.0.0",
|
||||
"nodemon": "^1.19.1",
|
||||
"nyc": "^14.1.1",
|
||||
"should": "^13.2.3",
|
||||
"supertest": "^3.4.2",
|
||||
"terser-webpack-plugin": "^1.2.3",
|
||||
"webpack-bundle-analyzer": "^3.3.2",
|
||||
"terser-webpack-plugin": "^1.4.1",
|
||||
"webpack-bundle-analyzer": "^3.4.1",
|
||||
"webpack-dev-middleware": "^3.7.0",
|
||||
"webpack-hot-middleware": "^2.25.0"
|
||||
}
|
||||
},
|
||||
"browserslist": "> 0.25%, not dead"
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
"info": {
|
||||
"title": "Nightscout API",
|
||||
"description": "Own your DData with the Nightscout API",
|
||||
"version": "0.12.3",
|
||||
"version": "0.12.4",
|
||||
"license": {
|
||||
"name": "AGPL 3",
|
||||
"url": "https://www.gnu.org/licenses/agpl.txt"
|
||||
|
||||
+1
-1
@@ -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
|
||||
license:
|
||||
name: AGPL 3
|
||||
url: 'https://www.gnu.org/licenses/agpl.txt'
|
||||
|
||||
@@ -20,18 +20,6 @@ main {
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
#close {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
color: #333;
|
||||
border-radius: 5px;
|
||||
border: 2px solid #333;
|
||||
padding: 5px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.inner {
|
||||
width: 100%;
|
||||
-webkit-transform: translateY(-2%);
|
||||
@@ -71,4 +59,21 @@ img#arrow {
|
||||
|
||||
.stale {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.close {
|
||||
color: white;
|
||||
font: 4em 'Open Sans';
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.close:after {
|
||||
content: '\00D7';
|
||||
}
|
||||
|
||||
.hidden {
|
||||
opacity: 0;
|
||||
transition: opacity 0.5s linear;
|
||||
}
|
||||
@@ -20,18 +20,6 @@ main {
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
#close {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
color: grey;
|
||||
border-radius: 5px;
|
||||
border: 2px solid grey;
|
||||
padding: 5px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.inner {
|
||||
width: 100%;
|
||||
-webkit-transform: translateY(-5%);
|
||||
@@ -72,4 +60,21 @@ img#arrow {
|
||||
|
||||
#clock {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.close {
|
||||
color: white;
|
||||
font: 4em 'Open Sans';
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.close:after {
|
||||
content: '\00D7';
|
||||
}
|
||||
|
||||
.hidden {
|
||||
opacity: 0;
|
||||
transition: opacity 0.5s linear;
|
||||
}
|
||||
+17
-12
@@ -20,18 +20,6 @@ main {
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
#close {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
color: #333;
|
||||
border-radius: 5px;
|
||||
border: 2px solid #333;
|
||||
padding: 5px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.inner {
|
||||
width: 100%;
|
||||
-webkit-transform: translateY(-5%);
|
||||
@@ -64,3 +52,20 @@ main {
|
||||
#clock {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.close {
|
||||
color: white;
|
||||
font: 4em 'Open Sans';
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.close:after {
|
||||
content: '\00D7';
|
||||
}
|
||||
|
||||
.hidden {
|
||||
opacity: 0;
|
||||
transition: opacity 0.5s linear;
|
||||
}
|
||||
@@ -1,11 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
|
||||
|
||||
<title>Nightscout</title>
|
||||
|
||||
|
||||
<link href="/images/round1.png" rel="icon" id="favicon" type="image/png" />
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="/images/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="/images/apple-touch-icon-60x60.png">
|
||||
@@ -16,32 +17,87 @@
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="/images/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="/images/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-180x180.png">
|
||||
|
||||
|
||||
<style type="text/css">
|
||||
@import url("//fonts.googleapis.com/css?family=Open+Sans:700");
|
||||
@import url("//fonts.googleapis.com/css?family=Open+Sans:700");
|
||||
<%- include(face + '.css', {}); %>
|
||||
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<a href="/"><div id="close">X</div></a>
|
||||
<a href="/" id="closeButton" class="close"></a>
|
||||
<main>
|
||||
<div class="inner">
|
||||
<div id="trend">
|
||||
<div id="bgnow"></div>
|
||||
<div id="arrowDiv"><img id="arrow" src=""/></div>
|
||||
<div id="arrowDiv"><img id="arrow" src="" alt="arrow" /></div>
|
||||
</div>
|
||||
<div id="clock"></div>
|
||||
<div id="staleTime"></div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<script src="/api/v1/status.js"></script>
|
||||
<script src="<%= locals.bundle %>/js/bundle.clock.js?v=<%= locals.cachebuster %>"></script>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
let clockFace = "<%= face %>"; // can now be used in scripts
|
||||
window.Nightscout.client.init( );
|
||||
var clockFace = "<%= face %>"; // can now be used in scripts
|
||||
|
||||
var parts = (location.search || '?').substring(1).split('&');
|
||||
var token = '';
|
||||
parts.forEach(function(val) {
|
||||
if (val.startsWith('token=')) {
|
||||
token = val.substring('token='.length);
|
||||
}
|
||||
});
|
||||
|
||||
var secret = typeof localStorage !== 'undefined' ? localStorage.getItem('apisecrethash') : '';
|
||||
var src = '/api/v1/status.js?t=' + Date.now();
|
||||
|
||||
if (secret) {
|
||||
src += '&secret=' + secret;
|
||||
} else if (token) {
|
||||
src += '&token=' + token;
|
||||
}
|
||||
|
||||
var script = document.createElement('script');
|
||||
script.onload = function() {
|
||||
window.Nightscout.client.init();
|
||||
};
|
||||
script.src = src;
|
||||
|
||||
document.head.appendChild(script); //or something of the likes
|
||||
|
||||
var buttonVisible = true;
|
||||
|
||||
function hideClose () {
|
||||
document.getElementById('closeButton').classList.add('hidden');
|
||||
buttonVisible = false;
|
||||
}
|
||||
|
||||
// Show on start so user knows it's there
|
||||
setTimeout(function() {
|
||||
hideClose();
|
||||
}, 2000);
|
||||
|
||||
function showClose () {
|
||||
if (buttonVisible) return;
|
||||
|
||||
buttonVisible = true;
|
||||
document.getElementById('closeButton').classList.remove('hidden');
|
||||
setTimeout(function() {
|
||||
hideClose();
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
window.addEventListener('touchstart', function() {
|
||||
showClose();
|
||||
});
|
||||
|
||||
window.addEventListener('click', function() {
|
||||
showClose();
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
+2
-2
@@ -54,9 +54,9 @@
|
||||
width: 100%;
|
||||
height: 90%;
|
||||
top: 30%;
|
||||
left: 0%;
|
||||
left: 0;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.spinner {
|
||||
margin: 100px auto 0;
|
||||
|
||||
+9
-1
@@ -68,7 +68,15 @@ pluginArray.push(new MomentLocalesPlugin({
|
||||
],
|
||||
}));
|
||||
|
||||
const rules = [{
|
||||
const rules = [
|
||||
{
|
||||
test: /\.(js|jsx)$/,
|
||||
exclude: /node_modules/,
|
||||
use: {
|
||||
loader: "babel-loader"
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.(jpe?g|png|gif)$/i,
|
||||
loader: 'file-loader',
|
||||
query: {
|
||||
|
||||
Reference in New Issue
Block a user