Commit Graph

241 Commits

Author SHA1 Message Date
D. Berge
c0e25ac36f Allow editing fsp/lsp in planner.
This is a very basic implementation and doesn't
check that the points are indeed valid.

A proper solution is to request the list of preplots
for that line from the server and validate against those.
2020-10-09 15:09:43 +02:00
D. Berge
2031922d68 Update line names when renumbering sequences 2020-10-09 15:04:45 +02:00
D. Berge
aeae758744 Let patch regenerate line name.
If the user sends a patch to a line with
a `name` which is exactly `null` or the
empty string `""`, the server will regenerate
the name based on the defaults script.
2020-10-09 15:02:31 +02:00
D. Berge
b7f65c4f78 Fix transaction handling 2020-10-09 15:01:42 +02:00
D. Berge
eb582863bb Move auxiliary functions to a separate file.
So they can be reused.
2020-10-09 15:00:01 +02:00
D. Berge
5415e81334 Avoid conflict when decrementing sequence numbers 2020-10-09 14:06:38 +02:00
D. Berge
9fd48c6a5a Show planned lines on map 2020-10-09 13:59:59 +02:00
D. Berge
851a076c06 Implement editing of most planned sequence details 2020-10-09 13:59:11 +02:00
D. Berge
72922560d2 Add GeoJSON output of planned lines 2020-10-09 13:58:11 +02:00
D. Berge
60ff4f57b1 Allow patching planned sequence name 2020-10-09 13:57:12 +02:00
D. Berge
22b7aa5112 Use view instead of ad-hoc query 2020-10-09 13:56:29 +02:00
D. Berge
ba8eeb82d3 Listen for planner events 2020-10-09 13:55:34 +02:00
D. Berge
6f521d1968 Add explanatory text to planner's no-data message 2020-10-08 17:06:04 +02:00
D. Berge
bc54d4ad59 Add option to add sequence to planner as reshoot 2020-10-08 16:40:52 +02:00
D. Berge
c4915e43d7 Add option to append line to planner 2020-10-08 16:40:52 +02:00
D. Berge
a8fa238e68 Add planner component to site 2020-10-08 16:40:52 +02:00
D. Berge
d86a5a2feb Add planner frontend component 2020-10-08 16:40:52 +02:00
D. Berge
63254a6bf7 Add planner endpoints 2020-10-08 16:40:52 +02:00
D. Berge
2a19caf219 Fix SQL error in QC shots selection query 2020-10-06 19:58:55 +02:00
D. Berge
6d427c4b1a Update version in package-lock 2020-10-06 19:48:59 +02:00
D. Berge
eb6329e6f7 Catch DB connection errors.
If we can't connect straight away (either first time
or after a disconnection), keep retrying until we
manage.
2020-10-06 19:44:07 +02:00
D. Berge
2486cb3944 Monitor for disconnection from DB.
The events listener now listens to the 'end' event from
the PostgreSQL driver and will attempt to reconnect if
we get disconnected.
2020-10-06 19:22:56 +02:00
D. Berge
dd9be0ea82 Do not QC online data.
It's kind of pointless at the moment (we will probably
want a separate QC for online data) and it may cause shots
to be, at least temporarily, flagged as having missing
gun data.

Closes #29.
2020-10-06 18:34:33 +02:00
D. Berge
efc1711158 Fix previous fix to preplot azimuth calculation.
Closes #58.
2020-10-06 18:29:59 +02:00
D. Berge
4b7f544e28 Order preplot points according to incr flag.
Fixes #58.
2020-10-06 16:39:07 +02:00
D. Berge
0c1fde09c6 Update dependencies 2020-10-04 20:17:49 +02:00
D. Berge
d17a2ce463 Make EPSG selection subquery more specific.
More of a kludge than a fix. See #56 for
a cleaner solution.

Closes #55.
2020-10-04 19:27:16 +02:00
D. Berge
963f75fd51 Add exporting of missing shots.
It is enabled by default but the user should pass
`missing=t` (or some other truty value) in the query
part of the request.
2020-10-04 03:49:04 +02:00
D. Berge
d3d535a8be Add missing option to sequence.list DB method.
If present and truthy, it will cause the output
to contain two extra fields: missing_raw and
missing_final, each consisting of a JSON array
containing missing raw and final shots for the
corresponding sequence.

In the event that the option was passed but
there are no missing shots, the two aforementioned
fields will still be present and consist of
empty arrays.

Note that this makes the query significantly
slower.
2020-10-04 03:48:15 +02:00
D. Berge
39256a4917 Fix copy/paste error in Log view 2020-10-03 00:36:53 +02:00
D. Berge
2ca83f9a60 Remove debugging statements 2020-10-02 21:21:58 +02:00
D. Berge
2f7315f133 Mark or unmark entire lines as NTBA.
Closes #52.
2020-10-02 20:40:13 +02:00
D. Berge
632a056f98 Include NTBA status in line endpoint response 2020-10-02 20:39:48 +02:00
D. Berge
de2deedfd2 Do not refresh sequence list on raw_shots event.
Otherwise, it will get refreshed continuously while
online, which is not great.
2020-10-02 19:30:24 +02:00
D. Berge
eb37a6b6c6 Listen also to shot events.
We need this because the *_lines event will
always fire before any shots have been imported.
2020-10-02 18:35:05 +02:00
D. Berge
198d0072d4 Show sequence remarks + NTBP status on map.
Closes #50.
2020-10-02 17:58:44 +02:00
D. Berge
e8c230ccc2 React to sequence change notifications in SequenceList 2020-10-02 16:33:06 +02:00
D. Berge
cf1678ed25 Increase body-parser limits.
Fixes #51.
2020-10-02 15:28:43 +02:00
D. Berge
940aea8c7b Run events manager in a separate process.
Not sure if this is going to do anything in
terms of improving the handling of and reacting
to events, but it doesn't seem to hurt terribly.

Eventually, all this will probably need to be
refactored to use EventEmitter.
2020-10-02 01:34:49 +02:00
D. Berge
c404edc4b3 Improve reliability of reaction to events.
Hopefully.
2020-10-02 01:33:58 +02:00
D. Berge
7451433aa4 Remove debugging statements 2020-10-02 01:33:33 +02:00
D. Berge
cf9cb393a9 Fix table labelling 2020-10-02 00:47:39 +02:00
D. Berge
b77ffa5d0f Ensure line statuses are visible on mobile 2020-10-02 00:42:19 +02:00
D. Berge
f30f108e08 React to preplot_lines notifications 2020-10-02 00:41:16 +02:00
D. Berge
746e3405fb Let websocket listen to all DB notification channels 2020-10-02 00:39:53 +02:00
D. Berge
902338f835 Restrict patching actions to vessel lines only.
These are the only type of lines returned by list().
2020-10-01 18:37:49 +02:00
D. Berge
381e3773c6 Allow editing of remarks in preplot lines list 2020-10-01 18:28:59 +02:00
D. Berge
f9ef971802 Add preplot line patching endpoint.
Allows us to change remarks, meta and ntba
fields in preplot lines.
2020-10-01 18:28:02 +02:00
D. Berge
3a87f8959a Add slot for empty line status 2020-10-01 15:31:24 +02:00
D. Berge
79a751393c Highlight active row in preplot lines list 2020-09-30 20:12:15 +02:00