Commit Graph

1218 Commits

Author SHA1 Message Date
D. Berge
934b921f69 Include schema in returned survey configuration object 2024-05-01 10:40:04 +02:00
D. Berge
c20b3b64c7 Fix symlink target 2024-05-01 10:40:04 +02:00
D. Berge
8ec918bc7c Rename "SPS" preplots import to "legacy fixed width" 2024-05-01 10:40:04 +02:00
D. Berge
6fa0f8e659 Expose Buffer to Webpack configuration 2024-05-01 10:40:04 +02:00
D. Berge
a9f93cfd17 Add save / upload controls to configuration toolbar 2024-05-01 10:40:04 +02:00
D. Berge
9785f4541b Add dirty configuration flag 2024-05-01 10:40:04 +02:00
D. Berge
62ab06b4a7 Refactor configuration GUI.
Another refactoring. What we're doing now is eliminating the
need to save individually on each section. Configuration changes
are done directly on the local configuration and then the local
configuration is saved, downloaded or discarded in one go.
2024-05-01 10:40:04 +02:00
D. Berge
c7270febfc Add project configurations upgrade script.
This script rewrites project configurations to take into account
various structural changes in the configuration object.

The script can be run without arguments, in which case it will
upgrade the configuration of every project found in the local
database, or one or more project IDs can be given as command
line arguments in order to upgrade only those projects.

Configurations that have already been upgraded will not be
touched.

For other projects, both the original and new configurations will
be saved to file in the current directory, as well as two scripts:
one commits the new configuration to the server, and the other
restores the original one.

This script connects directly to the database, using the same
mechanisms as the Dougal server. It is recommended to run it
locally on the server host.

The restore scripts use the HTTP API, which they expect to find
on http://localhost:3000/api, so it is also recommended to run
them in the local server.

Closes #290.
Closes #291.
Closes #292.
Closes #293.
Closes #294.
Closes #295.
Closes #296.
Closes #297.
Closes #298.
2024-05-01 10:40:04 +02:00
D. Berge
2dffd93cfe Simplify expression 2024-05-01 10:40:04 +02:00
D. Berge
867a534910 Remove debugging statements 2024-05-01 10:40:04 +02:00
D. Berge
60aaaf9e04 Aesthetic changes 2024-05-01 10:40:04 +02:00
D. Berge
b64a99ab19 Add option to upload the configuration to the server 2024-05-01 10:40:04 +02:00
D. Berge
69fce0e0dc Add option to load configuration from local file.
Supports both JSON and YAML.
2024-05-01 10:40:04 +02:00
D. Berge
8dd971ffec Add option to save local copy of configuration to local file 2024-05-01 10:40:04 +02:00
D. Berge
fd84eb1ebb Add "advanced configuration" view.
This view shows a tree view of the raw JSON configuration
object, allowing the user to add / edit / delete any properties
whatsoever. It is semi-hidden behind a context menu. The user
has to right-click on the header of the left-hand column showing
the list of configuration sections and then click on the red
"advanced configuration" button. In the advanced configuration
view there is another button to go back to normal configuration.

It is only possible to save / refresh the configuration from the
normal view.
2024-05-01 10:40:04 +02:00
D. Berge
53b4213a05 Fix configuration not being refreshed 2024-05-01 10:40:04 +02:00
D. Berge
3fbc266809 Add configuration GUI for SEG-Y near field hydrophone data 2024-05-01 10:40:04 +02:00
D. Berge
66a758d91f Refactor Smartsource header reading configuration.
- Use a fixed width name parser rather than regular expressions
- Move the Smartsource header files configuration to a different
  part of the configuration object.
2024-05-01 10:40:04 +02:00
D. Berge
6cebf376d0 Refactor <dougal-project-settings-final-pending/> 2024-05-01 10:40:04 +02:00
D. Berge
02adbdf530 Refactor <dougal-project-settings-final-p111/>.
Use fixed width name decoding instead of regular expression.
2024-05-01 10:40:04 +02:00
D. Berge
2357381ee6 Refactor <dougal-project-settings-raw-p111/>.
Use fixed width name decoding instead of regular expression.
2024-05-01 10:40:04 +02:00
D. Berge
5245e6a135 Refactor <dougal-project-settings-raw-ntbp/> 2024-05-01 10:40:04 +02:00
D. Berge
d93b8f8a9c Refactor <dougal-project-settings-file-matching-parameters/>.
It uses a fixed width format specification instead of a regular
expression.

It shows a preview of what parts of the string are decoded as what.
2024-05-01 10:40:04 +02:00
D. Berge
8b47fc4753 Refactor <dougal-project-settings-asaqc/>.
- Uses the new interface with the main component
- Changes the path where ASAQC related settings are saved,
  from $.asaqc to $.cloud.asaqc.
