D. Berge
d45e17fce3
Add scripts to launch Dougal services in production
2020-09-13 15:35:36 +02:00
D. Berge
225c710142
Allow taking JWT secret from environment in production
2020-09-13 15:02:58 +02:00
D. Berge
da7a977c59
Change definition of Preplot QC objects
2020-09-12 22:25:45 +02:00
D. Berge
a596a3be48
Implement QC routine.
...
Even though for practical reasons it's inside lib/www
this is meant to be run by bin/runner.sh at regular
intervals and refresh the QC data. This is a work
in progress. This version does not process or produce
labels, it doesn't create events in the event log and
it doesn't do online data, amongst other things.
2020-09-10 23:18:28 +02:00
D. Berge
db25878fdd
Add info API endpoint.
...
It queries a project's `info` table.
2020-09-09 15:55:04 +02:00
D. Berge
1a612f74d6
Refactor configuration methods in DB
2020-09-09 15:53:01 +02:00
D. Berge
c40a859efa
Deal with Hydronav header fields overflowing.
...
Fixes #21 .
2020-09-09 12:43:37 +02:00
D. Berge
2db376e1cc
Bubble errors in db.event.post
2020-09-06 23:26:12 +02:00
D. Berge
d285a63746
Remove debug statements
2020-09-06 21:00:06 +02:00
D. Berge
a253578a1b
Make SmartSource header less verbose.
...
PostgreSQL NOTIFY has an 8,000 bytes payload limit
and we were going over that.
2020-09-04 01:33:18 +02:00
D. Berge
5c8f8023d6
Remove debug statement
2020-09-04 01:33:18 +02:00
D. Berge
52907921f1
Add websocket server to emit DB notifications
2020-09-04 01:33:18 +02:00
D. Berge
a9a084b531
Cope with prospect detection not working during approach / runout
2020-09-04 01:31:39 +02:00
D. Berge
d683f00594
Implement SmartSource header parser
2020-09-02 08:59:22 +02:00
D. Berge
0a2f0b0b60
Refactor save() so that we can force a specific CRS.
...
This was brought about due to the absence of CRS information
in the navigation header outputs. We get either unqualified
easting / northing or unqualified latitude / longitude, neither
of which happen to be WGS84.
This is not a good solution as it involves manual configuration,
but allows us to move forward for the time being.
2020-09-02 08:55:08 +02:00
D. Berge
ff2e30511c
Refactor save() call to pass in header.meta options
2020-09-02 08:54:16 +02:00
D. Berge
1f60ebae47
Make selection of headers to parse configurable
2020-09-02 08:52:49 +02:00
D. Berge
c8e0dc5d02
Return only real files from sequence list endpoint.
...
In other words, filter out real-time data.
2020-09-01 12:30:49 +02:00
D. Berge
eded667d79
Add endpoint for retrieving real-time data as GeoJSON
2020-09-01 10:58:37 +02:00
D. Berge
557d87de72
Add endpoint to retrieve real-time input data
2020-09-01 10:56:25 +02:00
D. Berge
bfc4124b33
Save to real_time_inputs also when we're on a line
2020-09-01 10:52:38 +02:00
D. Berge
bed9cdc69f
Add UDP server for navigation system headers
2020-08-31 14:36:56 +02:00
D. Berge
c0c395d9a0
Save online and offline real-time data to database
2020-08-31 14:36:56 +02:00
D. Berge
e4803da149
Add decoders for Hydronav, LABOv3 navigation headers
2020-08-31 13:40:56 +02:00
D. Berge
433daca9ef
Add deep properties getter utility function to config.
...
cfg._("a.deep.property") returns the value of
cfg.a.deep.property if it exists. If the property
or any of its parents do not exist, returns undefined.
2020-08-31 13:07:27 +02:00
D. Berge
e5bc5a0757
Refactor project summaries to use database views
2020-08-26 20:20:53 +02:00
D. Berge
cb4846c900
Refactor project DB routines
2020-08-26 17:41:40 +02:00
D. Berge
c7c8f5df8a
Sort sequence list by sequence descending by default
2020-08-25 18:31:51 +02:00
D. Berge
438f050c2a
Add possibility to return associated files if requested.
...
Pass a trueish value in opts.files to get the list of
raw and final files associated with a sequence. It does
make the query about 30% slower as it stands.
2020-08-25 18:02:28 +02:00
D. Berge
00f1ea20da
Allow sequences to be filtered.
...
Sequences can be filtered by:
* sequence number;
* line number;
* start / end date (of raw acquisition);
* remarks (raw or final).
2020-08-25 12:59:40 +02:00
D. Berge
f486b4835e
Instrument alerts for HTTP backend.
...
An alert is sent whenever an endpoint returns
an error other than an explicit failure (e.g.,
it won't send an alert if a middleware intentionally
returns a {status: XXX} object).
2020-08-25 11:32:13 +02:00
D. Berge
650ed998c6
Read also global config in server backend.
...
The configuration file etc/config.yaml is exposed to the
server backend under require('configuration').global.
Note that at some point it will probably make sense to
merge the two config files.
2020-08-25 08:48:10 +02:00
D. Berge
9fa76df446
Be explicit about the encoding of JSON config
2020-08-25 08:47:04 +02:00
D. Berge
721dae4084
Catch all middleware errors
2020-08-24 13:25:14 +02:00
D. Berge
949defd2f6
Add event API endpoints
2020-08-22 20:46:15 +02:00
D. Berge
a55046ed93
Add a meta property to requests.
...
Using the meta(key, value) middleware factory, the user
can add a property req.meta[key] = value to the request.
2020-08-22 20:46:15 +02:00
D. Berge
0c4d91c603
Implement event DELETE middleware
2020-08-22 20:46:15 +02:00
D. Berge
5349708fb8
Implement event PUT middleware
2020-08-22 20:46:15 +02:00
D. Berge
58694ac1c1
Refactor event POST middleware.
...
It can now take some parameters from the request URL.
If present, request URL parameters take precedence over
request body values.
2020-08-22 20:45:59 +02:00
D. Berge
ba160c441c
Implement db.event.del (delete)
2020-08-22 20:26:03 +02:00
D. Berge
517291d5c9
Implement db.event.put
2020-08-22 20:24:55 +02:00
D. Berge
81e0c40790
Refactor db.event.post
2020-08-22 20:24:10 +02:00
D. Berge
9e1f93d43e
Adapt db.events.list to latest schema
2020-08-22 20:23:28 +02:00
D. Berge
c93188a5a7
Add event POST middleware to API
2020-08-16 10:50:58 +02:00
D. Berge
608fd9d3cd
Refactor DB interface to use setSurvey()
2020-08-16 10:46:54 +02:00
D. Berge
170312efd6
Remove dead code from DB interface
2020-08-16 10:44:04 +02:00
D. Berge
ecbe4d38ca
Add setSurvey() utility function to DB interface.
...
It sets the current survey and optionally returns a
client connection to use in subsequent queries.
2020-08-16 10:16:08 +02:00
D. Berge
dc1e08b452
Add transaction utility functions to DB interface
2020-08-16 10:15:44 +02:00
D. Berge
2bfa340b52
Add API endpoint to retrieve survey configuration.
...
The endpoint /project/:project/configuration/:path(*)?
returns the contents of the survey configuration YAML
file for a given project.
To retrieve the full configuration:
* /project/:project/configuration
To retrieve a specific subset (e.g., binning parameters):
* /project/:project/configuration/binning
To retrieve a specific value (e.g., inline bin width):
* /project/:project/configuration/binning/I_width
2020-08-16 10:06:43 +02:00
D. Berge
6fa39eb3c7
Autogenerate JWT secret if not in production mode
2020-08-12 15:13:53 +02:00