Commit graph

4782 commits

Author SHA1 Message Date
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
Gina Häußge
00067768da Docs: PyCharm run config with dependency update 2017-11-08 18:08:06 +01:00
Gina Häußge
3ef97bf4d7 Update psutil version 2017-11-06 17:09:16 +01:00
Gina Häußge
5aad696c5c Do not enable timelapse if settings are missing
If snapshot url and/or ffmpeg path are not set, the timelapse cannot
work regardless of what type has been configured.

So if the current configuration still contains a timelapse type other
than "off" but snapshot url or ffmpeg path are unset, force a disabled
timelapse.

Fixes #2206
2017-11-06 12:24:19 +01:00
Gina Häußge
9837f67140 Small adjustments in webasset filters
* Add comment with source file to JsDelimiterBundler and
    JsPluginDelimiterBundler
  * Include source file name in JsPluginDelimiterBundler catch
    block and use log.error instead of console.error
2017-11-06 11:39:11 +01:00
Josh Major
dc53942015 Added plugin Javascript isolation 2017-11-04 10:08:04 -05:00
Gina Häußge
79581c390a Prefer plain pip over git for updating OctoPrint
At least unless we've selected git based tracking over release tracking.

This should greatly reduce the likelihood of not being able to update
due to some git repository corruption issues, as has happened to some
people in the past.
2017-11-03 16:31:21 +01:00
Gina Häußge
c30e54d75c Slight rewording/typo correction 2017-11-03 14:55:55 +01:00
Gina Häußge
55adb7ca33 Support sub codes for auto upper casing too
If either the full code or just the main code are blacklisted, only
upper case the code. Otherwise also upper case the parameter list.

In any case push originally entered command to history, not the
modified one.
2017-11-03 14:48:45 +01:00
Gina Häußge
980b72607e Update AUTHORS.md
Fixed one entry and added @pbackx
2017-11-03 12:57:33 +01:00
Peter Backx
ce16f861b3 Implemented @foosel's suggestions + made the blacklist settings actually work [#1026]
(cherry picked from commit 1857f07)
2017-11-03 12:44:25 +01:00
Ishwar Agarwal
51406b7c42 Auto uppercase Gcode except commands in configurable blacklist
Added new config setting: auto uppercase blacklist that is configurable
in the advanced option of the serial tab, with M117 included in the
default settings of the blacklist. Changed the sendCommand method in the
TerminalViewModel to auto uppercase the entire gcode command except when
gcode is in the blacklist. Updated documentation to include the default
auto uppercase blacklist command M117.

Resolves: #1026

(cherry picked from commit dbf7af1)
2017-11-03 12:44:05 +01:00
Gina Häußge
2fcbf49348 Docs: Some small changes as followup to #2176 2017-11-03 11:33:47 +01:00
Gina Häußge
5f34d5df27 Docs: Update mermaid to fix deprecation warning 2017-11-03 11:31:15 +01:00
Peter Backx
a0df4e78b5 Fixing Sphinx warnings during doc generation 2017-11-03 11:11:52 +01:00
Gina Häußge
772ee76e76 More hardening against invalid requests
See #2189
2017-11-02 09:36:53 +01:00
Gina Häußge
532ac0264d Force https index URL in requirements.txt
Also an additional measure against #2193
2017-11-01 16:15:18 +01:00
Gina Häußge
caaaa2e4e9 Fix temperature autoreport after external reset
We didn't reset the capability flag and also didn't resend M155. Now we
do at least the latter if we detected that the printer supports
temperature auto reporting earlier.
2017-10-30 12:59:43 +01:00
Gina Häußge
02aad445aa Hardening against system.actions = null
See #2187
2017-10-30 12:36:09 +01:00
Gina Häußge
bf7d4173cd Fix auto-adjust of temperature y axis
Thanks @Salandora for the heads-up
2017-10-27 14:22:03 +02:00
Gina Häußge
0ff0da4a7b Merge pull request #2182 from kantlivelong/invalid_tool_temp_fix
Handle non-[existent/functioning] tools
2017-10-27 13:48:41 +02:00
Shawn Bruce
b2552795dc Set tools actual/target to 0 if they dont exist. 2017-10-26 13:12:38 -04:00
Shawn Bruce
4b5eff5ec6 Don't set target temp for tools that do not exist. 2017-10-26 12:42:55 -04:00
Gina Häußge
bedcbb80be Set a minimum delay of 1s between snapshots
Followup to #2067
2017-10-26 16:38:40 +02:00
Gina Häußge
09509ca61d Refactor timelapse form & add reset button 2017-10-26 16:33:00 +02:00
Gina Häußge
8bf3f4ff50 Rate limit snapshots on for z-timelapses
This is to prevent against an endless stream of snapshots when
accidentally printing a vase mode file despite the warning.

