Commit Graph

420 Commits

Author SHA1 Message Date
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
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
D. Berge
b74419f770 Reuse deepMerge.js from the backend libs 2024-05-01 10:40:04 +02:00
D. Berge
cae57e2a64 Ensure we get a fresh response 2024-05-01 10:40:04 +02:00
D. Berge
cd739e603f Fix configuration object data corruption 2024-05-01 10:40:04 +02:00
D. Berge
beeba966dd Cope with empty result 2024-05-01 10:40:04 +02:00
D. Berge
544c4ead76 Remove trailing slash from URL 2024-05-01 10:40:04 +02:00
D. Berge
4486fc4afc Improve contrast of new group item 2024-05-01 10:40:04 +02:00
D. Berge
402a3f9cce Add code for a ‘new project’ button to project list navigation.
This is currently disabled though (value in route/index.js is
commented out) as it is not possible at the moment to create
new projects fully from scratch from the frontend. See comment
on previous commit.

NB: projects may be created fully from scratch by making an API
request with a suitable YAML / JSON configuration file, thusly:

curl -vs "https://[hostname]/api/project" -X POST \
    -H "Content-Type: application/yaml"
    --data-binary @/path/to/configuration.yaml
2024-05-01 10:40:04 +02:00
D. Berge
1801fdb052 Add project creation details component.
This is not usable at the moment as the backend requires even
more details, such as binning parameters, which this dialogue
does not provide.

It might be a matter of relaxing the rules on the backend or,
perhaps more likely, rethinking the project creation / editing
frontend. Maybe refactoring the frontend so that saves are done
in one go for the whole configuration as opposed to piecemeal as
currently done might make it easier to work on a configuration
(especially a new one) fully offline.
2024-05-01 10:40:04 +02:00
D. Berge
be904d8a00 Add ‘groups’ column to ProjectList table 2024-05-01 10:40:04 +02:00
D. Berge
2131cdf0c1 Add project cloning option to ProjectList 2024-05-01 10:40:04 +02:00
D. Berge
15242de2d9 Add configuration settings tab to project navigation bar.
Only for admin users.
2024-05-01 10:40:04 +02:00