Commit graph

4205 commits

Author SHA1 Message Date
Gina Häußge
3d3c93c67d Fix yet another settings caching issue
That api endpoint really is a tough nut. ETag calculation now also
takes full settings dump from settings plugins into account, because
those might be providing custom keys through custom on_settings_load
implementations, for which we will not notice any changes if we are
only looking at the effective config.

Of course, the more we put into that ETag calculation, the slower it will
be and the less sense it will make. Somewhat annoying :/
2016-12-01 13:47:41 +01:00
Gina Häußge
1e84f2ee6e Fix handling of new structures in getOnlyChangedData
Not testing if oldRoot was actually set and contained the
key in question could cause issues if a completely new data
structure was sent to the backend that was not mirrored by
the default settings. Things like e.g. complex configuration
items in a by default empty object.
2016-12-01 13:46:20 +01:00
Gina Häußge
4541148aa5 Merge branch 'maintenance' into devel
# Conflicts:
#	CHANGELOG.md
2016-11-30 14:34:21 +01:00
Gina Häußge
e8a4750379 Improved (manually to run) doc test for latest release selector 2016-11-30 14:33:36 +01:00
Gina Häußge
1d0657a8eb Preparing release of 1.2.18 2016-11-30 11:24:50 +01:00
Gina Häußge
65377b396f Added note that jquery and lodash are dependencies of the js client lib 2016-11-28 11:29:17 +01:00
Gina Häußge
a66e6b603f Make sure our command line calls always exit
sarge's "wait_events" is unreliable. If an asynchronous
job is started but stops immediately and raises a sarge
Exception (inside the async thread), the associated
command's event will never be set event though the
process finished. So we'd wait indefinitely here.

We circumvent this by first waiting until the commands
are parsed and processed (p.commands contains
elements), then until said commands are started and then
making sure the command's process is actually set. Only
then do we actually have a background process running
that we'll be able to monitor further down, otherwise
the command immediately failed.
2016-11-25 15:45:43 +01:00
Gina Häußge
528e99898f Better error and subprocess handling
Removed a potential deadlock, added logging for all
raised exceptions, made _to_error more solid and
removed another potential encoding issue when
creating diffs
2016-11-25 14:58:09 +01:00
Gina Häußge
8beedce98f Slight rewording in Cura wizard 2016-11-24 12:56:00 +01:00
Gina Häußge
69412d0b8b Preparing release of 1.3.0rc2 part 2 2016-11-24 12:20:29 +01:00
Gina Häußge
23744cdba9 onWizardTabChange => onBeforeWizardTabChange 2016-11-24 11:56:37 +01:00
Gina Häußge
0f53c1aaa6 Pin tornado dependency to 4.0.2 for now
">=4.0.2,<4.1" will pull in 4.1b and we don't want that due to issue with
that and websocket communication due to permessage-deflate.

While we desperately need to migrate to a newer tornado, due to some
voodoo needed to get large streamed uploads and downloads to work
that is probably not completely straightforward and therefore
something for post-1.3.0-stable release.
2016-11-24 11:45:26 +01:00
Gina Häußge
462ab5aa37 Prevent SWU popup when wizard is open 2016-11-24 11:28:45 +01:00
Gina Häußge
01b221ab30 Prepare release of 1.3.0rc2 2016-11-24 11:08:43 +01:00
Gina Häußge
d37a6a9114 Actually add config subcommand to CLI 2016-11-24 10:55:03 +01:00
Gina Häußge
9875617046 SWU: "busy" spinner while checking for updates 2016-11-23 17:52:16 +01:00
Gina Häußge
daeb3dbc91 Documentation for last_position, pause_position, cancel_position 2016-11-23 17:41:58 +01:00
Gina Häußge
ccf77a5dae Restrict pause_position and cancel_position to relevant GCODE scripts 2016-11-23 17:41:43 +01:00
Gina Häußge
6cc3846512 Add M600 (filament change) to long running commands 2016-11-23 15:53:05 +01:00
Gina Häußge
4ed0ed5f99 Fix working dialog of pgmr and swu being closeable while active
Only the close button should work now
2016-11-23 15:11:35 +01:00
Gina Häußge
5c39e9a8a3 Demote pip upgrade message from stderr to stdout in client output
Having that output stay on stderr and hence in shiny red looks way
too alarming considering that it's only a pip update that is not THAT
critical usually (and we don't want to do it automatically anyhow
considering how often that appears to break stuff).
2016-11-23 14:28:50 +01:00
Gina Häußge
5b910b557e Fixed a rare race condition causing a "settings changed" popup in case of local changes
If the SettingsUpdated event for whatever reason got slightly delayed and arrived AFTER
the save request was already processed, in rare situations it could happen that the
"Settings Changed" popup was triggered even though the settings had already been
successfully saved.

Modified such that we now keep track of if we already saw the SettingsUpdated event
associated with our save request and if not we ignore the next one.

To ensure that we don't get out of sync due to that when a settings update request is
sent, but no settings are actually change, we also now always trigger the SettingsUpdated
event, even in such cases. Clients can use the hashs in the payload to test if something
 actually changed - if necessary.
