Commit graph

2641 commits

Author SHA1 Message Date
Andy Werner
3bb06a1a33 SW Update check type 'bitbucket_commit' now supports API credentials for private repos 2017-07-03 17:17:43 +02:00
Gina Häußge
8ad165c625 Fix blur of temp input focus on submit
Also separated "clear offset" button in offset editor from input
field, looks better this way.
2017-07-03 16:08:41 +02:00
Gina Häußge
841b86a017 Merge branch 'maintenance' into improve/temperatureInput 2017-07-03 16:07:19 +02:00
Mark Walker
c0c249ece9 Typo: red->read 2017-07-01 10:37:51 -07:00
Gina Häußge
ed6c01c12a Remove current_user from template contexts
That should never have been enabled for our usage scenario in the
first place.
2017-06-30 14:37:37 +02:00
Gina Häußge
e309646504 Prevent unnecessary settings fetch during startup
We fetch settings once explicitly after passive login but before
completed startup. Without this patch we fetched them again after
onUserLoggedIn got fired (if it got fired by the passive login)
during startup. That's not necessary because we did the passive login
before our initial settings fetch, so IF that already logged us in,
our settings fetch already was done with us logged in as well and
the onUserLoggedIn later only tells us what we already knew.
2017-06-30 14:36:18 +02:00
Gina Häußge
96ee80afd2 Only trigger onUserLogged(In|Out) if login state actually changed
This also includes triggering an initial onUserLoggedIn after
initialization if the user turned out to be logged in by passive login.
2017-06-30 14:34:05 +02:00
Gina Häußge
8aec836d22 Minor refactoring of the web interface startup (again)
We still had some concurrent requests triggered through onStartup that
managed to overtake the passive login (and hence nuke the session
data on the client). This should now really not be possible any longer.

