Commit Graph

375 Commits

Author SHA1 Message Date
D. Berge
6896d8bc87 Change sequence renumbering behaviour.
By default, change just the number of the sequence
being edited. It is checked for conflict with other
planned sequences but not with anything already acquired.

If the user ticks the ‘shift all’ checkbox, then all
planned sequences are shifted by the same amount.
2020-10-15 19:07:27 +02:00
D. Berge
80b463fbb7 Change default sequence assignment for planned lines.
If there are other lines in the planner, we increment the
highest numbered sequence in the planner by one.

If there are no planned lines, we take the highest numbered
raw sequence and increment by one.
2020-10-15 19:05:14 +02:00
D. Berge
e0cd52f21a Replace favicon 2020-10-11 12:17:40 +02:00
D. Berge
d902806c32 Replace logo 2020-10-11 12:08:00 +02:00
D. Berge
f3e171264c Fix development websocket URL 2020-10-09 18:10:14 +02:00
D. Berge
6e7016e2ac Merge branch '59-planner' into 'devel'
Resolve "Planner"

Closes #59

See merge request wgp/dougal/software!2
2020-10-09 15:58:06 +00:00
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
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