Commit graph

3112 commits

Author SHA1 Message Date
Gina Häußge
cb8167a25a Merge branch 'fix/atomicWrites' into devel 2015-10-07 17:45:20 +02:00
Gina Häußge
85e6ae8e82 Fixed a unit test that broke by switching to atomic_write 2015-10-07 17:45:07 +02:00
Gina Häußge
4017f96ed5 Merge branch 'fix/contentTypeForDownloads' into devel 2015-10-07 17:22:21 +02:00
Gina Häußge
859ea0d0e4 Added mime type guessing for downloads to Tornado 2015-10-07 17:19:18 +02:00
Gina Häußge
236f87ca23 Merge remote-tracking branch 'origin/devel' into devel 2015-10-07 12:29:11 +02:00
Gina Häußge
b458759159 Merge branch 'fix/wrongEtagForDownloads' into devel 2015-10-07 12:25:52 +02:00
Gina Häußge
9cf21aa036 Also set caching headers for downloads to discourage client-side caching
At least if necessary (added new boolean flag to the constructor of
LargeResponseHandler for that). While at it also rename UrlForwardHandler
to UrlProxyHandler (it does not forward, it proxies) and make it aware of
ETag and Expires headers.
2015-10-07 12:25:25 +02:00
Mark Walker
3aa4c8f6c6 Add S255 parameter to M106 for "Fan On"
Bit of a debate with some gcode purists. RepRapPro demands an S
parameter.  Adding S255 should be backward compatible with the firmwares
that recognize M106 as full on. As with other issues, it'd be nice to
have something more to go on here than the reprap wiki and firmware
source code.
2015-10-06 14:07:08 -07:00
Gina Häußge
60ce959909 Merge branch 'fix/atomicWrites' into devel 2015-10-06 18:41:04 +02:00
Gina Häußge
78d8c18a82 Merge branch 'fix/wrongEtagForDownloads' into devel 2015-10-06 18:40:55 +02:00
Gina Häußge
637adc3095 Fix: LargeResponseHandler was wrongly caching ETag value
ETag values returned with download responses were cached internally within
the LargeResponseHandler class, with the file's path as key. That let to
problems once the content changed and hence the ETag value actually
becoming invalid. Since the path however stayed the same, the same ETag
value for the modified file was assumed and a 304 Not Modified response
was generated.

This patch changes the behaviour of LargeResponseHandler to use
the last modified date of the file as the ETag value and alternatively allowing
an etag generator function to be provided as constructor parameter as well
to use for calculating (or disabling) the ETag header dependant on the
situation.
2015-10-06 18:19:53 +02:00
Gina Häußge
a6c21c4985 Merge branch 'fix/utf8BomResilience' into devel
Conflicts:
	src/octoprint/static/js/app/dataupdater.js
	src/octoprint/util/comm.py
2015-10-05 19:58:01 +02:00
Gina Häußge
45c92cb1f4 Fix: Open GCODE files als utf-8, replacing encoding errors
Also detect files that contain a BOM and strip it.
Internal handling of GCODE file contents switched to unicode.

 Should take care of #1077
2015-10-05 19:43:40 +02:00
Gina Häußge
f83d5aa89f Fix: Use atomic writes for all save processes
That includes uploaded files, profiles, caching files, settings and user
directories.
2015-10-05 18:07:43 +02:00
Nicanor Romero Venier
c050f6a467 Merge branch 'dev/dynamicMaxTemp' into devel 2015-10-05 16:04:08 +02:00
Gina Häußge
abf073340f Fixed reporting of duration needed for capturing timelapse postroll
Needs to be calculated differently for time based and z-triggered. Capture interval
was not taken properly into account.
(cherry picked from commit 9284ff4)
2015-10-02 18:22:44 +02:00
Gina Häußge
918ffa2557 Refactored timelapse core
Capturing is now queue based, rendering will not start until all images have been captured,
and timed postroll does not depend on system time anymore.

Also refactored some of the names to be python naming compliant while at it.
(cherry picked from commit 4f5dc70)
2015-10-02 18:18:31 +02:00
Gina Häußge
e9074e127e Added a couple of changelog entries 2015-10-02 18:13:40 +02:00
Gina Häußge
9284ff4086 Fixed reporting of duration needed for capturing timelapse postroll
Needs to be calculated differently for time based and z-triggered. Capture interval
was not taken properly into account.
2015-10-02 15:14:05 +02:00
Gina Häußge
5644b5dc01 clientlib: Fixed some refactoring errors still referring to exports var
Closes #1079
2015-10-02 14:26:51 +02:00
Gina Häußge
a28198edef Timelapse API couldn't yet cope with JSON requests 2015-10-02 13:16:58 +02:00
Gina Häußge
874ebde069 Fix: make a deep copy of temp profiles and terminal filters
Otherwise changes to the observable will write into the last received values,
making the changes undetectable.
2015-10-02 10:18:30 +02:00
Salandora
ac6cfbc0ea Stopped GCodeViewer from rendering if GCode Viewer tab is not active
Anything else is normally processed
(cherry picked from commit 426e9f3)
2015-10-01 17:31:46 +02:00
Gina Häußge
6a11f4a4d8 Fixed API key reset after reconnect 2015-10-01 16:03:16 +02:00
Gina Häußge
085ab77c57 Added system API to client lib and migrated users to it 2015-10-01 14:57:41 +02:00
Gina Häußge
8875f257ea Merge branch 'devel' into dev/clientlib
Conflicts:
	src/octoprint/server/api/__init__.py
	src/octoprint/static/js/app/viewmodels/navigation.js