2016-11-23 11:34:58 +01:00
Gina Häußge
4a0d91315c Fix update of webcam streamURL not being recognized
We used to track our webcam stream URL by the global variable
CONFIG_WEBCAMURL. That's still a left over from the architecture
about four years ago and completely obsolete these days.

Additionally it causes issues now that anything rendered into
the page (as this variable value is through initscript.jinja2)
will not be changed unless the page cache is refreshed.

Taking the stream URL from the settings view model instead
solves that problem and is way cleaner anyhow.
2016-11-22 16:17:00 +01:00
donovan6000
1b9bfc6d04 Inapplicable pip arguments can be blacklisted when installing or uninstalling a package 2016-11-22 14:58:39 +01:00
Gina Häußge
def5fd4ad3 Changed help text slightly 2016-11-22 14:44:17 +01:00
Gina Häußge
9ed5e37fc8 Reduced code duplication as suggested 2016-11-22 14:00:08 +01:00
Gina Häußge
5424d42b60 Merge branch 'feature/timelapse_repeat_frames' of https://github.com/dattas/OctoPrint into pr/dattas/feature/timelapse_repeat_frames 2016-11-22 13:53:51 +01:00
Gina Häußge
8ff1834442 Merge branch 'maintenance' into devel
# Conflicts:
#	CHANGELOG.md
#	src/octoprint/translations/de/LC_MESSAGES/messages.mo
#	src/octoprint/translations/de/LC_MESSAGES/messages.po
#	translations/de/LC_MESSAGES/messages.mo
#	translations/de/LC_MESSAGES/messages.po
#	translations/messages.pot
2016-11-22 13:49:19 +01:00
Gina Häußge
ec04364b47 Preparing release of 1.2.18rc1 2016-11-22 12:47:29 +01:00
Gina Häußge
2fc3819afd Another update of the german translation 2016-11-21 17:43:20 +01:00
Gina Häußge
a24beb25a3 _snippets => snippets - because babel ignores folders starting with _ 2016-11-21 17:43:04 +01:00
Gina Häußge
07bbbff038 Fix error border after successfull install of plugin archive
Was caused by incorrectly resetting the uploadFilename.
2016-11-21 16:25:53 +01:00
Gina Häußge
c9c2946db2 Allow closing of all pmgr notifications & remove on server disconnect 2016-11-21 16:14:09 +01:00
Gina Häußge
8034a4bb98 Merge branch 'maintenance' into devel 2016-11-21 14:39:24 +01:00
Gina Häußge
a88cd9fcfc Copy settings in on_settings_load so we don't mutate them 2016-11-21 13:44:26 +01:00
Gina Häußge
59e4394cdd Allow type specific default values for restricted settings
See #1567
2016-11-21 13:43:53 +01:00
Gina Häußge
d991eab87e Only insert divider in system menu if there are custom commands 2016-11-18 15:01:53 +01:00
Gina Häußge
71581c9c93 Fix deletion of migrated system commands
We need to process the deletion in reverse order, or we'll
delete the wrong (or no) commands due to the changing
list size.
2016-11-18 14:54:02 +01:00
Gina Häußge
7489d2da80 Updated german translation 2016-11-18 14:07:51 +01:00
Gina Häußge
7c1bb5c115 Cache templates per locale, otherwise we might get a language mix 2016-11-18 14:07:31 +01:00
Gina Häußge
b8278b6a93 Don't safe config.yaml when migrating settings overlays 2016-11-18 13:40:25 +01:00
Gina Häußge
7709150a2b Make backup of config before system command migration 2016-11-18 13:39:31 +01:00
Gina Häußge
fc06c91ae8 Auto-migrate manual server system commands in config
If there are custom system menu entries for restart, reboot and/or
shutdown, they are deleted. If the corresponding server command is
not yet configured, the command from the system menu entry is
transfered.
2016-11-18 13:07:19 +01:00
Gina Häußge
2564820d16 Fix ordering of core system commands & slight rewording 2016-11-18 13:05:26 +01:00
Gina Häußge
f83625acba New "octoprint config" CLI
Allows getting and setting settings values
2016-11-18 13:04:59 +01:00
Gina Häußge
97bf331307 Add safe mode that disables all third party plugins
Can be enabled either through new --safe command line
parameter or through server.startOnceInSafeMode in
config.yaml

When running in safe mode the plugin manager will
only allow to disable or uninstall third party plugins. Enabling
third party plugins or installing new plugins is disabled.

That will hopefully allow for more straightforward recovery
in case of a misbehaving plugin.
2016-11-18 13:02:16 +01:00
Gina Häußge
e4d34f4130 Fix logging during settings initialization
We record the messages logged during that time to a recording
log handler, then playback anything we caught after startup.
2016-11-18 10:25:24 +01:00
Gina Häußge
b68ee4df98 If l10n is set on page load, set OctoPrint.options.locale to its value
That way API requests will be made with the locale the page was requested
in.

See #1593
2016-11-18 07:56:56 +01:00
Gina Häußge
0d13c3b439 Add OctoPrint.options.locale and if set send X-Locale header on requests
See #1593
2016-11-18 07:56:49 +01:00
Gina Häußge
1a75dcd5ee Allow locale definition via request header
Important for session less API calls that might return
localized content (e.g. the system commands).

See #1593
2016-11-18 07:56:35 +01:00