Commit graph

4581 commits

Author SHA1 Message Date
Gina Häußge
697df4f3ce And fixed connection accordion toggling again
#1001 said hi once more after fixing the onUserLogged(In|Out) events
not firing...
2017-06-30 09:48:57 +02:00
Gina Häußge
ac3f4d598c Fixed onUserLoggedIn/Out not firing correctly on startup anymore
Introduced by b205e84d4b
2017-06-30 09:39:14 +02:00
Gina Häußge
836fbef6d8 Fixed an error in the temp graph when not connected 2017-06-30 09:24:07 +02:00
Gina Häußge
ce4cf38547 Removed log prefixing again
It caused issues with our line number tracking in the browser
developer tools and I don't see any way to avoid this considering
that we can't adjust the arguments supplied to console.log without in
fact wrapping it :/
2017-06-29 17:37:01 +02:00
Gina Häußge
38a5da1c35 Fix connection accordion again
Slightly different order of things caused #1001 to resurface.
2017-06-29 16:51:04 +02:00
Gina Häußge
b205e84d4b Refactored web startup to minimise risks of race conditions
Under specific circumstances it could happen that the passive login
response was overtaken by a response from an earlier still
unauthenticated request which would then effectively overwrite the
session cookie immediately and hence cause the browser to use its
login session against the server, but without displaying that to the
user. See #1881 for what is probably an issue caused by exactly this
kind of scenario.

Additionally a couple of requests needed to be done a second time
after login, just moments after having done them for an anonymous
user. See #1572 for a request to change this behaviour.

This patch changes the startup order of the web interface like this:

  1. connect to the websocket, postpone any events triggered by
     this (e.g. "fromHistoryData") until 3
  2. perform a passive login, postpone any events triggered by this
     (e.g. "onUserLoggedIn", "onUserLoggedOut") until 4
  3. trigger postponed events from 1
  4. trigger "onStartup" (triggers postponed events from 2)
  5. fetch settings
  6. bind view models etc

A connection close of the websocket will disable event processing on the
socket until it is marked as initialized again by the passive login
processing, which will also be triggered immediately on server connect.

That way under normal circumstances nothing should ever get triggered
in the registered view models that might generated requests to the
server API until a passive login has been done, a server session
initialized and if necessary a user properly authenticated.
2017-06-29 15:42:19 +02:00
Gina Häußge
7ab4d12548 Better error resilience against wrong user manager
Also improved get_class by using importlib instead of complicated
climbing through the whole module tree.
2017-06-29 15:07:17 +02:00
Gina Häußge
f6c3e5991d PMGR: Detect if plugin needs printer reconnect 2017-06-28 10:30:35 +02:00
Gina Häußge
188b59a319 Added id to tabs content div
cc @Salandora
2017-06-27 15:47:39 +02:00
Gina Häußge
b3594e367e Remove superfluous <br> tag from progress dialog output lines 2017-06-27 15:07:00 +02:00
Gina Häußge
12d40122d1 Use wrapt.ObjectProxy for SessionUser wrapper class
Our old manual wrapped didn't properly work in some aspects, this
version now should hopefully take care of most common proxy object
pitfalls.
2017-06-27 15:03:37 +02:00
Gina Häußge
2e11a7b860 Introduced pre-output css class for line based output pres
Easier to just put this on all output pre tags than defining
display:block on the contained spans for all individually.
2017-06-27 11:54:15 +02:00
Gina Häußge
f20185db3a Better handling of timelapse deletion errors
Closes #1975
2017-06-27 11:32:42 +02:00
Gina Häußge
0db323d0c5 Removed unused import 2017-06-26 17:14:03 +02:00
Gina Häußge
639d8d4c5f Perform gcode analysis in subprocess 2017-06-26 16:19:18 +02:00
Gina Häußge
5e0b53b651 Better thread safety for SockJS
Heartbeat messages could still be sent out of turn, causing message
corruption or other weird things. This should hopefully fix this.
2017-06-23 17:56:17 +02:00
Gina Häußge
1ebfa4b1dd New event ToolChange and tool change GCODE scripts
(cherry picked from commit 5f79aa6)
2017-06-23 16:06:44 +02:00
Gina Häußge
35c45df86c Allow multi line commands in sending phase
(cherry picked from commit 1018946)
2017-06-23 14:55:34 +02:00
Gina Häußge
a50e8bbbb5 Merge branch 'improve/temperatureGraphCrosshair' into maintenance 2017-06-22 17:33:09 +02:00
Gina Häußge
4665070601 last_temperatures -> last_temperature (for consistency) 2017-06-22 12:47:55 +02:00
Gina Häußge
b34fc8e05e Merge branch 'improve/temperatureInScripts' into maintenance
# Conflicts:
#	src/octoprint/util/comm.py
2017-06-22 12:45:50 +02:00
Gina Häußge
dad956b5c9 Treat Anet A8 firmware as Repetier firmware
It appears to behave identically and probably is a renamed variant.
That would also explain #1737 and some observations reported in
#1946.
2017-06-19 16:33:33 +02:00
Gina Häußge
981110d4b2 Devel RC release channel should also track Maintenance RCs
That way people don't have to toggle between Maintenance and Devel RCs
just to get _all_ RCs.
2017-06-14 13:52:47 +02:00
Gina Häußge
cbd94a9020 Ignore coordinates outside bed for zoom/centering in gcode viewer
They might be nozzle priming routines which are not actually part of
the model proper and hence it doesn't make sense trying to keep them
visible when zooming in on the model, or allowing them to offset the
model center.
2017-06-13 15:59:30 +02:00
Gina Häußge
77db00a2ea Extend coordinates used for min/max calculation
Both old and new position are relevant, we are extruding from one to
the other.
2017-06-13 15:58:12 +02:00
Gina Häußge
665078e1a4 Better backwards compatibility & disable crosshair on mobile 2017-06-07 14:24:24 +02:00
Gina Häußge
cfae406a4c Fix issue with hover pos being undefined & resizing of plot 2017-06-07 10:59:22 +02:00
Gina Häußge
00c14e6936 First throw at tracking individual data points in the temp graph
See #1640
2017-06-07 10:10:31 +02:00
Gina Häußge
6a1b162e7b Support for temperature autoreporting instead of polling
Now also detects capabilities reported by (extended) M115 output and
if AUTOREPORT_TEMP is available enables it with the configured
autoreport interval and disables active polling.

