Commit graph

4822 commits

Author SHA1 Message Date
Gina Häußge
cec8d15b46 Some additions to the docs
* Note that api/job is what you want for info about the selected file
    as promised in #2251
  * Added pause/resume script from
    https://gist.github.com/foosel/1c09e269b1c0bb7a471c20eef50c8d3e
    as example to the gcode scripts section (with disclaimer)
2017-11-29 19:31:56 +01:00
Gina Häußge
38c9840e30 Add note to printer profile editor about offsets
We don't need to define them in the firmware AND in OctoPrint. If they
are already set in firmware we'll otherwise get wonky issues in the
GCODE viewer or when slicing.

Closes #2229
2017-11-29 19:00:00 +01:00
Gina Häußge
f77e49be7f Use new ChainedHunk for JsPluginBundle 2017-11-29 18:53:38 +01:00
Gina Häußge
00cb71898a Some rewording and icons on final wizard page 2017-11-29 18:15:41 +01:00
Gina Häußge
328c08b775 Wrap all plugin's JS assets into same IIFE
As discussed in #2200.

For this to work we've introduced sub-bundles per plugin for the JS
assets. CSS and LESS on the other hand are basically handled as before.
We use a custom bundle class here since it's apparently not possible to
keep a sub bundle from inheriting the parent's filters, thus not
allowing us something like

  packed_plugins [js_plugin_delimiter_bundler]
    packed_plugin_a [js_delimiter_bundler]
    packed_plugin_b [js_delimiter_bundler]
    ...

The individiual bundles per plugin would inherit
js_plugin_delimiter_bundler and we'd get a double wrapper - not helpful.

Instead we now have a modified JsPluginBundle that overwrites
Bundle._merge_and_apply to further wrap the returned hunk.
2017-11-29 17:28:30 +01:00
Gina Häußge
ca7aa322c3 Some cleanup, refactoring & docs 2017-11-29 15:55:33 +01:00
Gina Häußge
5c20e264e2 Feature flag to enable legacy plugin assets
Work around issues like #2246 until the plugins that are affected are
fixed.

To be removed in 1.3.8.

See also #2200
2017-11-29 15:55:09 +01:00
Gina Häußge
aa65671ac7 Always check active flag 2017-11-28 13:05:28 +01:00
Gina Häußge
14bd0632c0 parse_requirements => Requirement.parse
Since we only ever handle one requirement here, the parse_requirements
generator (which btw needs a next m() is not the best choice.

Also extracted install command cleanup into class method and added tests
for that.

cc @markwal
2017-11-28 12:02:43 +01:00
Gina Häußge
d174d7ab80 Temporary fix for #2246 until #2200 is solved 2017-11-27 17:24:40 +01:00
Gina Häußge
a2d38016ec Fix some corner cases of print time formatting
Closes #2242
2017-11-27 12:38:13 +01:00
Gina Häußge
cf25291dee Mark readonly fields readonly instead of disabled
Further fix for FF issues with disabled input fields as tracked in
#2056 and #2196.
2017-11-27 12:23:20 +01:00
Gina Häußge
6d4f8266cd Fix message for synchronous system commands
We managed to swap those m(
2017-11-24 13:46:38 +01:00
Gina Häußge
991dab58d5 Remove experimental extension tree caching 2017-11-24 13:20:50 +01:00
Gina Häußge
0de0e4ea9b Handling of non gcode SD file transfers
No guarantees however that transporting anything BUT gcode via the usual
M28/M29 interface will even remotely work. Note that it most likely
won't work if the transferred file contains an M29 (= end transfer),
just like with transferred GCODE files.

Also note that stuff like config files or some such that might be
transferred might contain lines that are too large to fit into the
buffer of the printer. This is really just to enable plugins to maybe do
some nifty stuff, no official support of streaming arbitrary files to
the printer's SD (for that we'd need WAY more firmware support first).

See jneilliii/OctoPrint-SmoothiewareConfig#1
2017-11-24 13:11:23 +01:00
Gina Häußge
9b3c1947d9 Limit SD transfers to broader machinecode type
See jneilliii/OctoPrint-SmoothiewareConfig#1
2017-11-24 13:08:10 +01:00
Gina Häußge
364d692db2 Support leaf merging for file extension tree
This allows us to add new extensions to existing entries (e.g. a new
extension for gcode files)
2017-11-24 13:07:16 +01:00
Gregers Gram Rygg
b002e41a00 Respond with 411 Length Required when missing 2017-11-24 11:32:07 +01:00
Gina Häußge
f3080daa47 Merge branch 'maintenance' of github.com:foosel/OctoPrint into maintenance 2017-11-24 11:31:44 +01:00
Gina Häußge
06ab173b21
Merge pull request #2239 from alex-gh/faster_checksum
Improve the checksumming speed.
2017-11-24 11:27:06 +01:00
Gina Häußge
26789a2bb7 CPU frequency might be reported as None
Don't die when that's the case.
2017-11-24 11:26:27 +01:00
Gina Häußge
4a5308b4ab Fix plugin detection only finding one plugin
We actually should iterate over ALL of the generator, not just its first
entry m)
2017-11-24 10:51:14 +01:00
alex-gh
f4eb60dc6a Improved the checksumming speed by a factor of 1.4-3.4 2017-11-23 14:04:31 +01:00
Gina Häußge
a0a8d641c3 Merge branch 'doc/SuseLinuxInstallation' of https://github.com/caikn/OctoPrint into maintenance 2017-11-23 10:41:11 +01:00
caikn
e32f469de4 fix typo 2017-11-22 14:04:32 +00:00
caikn
8bc99f928c add installation doc for SLES 2017-11-22 12:52:48 +00:00
Gina Häußge
6221175649 Add note about how to run test suite 2017-11-22 13:19:24 +01:00
Gina Häußge
b252da477c Virtual printer: allow empty/None prepared oks 2017-11-22 12:49:58 +01:00
Gina Häußge
8a977e8777 Some long overdue == vs === view model cleanup 2017-11-21 10:18:46 +01:00
Gina Häußge
65753a0539 Convert to new viewmodel declaration
We've been supporting the new object based view model declaration
format since 1.3.0, time to move the bundled view models towards
actually using it.
2017-11-21 10:17:52 +01:00
Gina Häußge
f1518e6fe6 Use octoprint.__version__ instead of more convuluted option 2017-11-20 18:08:05 +01:00
Gina Häußge
c7e248b142 Fix handling of "missing line number" errors
We so far assumed that a resend request would follow that. Alas, it
won't and we'll simply get stuck due to a missing ack from the printer.
So let's simulate that here to keep things flowing.

