We also reflect that in the Cura profile import dialog by checking and
disabling modification of the corresponding checkbox if no profiles are
yet available.
Plot area was wrongly sized due to (invisible) X axis tick labels.
We now initialize an empty plot to min/max timestamps of "now" to
circumvent this. Additionally plot was not properly initialized on
initial load of page due to onAfterTabChange not firing for the first
tab.
Also added a bit for tick labels.
Wasn't properly revalidating when an already registered slicer switched
between unconfigured and configured.
Also adjusted data format version tracking on files and slicing API to
match.
We might add fields to things like file entries (e.g. "display") and in
such cases want to refetch the list even if the files itself didn't
change, to make sure those new fields are available to the clients.
See https://github.com/foosel/OctoPrint/issues/2111#issuecomment-337164940
Increased scrollbar width of file list and plugin repository list to
10px (from 5px). Fixed scroll bar hiding itself on initialization due to
alwaysVisible not properly persisting the initial binding.
Enhance knockout binding syntax for slimScrolledForeach: slimscroll
initialization parameters may now be provided during data binding via
the additional slimscroll property accepted as part of the extended
foreach syntax, e.g.
slimScrolledForEach: {data: ..., slimscroll: {alwaysVisible: true, ...}}
Implements #2111
Files (and folders) are still slugified to ASCII for storage on disk,
but now the original filename is stored alongside in metadata.yaml
and used for display in the file list and print status.
The slicing dialog also inherits that display name for use as base
for the suggested GCODE name.
Internally, everything still depends completely on the slugified
ASCII version.
This implements #2094
This would normally not fly at all but we give it a pass here since we
only use that module for auto detection anyhow (and probably not for
much longer since that approach is simply too error prone).
Adapted from
https://github.com/foosel/OctoPrint/issues/2138#issuecomment-334117910
by @dtynan.
Solves #2138 until I come up with something better
If the filename contained a [] pair, the file would not match the glob
pattern used for selecting for deletion.
Backporting the glob.escape function from Python 3.4 and using it here
should fix that. We only use our own ported version if glob.escape
doesn't exist - that should reduce redundant code once we become Python
3 compatible.
If the temperature graph was not on the first tab, the plot would be
initialized without being visible, causing some sizing issues and
alignment issues with the Y axis ticks.
Forcing the plot to only get initialized once visible solves these
problems.
Fixes#2147
That way people clicking too fast on login before the view models are
bound won't be able to make the form submit username and password as GET
parameter to the base URL.
Closes#2108
Otherwise we might run into trouble if we have an OctoPrint instance
running on / and /octoprint2 for example - the browser will send
cookies for both instances to the /octoprint2 instance and whatever
gets processed last will overwrite the value before in Tornado's cookie
processing. This of course will nuke the login session in case of the /
cookie being sent or processed last.
Appending the path/script root to the cookie name solves this, similar
to how we circumvented an identical problem caused by browsers not
distinguishing between ports for cookies.
Solves an issue reported by @mgrl in #2095
That should solve any weird import issues we have when
running gcodeInterpreter.py directly (and hence putting
octoprint.util as first entry into the python path,
causing potential issues with imported modules such as
yaml to catch the octoprint.util.platform module instead
of the actual python platform module).
See reported problem with that by @CapnBry in #2095
Using the win32 API it's possible to prevent the intermediary server
socket from inheriting itself to subprocesses. So let's use that here.
Another bit of the solution for #2090.
There's now a dedicated button for that.
This should get around issues like #2056. Also increased size
of API key display field (where possible). Fixes#2055
Allows preprocessing/sanitizing temperatures as received from the
printer.
Workaround for printers that occasionally report garbage temperature
data, e.g. #2050
Any processes inheriting the open port descriptor of that server will
cause the actual server startup to fail due to the port still being
claimed.
We can't fully prevent this under Windows thanks to fnctl not being
available and win32api being a PITA, and also close_fds on Popen not
being allowed if we also need to redirect stdout/stderr/stdin for a
process. So let's hope hardening against this problem when running
under *nix, adding a bit fat warning to never start a subprocess
during the intermediary's runtime and also moving the only actual
process we so far DID start (analysis backlog processing) to after
Tornado is running will suffice.
Fixes#2035
We were only adding one byte for "\n". That ignored that our regex
could also match "\r\n" or "\r\r" or something like that.
Our split regex now only matches one "\r" or "\n". Empty lines we'll
simply ignore anyhow so no real harm done.
Also, we no longer strip the comments in this step - leave that to
the worker running in its own thread. Not only should that speed
things up a bit, it will also allow us to better debug the worker in
the future.
We were just testing if z_heights[z] was truthy. If the layer index was
set but 0 that wasn't properly detected and let to overwriting our
layer information. Instead check explicitly against undefined.
Closes#2017
* remove some more "fa" classes where they didn't belong
* use "fa-toggle-(on|off)" instead of circles where they were used
to signify toggle actions
* fix SD card icon being too high
Another follow-up to #1915
So far we only supported \n and \r\n, leading to problems with MM
GCODE files generated by Slic3r Prusa Edition which apparently
produces \r line endings for some reason.
Closes#1996
Clicking terminal output (excluding highlighting) will set focus to terminal command
Change fancy functionality style from muted to warning so that it stands out more
We won't support this after all, it's too much of a headache with
regards to the sending queue. Pausing takes longer, cancelling takes
longer, resends get more complicated and so on.
Command expansion in the queuing phase needs to suffice.
E.g. in case of a disconnected thermistor, or when it is really
really cold. Make sure our parsing doesn't get confuse by this and
thinks that
ok T:150.0/210.0 T0:-55.7/0 T1:150.0/210.0
is actually only T and T1 being reported by the firmware, causing
stuff to be wrongly canonicalized thanks to T/T1 being Smoothie's way
of reporting dual extruder setups.
Fixes#2007
Introduced a custom send queue type that actually contains two queues,
one for resends, one for regular lines. A flag indicates whether
lines should be returned from both or only resends. That way we
ensure that as soon as we have an active resend request we ignore
what was already in the queue and only send the lines we need to resend.
Also: PrependQueue => PrependableQueue
Less tracking of offsets and also more similar to how
firmware does this.
We rewrite our current position on tool change to current position
plus tool offset instead of applying it for every single
position change.
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.
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.
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 :/
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.
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.
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