Commit Graph

1183 Commits

Author SHA1 Message Date
D. Berge
77ff9a047c Pass a different copy of the data to each listener 2020-09-28 23:07:27 +02:00
D. Berge
2886bd4943 Do not react to events until we have at least two of them.
This is to avoid false positives when restarting the API
mid-line.
2020-09-28 21:43:24 +02:00
D. Berge
03563bdaf2 Auto-create FSP/LSP events from nav header.
If the nav header is being received, this will
try to detect the start and end of line and create
an entry in the log.

It doesn't check whether FSP/FGSP LSP/LGSP entries
already do exist for that sequence.

Closes # 28.
2020-09-28 21:36:32 +02:00
D. Berge
7758f08a79 Use array instead of set for storing callbacks 2020-09-28 21:33:16 +02:00
D. Berge
b73dd3fe1e Add function to return project ID from schema name 2020-09-28 21:32:28 +02:00
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
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
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
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
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
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
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
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
D. Berge
2bd4b895b7 Save item id in results 2020-09-20 17:08:15 +02:00
D. Berge
1f837b12df Save item type in results.
Not sure if this is actually used though.
2020-09-20 17:05:32 +02:00
D. Berge
5324a71523 Fix assignment of _id values to tests 2020-09-20 17:04:13 +02:00
D. Berge
92f15d00de Check for Notifications in the window object 2020-09-19 14:48:03 +02:00
D. Berge
b58dfc847a Adapt footer to small viewports 2020-09-15 03:06:31 +02:00
D. Berge
6c582e6b4b Notifications control: cancel waiting state if switched off 2020-09-15 03:02:12 +02:00
D. Berge
47166b65e0 Adapt footer to small viewports 2020-09-15 02:54:48 +02:00
D. Berge
f32066695e Add notifications control.
Experimental. Pushes updates of interest (currently
new / changed log entries) via the Notifications API.
Can be enabled or disabled by the user at any time.
2020-09-15 02:41:05 +02:00
D. Berge
3d091eec53 Adapt to small viewports 2020-09-15 02:40:19 +02:00
D. Berge
00e00a2ae6 Change page title 2020-09-15 00:39:46 +02:00
D. Berge
0bbe29febc Make QC tab more mobile friendly.
Closes #38.
2020-09-14 23:58:26 +02:00
D. Berge
d93c70b9eb Make log reactive.
Automatically reloads when events have been changed.
2020-09-14 23:56:30 +02:00
D. Berge
946e05c283 Add project schema to Vuex state 2020-09-14 23:55:46 +02:00