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
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
D. Berge
b4aed52976
Add project settings cloning component.
...
Asks for the new ID, name and root file path.
2024-05-01 10:40:04 +02:00
D. Berge
1b85b5cd4b
Remove cloning control stub.
...
Cloning takes place from the project list, we don't really need
to duplicate that functionality here for the time being.
2024-05-01 10:40:04 +02:00
D. Berge
f157f49312
Use project list from Vuex
2024-05-01 10:40:04 +02:00
D. Berge
3d42ce6fbc
Add context menu with ‘Edit project settings’ option
2024-05-01 10:40:04 +02:00
D. Berge
4595dddc24
Add ProjectSettings view
2024-05-01 10:40:04 +02:00
D. Berge
642f5a7585
Add project configuration components.
...
The configuration settings are quite complex so we divide the
GUI into modular components.
2024-05-01 10:40:04 +02:00
D. Berge
e7c29ba14c
Add file browsing components.
...
Essentially, these are a file selection dialog.
2024-05-01 10:40:04 +02:00
D. Berge
d919fb12db
Add control to filter out archived projects in ProjectList
2024-05-01 10:40:04 +02:00
D. Berge
2fb1c5fdcc
Process incoming JWT WebSocket messages
2024-05-01 10:20:09 +02:00
D. Berge
c6b99563d9
Send a request for new credentials at regular intervals.
...
Every five minutes, a message is sent via WebSocket to ask the
server for a refreshed JWT token.
2024-05-01 10:19:00 +02:00
D. Berge
76a90df768
Send "Authorization: Bearer …" on API requests.
...
We need this because we might have more recent credentials than
those in the cookie store.
2024-05-01 10:15:26 +02:00
D. Berge
ea8ea12429
Add JWT Vuex getter
2024-05-01 10:14:55 +02:00
D. Berge
7bd2319cd7
Allow setting credentials directly via the Vuex store.
...
Until now, credentials were set indirectly by reading the browser's
cookie store. This change allows us to receive credentials via other
mechanisms, notably WebSockets.
2024-05-01 10:13:14 +02:00
D. Berge
a9270157ea
Process JWT messages over WebSockets
2024-05-01 10:06:35 +02:00
D. Berge
d2f94dbb88
Refactor JWT token verification
2024-05-01 10:05:48 +02:00
D. Berge
1056122fff
Fix missing parenthesis
2024-04-28 18:37:30 +02:00
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
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