Commit Graph

89 Commits

Author SHA1 Message Date
Donkie
86f69d470f Added backend supported csv/json export functionality 2024-10-27 12:36:39 +01:00
Donkie
32c737fa98 Revert so commit now happens before notice, but add a catch-all to websocket notifications 2024-08-16 15:13:09 +02:00
Donkie
e5f79493cc Fixed error on trying to send ws message to disconnected client
This could result in a major filament usage track failure since the Use http request would fail and Moonraker would keep retrying to save the used filament. However it was actually saved since the db.commit() happens before the websocket message fails.
2024-08-16 10:28:22 +02:00
Donkie
cc7dceb2a3 Fixed backend not supporting editing multi color dir 2024-06-08 22:50:01 +02:00
Donkie
8c164ac55f Added backend support for multi-color filaments 2024-05-28 18:49:24 +02:00
Donkie
b00075ab87 Added backend support to perform exact matches 2024-05-25 20:56:22 +02:00
Donkie
535fa40ad2 Updated most python dependencies
Primarily FastAPI and Pydantic to v2. Also ruff to latest.

Updated some code to support Pydantic v2
2024-05-23 19:42:27 +02:00
Donkie
ca545b72b9 Fixed spool price sorting not working
Resolves #349
2024-05-20 22:42:44 +02:00
Donkie
c4693d3f34 Implemented used_length spool sort 2024-05-15 20:18:24 +02:00
Donkie
51c3b46f1f Fixed wrong remaining weight and length spool sort 2024-05-15 20:17:00 +02:00
Donkie
e4d2ecf0dc Filament/vendor find by ext id + integration tests 2024-05-12 21:58:01 +02:00
Donkie
1e4c73138c Added external ID fields to filaments and vendors 2024-05-12 21:58:00 +02:00
Donkie
21d541a680 Added script to download files from external db 2024-05-12 10:48:33 +02:00
Matt Gerega
153b21408b Merge branch 'master' into feature/spool_revisions 2024-04-17 17:26:14 -04:00
Matt Gerega
fdec032d19 Updated handling of higher measurements 2024-04-15 16:41:14 -04:00
Dmitry Belousov
91d922d0b8 fixed version prometheus-client
added env variable SPOOLMAN_METRICS_ENABLED for enabled database collector

set metrics path as /metrics

checked Null values at vendors, init weight and price
removed some logs
2024-04-15 00:17:36 +03:00
Dmitry Belousov
2aa0a4f1b0 WA for FastApi session manager 2024-04-12 01:20:35 +03:00
Matt Gerega
c6f9abeced Changed initial_weight to be net weight, not gross weight 2024-04-10 11:00:46 -04:00
Dmitry Belousov
28b2bfec50 Added prometheus client
Added scheduler for compute current spool metrics and info
2024-04-09 15:25:09 +03:00
Matt Gerega
23cfb42ba8 Updated based on PR requests 2024-04-08 17:38:18 -04:00
Matt Gerega
37804c14a8 modified default settings 2024-04-08 09:27:15 -04:00
Matt Gerega
a6ae808389 Added additional integration tests for measure and add 2024-03-28 09:29:39 -04:00
Matt Gerega
19c414da4b Add integration tests for new measure endpoint 2024-03-27 15:44:54 -04:00
Matt Gerega
3ea4937f24 Updated spool UIs (create/edit) 2024-03-27 14:47:05 -04:00
Matt Gerega
3aed735cea Updated vendor API to correct issues - Implement new UI 2024-03-26 21:26:41 -04:00
Matt Gerega
e68f88da2a Added empty spool weight as an option field for the vendor 2024-03-26 20:35:50 -04:00
Matt Gerega
83fd3073ec Fixed formatting 2024-03-26 14:02:17 -04:00
Matt Gerega
1d6830d769 Added initial_weight and empty_weight to spool 2024-03-26 13:55:44 -04:00
Donkie
c2335366bb Fixed sorting by remaining weight/length 2024-02-02 22:10:11 +01:00
Donkie
290eb5cb81 Added backend ability to sort by combined_name 2024-01-30 18:20:53 +01:00
Donkie
09b8705133 Existing extra fields for entities are now cleared if a field is deleted 2024-01-23 18:58:57 +01:00
Donkie
77ac9d6a5c Added custom extra fields to backend
No integration tests yet, TBD
2024-01-23 18:58:57 +01:00
Donkie
44da991d47 Added a new backend settings system
This can be used for saving runtime-configurable settings in the database.
2024-01-16 19:17:06 +01:00
pdsccode
d18d21d8fd Fixed db access to spool price field 2023-12-30 09:18:37 +01:00
pdsccode
1eb78f01df Added pricing field for single spool 2023-12-30 07:29:27 +01:00
Donkie
cf8d7472f5 Added backend filament search by similar color 2023-12-19 21:37:07 +01:00
Donkie
796523a860 Fixed db backups not using the fancy get_backups_dir function 2023-11-25 21:58:20 +01:00
Donkie
9eb3aef08d Removed unused default registered func 2023-10-21 11:49:00 +02:00
Donkie
5f7a063125 Added resource field in websocket message
Used to differentiate resources for root-level subscriptions
2023-10-15 20:39:53 +02:00
Donkie
a6d527aaf0 Added/deleted-type websocket messages
Events are now sent for not only when an object changes but also when one is created or deleted.

For now it's not really possible to subscribe to these events however.

This breaks backwards-compatibility with the websocket messages.
2023-10-15 19:46:10 +02:00
Donkie
3c5b3cea5a Added websocket endpoints for filament and vendors 2023-10-15 15:39:39 +02:00
Donkie
9595aec675 Fixed registered field having wrong timezone
This happened with at least Postgres, which took it's server's timezone. It's complicated. Let's just set it from our side instead where we have some control.
2023-10-02 21:36:50 +02:00
Donkie
205574fa2c Fixed timezone being returned incorrectly
Happened if you've set TZ to non-UTC.

Apparently astimezone and replace doesn't do the same thing even if tzinfo is None.
2023-10-02 21:36:50 +02:00
Donkie
597dca7c28 Fixed combining empty and non-empty filter
Previously it would then act as a wildcard filter
2023-09-20 21:02:49 +02:00
Donkie
cadb707fdd Added WebSocket notify API for spools 2023-09-17 22:00:00 +02:00
Donkie
6ee3b8df70 Added support for multiple int where's 2023-09-16 11:13:30 +02:00
Donkie
6d68a40313 Added support for multiple string where's 2023-09-16 11:13:30 +02:00
Donkie
841cc8b6df Added sort by remaining weight 2023-09-16 11:13:30 +02:00
Donkie
a4d14c5b52 Added X-Total-Count test asserts
Fixed issue with incorrect total count for vendors
2023-09-16 11:13:30 +02:00
Donkie
e436aa4975 Added tests for spool find sorting 2023-09-16 11:13:30 +02:00