Commit Graph

1556 Commits

Author SHA1 Message Date
Eric Callahan bd1fd63b14
requirements: update python dependencies
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-11-16 10:11:59 -05:00
pataar 7afd556c21 notify: upgrade apprise to version 1.2.0
Signed-off-by: Pieter Willekens <me@pataar.nl>
2022-11-16 10:10:50 -05:00
Markus Küffner 8b2e8c2a4e scripts: update streaming-form-data dependency
Updates streaming-form-data to Version 1.11.0 to be compatible with Python 3.11.0

Signed-off-by: Markus Küffner <kueffner.markus@gmail.com>
2022-11-16 10:09:23 -05:00
Eric Callahan 490d27b7de
extensions; type checking fix take two
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-11-13 14:30:24 -05:00
Eric Callahan 0c6e860534
extensions: fix type checking for Python 3.7
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-11-13 14:16:59 -05:00
Eric Callahan 7f58f2274e
docs: add unix socket documentation 2022-11-13 12:32:07 -05:00
Eric Callahan b2d109a840
extensions: serve JSON-RPC API over a unix socket
Support unix connections with full access to all JSON-RPC APIs.
Internally these connections are treated as websocket connections,
however the underlying transport protocol is simplfied.  Packets
are JSON encoded objects terminated with an ETX character.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-11-10 11:57:21 -05:00
Eric Callahan 53129bef7e
utils: add method for retrieving unix socket peercred
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-11-09 07:15:33 -05:00
Eric Callahan f089794adc
websockets: create a client base class
Separate out code that applies to both standard websockets and the
future unix socket implementation.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-11-09 07:15:33 -05:00
Eric Callahan 5a3b1b6e5c
docs: fix list roots endpoint
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2022-11-07 07:54:43 -05:00
Eric Callahan ddf3325dae
docs: document list roots
Update documentation to note that the uds now supports
templates.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-11-06 11:48:00 -05:00
Eric Callahan bb7cd27be5
machine: fix typo in sudo access request
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-11-06 11:43:52 -05:00
Eric Callahan a8018afd46
file_manager: always deny access to .git folders
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-11-06 10:51:32 -05:00
Eric Callahan d490796da9
file_manager: fix permission reporting
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-11-06 10:51:32 -05:00
Eric Callahan 36536535bc
klippy_connection: update configuration
Use the ConfigHelper's getpath() method to configure the
unix socket.  The option may now be a template where the
datapath is passed into the context.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-11-06 10:51:31 -05:00
Eric Callahan b291d94596
file_manager: implement additional reserved path filters
Do not add inotify watches for reserved paths that exclude
write acccess.  Do not return include reserved paths in
file list requests without read access.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-11-06 10:51:31 -05:00
Eric Callahan 484950cb40
confighelper: implement getpath
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-11-06 10:51:30 -05:00
Eric Callahan e8dad1c8c0
file_manager: add list roots endpoint
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-11-06 10:51:30 -05:00
Misterke 130c2a48f0 file_manager: disallow drilling down protected folders
Signed-off-by:  Kurt Haenen <kurt.haenen@gmail.com>
2022-11-05 10:45:46 -04:00
pataar 6f43940270 docs: improve notifier reference when using the action
This was unclear for users.

Signed-off-by: Pieter Willekens <me@pataar.nl
2022-11-04 16:20:37 -04:00
Eric Callahan 779997c2b8
git_deploy: refresh previously corrupt repos
It is possible that the user manually corrected a corrupt repo.
If a repo makes it past initialization reset the corrupt flag.

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2022-10-22 19:03:48 -04:00
Eric Callahan 1a3689cb7d
klippy_connect: resolve the uds path
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-10-22 16:45:16 -04:00
Eric Callahan 1ef34b8b60
machine: improve default database handling
Don't force a symlink to the default database if
the subfolder exits.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-10-22 16:44:51 -04:00
Eric Callahan 80a7d461ed
data-path-fix: correct moonraker.conf typo
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-10-22 11:21:17 -04:00
Eric Callahan 4c963de0fc
data-path-fix: add gcode path option
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-10-21 19:25:15 -04:00
Nick Douma 6afa664ac9 ldap: Add option to use a customer LDAP query for looking up the user logging in
This allows for more advanced integration of LDAP databases that are not
covered by the default behaviour of is_active_directory.

