Commit graph

432 commits

Author SHA1 Message Date
Gina Häußge
f1cf482919 Adjusted metadata of bundled plugins 2017-03-30 14:09:12 +02:00
Gina Häußge
18e14aa412 Support "disabling unrecommended" for bundled plugins
* Extended plugin metadata by new property, only evaluated for bundled
    plugins.
  * Adjusted plugin manager to evaluate new metadata and add
    confirmation dialog with details when attempting to disable such
    a plugin.
2017-03-30 14:08:47 +02:00
Gina Häußge
c3ad1d3691 Announcements: Various improvements
* Added combined OctoBlog feed, replacing news + spotlight (+
    octoprintonair), added corresponding config migration
  * Subscribe to all registered feeds by default
  * Added config button to announcement reader
  * Added note how to edit announcement subscriptions to notifications
  * Auto-hide announcements on logout
  * Order channels server-side based on new order config setting
2017-03-30 12:40:57 +02:00
Gina Häußge
fda67f48ff Allow users to ignore update notification & setting to disable outright
Old default behaviour of showing logged in users the update
notification stays default, but can now be disabled via the software
update plugin settings.

Additionally added the ignore button to the notification for users as
well (and made ignore entry in local storage user specific to still
show notification to other logged in users), plus a small hint that
in order to apply updates an admin is needed. Additionally now hiding
the notification on log out.

Closes #1739
2017-03-29 14:47:49 +02:00
Gina Häußge
517fd6f3ab Auto detect Malyan firmware and configure comm layer
Should close #1762
2017-03-24 16:55:54 +01:00
Gina Häußge
6e793c2ba3 Don't mark "can't clean" messages from setup.py clean as error
Might confuse users to see that marked up like an error when it's
perfectly normal for some kinds of installs simply because the
specific build folders never were created in the first place.
2017-03-10 11:36:49 +01:00
Gina Häußge
136736d307 Reset line numbers if printer sends "start" when operational
Might have been an external reset of the printer we didn't otherwise
detect, and unless we reset the line numbers we'll now be off and run
into resend requests.

Solves #1676
2017-03-09 14:35:07 +01:00
Gina Häußge
20e1219d9e Virtual printer: configurable ok format 2017-03-01 15:48:36 +01:00
Gina Häußge
2198add8e6 SWU: Refresh cache on startup & prevent concurrent refresh & fix hash 2017-02-24 11:56:02 +01:00
Gina Häußge
e1eaf4eb8e comm: More resilience against garbage on the line during connect
* leading and trailing null bytes will now be stripped
  * while connecting, a "wait" will also trigger switch to connected
    state - relevant when connecting without reset and initial "ok" for
    M110 gets mangled
  * extended virtual printer by new options to test the above:
      * mangled "ok" can now be injected via "preparedOks" setting and
        prepare_ok DEBUG command
      * simulated reset lines on beginning ("start" etc) now only sent
        if new setting "simulateReset" is true

Should fix #1770
2017-02-20 11:57:47 +01:00
Gina Häußge
216f05d553 Hibernate communication with printer during active G4 on Repetier
Should hopefully solve #1506
2017-02-17 13:52:16 +01:00
Gina Häußge
b2229ae24a SWU: Ignore empty or None configs 2017-02-14 15:03:20 +01:00
Gina Häußge
6963e5e495 SWU: We need to do that overwrite protection differently
Only replace data from config.yaml with merged results once everything
trying to overwrite stuff is filtered out.
2017-02-14 12:52:07 +01:00
Gina Häußge
7b6642f7c2 SWU: Better resilience against overwriting of update configs
Don't allow overwriting of "octoprint" config through plugins, don't
allow overwriting of already registered configs unless id to register
matches plugin identifier (in which case the already registered config
was probably a case of a copy-paste-error from another plugin).
2017-02-14 11:14:03 +01:00
Gina Häußge
5d97dc4b40 Better resilience against broken software update configs
Fixes #1773
2017-02-14 10:42:02 +01:00
Gina Häußge
eaadf8743b Allow multiple instances of the JS client
We now have a global OctoPrintClient, which is the class from which
all clients are derived, and a global OctoPrint, which is a single
instance already setup and ready to use in case we only need one.

It would be cleaner to have clients create that singular instance
themselves, but we need to maintain backward compatibility for now
with how we established the client to work with the 1.3.0 release.

New clients can be create with

    client = new OctoPrintClient({ /* options */ });

Alternatively the options can be left out and set at a later point:

    client = new OctoPrintClient();
    /* ... */
    client.options = { /* options */ };