Also created a sequence diagram of the new process and linked it from
a lengthy comment.
2017-06-30 11:59:52 +02:00
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
a3ece229f2 Fixed button types & update displayed current offset in dialog 2017-06-21 12:40:59 +02:00
Gina Häußge
fc53febb87 WIP: Improved temperature controls 2017-06-20 16:53:41 +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
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
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
Gina Häußge
33cafbbd8a Make stream timeout adjustable
As suggested by @ntoff in #1937
2017-05-30 17:26:30 +02:00
Gina Häußge
d274a9c73d Fixed a couple of FontAwesome issues
* fa-circle-blank does not exist, replaced with fa-circle-o (see also
    report in #1928)
  * fa-trash-o instead of fa-trash (same look and feel)
  * fa-check instead of fa-check-circle (same look and feel)
  * fixed toggleContent binding to also be able to toggle fa icons
  * fix deletion spinner in file list (was still using old icon-
    classes which of course weren't there anymore and hence not
    toggleable)
  * icons-ul => fa-ul
  * remove superfluous fa class from some places

Follow-up to #1915.
2017-05-29 13:42:11 +02:00
Gina Häußge
c3619a3795 No scary message on autodetect fail 2017-05-24 18:04:11 +02:00
Gina Häußge
dffb33727d More sensible sorting of baudrates for auto detect
115200 is the most likely baudrate candidate for printers, followed
by 250000. Any additional baudrates that were configured are even more
likely.
2017-05-24 17:56:01 +02:00
Gina Häußge
78724163b1 No need for programmer mode for detecting one port 2017-05-24 17:54:30 +02:00
Gina Häußge
b6a09abb83 Fix an issue causing non-gcode commands not to be sent
Introduced by multi-command returns from comm handlers
2017-05-24 17:51:01 +02:00
Gina Häußge
77b6d83e0b Set X-Robots-Tag and remove Server header in responses
Also set robots meta tag in index.jinja2
2017-05-24 16:53:54 +02:00
Gina Häußge
7c6b85a0ad Merge branch 'staging/maintenance' into maintenance 2017-05-24 14:51:24 +02:00
Gina Häußge
ce1541e956 Preparing release of 1.3.3rc3 2017-05-24 13:26:06 +02:00
Gina Häußge
bd1d0e6073 Merge branch 'rc/maintenance' into staging/maintenance 2017-05-24 12:33:40 +02:00
Gina Häußge
76f58e05ec Better fix for #1821
Instead of disabling capturing of postroll by default (which we actually
don't want and doing so was a mistake thanks to misremembering the
meaning of the variable in question), we now properly reset the
default value for that check box (which wasn't properly set only due to
a very stupid typo).
2017-05-24 12:26:14 +02:00
Gina Häußge
2a600d7d00 Fix consecutive timed timelapses without postroll capture
Due to the timer never properly resetting to None only one timelapse
was ever done.

Introduced in 7e2382fed4, covered until
315a80a7a7.

Closes #1934
2017-05-24 11:57:02 +02:00
Gina Häußge
4a84fa95e4 [docs] Fix another typo in the SettingsPlugin docs 2017-05-23 10:15:04 +02:00
Gina Häußge
557c761e80 [docs] Fix a typo in the SettingsPlugin docs 2017-05-23 10:13:04 +02:00
Gina Häußge
10cb60acca [docs] Warn about the need to protect sensitive settings in plugins 2017-05-22 19:24:20 +02:00
Gina Häußge
5e55d637af Don't escape \t, \r or \n in terminal output 2017-05-22 14:06:12 +02:00
Gina Häußge
8942d7d50d Slight rewording for the webcam error message
See #1925
2017-05-19 18:25:40 +02:00
Gina Häußge
0ad09e422d Add stream URL to webcam error message for logged in users 2017-05-19 17:59:54 +02:00
Gina Häußge
0657160389 Different "webcam error" text for non-admins 2017-05-19 17:59:12 +02:00
Gina Häußge
cfde6342a8 Update SockJS to 1.1.2
Also include source maps. While those are stripped when bundling, for
alternative UIs including sockjs they still might make sense.
2017-05-19 12:29:40 +02:00
Gina Häußge
832c27ed18 Filter source maps from bundled assets
At least for now. Might be re-evaluated in the future. URL rewrite
filter for such a case already in place.
2017-05-19 12:28:20 +02:00
Gina Häußge
59d78ba893 Merge branch 'maintenance' of github.com:foosel/OctoPrint into maintenance 2017-05-18 11:20:54 +02:00
Gina Häußge
7770ee3d08 static/assets/vendor => static/vendor
Our static folder is basically an assets folder (it just is named differently).
So let's get rid of the redundant directory level.
2017-05-18 11:12:33 +02:00
Gina Häußge
2d9ad41e49 Moved FontAwesome css into vendor folder & use cssrewrite filter for webassets
That fixes up the relative URLs to the font files and should make updates down the line
a thing of a quick copy and paste (plus allow some more sophisticated dependency
management down the road as well).

Also renamed fonts folder for FontAwesome 3.2.1 from font to fonts, for more
consistency.
2017-05-18 11:10:37 +02:00
Gina Häußge
821156c9d6 Py3: basestring => past.builtins.basestring 2017-05-17 19:01:42 +02:00
Gina Häußge
9e5982be29 Attach on_sent callback to last command only 2017-05-17 18:51:34 +02:00
Gina Häußge
d029abc8f3 Updated docs with an example of multi command expansion 2017-05-17 17:47:58 +02:00
Gina Häußge
7b5848b9c3 Extracted handler result normalization and added tests for it
Caught some more bugs while doing that.
2017-05-17 17:47:57 +02:00
Gina Häußge
53bfbf5acf Refactored things a bit to remove a bit of repetition 2017-05-17 17:47:21 +02:00
Goswin von Brederlow
917c9e54ba Allow octoprint.comm.protocol.gcode.queuing hook to return a list of commands 2017-05-17 17:46:58 +02:00
Davide Depau
d8d9c7fe64 Merge branch 'maintenance' into fa-update 2017-05-17 17:46:01 +02:00
Davide Depau
6c0f2de780 upgrade FontAwesome CSS+fonts to 4.7.0, keeping 3.2.1 as fallback [2/2] 2017-05-17 17:35:49 +02:00
Davide Depau
700975d670 upgrade templates to use FontAwesome 4.7.0 classes [1/2] 2017-05-17 17:35:27 +02:00
Gina Häußge
9fac314d71 SWU: restart asynchronously instead of synchronously
Otherwise we will block ourselves, waiting for the restart command to
complete which it only can when we are no longer there.

Should reduce restart times on update significantly.

Downside is that we no longer can wait for the return code of the
call. However, that should be caught by our UI handler timing out for
the restart and showing an error prompting the user to restart
manually.
2017-05-17 13:44:11 +02:00
Gina Häußge
9dfee34f01 Fix various popup buttons allowing multiple clicks
As suggested by @ntoff in #1914
2017-05-17 13:44:08 +02:00
Gina Häußge
dc8473bc4d Add check for valid job file type to job validation 2017-05-17 13:44:04 +02:00
Ken
c1c75f032d Fixed webcam not loading bug if first/initial tab is "Control"
(cherry picked from commit d66a4f3)
2017-05-17 13:44:01 +02:00
Gina Häußge
9ad180c02a Disable "Upload to SD" ui elements while printing
As suggested by @ntoff in #1914
2017-05-17 13:43:57 +02:00
Gina Häußge
7795320fc8 Allow timelapse config through UI when not connected to printer
That restriction didn't really make sense.

As mentioned in #1918
2017-05-17 13:43:53 +02:00
Gina Häußge
51959319eb PGMR: Fix call to non existing onAlways
Closes #1919
2017-05-16 16:00:40 +02:00
Gina Häußge
6d73e6557b Timelapse: Disable "save as default" along other controls
Fixes #1918
2017-05-15 13:03:40 +02:00
Gina Häußge
4c65313c7f Fix a regression causing job data to be reset on completion of a print
Fixes #1917
2017-05-15 12:40:05 +02:00
Gina Häußge
3fbd477d15 Preparing release of 1.3.3rc1 2017-05-11 15:25:43 +02:00
Gina Häußge
2c73dd36c5 Final fixes before 1.3.3rc1 2017-05-11 15:23:45 +02:00