Commit graph

984 commits

Author SHA1 Message Date
Gina Häußge
1eb3f84bce Also handle partial timelapse settings gracefully
Server startup could fail if for whatever reason the timelapse settings
had lost their type value, since the dict was not merged with the
default values upon retrieval.
2015-07-06 17:06:30 +02:00
Gina Häußge
6906584892 Fixed sorting by size of file list 2015-07-06 17:04:55 +02:00
Gina Häußge
ea53fd368a settings().get(..) => settings().getBoolean(..) 2015-07-06 17:03:36 +02:00
Gina Häußge
3441431cdf Do only allow machinecode files for selection/printing 2015-07-06 10:49:24 +02:00
Gina Häußge
3da54be6ea Merge branch 'test/pollingObserver' into devel 2015-07-06 08:40:31 +02:00
Gina Häußge
b8cf5ef83d Added "pollWatched" setting to UI 2015-07-06 08:40:13 +02:00
Gina Häußge
6600d246b7 Better resilience against senseless polling intervals 2015-07-05 16:49:35 +02:00
Gina Häußge
8722cdadcd Merge branch 'maintenance' into devel
Conflicts:
	src/octoprint/plugins/softwareupdate/updaters/pip.py
	src/octoprint/util/pip.py
2015-07-05 10:15:14 +02:00
Gina Häußge
29d49179a9 SWU Fix: properly sanitize version strings for comparison 2015-07-05 10:04:06 +02:00
Gina Häußge
f2df1748ef Allow polling for changes in watched folder
Some underlying file systems might not trigger change events (e.g.
mounted remote file systems). Added a feature flag to allow for
switching to a (less performant) polling method.
2015-07-05 09:38:09 +02:00
Gina Häußge
19b4a0f403 Fix: Always delete files from watched folder
Wasn't ensure previously when using file preprocessors.
2015-07-05 09:35:49 +02:00
Gina Häußge
f0530eff8f SWU: always send displayName to frontend
Spares us having to map on the client side which might not work
in all cases.
2015-07-03 15:25:36 +02:00
Gina Häußge
a1735190d5 OctoPrint update script now logs asynchronously
stdout and stderr of executed commands was previously only logged at
the very end, now gets logged when it is received.
2015-07-03 14:00:01 +02:00
Gina Häußge
be8827b67c SWU: plugin now logs stdout/stderr during updating
Only if logged in as Admin though. Working dialog is as verbose as
Plugin install dialog.
2015-07-03 13:59:22 +02:00
Gina Häußge
ae73ebdcb3 PMGR: console_logger was not properly defined in init 2015-07-03 13:57:15 +02:00
Gina Häußge
6f24a2b6c5 New helper CommandlineCaller
Wraps sarge and allows asynchronous execution of commands incl. logging
to provided logging methods for stdout, stderr and command calls.

Refactored PipCaller to utilized that.
2015-07-03 13:56:31 +02:00
Gina Häußge
5674de9c2f Fix: Do not auto-close SWU plugin notifications 2015-07-03 13:53:59 +02:00
Gina Häußge
95c26a7850 Fix: Don't automatically persist or return _config_version
Should only ever be read or written by the plugin system itself, not
by on_settings_save or on_settings_load
(cherry picked from commit 77f7d59)
2015-07-02 15:27:35 +02:00
Gina Häußge
885e6f916c Fix: Don't persists checks when saving SWUpdate settings
(cherry picked from commit 8d10be6)
2015-07-02 15:27:27 +02:00
Gina Häußge
d7a86a4d28 Use UTF-8 for _all_ output from sarge
Lines taking from the asynchronous processing of stdout/stderr where
left as str, leading to encoding problems when utf8 characters showed
up in the stream and were being interpreted as ascii encoding.
(cherry picked from commit 9373be3)
2015-07-02 15:27:17 +02:00
Gina Häußge
7b3e0563cc SWUpdate: Only use version cache from same version of OP
When using the version cache only use the version cache if the OctoPrint
version stored within it matches the one of the currently running
instance. Otherwise we might report false positives with regards to
available updates under some circumstances.
(cherry picked from commit bb7b0cb)
2015-07-02 15:26:02 +02:00
Gina Häußge
77f7d59c53 Fix: Don't automatically persist or return _config_version
Should only ever be read or written by the plugin system itself, not
by on_settings_save or on_settings_load
2015-07-02 15:21:05 +02:00
Gina Häußge
8d10be6ac4 Fix: Don't persists checks when saving SWUpdate settings 2015-07-02 15:20:07 +02:00
Gina Häußge
1ab0a00700 Fix for deriving base version for old setuptools
Old versions of setuptools return a tuple for their
pkg_resources.parse_version method instead of a Version object with
a base_version attribute that we can use to retrieve the base version.