Individual client components register themselves with OctoPrintClient
via OctoPrintClient.registerComponent(name, component) from the
component JS files. Just like before their instances are then
available in the individual client instances under "<client>.<name>",
 e.g. "OctoPrint.files".

Plugin components register themselves with OctoPrintClient via
OctoPrintClient.registerPluginComponent(name, component) from the
component JS files. Just like before their instances are then
available in the individual client instances under "<client>.plugins
.<name>", e.g. "OctoPrint.plugins.softwareupdate".

This should make it possible to create dashboard pages utilizing the
JS client that monitor the status of multiple OctoPrint instances,
without workarounds such as having to swap out the options globally
before each request.

See #1681 for the corresponding discussion.
2017-01-26 14:59:56 +01:00
Gina Häußge
b0cd742bf4 Fix UMD pattern 2017-01-26 14:59:54 +01:00
Gina Häußge
7ab3eabe0f Support for shared nozzle setups
Support multi-extruder setups that share a single nozzle and heater,
like the E3D Cyclops, Diamon hotend or probably the upcoming Prusa Mk2
multi-extruder upgrade.

The Control tab will still allow tool switching and extruding for
the configured extruders, the Temperature tab will only display
one hotend temperature though.

Printer profiles have been extended by a new option
extruder.sharedNozzle that defaults to False. Extruder offsets are
not displayed in the profile editor if that setting is checked and
reset to (0,0).
2017-01-26 13:33:42 +01:00
Gina Häußge
9250cd0c3b Whitespace, comments & added @eyal0 to AUTHORS.md
(cherry picked from commit c7f67cc)
2017-01-24 11:38:52 +01:00
Eyal Soha
6b2f28240e Ignore a leading v or V in github release tags.
This fixes foosel/OctoPrint#1723 .

(cherry picked from commit f1c3829)
2017-01-24 11:38:46 +01:00
Gina Häußge
a948050c54 SWU: Fixed update configs without restart 2017-01-19 14:07:04 +01:00
Gina Häußge
0d76df2cd5 SWU: Fixed python_checker and python_updater 2017-01-19 14:06:33 +01:00
Gina Häußge
3b5c2fe519 SWU: Config version 4 didn't properly migrate old commands -> version 5 2017-01-19 12:33:45 +01:00
Gina Häußge
6f5ee4d291 Fixed doctests of software update version checks 2017-01-19 12:33:44 +01:00
Gina Häußge
507ddde9dd Improved error resilience in plugin repository handling 2017-01-19 12:33:43 +01:00
Gina Häußge
caa84d7918 Don't kill manual software update configs during migration
See lengthy comment in source added through this commit for details.
2017-01-19 12:11:01 +01:00
Gina Häußge
20cd13904d Cura: Fix selection of which start/end gcode to choose
So far the plugin selected the gcode script corresponding to the number of
extruders configured in the printer profile. After a close look into the
implementation in Cura itself, prompted by #1708, it turns out that this is
in fact wrong.