2015-10-01 14:22:15 +02:00
Gina Häußge
1837c74e8e PMGR: Show restart button on notification if restart command is configured
This will directly offer a "Restart Now" button on the "a restart is required" notification
for plugins which cannot be directly enabled/disabled without a restart, but only if
the restart command is configured on the server.

On click a confirmation dialog will be shown.
2015-10-01 14:20:37 +02:00
Gina Häußge
950b1c2355 Only show divider between core & custom commands if there are core commands 2015-10-01 14:19:00 +02:00
Gina Häußge
97e8326768 Only try to rewrite PNotify confirm buttons if buttons are actually configured 2015-10-01 14:16:24 +02:00
Gina Häußge
6ab44849cd Extracted system commands into their own proper API & ViewModel 2015-10-01 14:05:23 +02:00
Gina Häußge
31bc7c1f3e Helper method for creating notifications with only one confirm button
PNotify always merges the default buttons and the ones provided. Just settings the default
to containing no buttons was no option since plugins might already depend on the so far
obligatory Cancel button being present. The helper allows to create one buttoned
notifications without touching the defaults.
2015-10-01 10:08:24 +02:00
Gina Häußge
be79cf289e Merge branch 'maintenance' into devel 2015-09-30 16:00:56 +02:00
Gina Häußge
5cc8ec5cc3 Better wording for plugin system startup & sorted plugin list of ALL plugins 2015-09-30 16:00:32 +02:00
Gina Häußge
982f24fe31 PMGR: Better wording of "pip unavailable" message 2015-09-30 15:59:08 +02:00
Gina Häußge
0a1816e52f Better error reporting in PipUtil for errors during pip setup detection 2015-09-30 15:58:38 +02:00
Gina Häußge
b432496b7f Merge branch 'devel' into dev/clientlib 2015-09-30 14:40:46 +02:00
Gina Häußge
2926b5c8d5 PMGR: only mark as pending (un)installed if restart is needed 2015-09-30 14:30:10 +02:00
Gina Häußge
fdcc6ac367 PMGR: Only add --user flag if not running in a virtual env 2015-09-30 14:25:06 +02:00
Gina Häußge
2eb80c550f PMGR: Disable plugin remove button if plugin is not managable 2015-09-30 13:44:58 +02:00
Gina Häußge
ca587454df PMGR: Fixed marking of plugins
Plugins can now (again) show if they are pending installation,
uninstallation and also if they are managable at all.
2015-09-30 13:37:27 +02:00
Gina Häußge
e64975c85c PMGR: Debug output in frontend to indicate venv 2015-09-30 13:36:45 +02:00
Gina Häußge
4a97864e01 PMGR: Added option to force use of --user flag 2015-09-30 13:36:00 +02:00
Gina Häußge
28fc7d74f4 Made plugin marking in PluginManager more flexible
Now supports arbitrary markers for plugins. Also added a method
to check if a plugin was marked with a specified marker.
2015-09-30 13:33:25 +02:00
Gina Häußge
fbfac4b569 PluginManager also scans user site packages
In case the user site packages are not yet part of the used
working set OR the sys path and ENABLE_USER_SITE is true, the
manager will now make sure that the folder is searched for plugins
as well upon plugin reload.

This is necessary since Python will not automatically include the
user site directory upon firing up the program in case there's
nothing installed to it/it doesn't exist. If a plugin is installed
during run time with --user that will lead to it not being found,
which is undesirable. Hence run time manipulation of sys.path and
the workingset becomes necessary.
2015-09-30 13:30:39 +02:00
Gina Häußge
10db8c9577 PluginManager now marks plugins as managable
Managable currently pretty much only means "uninstallable".

Plugins are managable if their installation location is writable
and - if they are installed from an entry point and OctoPrint is
running in a virtual environment - within the bounds of the virtual
environment (because otherwise pip will not allow to uninstall).
2015-09-30 13:28:58 +02:00
Gina Häußge
7c5fe46f4a More intelligence for PipUtil to determine when to use --user
Includes a force_user (and a force_sudo) parameter.
2015-09-30 13:27:24 +02:00
Nicanor Romero Venier
4a7c81d1c6 Added offset to max Y in temperature chart 2015-09-30 09:20:40 +02:00
Nicanor Romero Venier
2674741797 Change the max temp of chart dynamically 2015-09-29 19:08:22 +02:00
Gina Häußge
6ed96764e1 Merge branch 'devel' into dev/pipUserParameter 2015-09-29 16:41:11 +02:00
Gina Häußge
79b8639135 Fix: Use adjusted pip arguments in execute method 2015-09-29 16:38:26 +02:00