Commit Graph

1089 Commits

Author SHA1 Message Date
D. Berge
9bd0aca18f Add debugging statements to ETag middleware 2023-11-04 10:45:50 +01:00
D. Berge
60932300c1 Ensure that project is defined.
Which would not be in the case of the `project` event unless we
look at the `new` and `old` properties.
2023-11-04 10:45:50 +01:00
D. Berge
12307b7ae6 Refactor ETag watcher to use path-to-regexp.
Simplifies the code and makes it easier to look at.
2023-11-04 10:45:50 +01:00
D. Berge
ceeaa4a8f3 Add path-to-regexp depedency. 2023-11-04 10:45:50 +01:00
D. Berge
3da54f9334 Always request a fresh response from the config endpoint 2023-11-04 10:36:58 +01:00
D. Berge
4c612ffe0a Take etc/www/config.json out of revision control.
This file contains site-specific configuration. Instead, an
example.config.json is now provided.
2023-11-03 21:30:22 +01:00
D. Berge
7076b51a25 Add auth.access.role(roles) higher order middleware 2023-11-03 21:22:02 +01:00
D. Berge
fe5ca06060 Return a JSON response for all 404s.
When an endpoint did not exist, the default expressjs response
was being returned, which is text/html.
2023-11-03 18:52:31 +01:00
D. Berge
71467dddf9 Report also request body size, if applicable 2023-11-03 18:51:43 +01:00
D. Berge
246f01efbe Report requested URLs and user data in debug mode 2023-11-02 23:52:15 +01:00
D. Berge
68bf853594 Add comments 2023-11-02 23:51:53 +01:00
D. Berge
4a18cb8a81 Remove useless code 2023-11-02 23:51:05 +01:00
D. Berge
c615727acf Don't require authentication for the /version endpoint.
It will still hide the `db` and `os` values from non-admins though.
2023-11-02 23:48:46 +01:00
D. Berge
2e21526fca Simplify versions handling 2023-11-02 23:47:13 +01:00
D. Berge
3709070985 Add a start script to package.json.
So that `npm start` will run.
2023-11-02 23:40:41 +01:00
D. Berge
2ac963aa4f Update redoc-cli version 2023-11-02 20:23:04 +01:00
D. Berge
db7b385d66 Don't show logo on graph toolbar 2023-11-02 20:05:18 +01:00
D. Berge
d91a1b1302 Do show a legend for shots with final data.
Fixup for commit e4607a095b.
2023-11-02 20:03:57 +01:00
D. Berge
fa031d5fc9 Update API specification 2023-11-02 19:59:02 +01:00
D. Berge
620d5ccf47 Add /version API endpoint 2023-11-02 19:48:30 +01:00
D. Berge
f0fa2b75d5 Add more details to version() return value 2023-11-02 19:46:44 +01:00
D. Berge
46bb207dfb Remove debugging artefact 2023-11-02 15:32:48 +01:00
D. Berge
f7a386d179 Merge branch '287-the-project_summary-view-is-too-slow' into 'devel'
Resolve "The `project_summary` view is too slow"

Closes #287

See merge request wgp/dougal/software!55
2023-11-02 14:29:35 +00:00
D. Berge
e4607a095b Don't show a legend for points without gun data 2023-11-02 15:27:06 +01:00
D. Berge
4b0d42390f Show a message if plotting a c-o with no final data 2023-11-02 15:26:37 +01:00
D. Berge
114e41557f Don't show graph if there is no data 2023-11-02 15:25:45 +01:00
D. Berge
e605320503 Refresh shotlog on sequence change 2023-11-02 15:24:45 +01:00
D. Berge
6606c7a6c1 Do not show c-o for raw sequences 2023-11-02 15:24:28 +01:00
D. Berge
e3bf671a49 Also monitor raw_shots events 2023-11-02 15:23:45 +01:00
D. Berge
3e08dfd45b Ignore shots without source data 2023-11-02 13:51:07 +01:00
D. Berge
f968cf3b3c Bump the required database schema version 2023-11-02 13:25:34 +01:00
D. Berge
b148ed2368 Add refresh-project-summary periodic task.
It listens for events that might indicate that the project_summary
materialised view needs to be refreshed and schedules a refresh.

Refreshes are throttled to a maximum of one every throttlePeriod
milliseconds so that things don't get too crazy for instance when
importing a lot of data.
2023-11-02 13:25:34 +01:00
D. Berge
cb35e340e1 Change the periodic tasks interface to support an init() function.
When a task needs to keep state, it can do so via a closure.
2023-11-02 13:25:34 +01:00
D. Berge
6c00f16b7e Add a refresh() method to db.project.summary 2023-11-02 13:25:34 +01:00
D. Berge
ca8dd68d10 Add database upgrade file 32. 2023-11-02 13:25:34 +01:00
D. Berge
656f776262 Do not cache any responses containing cookies 2023-11-02 13:24:40 +01:00
D. Berge
e1b40547f1 Deconflict Webpack's dev-server websocket.
It uses /ws which is the same path Dougal uses.

Changing Dougal's path to something more imaginative requires
reconfiguring Nginx though.
2023-11-02 13:20:41 +01:00
D. Berge
98021441bc Revert "Rename websocket /ws → /dougal-websocket."
This reverts commit 4a8d3a99c1.
2023-11-02 13:18:37 +01:00
D. Berge
4a8d3a99c1 Rename websocket /ws → /dougal-websocket.
The Webpack dev server seems to really like /ws and ignores any
attempts to set a different path, so we just rename our websocket
instead.
2023-11-02 11:39:49 +01:00
D. Berge
7dee457fa1 Add FIXME comment 2023-11-02 11:38:27 +01:00
D. Berge
bccac446e5 Add polyfill for node:path so we can get basename() 2023-11-01 15:12:30 +01:00
D. Berge
535b3bcc12 Adapt to new Marked interface 2023-11-01 14:59:10 +01:00
D. Berge
11e84a7e72 Upgrade Node packages for frontend build 2023-10-31 22:41:37 +01:00
D. Berge
5ef55a9d8e Add dark mode support for QC graphs.
Closes #159.
2023-10-31 21:33:30 +01:00
D. Berge
f53e15df93 Merge branch '265-add-shotlog' into 'devel'
Resolve "Add shotlog"

Closes #265

See merge request wgp/dougal/software!54
2023-10-31 18:51:16 +00:00
D. Berge
cf887b7852 Upgrade Plotly 2023-10-31 19:49:40 +01:00
D. Berge
a917976a3a Fix styling of the download button in the event log 2023-10-31 19:48:42 +01:00
D. Berge
c201229891 Add a link from the event log to the shotlog 2023-10-31 19:47:18 +01:00
D. Berge
7ac997cd7d Add a link from the shotlog to the event log 2023-10-31 19:46:40 +01:00
D. Berge
08e6c4a2de Restyle sequence list links to shot and event logs 2023-10-31 19:46:07 +01:00