Commit graph

150 commits

Author SHA1 Message Date
baldo
a1f27a9f64 Fixed compile errors. 2022-07-21 18:49:49 +02:00
baldo
250353edbf Major refactoring and fixes.
* Split Node into multiple types and make sure fields are actually set
  when type says so.
* Refactor request handling.
* Start getting rid of moment as a dependency by using
  UnixTimestampSeconds instead.
2022-07-21 18:39:33 +02:00
baldo
d76c530431 Extract database types into own file to fix tests. 2022-07-21 12:07:18 +02:00
baldo
28c8429edd Sqlite upgrade and type refactorings 2022-07-18 18:14:51 +02:00
baldo
c627e702ce Stronger types for unix timestamps 2022-07-18 12:55:19 +02:00
baldo
720acfb276 Refactor some server-side string types into newtypes. 2022-07-14 20:13:02 +02:00
baldo
ad2db3427d Allow having multiple users for admin login.
* Use password hashes via bcrypt.
* Trying to reduce the risk of timing attacks against login.
2022-07-07 13:10:57 +02:00
baldo
975d5288a3 Refactoring of sorting and filtering in API. 2022-07-07 11:18:30 +02:00
baldo
3590ba048d More types refactoring. 2022-07-07 11:16:59 +02:00
baldo
29be32907c Server side types refactoring. 2022-07-07 11:15:34 +02:00
baldo
c0fe593dbf Removed unused type guard. 2022-07-07 11:14:00 +02:00
baldo
b6b16f5250 Server side type refactoring. 2022-07-07 11:12:40 +02:00
baldo
4c77f9f5ab Suppress wrong typeguard warnings 2022-07-07 11:11:06 +02:00
baldo
dabc675aa9 New api endpoint for client config. 2022-07-07 11:08:35 +02:00
baldo
7ef13bc28c Extracted some types to shared module. 2022-07-07 11:08:15 +02:00
baldo
002ae4419f Implement custom logger to replace scribe.js.
* scribe.js is unmaintained and adds unnecessary complexity.
2022-02-09 18:02:59 +01:00
baldo
5edeea4573 Lots of package updates. 2021-10-14 17:18:30 +02:00
baldo
12a13f47bf Allow to completely disable logging. 2021-08-23 21:05:17 +02:00
baldo
e2766e8402 Fix logging. 2021-08-09 22:03:27 +02:00
baldo
3a253ba72e Fix: Use seconds for unix timestamps to not compare seconds and milliseconds. 2021-08-09 21:54:13 +02:00
baldo
8cc9ee0908 Added logging when deleting nodes that were never online. 2021-08-09 21:36:41 +02:00
baldo
f96113c1c5 [UNTESTED]: Also delete offline nodes that were never online. 2021-07-26 21:40:54 +02:00
baldo
ada5d99128 Fix: Typo in field assignment. 2021-02-22 22:35:40 +01:00
baldo
93069806f6 Fix: Parsing node files did not prefill missing fields correctly.
* This lead to a HTTP 500 on dashboard as some nodes were missing
monitoring fields.
* Removed a problematic cast and added sane defaults.
2021-02-22 22:26:19 +01:00
baldo
9ad9ffabf7 Fix: Background-Jobs did not run automatically.
* Had to make sure `this` referred to `task` in `task.run()`.
2021-02-22 21:48:39 +01:00
baldo
cc44bce95a Fix: Some calls returned not only the node but also nodeSecrets.
* Broke REST-calls.
* Also prevents leaking monitoring tokens.
2021-01-25 22:40:41 +01:00
baldo
84ac9bd256 Bump versions of server / dev dependencies. 2020-06-30 18:29:06 +02:00
baldo
b6a67d6e74 Admin: Add message with failed / total nodes for nodes.json-task. 2020-06-30 17:08:24 +02:00
baldo
fb87695b3e Migrate to version 2 of nodes.json and start adding tests 2020-06-30 13:47:30 +02:00
baldo
52822207a5 Typescript migration: Major refactoring. 2020-04-15 20:12:58 +02:00
baldo
31ecc0cf4f Typescript migration:
* resources/frontendResource.js
* resources/taskResource.js
* resources/versionResource.js

Also some refactoring towards using promises with async / await.
2020-04-09 20:18:13 +02:00
baldo
b1755047af Typescript migration:
* utils/resources.js
* validation/constraints.js (only server side)
2020-04-09 01:41:45 +02:00
baldo
8b8835e4ac Typescript migration:
* Refactoring of scheduler and jobs to use promises.
* Add "failed" state for tasks.
2020-04-08 23:41:04 +02:00
baldo
5c0b5abf73 Typescript migration:
* validation/validator.js
2020-04-08 22:45:21 +02:00
baldo
9e29eb924e Typescript migration
* db/database.js
* utils/databaseUtil.js
2020-04-08 22:05:53 +02:00
baldo
7325cd4db6 Typescript migration
* utils/strings.js
* utils/urlBuilder.js
2020-04-08 21:25:33 +02:00
baldo
08249885a8 Typescript migration
* config.js
* Added typesafe validation of config.json.
2020-04-08 17:55:45 +02:00
baldo
9652519267 Typescript migration
* app.js
* main.js
* router.js
2020-04-08 03:19:55 +02:00
baldo
94d01310b9 Quick and dirty typescript setup to get going. 2020-04-08 01:55:48 +02:00
baldo
2e27e63f94 Fix: Start using sqlite module that actually uses promises.
For now export legacy sqlite3 module until other code is refactored.
2019-03-29 22:26:54 +01:00
baldo
8697d79ba5 Removing ng-di on the server. 2018-12-18 00:29:20 +01:00
baldo
ddb2f47a9d Promisify and asyncify db initialization. 2018-12-17 22:08:38 +01:00
baldo
84b20b209e Splitting site field: Now we track site and domain. 2018-12-17 20:06:39 +01:00
baldo
d23024241c Added links for imprint and privacy information. 2018-05-21 13:22:28 +02:00
baldo
8513ff0f3d Fix: During import skip nodes which cannot be parsed. 2018-01-05 20:34:57 +01:00
baldo
0dd170d755 Fix: Give unix timestamp to db when marking missing nodes as offline. 2017-08-13 19:39:40 +02:00
baldo
7d413a6f76 Added logging. 2017-08-13 19:36:16 +02:00
baldo
950daf6939 Simplify and improve marking missing nodes as offline. 2017-08-13 19:30:30 +02:00
baldo
8628bee9e9 Fix: Typo. 2017-08-13 19:29:50 +02:00
baldo
2b22926b2f Fix: Setting site for missing node was bogus. 2017-08-13 19:29:36 +02:00