D. Berge
cd00f8b995
Breaking-change Node package udpates (server)
2023-09-10 11:49:56 +02:00
D. Berge
78fb34d049
Update the API version number
2023-09-09 16:56:52 +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
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
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
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
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
6d8a199a3c
Allow setting IP to listen on.
...
Running on bare metal, 127.0.0.1 is a sensible choice of address
to bind on, but that is not the case when running inside a
container, so we add the ability to choose which IP to listen on.
This can be given via the environment variable HTTP_HOST when
starting the server or, if used as a module, as the second
argument of the start(port, host, path) function.
2023-04-07 09:04:51 +02:00
D. Berge
3ed8339aa3
Migrate more console messages to debug()
2022-05-12 22:09:08 +02:00
D. Berge
546bc45861
Remove dead code
2022-05-04 18:35:20 +02:00
D. Berge
6c8515a879
Add QC results accept/unaccept API endpoints
2022-05-04 18:11:05 +02:00
D. Berge
bb9340a0af
Add QC results accept/unaccept middleware.
...
This middleware can only deal with shot QCs, not sequence-wide QCs.
2022-05-04 17:22:18 +02:00
D. Berge
e3a3bdb153
Clean up whitespace.
...
Commands used:
find . -type f -name '*.js'| while read FILE; do if echo $FILE |grep -qv node_modules; then sed -ri 's/^\s+$//' "$FILE"; fi; done
find . -type f -name '*.vue'| while read FILE; do if echo $FILE |grep -qv node_modules; then sed -ri 's/^\s+$//' "$FILE"; fi; done
find . -type f -name '*.py'| while read FILE; do if echo $FILE |grep -qv node_modules; then sed -ri 's/^\s+$//' "$FILE"; fi; done
2022-04-29 14:48:21 +02:00
D. Berge
74d6f0b9a0
Accept mime query parameter
2022-04-16 17:18:04 +02:00
D. Berge
cf475ce2df
Adapt middleware to new database schema.
...
As introduced by commit 0c6567d8f8 .
2022-04-16 17:18:04 +02:00
D. Berge
186615d988
Add comments for ease of browsing
2022-03-09 17:43:51 +01:00
D. Berge
666f91de18
Add QC results API endpoint
2022-03-09 17:43:10 +01:00
D. Berge
c8ce786e39
Add API middleware for returning QC results
2022-03-09 17:41:27 +01:00
D. Berge
cb952d37f7
Fix: do not require file that no longer exists
2022-02-28 21:25:00 +01:00
D. Berge
adaa1a6b8a
Add version number to API
2022-02-27 19:56:21 +01:00
D. Berge
d7d75f34cd
Remove event caching.
...
That was a horrible kludge and should not be necessary with the
new schema, which is simpler and much faster.
2022-02-27 19:56:21 +01:00
D. Berge
950582a5c6
Refactor event middleware and db code to use new tables
2022-02-27 19:56:21 +01:00
D. Berge
4d2efd1e04
Move sequence events middleware to a different path.
...
This is to make room for a new endpoint to retrieve
data for individual events.
2022-02-27 19:56:21 +01:00
D. Berge
920ea83ece
Add API endpoint to retrieve a single shotpoint.
...
This will be used by the new event dialogue in the
frontend to get shotpoint information when creating
or editing events.
2022-02-27 19:56:21 +01:00
D. Berge
f10103d396
Enfore info key access restrictions on the API.
...
Obviously, those keys can be edited freely at the database
level. This is intended.
2022-02-06 22:40:53 +01:00
D. Berge
c7784aa52f
Add ASAQC queue endpoints to API
2021-10-04 02:21:00 +02:00
D. Berge
45fe467a21
Implement sequence/get API endpoint.
...
It returns data for all individual points in a sequence.
2021-09-11 12:19:06 +02:00
D. Berge
f0b1fc2fe6
Show missed shot events in HTML, PDF exports
2021-09-04 23:29:58 +02:00
D. Berge
d5980d9154
Add CSV planner output option
2021-06-19 19:04:05 +02:00
D. Berge
bba050032f
Add POST, PUT, DELETE support to /project/:project/info.
...
It reuses the same backend functions as for the global `/info/` path.
2021-05-31 02:29:50 +02:00
D. Berge
594233c965
Add HTML & PDF planner output options.
...
Coupled with a suitable Nunjucks template, this is effectively the
24-hour (or whatever period of time) lookahead.
2021-05-31 02:29:50 +02:00
D. Berge
041878096d
Accept a mime query parameter to force MIME type
2021-05-31 02:29:50 +02:00
D. Berge
9d2ccd75dd
Do not try to use line name if there isn't one
2021-05-25 03:19:00 +02:00
D. Berge
3985a6226b
Suggest ${lineName}-NavLog.${extension} as file name.
...
This is for the usual case where only one sequence is requested.
When more than one sequence is requested, the suggested name comes out
as ${projectId}-${sequenceList}.${extension}, where `sequenceList` is
the list of sequence numbers separated by semicolons, e.g.:
eq21203-37;38;39.html.
Closes #116 .
2021-05-25 02:23:41 +02:00
D. Berge
39d85a692b
Use default Nunjucks template if necessary.
...
If the survey configuration does not itself have a template
we will use the one in etc/defaults/templates/sequence.html.njk.
It is not very likely that the template will be changed all that
often and it avoids issues when people forget to copy it across
to a new survey, etc.
2021-05-20 20:38:39 +02:00
D. Berge
315733eec0
Refactor events export middleware.
...
Uses the `prepare` method for better reusability.
2021-05-20 18:35:56 +02:00
D. Berge
8d3e665206
Expose new API endpoint: /info/:path(*).
...
Provides CRUD access to values (which may be deeply nested) from the
global `info` table.
2021-05-20 18:19:29 +02:00
D. Berge
4ee65ef284
Implement info/delete middleware
2021-05-20 18:18:26 +02:00
D. Berge
d048a19066
Implement info/put middleware
2021-05-20 18:18:13 +02:00
D. Berge
97ed9bcce4
Implement info/post middleware
2021-05-20 18:17:52 +02:00
D. Berge
a8850e5d0c
Protect the /project/:project/meta route
2021-05-16 19:58:03 +02:00
D. Berge
b0f4559b83
Allow direct downloading of sequence reports.
...
If the `download` or `d` query parameter is supplied (even
without any value), the response will include a
`Content-Disposition: attachment` header. A filename will
also be suggested.
2021-05-15 17:10:28 +02:00