- Adds field for configuring the subscription key.
2024-05-01 10:40:04 +02:00
D. Berge
a0b3568a10 Refactor <dougal-project-settings-online-line-name-format/>.
Uses a fixed width specification instead of regular expressions
to decode line names from the navigation system.
2024-05-01 10:40:04 +02:00
D. Berge
8895a948cf Refactor preplots configuration GUI.
This introduces a number of changes, most notably an easier way
to specify fixed width formats and support for configuring
multiple import options (actual SPSv1, SPSv2.1, P1/90, CSV, …)

Note that only the configuration GUI is done, support for actually
importing those formats has not been implemented as of this commit.
2024-05-01 10:40:04 +02:00
D. Berge
afe04f5693 Refactor <dougal-project-settings-binning/> 2024-05-01 10:40:04 +02:00
D. Berge
c3a56bf7e2 Refactor <dougal-project-settings-production/> 2024-05-01 10:40:04 +02:00
D. Berge
18fcf42bc3 Refactor <dougal-project-settings-planner/> 2024-05-01 10:40:04 +02:00
D. Berge
ad48ac9998 Refactor <dougal-project-settings-file-path/> 2024-05-01 10:40:04 +02:00
D. Berge
7ab6be5c67 Refactor <dougal-project-settings-binning/> 2024-05-01 10:40:04 +02:00
D. Berge
2f56d377c5 Refactor <dougal-project-settings-groups/> 2024-05-01 10:40:04 +02:00
D. Berge
d1c041995d Refactor <dougal-project-settings-name-id/> 2024-05-01 10:40:04 +02:00
D. Berge
399e86be87 Refactor the interface between ProjectSettings and subcomponents.
This is still not set in stone and not fully consistent from one
subcomponent to another, but the general idea is that instead of
passing everything in one property via v-model we use v-bind
instead with a variable list of props depending on the needs of
the subcomponent.

We listen for @input and a new @merge event in order to apply
any changes to the *local* configuration. The local configuration
then needs to be uploaded to the server via a separate step. We
might change this in a later commit, so that changes made in
subcomponents are automatically applied to the local configuration.
2024-05-01 10:40:04 +02:00
D. Berge
13f68d7314 deepValue with an empty path returns the object itself 2024-05-01 10:40:04 +02:00
D. Berge
80de0c1bb0 Modify deepSet() to allow appending to arrays 2024-05-01 10:40:04 +02:00
D. Berge
26a487aa47 Add json-builder component.
It displays a JSON object as a <v-treeview/>, with editing
capabilities.
2024-05-01 10:40:04 +02:00
D. Berge
53e7a06a18 Add Vue watch mixin to update a variable on changes to another.
To be used where adding .sync to props is not convenient for
one reason or another.
2024-05-01 10:40:04 +02:00
D. Berge
efe64f0a8c Implement PUT method for project configuration endpoint.
In short:

POST creates a new project
PUT overwrites a project configuration with a new one
PATCH merges the request body with the existing configuration
2024-05-01 10:40:04 +02:00
D. Berge
313e9687bd Bring all the lib/utils from the frontend to the backend.
The idea being that eventually we will symlink the lib/utils
directory so that the same routines are available on both the
frontend and the backend.
2024-05-01 10:40:04 +02:00
D. Berge
09fb653812 Strip whitespace 2024-05-01 10:40:04 +02:00
D. Berge
0137bd84d5 Add Vue component for configuring sailline CSV imports.
Sailline CSV imports are related to issue #264. Not yet implemented
server-side.
2024-05-01 10:40:04 +02:00
D. Berge
f82f2c78c7 Add Vue component for handling delimited strings.
<dougal-delimited-string-decoder/> is intended for providing a UI
for configuring text-delimited import settings (such as CSV imports).
2024-05-01 10:40:04 +02:00
D. Berge
9f1fc3d19c Make Vue component reusable.
This converts <dougal-fixed-width-format/> into a more reusable
<dougal-fixed-string-decoder/> component.
2024-05-01 10:40:04 +02:00
D. Berge
873d7cfea7 Add utility Vue components.
This commit adds <dougal-field-content/> and
<dougal-field-content-dialog/>, which can be
used to configure certain properties of an
object. Intended for use while editing project
configurations.
2024-05-01 10:40:04 +02:00
D. Berge
2fa9d99eeb Add YAML frontend dependency.
To download / upload configurations.
2024-05-01 10:40:04 +02:00
D. Berge
12b28cbb8d Add csv-parse dependency to frontend.
Also requires a Buffer polyfill.
2024-05-01 10:40:04 +02:00
D. Berge
436a9b8289 Add utility function to truncate long strings 2024-05-01 10:40:04 +02:00
D. Berge
b3dbc0f417 Add utility function to create HSL colours 2024-05-01 10:40:04 +02:00
D. Berge
6d417a9272 Add utility functions.
The functions are:

- deepMerge()   Merge two objects
- deepCompare() Loose deep comparison
- deepEqual()   Strict deep comparison
- deepSet()     Set nested object property value
- deepValue()   Retrive nested object property value
2024-05-01 10:40:04 +02:00