Commit Graph

484 Commits

Author SHA1 Message Date
D. Berge
0d72ea3c88 Purge QCs that are no longer failing.
If a QC has failed in the past there will be a
record of it in raw_lines, raw_shots or preplot_points.

If that QC then stopped failing, e.g., because of a
change of parameters, then the QC results would correctly
reflect the change but not the line/shot tables and
hence, the event log.

This commit hopefully takes care of that.
2020-09-28 14:58:48 +02:00
D. Berge
e75e866285 Tidy up formatting 2020-09-28 13:12:18 +02:00
D. Berge
ca41bd8132 Do not lose data during database upgrades.
The database upgrade script is updated to export
also user-entered data stored in columns of tables
containing also derived data, and to re-import
everything after the upgrade.
2020-09-27 19:36:28 +02:00
D. Berge
a05ecfd41c Add functions to export/import specific columns from DB.
Unlike system_imports.py and system_exports.py, which
deal with whole tables via COPY, this allows us to
export / import *either* whole tables or specific
columns only.

The data will be exported to text files containing
the selected columns + the primary key columns for
the table.

When importing, those tables for which a selection
of columns was exported must already be populated.
The import process will overwrite the data of the
non primary key columns it knows about. If whole
tables are exported, on the other hand, when
re-importing rows will be appended rather than
updated. It is the user's responsibility to make
sure that this will not cause any conflicts.
2020-09-27 19:29:48 +02:00
D. Berge
bf313dd8e5 Allow editing of remarks in sequence list 2020-09-27 19:25:45 +02:00
D. Berge
371030e61e Add optional callback to Vuex API action.
The callback has the signature (err, res) where
res is the result object from the fetch() request
and err is non-null if an error occurred and fetch()
threw.

The callback is called before res.json() has had a
chance to run it is really not recommended to
consume the body from this callback as this will cause
an error in the API action itself.
2020-09-27 19:23:04 +02:00
D. Berge
fd1f1a2c1a Implement sequence patching endpoint.
Allows us to change remarks and meta fields in sequences.
2020-09-27 19:21:59 +02:00
D. Berge
bfcc02a140 Comment out logging statement 2020-09-27 19:19:47 +02:00
D. Berge
a7b4b70d59 Remove spurious semicolon 2020-09-27 19:19:19 +02:00
D. Berge
3bd8cbe860 Handle projects for which there is (yet) no QC data 2020-09-27 19:18:19 +02:00
D. Berge
5a74953739 Add vars() method to configuration.py.
Returns some shell variables that are used
by various deferred import processes.
2020-09-27 19:16:44 +02:00
D. Berge
303befef3b Add human exports to runner 2020-09-26 23:41:09 +02:00
D. Berge
4e70090b40 Export structured sequence data to JSON files.
Script meant to be run by runner.sh.

It will not overwrite existing files. If a
sequence is modified after the first export,
the resulting file needs to be removed by the
user before a re-export will occur.

The idea is to eventually export on demand
when a new raw is added to final_lines.
2020-09-26 22:57:36 +02:00
D. Berge
acf58df59f Return events in structured sequence export format.
The events endpoint will return data in the format
agreed with Multiseis if the request has an
Accept: application/vnd.seis+json
header.

Related to #12.
2020-09-26 22:55:11 +02:00
D. Berge
78adb2bef7 Make set_survey argument case insensitive 2020-09-26 22:53:48 +02:00
D. Berge
be242e109a Request map events from server as GeoJSON 2020-09-26 18:06:22 +02:00
D. Berge
b76f1f166b Refactor events middleware.
The reason for refactoring was to accommodate
Multiseis / client sequence exports, which will be
served by this endpoint via a specific Content-Type.

In the process, the cache has been fixed and redesigned.

