If for some reason an exception gets thrown
inside get_current_versions that doesn't get
caught therein, `_get_versions_data_ready` will
never be set and thus any calls waiting for it
will block forever.
This patch fixes that by always setting the event
in the `finally` block.
Announcement and Softwareupdate plugin now
request the online status more often, to better
anticipate intermittent network failures.
Possible solution for #4634
Logins via credentials, remember me cookie, headers or
autologin will now generate an entry in auth.log, as will
logouts via the API.
This should allow auditing OctoPrint access, and also
make it possible to use something like fail2ban if
desired.
Errors during install, e.g. due to dependency issues, that
happened while a "Requirement already installed" message
was present in the output as well, were wrongly read as
a "reinstall needed" case if there was no failure line
present for some reason.
The logic has now been adjusted so that a reinstall will
only be triggered if there was no `Error:` line in the
output. A test case has been added as well.
Closes#4703
We've been getting a deprecation warning about -x for a
while now. This change switches to using the less clean-css
plugin. Detection to make sure the package is installed
has been added and the instructions on how to get
everything needed for the command to work have been
updated.
* 🚧 WIP: multi install of plugins from JSON export
* 🚧 pmgr: Multi install works
TODO: better tracking in install log of individual
steps/results.
* 🚧 Fix error reporting, improve working dialog
* 🐛 Hide action buttons while still installing
* 🚸 Confirmation dialog for json multi install
* 🐛 Fix notifications for single installs
Also: a typo
* Create new WebcamPlugin type
* Let user switch webcam plugin
* Move keyboard controls
* Rename webcam plugin
* Rename webcam plugin
* Update settings pane
* Extract JS code from control.js
* Temporary fix for KO bindings
* Migrate settings to plugin
* Fix issue on tab change
* Migrate settings UI
* Join WebRTC servers to string on migration
* Allow list of all webcams to be retrieved
* Enricht settings with webcams and ensure backwards compatibility
* Fix binfing lost bug
* Do not contain webcam settings if permission is missing
* Style tabs
* Unload webcam based on visibility
* Let user pick default webcam
* Refactor webcam access in Python
* Show snapshot and stream URL in settings dialog
* Update timelapse
* Small UI improvements
* Ensure default webcam is used if nothign is set
* Remove dummy webcams
* Remove commented sections
* Fix CI build
* Ensure configuration types are correct
* Only show selector if more than one webcam is available
* Access default webcam savely in case not set
* Use enum values for stream ratio
* Address PR comments
* Convert data structure to dict
* Create function to get snapshot, remove force=True from migration
* Fix timelapse not captured
* Fix inverted condition check
* Update wording in timelapse error message
* Apply rotate/flip to timelapse
* Add compatibility layer for plugins
* Remove exclusion of classicwebcam plugin
* Fix unit tests
* Fix unit tests #2
* Add onWebcamVisbilityChange callback
* Move stream and snapshot wizard to plugin
* Replace classic_webcam with classicwebcam
* Rename WebcamPlugin to WebcamProviderPlugin
* Rename take_snapshot to take_webcam_snapshot
* Update copyright
* Default to empty dict
* Wrap WebcamCompatibility into Optional
* Rename CoreWizardWebcamViewModel to ClassicWebcamWizardViewModel
* Simplify settings dict creation
* Use plugin identifier for logging
* Add file header
* Simplify toDict() function and renamt to to_dict()
* Rename iter to snapshot
* Remove redundant boolean checks
* Replace with
* Add WebcamNotAbleToTakeSnapshotException
* Reset wizard version to 1
* Reset wizard version to 1
* Update disabling discouraged messgae
* Update default webcam description
* Simplify webcam collection
* Remove test webcam
* 🐛 Fix wrong data location
* ♻️ Refactor settings compatibility layer
Use a settings overlay centrally derived on
server start/platform initialization. Mark overlay
as deprecated so that warnings on read and write
access will be logged to overlay leaves, and writes
will also be denied.
Adjust octoprint.webcams methods to allow injecting
plugin manager and settings instance to use to
support use during initialization.
TODO: Reset overlay when default webcam changes?
TODO: If we split the compat layer then we should
also add TWO overlays, one for snapshot and one for
stream config stuff.
* 💚 Fix unit tests
* ♻️ Move webcam related schema
Webcam, WebcamCompatibility and RatioEnum have
nothing to do with the config anymore but are
rather WebcamProviderPlugin specific, so let's move
them into their own octoprint.schema.webcam package.
* Remove old wizard logic
* Add seprate setting got snapshot webcam
* Convert WebRTC servers to list
* 🚸 Log warning on deprecated settings on API
If anyone is trying to set stuff from the webcam
compat layer, we now get a log entry, or multiple
if needed.
Long term we might want to return an error on
the API
* ☂ Ensure plugin can actually be found
Also use API methods of plugin manager instead of
accessing internal control properties directly.
Co-authored-by: Gina Häußge <gina@octoprint.org>