Cura selects the gcode script to use based on the maximum of the number of
extruders needed for printing the models in the scene and the minimum number
of extruders needed for generating support (if support extruder is "both" or "first"
or there is only one extruder, that's 1, if it's "second" and there is more than one
extruder, it's 2).

This commit changes the plugin's implementation to mirror this implementation.
The difference to Cura is that we have the number of extruders needed for the
models in the scene hard coded to 1 since we only support STL right now which
can never contain more than one object. If we ever decide to support merging of
multiple STLs into one single multi-extruder print or other model files like AMF
or OBJ from OctoPrint's slicer support, we need to change this.
2017-01-13 12:54:01 +01:00
Gina Häußge
95e4ad82b4 Cura: Fix off-by-one error for placeholder replacement
Affected print_temperature and filament_diameter placeholders.

E.g. `print_temperature2` was wrongly attempting to fetch `print_temperatures[2]`
 instead of `print_temperatures[1]` (0-based-indexing!)

 Partially fixes #1708
2017-01-13 11:25:08 +01:00
Gina Häußge
071c32fff1 Ported fix of solid layer count from Ultimaker/CuraEngine#140
Fixes #1692
2017-01-11 16:15:43 +01:00
Gina Häußge
7c74594f06 Adjusted Cura profile handling to match latest Cura Legacy version
* Added/changed mappings of profile to engine settings to
    match Cura Legacy mapping:
    * perimeterBeforeInfill: taken from perimeter_before_infill (new,
      fixes #1693)
    * skinSpeed: taken from solidarea_speed (new)
    * raftAirGapLayer0: sum of raft_airgap and raft_airgap_all
    * raftAirGap: taken from raft_airgap_all (new)
    * raftFanSpeed: changed to 0
    * raftSurfaceThickness: taken from raft_surface_thickness (new)
    * raftSurfaceLinewidth & raftSurfaceLineSpacing: taken from
      raft_surface_linewidth (new)
  * Mach3 Gcode Flavor replaces S parameter with P parameter in
    temperature commands within generated GCODE, like in Cura
    Legacy
2017-01-11 14:50:09 +01:00
Gina Häußge
f20e985d0d profile => slicing_profile & removed filament 0 check
If the slicer returns values for a tool we want it in our analysis
result, even if it's zero. That way the result will be the same as
if we have our own built in gcode analyser take a look at the
file.

(cherry picked from commit 818ae92)
2017-01-11 12:04:13 +01:00
derpicknicker1
58f934e2c1 Fix issue in getting file metadata after slicing
This fixes the issue that there were no informations about filament
usage in metadata after slicing with cura plugin. Trying to call
profile.get_float("filament_diameter") ended in en exception with
message " 'module' object has no attribute 'get_float' ". So i defined
profile before using profile and now it works.
See issue #1685
Also inserted a check to determine if filament usage is > 0 to exclude
tools with no filament usage in metadata.

(cherry picked from commit c9b38bd)
2017-01-11 12:04:02 +01:00
Gina Häußge
e8a4750379 Improved (manually to run) doc test for latest release selector 2016-11-30 14:33:36 +01:00
Gina Häußge
528e99898f Better error and subprocess handling
Removed a potential deadlock, added logging for all
raised exceptions, made _to_error more solid and
removed another potential encoding issue when
creating diffs
2016-11-25 14:58:09 +01:00
Gina Häußge
8beedce98f Slight rewording in Cura wizard 2016-11-24 12:56:00 +01:00
Gina Häußge
23744cdba9 onWizardTabChange => onBeforeWizardTabChange 2016-11-24 11:56:37 +01:00
Gina Häußge
462ab5aa37 Prevent SWU popup when wizard is open 2016-11-24 11:28:45 +01:00
Gina Häußge
9875617046 SWU: "busy" spinner while checking for updates 2016-11-23 17:52:16 +01:00
Gina Häußge
4ed0ed5f99 Fix working dialog of pgmr and swu being closeable while active
Only the close button should work now
2016-11-23 15:11:35 +01:00
Gina Häußge
5c39e9a8a3 Demote pip upgrade message from stderr to stdout in client output
Having that output stay on stderr and hence in shiny red looks way
too alarming considering that it's only a pip update that is not THAT
critical usually (and we don't want to do it automatically anyhow
considering how often that appears to break stuff).
2016-11-23 14:28:50 +01:00
donovan6000
1b9bfc6d04 Inapplicable pip arguments can be blacklisted when installing or uninstalling a package 2016-11-22 14:58:39 +01:00
Gina Häußge
a24beb25a3 _snippets => snippets - because babel ignores folders starting with _ 2016-11-21 17:43:04 +01:00
Gina Häußge
07bbbff038 Fix error border after successfull install of plugin archive
Was caused by incorrectly resetting the uploadFilename.
2016-11-21 16:25:53 +01:00
Gina Häußge
c9c2946db2 Allow closing of all pmgr notifications & remove on server disconnect 2016-11-21 16:14:09 +01:00
Gina Häußge
97bf331307 Add safe mode that disables all third party plugins
Can be enabled either through new --safe command line
parameter or through server.startOnceInSafeMode in
config.yaml

When running in safe mode the plugin manager will
only allow to disable or uninstall third party plugins. Enabling
third party plugins or installing new plugins is disabled.

That will hopefully allow for more straightforward recovery
in case of a misbehaving plugin.
2016-11-18 13:02:16 +01:00
Gina Häußge
ec12e52865 virtual printer: small fix of temperature responses 2016-11-17 14:46:56 +01:00
Gina Häußge
b87348be3b Add support for M115 to virtual printer 2016-11-17 12:13:52 +01:00
Gina Häußge
174ffdf06f Simplified a line 2016-11-15 17:26:41 +01:00
Gina Häußge
f9253adf72 Remove accidentally commited plugin file 2016-11-15 13:03:18 +01:00
Gina Häußge
58835cfd8e Add tracking of cancel position & make public 2016-11-15 11:54:35 +01:00