Fixes #2226
2017-11-20 18:07:15 +01:00
Gina Häußge
59ca2188d9 Fix resend simulating & add trigger_missing_lineno
* we now don't send the triggered resend/comm errors out of band but
    instead as a response to the next received actual line - that
    prevents us from getting out of sync
  * new trigger_missing_lineno debug function to trigger a missing line
    number error _without_ a resend request for testing fix for #2226
2017-11-20 17:57:00 +01:00
Gina Häußge
c479c5455c Don't log request on uncaught errors in tornado
Might leak information if logs are shared. Still stick to the old
logging verbosity however if running in debug mode.
2017-11-17 12:06:17 +01:00
Gina Häußge
ebfc6f2f26 More dynamic detection of plugin mixins
Instead of hardcoding a list of supported mixins, we now instead define
a base class (or a list thereof) from which mixins might inherit and use
inspection to determine the set of mixins each plugin implementation
implements. Not only will that reduce the risk of forgetting to add a
new mixin to the whitelist, but it will also allow mixins defined by
plugins.
2017-11-13 16:01:37 +01:00
Gina Häußge
0b1db60d8b Easier copying of terminal contents 2017-11-13 14:10:54 +01:00
Gina Häußge
f9c738541f Workaround: temperature select not working in Edge
As suggested by @Mikk36 in #2214.

Closes #2214.
2017-11-13 13:51:27 +01:00
Gina Häußge
6c21911eb0
Merge pull request #2217 from Depaulicious/patch-1
Fix __future__ import in util
2017-11-13 10:09:24 +01:00
Davide Depau
fd7fdec565
Fix __future__ import in util
This syntax is accepted by CPython, but it doesn't work on PyPy.
2017-11-12 17:17:08 +01:00
Gina Häußge
b892b43ee1 Plugin metadata for OctoPi Support plugin & fix 2017-11-10 19:14:33 +01:00
Gina Häußge
14c1dfe9a3 New command "octoprint config effective" 2017-11-10 19:08:24 +01:00
Gina Häußge
1180e4e27b Fix & extend environment detection on Pi 2017-11-10 18:27:52 +01:00
Gina Häußge
b2d70de144 Environment detection & logging on startup
Incl. OctoPi version & RPi model through bundled plugin that only
gets loaded if OctoPi is detected.
2017-11-10 17:32:59 +01:00
Gina Häußge
0bb343e1d3 Sort timelapses by mtime instead of ctime
Otherwise we get bad sorting after copying over the files from another
instance (e.g. after backup/restore as described on the wiki).
2017-11-10 13:25:16 +01:00
Gina Häußge
92b048c789 Reset temperature data on disconnect 2017-11-10 13:03:36 +01:00
Gina Häußge
a6eac3911b Reset temperature offsets on disconnect
Fixes #2203
2017-11-10 12:40:58 +01:00
Gina Häußge
80bc82df55 Protect against broken packages in python env
As seen in https://groups.google.com/forum/#!msg/octoprint/DyXdqhR0U7c/kKMUsMmIBgAJ
a broken entry_points.txt in some arbitrary Python package installed in
the same python envrionment as OctoPrint can make our whole plugin
detection fail and hence interrupt regular server startup.

This adds better protection against such cases.
2017-11-10 11:14:50 +01:00
Gina Häußge
651a8f315b Strip query params from displayed link URLs
Looks to chaotic otherwise.
2017-11-10 10:50:25 +01:00
Gina Häußge
69f9c523f9 Add utm tags to announcement links 2017-11-09 10:49:39 +01:00
Gina Häußge
2364474ea6 Docs: Fix language on code-block & indentation 2017-11-08 18:10:37 +01:00