48 Commits
Author SHA1 Message Date
Sulka HaroandGitHub 3a0629578e Refactor moment to be loaded from ctx (#7331)
* Experimental branch that replaces momentjs with dayjs in the client

* Revert unintentional change

* feat

* Turns out dayjs is a no-go, but this has some good restructuring so submitting that
2023-01-01 19:14:59 +02:00
Sulka Haro c0b96a714e Fix admin localization 2021-01-14 09:29:00 +02:00
Sulka Haro 92cc12ee14 Fix a localization key 2020-12-22 11:43:11 +02:00
Sulka HaroandGitHub 8f25a6e7a4 Fix all issues from ESLint (#4730)
* Cherry picks the ES language changes from #4690

* Fix small issues found in linting

* * Fix all but one eslint complaint in the bundled code
* Add eslint and js-beautify rc files into the repo
2019-07-17 15:04:57 +03:00
Jeremy Cunningham d3368e5311 Add unit test for cleanentriesdb.js 2018-12-10 17:51:51 -06:00
Jeremy Cunningham 83bd1a7d31 Add unit test for cleantreatmentsdb.js 2018-12-10 17:45:00 -06:00
Jeremy Cunningham a34167aec3 Fix codacy finding 2018-12-09 22:54:33 -06:00
Jeremy Cunningham d9527d399b Add unit test for removing old devicestatus records 2018-12-09 22:49:55 -06:00
Jeremy Cunningham 8136633d8f Prevent deleting entries or treatments more recent than 2 days ago 2018-12-09 21:19:39 -06:00
Jeremy Cunningham 15cbfeac8e Correct delete query fields for entries db 2018-12-07 17:39:11 -06:00
Jeremy Cunningham 9123de4be3 Add clean entries db admin tool
(cherry picked from commit f56f0b3ba42e2472069775507402e6309d29c26c)
2018-12-07 17:39:11 -06:00
Jeremy Cunningham cd459fa37f Fix clean treatments status html id name 2018-12-07 17:39:11 -06:00
Jeremy Cunningham 759dd40dec Add clean treatments admin tool. 2018-12-07 17:39:11 -06:00
Jeremy Cunningham 15223077fa Retain action button for deleting old devicestatus records. 2018-09-29 08:36:12 -05:00
Jeremy Cunningham 4405ba8846 Remove max days to keep limit in devicestatus delete.
Remove unused count query option in devicestatus delete api.

(cherry picked from commit 3101a8d7d054df469071f78bba18a8295dc34404)
2018-08-25 09:42:06 -05:00
Jeremy Cunningham 682739b3d9 Fixed delete devicestatus url. 2018-08-09 15:01:52 -05:00
Jeremy Cunningham 471ad30228 Fixed syntax error. 2018-08-09 13:44:41 -05:00
Jeremy Cunningham 59ffd011f3 Removed extra line. 2018-08-09 13:38:16 -05:00
Jeremy Cunningham bcce40aa27 Added new option to delete up to a certain number of days worth of
devicestatus collection records.
2018-08-09 12:59:09 -05:00
PieterGitandSulka Haro 71103bb4b7 resolve npm audit security fixes (#3721)
* upgrade mocha from 3.5.3 to 5.0.5

This resolves these security issues

  Low             Regular Expression Denial of Service
  Package         debug
  Dependency of   mocha [dev]
  Path            mocha > debug
  More info       https://nodesecurity.io/advisories/534

  Critical        Command Injection
  Package         growl
  Dependency of   mocha [dev]
  Path            mocha > growl
  More info       https://nodesecurity.io/advisories/146

* upgrade mocha and start modularizing lodash to make sure tests pass

* more lodash modularization

* upgrade mqtt to 2.18.3

* allow npm 6.2

* upgrade share2nightscout-bridge

* incorporate express-extension-to-accept into Nightscout

the packages seems not maintained (github page is 404) and has a security issue with mime package.  so upgraded and included into Nightscout code.

if somebody knows a more efficient way of programming this with express4 please PR

* update jsdom for security fixes

* prevent wrapping of hour labels by removing the space

* Revert "update jsdom for security fixes"

This reverts commit 04f1f39d636d8d79c6b01b5f298f9a6cea3dc645.

* Revert "more lodash modularization"

This reverts commit c4fa5304db9f16b94f15c2b44793a5a11d595885.

* remove forever dependency

* Revert "Revert "more lodash modularization""

This reverts commit b13c274ebff0b5c3a48ffc0e610ca85a9f8d25bc.

* fix report.test.js with newer packages

sometimes a fix is very easy. This is to prevent:

```
Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
Arguments:
[0] _isAMomentObject: true, _isUTC: true, _useUTC: true, _l: undefined, _i: T00:00:00, _f: undefined, _strict: undefined, _locale: [object Object]
Error
    at Function.createFromInputFallback (XXX\cgm-remote-monitor\tmp\js\bundle.js:117408:98)
    at configFromString (XXX\cgm-remote-monitor\tmp\js\bundle.js:119456:15)
```

We must use ISO8601 formatted strings and not use slashes in dates, see https://github.com/moment/moment/issues/1407#issuecomment-155630060

* upgrade webpack to 4.16.2

* Update package.json
2018-07-24 20:25:44 +03:00
MilosKozak 4260d09768 translations admin tools subjects 2016-10-14 21:35:41 +02:00
MilosKozak 98b446f636 translations admin tools roles 2016-10-14 21:13:46 +02:00
Scott Leibrand 95435f9a42 Merge branch 'dev' of github.com:nightscout/cgm-remote-monitor into dev
Conflicts:
	lib/admin_plugins/futureitems.js
	lib/plugins/iob.js
2016-09-10 04:08:30 -07:00
Scott Leibrand f1ba301abe support scanning and removing more than 10 future records 2016-09-09 21:11:33 -07:00
Jason Calabrese 7346fea8df show edit button if api:treatments:update is allowed too; clean up 2016-08-07 01:21:50 -07:00
Jason Calabrese b9fe32765d hook up websocket api to new tokens; added headers to GETs; rework /api/v1/verifyauth; new status-only role so api-secret based login works 2016-08-06 01:25:31 -07:00
Jason Calabrese 3937f8564f hex digest; readable by default; default role clean up; init clean up 2016-08-04 22:41:19 -07:00
Jason Calabrese 75b467b3c0 codacay warnings 2016-08-04 01:17:16 -07:00
Jason Calabrese 9ffb47319f ui/api/storage crud for roles; some refactoring 2016-08-04 01:04:45 -07:00
Jason Calabrese 9d7f957b66 admin ui now works for creating, editing, and deleting subjects; some refactoring 2016-08-03 23:30:53 -07:00
Jason Calabrese a947ecd1a8 add subject delete 2016-08-03 18:55:03 -07:00
Jason Calabrese ab2facbd99 the beginig of subject/roles admin tools 2016-08-02 22:15:55 -07:00
MilosKozak f699321730 typo 2015-09-28 23:17:57 +02:00
MilosKozak e29627d622 translations for admin tools 2015-09-24 16:18:17 +02:00
MilosKozak 4a50e415dd missing semicolon 2015-09-24 13:25:44 +02:00
MilosKozak c501e6c199 codacy, hide button after use 2015-09-24 11:45:31 +02:00
MilosKozak e3e1fc99a1 remove entries one by one 2015-09-24 11:21:16 +02:00
MilosKozak 2f406619b8 future entries 2015-09-24 11:21:15 +02:00
MilosKozak 8d7a3b90c0 rename futuretreatments -> futureentries 2015-09-24 11:21:14 +02:00
MilosKozak c05e54d88e === instead of > 2015-09-24 11:21:14 +02:00
MilosKozak bb7205a0f2 clear html at the end fix 2015-09-24 11:21:13 +02:00
MilosKozak 764a9542fb 2nd admin plugin futuretreatments 2015-09-24 11:21:12 +02:00
MilosKozak c3c6effef7 load max 500 records 2015-09-24 11:21:12 +02:00
MilosKozak 469d09e4ea ALL -> * in URL 2015-09-24 11:21:10 +02:00
MilosKozak 719d32c1b6 missing semicolon 2015-09-24 11:21:10 +02:00
MilosKozak f96ffdf336 codacy 2015-09-24 11:21:09 +02:00
MilosKozak f807262874 typo 2015-09-24 11:21:08 +02:00
MilosKozak da9cceb548 admin tools initial release 2015-09-24 11:21:08 +02:00