As mentioned in #2067
2017-10-26 16:03:54 +02:00
Gina Häußge
2d925a2665 Synced with setup.py 2017-10-26 14:56:57 +02:00
Gina Häußge
490ef61e19 If serial.log is disabled, log how to enable it
That will hopefully help a bit against the endless stream of "serial
.log was empty" statements on the bug tracker. Or not. Here's hope.
2017-10-26 13:13:21 +02:00
Gina Häußge
a1548e1c1d Fix issue in M115 parser
If FIRMWARE_NAME is not there, but NAME is neither, we'd run into an
exception due to the Malyan detection. Not anymore.

Fixes #2181
2017-10-26 13:12:09 +02:00
Gina Häußge
77e48335da Virtual printer: support config of reset lines
Also updated config docs accordingly.
2017-10-26 13:10:54 +02:00
Gina Häußge
14b8fd7fa5 Only send "deactivated" status if password matches 2017-10-25 17:30:56 +02:00
Gina Häußge
0afa854763 Support a centralized plugin blacklist (opt-in)
A centralized plugin blacklist read from plugins.octoprint.org on server
start now allows us to stop plugins from being loaded that are known to
cause severe issues with OctoPrint's regular operation.

Blacklist entries can be restricted for specific plugin versions &
OctoPrint versions, allowing for very granular control of any kind of
blocking.

Additionally users may disable blacklist processing in general (an
opt-in wizard and a new section in the settings have been added) and
at server start via the new --ignore-blacklist parameter available for
"octoprint serve" and "octoprint daemon".

If a plugin is blacklisted, OctoPrint will not even import the
plugin module in question (if only a plugin key is specified OR a key
and a version and the plugin's version is already known during import
time, which is the case for plugins loaded from entry points) or at the
very least stop the plugin from being enabled (if a plugin key and a
version is specified and the plugin's version is only known after
loading, which is the case for plugins loaded from directories).
2017-10-25 17:29:00 +02:00
Marc Hannappel
3d1f3be4fc Make sure that deactivated Users can't login 2017-10-25 14:40:49 +02:00
Gina Häußge
38c410f80f New sub command "octoprint safemode"
Sets server.startOnceInSafeMode flag to true. Probably easier for a lot
of people than editing a config file or running OctoPrint manually from
command line, in case the built-in "Restart in safe mode" system command
is not an option.
2017-10-24 13:23:10 +02:00
Gina Häußge
46bd2ce7e9 Fix "octoprint config" sub command 2017-10-24 12:31:44 +02:00
Gina Häußge
10fc631700 More error resilience against broken view models
We so far only protected the binding process itself against errors
triggered inside view models. Now we are also more resilient against
issues arising in view model callbacks like onBeforeBinding,
onBoundTo and onAfterBinding as well as exceptions during plugin
instantiation itself.

Triggered by jneilliii/OctoPrint-TPLinkSmartplug#19 which was also
reported on OctoPrint's tracker as #2168, #2170 and #2171 and on OctoPi
as guysoft/OctoPi#427.
2017-10-24 10:37:25 +02:00
Gina Häußge
8f78784be3 Add safety warning to first run wizard
There are too many printers out there with crappy electronics that are
just waiting to go up in smoke, and people keep leaving those alone
because "they are monitoring them via OctoPrint, so nothing can happen".
So let's add a safety warning, in the hopes that will bring at least
some people to their senses or at the very least force them into making
the conscious decision to blow all warnings into the wind.
2017-10-23 18:41:42 +02:00
Gina Häußge
4479dd0222 Fix API key copy function in user list
Was firing on page load instead of only when clicked m(
2017-10-23 15:42:17 +02:00
Gina Häußge
9466e5d001 Some cleanup and renaming 2017-10-23 13:51:00 +02:00
Gina Häußge
4b3d883639 Don't evaluate onWebcamLoaded more than once
Firefox for some reason keeps triggering the event and we don't want to
do unnecessary work on each trigger (and flood the log with debug
statements).
2017-10-23 13:51:00 +02:00
Gina Häußge
4439f5aad0 Workaround for a Firefox bug
Firefox doesn't trigger dragleave if the mouse leaves the browser
window to another window on top during an active drag. That leaves
OctoPrint stuck with the drag-n-drop overlay.

Adding a timeout for dragover for only Firefox that clears the overlay
solves this issue.

Solves #2166
2017-10-23 13:51:00 +02:00