Commit Graph

809 Commits

Author SHA1 Message Date
D. Berge
8e11e242ed Remove NODE_OPTIONS from scripts.
Node version 18 does not seem to like it.
2023-09-09 20:37:08 +02:00
D. Berge
91076a50ad Show API error messages if available 2023-09-09 17:00:32 +02:00
D. Berge
e624dcdde0 Support async API callbacks in Vuex action 2023-09-09 16:59:43 +02:00
D. Berge
a25676122c Update material design icons dependency 2023-09-09 16:58:44 +02:00
D. Berge
e4dfbe2c9a Update minimum node version to 18 2023-09-09 16:57:20 +02:00
D. Berge
78fb34d049 Update the API version number 2023-09-09 16:56:52 +02:00
D. Berge
38c4125f4f Support patching values out of the configuration.
A configuration patch having keys with null values will result
in those keys being removed from the configuration.
2023-09-09 16:53:42 +02:00
D. Berge
04d6cbafe3 Use refactored database API in QC executable 2023-09-09 16:42:30 +02:00
D. Berge
e6319172d8 Fix typo in QC executable 2023-09-09 16:42:00 +02:00
D. Berge
c4b330b2bb Don't cache ETags for /files/ endpoint.
As we have no practical way of invalidating those.
2023-09-02 16:06:31 +02:00
D. Berge
308eda6342 Use ETag middleware 2023-09-02 15:29:39 +02:00
D. Berge
e8b1cb27f1 Add ETag middleware 2023-09-02 15:29:24 +02:00
D. Berge
ed14fd0ced Add notifier to DB library 2023-09-02 15:28:17 +02:00
D. Berge
fb10e56487 Add pg-listen dependency 2023-09-02 15:26:53 +02:00
D. Berge
56ed0cbc79 Merge branch '246-add-endpoint-for-creating-a-new-survey' into 'devel'
Resolve "Add endpoint for creating a new survey"

Closes #179, #174, and #246

See merge request wgp/dougal/software!29
2023-09-02 13:10:56 +00:00
D. Berge
227e588782 Merge branch '248-dougal-event-log-takes-a-long-time-to-register-new-events' into 'devel'
Resolve "Dougal event log takes a long time to register new events"

Closes #248

See merge request wgp/dougal/software!30
2023-09-02 13:09:56 +00:00
D. Berge
2cb96c0252 Let user download P1s from the Sequences tab 2023-08-30 14:08:28 +02:00
D. Berge
70cf59bb4c Add API files endpoint.
Used to download files. It relies on `imports.paths` being set
appropriately in `etc/config.yaml` to indicate which parts of
the filesystem are accessible to users via Dougal.
2023-08-30 13:51:31 +02:00
D. Berge
ec03627119 Remove logging statements 2023-08-30 13:48:26 +02:00
D. Berge
675c19f060 Fix whitespace 2023-08-30 13:47:51 +02:00
D. Berge
6721b1b96b Add API endpoint for patching a project 2023-08-30 13:47:02 +02:00
D. Berge
b4f23822c4 Fix db.configuration.get() 2023-08-30 13:43:36 +02:00
D. Berge
3dd1aaeddb Fix indentation 2023-08-30 13:42:25 +02:00
D. Berge
1e593e6d75 Clean up if project creation fails 2023-08-30 13:41:28 +02:00
D. Berge
ddbcb90c1f Add deepMerge() utility function 2023-08-30 13:37:01 +02:00
D. Berge
229fdf20ef Reload the project list on insert or deletion 2023-08-23 19:35:12 +02:00
D. Berge
72e67d0e5d React to project deletion 2023-08-23 19:34:47 +02:00
D. Berge
b26fefbc37 Show user-friendly message if a project cannot be found 2023-08-23 19:33:50 +02:00
D. Berge
04e0482f60 Vuex: add getters for project info 2023-08-23 19:31:22 +02:00
D. Berge
62f90846a8 Vuex: clear project variables if project not found 2023-08-23 19:30:52 +02:00
D. Berge
1f9c0e56fe Default npm run serve to 0.0.0.0 2023-08-23 19:29:13 +02:00
D. Berge
fe9d3563a0 Add API endpoint to delete a project 2023-08-23 19:26:27 +02:00
D. Berge
38a07dffc6 Add API endpoint to retrieve project configuration.
Only available to users with at least `write` access.
2023-08-23 19:26:27 +02:00
D. Berge
1a6500308f Add API endpoint for creating a project 2023-08-23 19:26:27 +02:00
D. Berge
6033b45ed3 Refactor API middleware.
The middleware naming is kept consistent with the HTTP verb that
they handle.
2023-08-23 19:17:20 +02:00
D. Berge
33edef6647 Use modified body-parser accepting YAML 2023-08-23 19:12:44 +02:00
D. Berge
8f8e8b7492 Implement db.project.delete().
Removes a project from the database, but only if the project is
empty, i.e., it has no preplots, no lines and no events in its
log (except deleted).
2023-08-21 14:50:20 +02:00
D. Berge
ab5e3198aa Add DB function to return project configuration.
NOTE: mostly redundant with db.configuration.get(),
see previous commit.
2023-08-21 14:49:22 +02:00
D. Berge
60ed850d2d Change db.configuration.get() to use database.
NOTE: this endpoint is redundant with db.project.configuration.get()
except for its ability to return a partial tree.

TODO: merge this with db.project.configuration.get().
2023-08-21 14:46:51 +02:00
D. Berge
63b9cc5b16 Add database functions for project creation.
Instead of storing the project configuration in a YAML file
under `etc/surveys/`, this is now stored in public.projects.meta.

NOTE: as of this commit, the runner scripts (`bin/*.py`) are not
aware of this change and they will keep looking for project info
under `etc/surveys`. This means that projects created directly
in the database will be invisible to Dougal until the runner
scripts are changed accordingly.
2023-08-21 14:39:45 +02:00
D. Berge
f2edd2bec5 Refactor project DB functions.
The old db.project.list() function is now db.project.get()
and the old db.project.get() is not db.project.summary.get().

If a project does not exist, db.project.summary.get() now
throws a 404 rather than a database error.
2023-08-21 14:36:02 +02:00
D. Berge
44ad59130f Add pid2schema function.
Translates a project ID into a database schema name.
2023-08-21 14:31:23 +02:00
D. Berge
ecbb1e04ee Do not disable event edit form while loading data 2023-08-20 20:07:29 +02:00
D. Berge
7cb2c3ef49 Add comment 2023-05-30 17:20:35 +02:00
D. Berge
fbe0cb5efa Default the API prefix to /api 2023-05-18 18:34:10 +02:00
D. Berge
aa7cbed611 Do not require authentication to query API version 2023-05-18 18:32:26 +02:00
D. Berge
89061f6411 Print port and prefix on startup 2023-05-18 18:30:48 +02:00
D. Berge
838883d8a3 Update caniuse version (package-lock) 2023-05-18 18:29:44 +02:00
D. Berge
cd196f1acd Add option needed for node v16+ support.
Note: this may cause the client *not* to start on node versions
less than 16.
2023-05-18 18:28:36 +02:00
D. Berge
a2b894fceb Fix class instantiation error.
Closes #252.
2023-05-12 15:32:12 +02:00