Implements #1679
2017-06-06 18:46:23 +02:00
Gina Häußge
a2fd39b3c4 Removed some unused variables from StateMonitor 2017-06-06 12:47:38 +02:00
Gina Häußge
bda2fd94e3 More hardening against expected folders being files
See #1953
2017-06-06 10:01:21 +02:00
Gina Häußge
9e207ca8a1 SWU: Force exact version update for OctoPrint when tracking releases 2017-06-02 16:27:25 +02:00
Gina Häußge
5d321926bb Corewizard: Don't load js if not required 2017-06-02 16:06:11 +02:00
Gina Häußge
3d3e0212c6 Corewizard: Disable client if not required 2017-06-02 16:06:00 +02:00
Gina Häußge
e3d44d7d06 Use client default if server default printer profile in unavailable 2017-06-02 16:05:12 +02:00
Gina Häußge
d39c124f35 Allow empty & custom size in print job events
Thanks to @erikheidstra for the heads-up
2017-06-02 14:25:02 +02:00
Gina Häußge
8603ea4b6f Fix stupid typo causing printerProfileManager.set_default
Thanks for the heads-up @erikheidstra!
2017-06-02 14:20:06 +02:00
Gina Häußge
a681048df6 Enable blockWhileDwelling for Malyan printers
See #1941 and #1762
2017-06-01 17:08:28 +02:00
Gina Häußge
d689496802 Fix stupid typo causing unnecessary creation of default profile 2017-06-01 16:29:49 +02:00
Gina Häußge
5a23b46c11 Merge branch 'staging/maintenance' into maintenance 2017-06-01 16:11:50 +02:00
Gina Häußge
2b96e57923 maintenance & staging/maintenance are now 1.3.5(rc1) 2017-06-01 16:09:34 +02:00
Gina Häußge
885e88a5e0 Merge branch 'rc/maintenance' into staging/maintenance 2017-06-01 16:08:30 +02:00
Gina Häußge
fe481e12b3 Prepare release of 1.3.4 (hotfix) 2017-06-01 12:22:23 +02:00
Gina Häußge
cbdf85c27a Fix crash on startup thanks to invalid default profile & auto connect
See #1942

This does NOT fix the root cause of `_default.profile` becoming an
empty file (apparently during migration from config.yaml?), however
since this particular situation was impossible to reproduce so far this
workaround for the consequences will have to suffice for now since we
want a hotfix as fast as possible for 1.3.3.
2017-06-01 12:10:12 +02:00
Gina Häußge
674637f6b2 Merge branch 'staging/maintenance' into maintenance 2017-05-31 16:58:32 +02:00
Gina Häußge
9056f5d610 maintenance & staging/maintenance are now 1.3.4(rc1) 2017-05-31 16:57:10 +02:00
Gina Häußge
b55c4ef5ca Preparing release of 1.3.3 2017-05-31 15:49:01 +02:00
Gina Häußge
b9747d0f0e Fix typo: TRANFERING_FILE
(cherry picked from commit c4fcc59efdd7eb50092098123463ded70642be38)
2017-05-31 11:24:44 +02:00
Gina Häußge
0feae3ba18 Centralized browser detection 2017-05-31 10:45:19 +02:00
Gina Häußge
1cc3ddb03c Add levels & color to browser console log 2017-05-30 17:46:03 +02:00