Former implementation tested for z-hop rising flank and anything that
is falling. That however causes issues with z-hop directly followed
by layer change (diff is not z-hop size but negative, image hence not
captured).
Instead of testing for positive flank == z-hop and any negative flank,
we now test for absolute value == z-hop.
Solves #1777
Cache was not invalidated on change of:
* snapshot URL presence
* system menu entry presence
* gcode viewer enabled/disabled
* changes in access control availability
Refactored cache setup to add enable_timelapse, enable_gcodeviewer
and enable_accesscontrol to ETag calculation, removed system menu
check. Template filtering will now be done based on the values of
these flags at render time, not before.
See also #1776 for a related ticket.
* Use only icons for settings and system entries
* Limit length of login entry to 100px
* Limit length of instance name to 250px
* Removed "OctoPrint" text if instance name is set
See discussion in #1741
* leading and trailing null bytes will now be stripped
* while connecting, a "wait" will also trigger switch to connected
state - relevant when connecting without reset and initial "ok" for
M110 gets mangled
* extended virtual printer by new options to test the above:
* mangled "ok" can now be injected via "preparedOks" setting and
prepare_ok DEBUG command
* simulated reset lines on beginning ("start" etc) now only sent
if new setting "simulateReset" is true
Should fix#1770
Extracted methods to check if modification of a file is possible and
to determine if a specific file is currently select to take care of
denying upload and re-selecting file after upload.
Refactored watched folder handler to use the same methods and mirror
behaviour of file upload via API.
Should solve #1760
* Endless recursion on file delete as reported in #1738
* Broken implementation of .move
* Broken definition of .pathForEntry, .entryForPath,
.pathForElement and .elementByPath
API endpoints that were not decorated with restricted_access so far did
not properly create a user session for cookie-less requests with an API
key only.
That meant that flask.current_user stayed an anonymous user, even with
the global admin API key. In case of /api/settings that meant that even
with the global admin API key it was not possible to read settings that
are admin-only (like the API key for example) or user-only.
This has now been rectified by moving the session creation into a
different before_request handler that is registered globally on all API
endpoints, meaning that an API key will now always lead to a user
session to be created, regardless of the requirements of the API
endpoint in question. Additionally the CORS handling was extracted
as well as the API key presence enforcement.
BlueprintPlugins will now also get the CORS and session-from-API-Key
treatment if they do not declare their endpoints as restricted.
Might solve the API key "n/a" issue filed in #1751, but since the cause
of that isn't identified yet that's not sure.
Don't allow overwriting of "octoprint" config through plugins, don't
allow overwriting of already registered configs unless id to register
matches plugin identifier (in which case the already registered config
was probably a case of a copy-paste-error from another plugin).