Commit Graph

363 Commits

Author SHA1 Message Date
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
6e7ba82ed3 Add planner elements to DB schema 2020-10-09 13:54:45 +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
739cf4b9ec Add missing triggers in preplot, raw and final tables 2020-10-06 19:19:35 +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
83d966c4b7 Do not import gun data into online shots.
These shots will be deleted when the raw P1 is
imported deleting the gun data, but the gun data
file will show as having been imported.

(#29)
2020-10-06 18:33:59 +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
afa34867f5 Modify functions accessing file_data to return jsonb.
Following schema change in 2d270cdef9.
2020-10-04 05:13:17 +02:00
D. Berge
3ed5558490 Fix query to account for new column type.
The type of the file_data.data column was
changed from JSON to JSONB by commit
2d270cdef9.

Fixes #54.
2020-10-04 04:29:14 +02:00
D. Berge
3de7d5d334 Re-export schema template.
No changes, it merely shuffles the position of raw_lines
in the export.
2020-10-04 04:07:50 +02:00
D. Berge
3c215e9973 Fix error with definition of missing_final_points view 2020-10-04 04:06:15 +02:00
D. Berge
35a6a9188a Add missing shots to structured sequence export files.
Closes #8, #9, #12.
2020-10-04 03:51:30 +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
700e683022 Import preplot file configuration into database.
We do this so that we can look for the "saillineOffset"
parameter, which we expect to be present in source
preplot imports and allows us to correlate source
and sail lines.

The change to bin/sps.py is necessary to let the JSON
serialisation take place.
2020-10-04 03:42:19 +02:00
D. Berge
0a684cd02a Add option to import file data for preplot files 2020-10-04 03:41:20 +02:00
D. Berge
947bf72260 Rename variable.
To be consistent with the other methods.
2020-10-04 03:39:58 +02:00
D. Berge
362d9dc1a5 Re-export schema template.
No changes, it merely shuffles the position of raw_lines
in the export.
2020-10-04 03:37:20 +02:00
D. Berge
1249c976ef Add views related to missing shots and outstanding production 2020-10-04 03:33:23 +02:00
D. Berge
2d270cdef9 Change file_data column type from JSON to JSONB 2020-10-04 01:22:42 +02:00
D. Berge
a101542bc2 Do not import gun data if sequence has no shots.
Doing otherwise will result in the gun data file
appearing has having been read, but no data will
have been saved as there was nowhere to save to.

Fixes #29.
2020-10-03 00:44:55 +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
c013073104 Save deferred import data as a single transaction.
Each of the save_* operations starts a transaction
(which is automatically commited if all goes well).

The main reason for this is to ensure that by the
time raw_lines and final_lines events fire, the
corresponding entries in raw_shots and final_shots
have already been populated.
2020-10-02 19:31:14 +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
11a5020004 Remove old QCs when importing final shots.
When final shots are inserted, updated or
deleted, the corresponding QC info (which
is always held in raw_shots.meta->'qc')
is deleted.

If applicable, it will be recreated on the
next QC run.
2020-10-02 17:30:42 +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