Skip to content

Commit

Permalink
Merge pull request #26 from nightscout/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
unsoluble authored Feb 7, 2019
2 parents c0fa7b4 + 9abcdd7 commit 537b4a7
Show file tree
Hide file tree
Showing 12 changed files with 59 additions and 16 deletions.
27 changes: 27 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,15 @@ If in doubt, format your code with `js-beautify --indent-size 2 --comma-first -

## Create a prototype

<<<<<<< HEAD
Fork cgm-remote-monitor and create a branch.
You can create a branch using `git checkout -b wip/add-my-widget`.
This creates a new branch called `wip/add-my-widget`. The `wip`
stands for work in progress and is a common prefix so that we know
what to expect when reviewing many branches.
=======
Fork cgm-remote-monitor and create a branch. You can create a branch using `git checkout -b wip/add-my-widget`. This creates a new branch called `wip/add-my-widget`. The `wip` stands for work in progress and is a common prefix so that when know what to expect when reviewing many branches.
>>>>>>> master

## Submit a pull request

Expand All @@ -91,6 +95,7 @@ This can be done by checking your code `git commit -avm 'my improvements are her
Now that the commits are available on github, you can click on the compare buttons on your fork to create a pull request. Make sure to select [Nightscout's `dev` branch](https://github.com/nightscout/cgm-remote-monitor/tree/dev).
We assume all new Pull Requests are at least smoke tested by the author and all code in the PR actually works.
<<<<<<< HEAD
Please include a description of what the features do and rationalize why the changes are needed.
Expand All @@ -107,6 +112,20 @@ This can be done by committing your code `git commit -avm 'my
improvements are here'`, and pushing it to the branch you created on your own
fork. This will probably look something like
`git push -u origin wip/add-my-widget`.
=======

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.

When adding new features that add confugration options, please ensure the `README` document is amended with information on the new configuration.

## Bug fixing

If you've fixed a bug, please consider adding a unit test to the `/tests` folder that reproduces the original bug without the change.
Try to identify the root cause of the issue and fix the issue. Pull requests that simply add null checks to hide issues are unlikely to be accepted.
>>>>>>> master
Please include instructions how to test the changes.
Expand All @@ -118,6 +137,7 @@ We encourage liberal use of the comments, including images where appropriate.
Most cgm-remote-monitor hackers use github's ticketing system, along with Facebook cgm-in-the-cloud, and gitter.

<<<<<<< HEAD
We use [git-flow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow), with `master` as our production, stable branch, and
`dev` is used to queue changes for upcoming releases. Everything else is
done on branches, hopefully with names that indicate what to expect.
Expand All @@ -129,6 +149,13 @@ the version correctly. See [sem-ver](https://semver.org/) for versioning strate
Every commit is tested by Travis CI. We encourage adding tests to
validate your design. We encourage discussing your use cases to help
everyone get a better understanding of your design.
=======
We use git-flow, with `master` as our production, stable branch, and `dev` is used to queue up for upcoming releases. Everything else is done on branches, hopefully with names that indicate what to expect.
Once `dev` has been reviewed and people feel it's time to release, we follow the git-flow release process, which creates a new tag and bumps 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.
>>>>>>> master

## Other Dev Tips

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ Community maintained fork of the

Supported configurations:

If you plan to use Nightscout, we recommend using [Heroku](http://openaps.readthedocs.io/en/latest/docs/While%20You%20Wait%20For%20Gear/nightscout-setup.html#nightscout-setup-with-heroku), as Nightscout can reach the usage limits of the free Azure plan and cause it to shut down for hours or days. If you end up needing a paid tier, the $7/mo Heroku plan is also much cheaper than the first paid tier of Azure. Currently, the only added benefit to choosing the $7/mo Heroku plan vs the free Heroku plan is a section showing site use metrics for performance (such as response time). This has limited benefit to the average Nightscout user. In short, Heroku is the free and best option for Nightscout hosting.
If you plan to use Nightscout, we recommend using [Heroku](http://www.nightscout.info/wiki/welcome/set-up-nightscout-using-heroku), as Nightscout can reach the usage limits of the free Azure plan and cause it to shut down for hours or days. If you end up needing a paid tier, the $7/mo Heroku plan is also much cheaper than the first paid tier of Azure. Currently, the only added benefit to choosing the $7/mo Heroku plan vs the free Heroku plan is a section showing site use metrics for performance (such as response time). This has limited benefit to the average Nightscout user. In short, Heroku is the free and best option for Nightscout hosting.

- [Nightscout Setup with Heroku](http://openaps.readthedocs.io/en/latest/docs/While%20You%20Wait%20For%20Gear/nightscout-setup.html#nightscout-setup-with-heroku) (recommended)
- [Nightscout Setup with Heroku](http://www.nightscout.info/wiki/welcome/set-up-nightscout-using-heroku) (recommended)
- [Nightscout Setup with Microsoft Azure](http://www.nightscout.info/wiki/faqs-2/azure-2) (not recommended, please
[switch from Azure to Heroku](http://openaps.readthedocs.io/en/latest/docs/While%20You%20Wait%20For%20Gear/nightscout-setup.html#switching-from-azure-to-heroku) )
- Linux based install (Debian, Ubuntu, Raspbian) install with own Node.JS and MongoDB install (see software requirements below)
Expand Down
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function create(env, ctx) {
});
});

app.get("/nightscout.appcache", (req, res) => {
app.get("/appcache/*", (req, res) => {
res.render("nightscout.appcache", {
locals: app.locals
});
Expand Down
2 changes: 1 addition & 1 deletion lib/hashauth.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ hashauth.init = function init(client, $) {
var translate = client.translate;
hashauth.injectHtml();
$( '#requestauthenticationdialog' ).dialog({
width: 500
width: 350
, height: 240
, buttons: [
{
Expand Down
4 changes: 2 additions & 2 deletions lib/language.js
Original file line number Diff line number Diff line change
Expand Up @@ -4254,7 +4254,7 @@ function init() {
,it: 'Non Autorizzato'
,ja: '認証されていません'
,dk: 'Uautoriseret'
,fi: 'Kielletty'
,fi: 'Et ole autentikoitunut'
,nb: 'Uautorisert'
,pl: 'Nieuwierzytelniono'
,ru: 'Не авторизовано'
Expand Down Expand Up @@ -7233,7 +7233,7 @@ function init() {
,bg: 'Актуализирай'
,it: 'Aggiornamento'
,pl: 'Aktualizacja'
,fi: 'Päivitys'
,fi: 'Tallenna'
,ru: 'Обновить'
,sk: 'Aktualizovať'
,nl: 'Update'
Expand Down
14 changes: 9 additions & 5 deletions lib/server/bootevent.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,32 @@ function boot (env, language) {
// Check Node version.
// Latest Node 8 LTS and Latest Node 10 LTS are recommended and supported.
// Latest Node version on Azure is tolerated, but not recommended
// Other versions will not start
// More explicit:
// < 8 does not work, not supported
// >= 8.15.0 works, supported and recommended
// == 9.x does not work, not supported
// == 10.14.1 works, not fully supported and not recommended (Azure version)
// == 10.14.2 does not work, not supported and not recommended,
// >= 10.15.0 works, supported and recommended
// >= 10.15.1 works, supported and recommended
// >= 11.6.0 does not work, not recommended, will not be supported. We only support Node LTS releases
///////////////////////////////////////////////////
function checkNode (ctx, next) {
var semver = require('semver');
var nodeVersion = process.version;
if ( semver.satisfies(nodeVersion, '^8.15.0') || semver.satisfies(nodeVersion, '^10.15.1')) {

if ( semver.satisfies(nodeVersion, '^8.15.0') || semver.satisfies(nodeVersion, '^10.15.1')) {
//Latest Node 8 LTS and Latest Node 10 LTS are recommended and supported.
console.debug('Node version ' + nodeVersion + ' is supported');
next();
}
else if ( semver.eq(nodeVersion, '10.14.1')) {
else if ( semver.eq(nodeVersion, '10.14.1')) {
//Latest Node version on Azure is tolerated, but not recommended
console.log('WARNING: Node version v10.14.1 and Microsoft Azure are not recommended.');
console.log('WARNING: Please migrate to another hosting provider. Your Node version is outdated');
console.log('WARNING: Please migrate to another hosting provider. Your Node version is outdated and insecure');
next();
} else {
// in all other cases don't start Node
// Other versions will not start
console.log( 'ERROR: Node version ' + nodeVersion + ' is not supported. Please upgrade your Node');
process.exit(1);
}
Expand Down
2 changes: 1 addition & 1 deletion npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nightscout",
"version": "0.11.0-rc1-20190205",
"version": "0.11.1+dev+20190207",
"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",
Expand Down
12 changes: 12 additions & 0 deletions static/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,18 @@ body {
z-index: 2;
}

button {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}

.ui-button {
background-color: grey;
border: 1px solid white;
padding: 2px;
}

a, a:visited, a:link {
color: #2196f3;
text-decoration: none;
Expand Down
2 changes: 1 addition & 1 deletion swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"info": {
"title": "Nightscout API",
"description": "Own your DData with the Nightscout API",
"version": "0.11.0-rc1-20190205",
"version": "0.11.1+dev+20190207",
"license": {
"name": "AGPL 3",
"url": "https://www.gnu.org/licenses/agpl.txt"
Expand Down
2 changes: 1 addition & 1 deletion swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ servers:
info:
title: Nightscout API
description: Own your DData with the Nightscout API
version: 0.11.0-rc1-20190205
version: 0.11.1+dev+20190207
license:
name: AGPL 3
url: 'https://www.gnu.org/licenses/agpl.txt'
Expand Down
2 changes: 1 addition & 1 deletion views/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html manifest="nightscout.appcache">
<html manifest="appcache/nightscout-<%= locals.cachebuster %>.appcache">
<head>
<meta name="viewport" content="width=device-width, maximum-scale=1, initial-scale=1, user-scalable=0" />
<meta name="apple-mobile-web-app-capable" content="yes">
Expand Down

0 comments on commit 537b4a7

Please sign in to comment.