So some manually parsing is needed instead.
2015-07-02 10:48:46 +02:00
Gina Häußge
fe35086ad7 PMGR: Make sure we use OP's base version for compatibility
OctoPrint's version might be a prerelease version ("...dev<n>"), we
want that to still be able to pass plugin compatibility checks like the
final release version would, so always use the base version of
OctoPrint's current version for comparison during compatibility checks.
2015-07-01 10:20:09 +02:00
Gina Häußge
bb7b0cbcbd SWUpdate: Only use version cache from same version of OP
When using the version cache only use the version cache if the OctoPrint
version stored within it matches the one of the currently running
instance. Otherwise we might report false positives with regards to
available updates under some circumstances.
2015-07-01 09:19:51 +02:00
Gina Häußge
33bd1acd47 We want to use pep440-post as default version scheme 2015-07-01 08:59:37 +02:00
Gina Häußge
537c205757 Use lowercase when matching extensions
(cherry picked from commit 29cee16)
2015-06-30 19:12:58 +02:00
Gina Häußge
f07b2477f5 Fixed some comments that were outdated
(cherry picked from commit 18816b6)
2015-06-30 19:12:52 +02:00
Gina Häußge
5e5531f6d8 Verify extension of uploaded language packs & plugins
Should be valid zip archives/tarballs. Also use only the extension
of an uploaded plugin archive as suffix for the temporary file that's
used for installing it.
(cherry picked from commit a1ff698)
2015-06-30 19:12:45 +02:00
Gina Häußge
eadc9ee795 Fix: We don't need the shell for pip
(cherry picked from commit 2db3228)
2015-06-30 19:12:37 +02:00
Gina Häußge
29cee16d3e Use lowercase when matching extensions 2015-06-30 19:04:14 +02:00
Gina Häußge
18816b6ea8 Fixed some comments that were outdated 2015-06-30 19:00:56 +02:00
Gina Häußge
a1ff6986ca Verify extension of uploaded language packs & plugins
Should be valid zip archives/tarballs. Also use only the extension
of an uploaded plugin archive as suffix for the temporary file that's
used for installing it.
2015-06-30 18:59:45 +02:00
Gina Häußge
2db32289f3 Fix: We don't need the shell for pip 2015-06-30 18:52:23 +02:00
Gina Häußge
7cd0adb922 Refreshed versioneer again 2015-06-30 15:15:49 +02:00
Gina Häußge
70eb490e02 Merge branch 'dev/versioneerUpdate' into devel
Conflicts:
	.versioneer-lookup
2015-06-30 15:03:04 +02:00
Gina Häußge
711810d18b Switched to new version of versioneer
Versions should now be PEP440 compatible.
2015-06-30 14:57:39 +02:00
Gina Häußge
2a8eea086c Only print command of event handler to log when debug flag is present
(cherry picked from commit 49d28c5)
2015-06-30 08:28:16 +02:00
Gina Häußge
49d28c58b3 Only print command of event handler to log when debug flag is present 2015-06-29 21:08:20 +02:00
Gina Häußge
bb0bfaee56 Fix: Increase max body size for plugin archives
Closes #957
(cherry picked from commit af89097)
2015-06-29 21:01:21 +02:00
Gina Häußge
af89097204 Fix: Increase max body size for plugin archives
Closes #957
2015-06-29 20:59:46 +02:00
Gina Häußge
b8209e8e09 Switch to pkg_resources for compatibility check
Plugin Manager now internally uses pkg_resources.parse_version and
pkg_resources.parse_requirements to check for version compatibility
with plugins from the repository. That will allow to directly use
the OctoPrint version string once it's PEP440 compatible.
(cherry picked from commit 8eb61a9)
2015-06-29 18:24:23 +02:00
Gina Häußge
8eb61a9926 Switch to pkg_resources for compatibility check
Plugin Manager now internally uses pkg_resources.parse_version and
pkg_resources.parse_requirements to check for version compatibility
with plugins from the repository. That will allow to directly use
the OctoPrint version string once it's PEP440 compatible.
2015-06-29 18:08:34 +02:00
Gina Häußge
b3e547c60f Fix: Don't reload page on search form submits
Both file search and plugin repository search reloaded the page when
hitting enter in the search field. This fixes that.
(cherry picked from commit 60043cc)
2015-06-29 17:40:15 +02:00
Gina Häußge
60043ccd1e Fix: Don't reload page on search form submits
Both file search and plugin repository search reloaded the page when
hitting enter in the search field. This fixes that.
2015-06-29 17:39:56 +02:00
Gina Häußge
137db0b17c Updating versioneer & switch to PEP440 versioning 2015-06-29 17:27:15 +02:00
Gina Häußge
1ead6e2d20 Fix: Ensure correct "upload date" for all added files
Local file storage implementation will now "touch" added files to set
modification date to current date, ensuring that files that are just
moved through a custom implementation of file object (e.g. through the
watched folder mechanism) will show with "now" as the upload date.
(cherry picked from commit 5f0c89c)
2015-06-29 10:35:33 +02:00
Gina Häußge
5f0c89c553 Fix: Ensure correct "upload date" for all added files
Local file storage implementation will now "touch" added files to set
modification date to current date, ensuring that files that are just
moved through a custom implementation of file object (e.g. through the
watched folder mechanism) will show with "now" as the upload date.
2015-06-29 10:34:55 +02:00
Gina Häußge
016bdd542a Fix: More flexibility when parsing plugin compatibility
If compatibility information is provided only as a version number it's
prefixed with >= for the check (so stating a compatibility of only
1.2.0 will now make the plugin compatible to all versions that follow
too).

Alternatively the compatibility information may now contain stuff like
">=1.2,<1.3" in which case the plugin will only be shown as compatible
to OctoPrint versions 1.2 and up but not 1.3 or anything above that.
(cherry picked from commit d5692d7)
2015-06-29 10:22:10 +02:00