Signed-off-by: Nick Douma <n.douma@nekoconeko.nl>
2022-10-21 19:24:35 -04:00
Eric Callahan 379bcb10f9
data-path-fix: add missing alias
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-10-21 15:23:45 -04:00
Eric Callahan 8540f5a794
data-path-fix: add command line arguments
Give the script flexibility for use on installs with multiple instances.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-10-21 14:26:03 -04:00
Eric Callahan 1f86943cbb
gpio: relax error handling
Increase the error threshold to 50 and reset within a 5 second threshold.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-10-21 14:13:17 -04:00
Eric Callahan 4df0b4d532
machine: abort validation if the backup config is loaded
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-10-21 10:26:25 -04:00
Eric Callahan 1190aba4b7
machine: add logging to validation init
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-10-21 10:26:25 -04:00
Jim C K Flaten 25adba0bf6 docs: Correct `minimum_event_time` example
The internal variable is called `min_`, but the config option is called `miniumum_`.
2022-10-21 10:23:29 -04:00
Eric Callahan 974b37dad8
machine: improve multi-instance validation
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-10-20 20:27:02 -04:00
Eric Callahan 8f444a908e
shell_command: error message fix
Use the original command in the message rather than the
list generated by shlex.split().

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-10-20 16:54:35 -04:00
Eric Callahan 59cc8c6c7b
update_manager: report errors in update response
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-10-20 16:54:35 -04:00
Eric Callahan e4a670a380
update_manager: improve corrupt repo detection
It that "git status" will not detect some repo issues, these are only
found after a fetch.  When this condition is detected save the repo
state and report that the repo is corrupt and invalid.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-10-20 16:54:34 -04:00
Eric Callahan 74f43cad6e
git_deploy: notify attempts to fix loose objects
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-10-19 19:32:54 -04:00
Eric Callahan c7e290a3cd
update_manager: improve web client error handling
Singed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-10-19 17:58:58 -04:00
Eric Callahan 38b035389d
power: improve logging
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-10-19 16:35:49 -04:00
Eric Callahan 1f1c590409
power: add initial state support for all devices
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2022-10-19 13:43:14 -04:00
Franklyn Tackitt 6131c7afc1 Git submodules use a .git file instead of a directory
I'm playing with using git submodules to track my entire printer config,
 and moonraker only works with separate clones as is. Using `.exists()`
 instead of `.is_dir()` allows moonraker to control the submodules.

Signed-off-by: Franklyn Tackitt <git@frank.af>
2022-10-19 13:41:35 -04:00
Eric Callahan 4954cc74cd
machine: change sudo folder access test
The previous "/lost+found" is not available on all systems.  Change to
"/root", which should be available.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-10-19 06:21:18 -04:00
Eric Callahan f745c2ce17
database: remove legacy database warning
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-10-18 14:13:25 -04:00
Eric Callahan d6bdad3a9d
machine: announce required update via gcode terminal
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-10-18 14:07:27 -04:00
Eric Callahan 9a466f3b22
server: improve warning formatting
Introduce a "raw" parameter for /server/info that defaults to False.
Front ends that do not wish to recieve warnings with html line breaks
may set this parameter to True, otherwise newlines will be replaced
with "<br/>".

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-10-18 07:23:25 -04:00
Eric Callahan a8cbfe6345
file_manager: improve gcode path warning
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2022-10-18 07:23:25 -04:00
Eric Callahan 6b3c78da71
docs: fix notifier debug endpoint
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2022-10-18 05:20:39 -04:00
pataar b981dc109d notify: add server endpoints for notifier to list and test them
Signed-off-by: Pieter Willekens <me@pataar.nl>
2022-10-18 05:18:30 -04:00
Eric Callahan f1c4d6b143
machine: validation fix for new installs
Add a missing return statement to _link_data_subfolder.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2022-10-17 06:30:54 -04:00
alfrix 7552631b65 update_manager: fix error message displaying the wrong option
Signed-off-by: Alfredo Monclus <alfredomonclus@gmail.com>
2022-10-16 10:31:15 -04:00