Related to #12.
2020-09-26 17:41:47 +02:00
D. Berge
ae8a25f240 Avoid making unnecessary map requests 2020-09-26 01:34:14 +02:00
D. Berge
39b425b392 Add comment 2020-09-26 01:24:12 +02:00
D. Berge
f2024a7b99 Abort pending requests on successive map refreshes 2020-09-26 01:18:12 +02:00
D. Berge
b383f4e4c0 Slightly increase size of event markers 2020-09-26 01:17:34 +02:00
D. Berge
1d8036b429 Protect against events without payload.
These will eventually arrive when we stop ignoring
events > 8 KiB.
2020-09-26 01:16:25 +02:00
D. Berge
358eb44de3 Don't report error if a fetch was aborted 2020-09-26 01:15:32 +02:00
D. Berge
6badff2f76 Switch event map layers to ‘push’ style update.
Still no updating on new / deleted events though.
2020-09-25 22:42:33 +02:00
D. Berge
949f42c1dc Show events on map.
Partial implementation. Notably, it does not yet update
when events are added/modified/deleted.

Related to #48.
2020-09-25 18:33:55 +02:00
D. Berge
42d453f714 Cache event responses at the middleware level.
This is not really a substitute for proper database
design but if deemed useful it might be refactored
into a more generic caching middleware and applied
to other requests as a low-cost alternative to
database refactoring while we gain usage and
performance information.
2020-09-25 18:29:40 +02:00
D. Berge
77aae68603 Include project ID in DB notifications 2020-09-25 18:27:59 +02:00
D. Berge
ab2cf81327 Broadcast an already parsed JSON payload 2020-09-25 18:26:04 +02:00
D. Berge
55cb3856c3 Remove logging statement 2020-09-25 18:23:03 +02:00
D. Berge
9470f41f4b Fix lookup of timed event labels.
Fixes #44.
2020-09-24 15:32:25 +02:00
D. Berge
4dc1c7df8e Re-export schema template.
No changes to the actual schema.
2020-09-24 15:31:53 +02:00
D. Berge
80324130f9 Return event geometries as GeoJSON 2020-09-24 15:24:47 +02:00
D. Berge
72e06c9f2a Give more info to the user in disconnection icon 2020-09-23 22:23:42 +02:00
D. Berge
c25f350c7a Show online indicator.
Closes #37.
2020-09-23 22:18:51 +02:00
D. Berge
46b9978d3f Allow searching sequence list by line.
Closes #40.
2020-09-23 21:13:55 +02:00
D. Berge
808fa71c5f Change colour of highlighted row in sequence list.
The default pink colour in night mode wasn't overly popular.

Related to #36.
2020-09-23 21:05:08 +02:00
D. Berge
a4ed7f7b62 Return all QC events, not just those with labels 2020-09-23 20:19:13 +02:00
D. Berge
60ffff15bf Disconnect DB sessions before starting upgrade 2020-09-23 18:18:39 +02:00
D. Berge
33c23c1239 Return event labels directly from events view.
This speeds up the query by orders of magnitude.
2020-09-23 16:31:55 +02:00
D. Berge
0e5e54b680 Ensure views are synchronised after re-import 2020-09-23 15:48:42 +02:00
D. Berge
6b52383056 Reset sequences after re-import 2020-09-23 15:48:21 +02:00
D. Berge
97104556b7 Do not hard fail if imports fail for one project.
It may be the case that we have already re-imported
some of the data, so we just move on to the next
project.
2020-09-23 15:46:17 +02:00
D. Berge
6bab21bce4 Fix QC test definition 2020-09-23 15:45:41 +02:00
D. Berge
7898cc907d Set, retrieve and process QC labels on frontend 2020-09-20 18:12:48 +02:00
D. Berge
80e8ccef9c Add endpoints for setting and retrieving metadata 2020-09-20 18:11:33 +02:00
D. Berge
7e36305472 Remove logging statements 2020-09-20 18:10:25 +02:00
D. Berge
fe3a825bf7 Do not overwrite other qc info 2020-09-20 18:09:43 +02:00
D. Berge
bdb2fb9c3f Cache QC results associated with each shot / sequence.
This is to enable the user to associate information, in
particular “QCAccepted” override labels, to individual
results. The information stays associated with tests
unless the data is removed or the results change (e.g.,
because the data was reprocessed or the test parameters
or algorithm were changed).
2020-09-20 17:10:47 +02:00
D. Berge
cd392a33df When QCs called without projectId, associate pid with results.
Otherwise the return value would be ambiguous as we wouldn't
know to which project the values belong.
2020-09-20 17:09:31 +02:00
D. Berge
2107a5087a Skip disabled items 2020-09-20 17:08:47 +02:00