Commit graph

2097 commits

Author SHA1 Message Date
Gina Häußge
28738a5179 More documentation and unit tests 2015-02-18 17:16:37 +01:00
Gina Häußge
258b824ff8 self._printer in plugins now allows direct access to the transport object (serial instance in most cases) 2015-02-17 21:53:45 +01:00
Gina Häußge
7438ba1eea Merge remote-tracking branch 'origin/devel' into devel 2015-02-17 14:26:52 +01:00
Gina Häußge
3c33401b48 GCODE viewer: Only try to instantiate sliders if their elements are available 2015-02-17 13:51:34 +01:00
Gina Häußge
9aa45041f6 View models can now implement getAdditionalControls to add controls to the control tab
Controls may now contain a new property "javascript" which may be either a javascript function to be called when the control is executed, or a string to be eval'd when the control is executed. If it is a function, it will be called with the config of the custom control as single parameter "data". If it is a string it will be eval'd within a function context providing the custom control configuration as variable data.

Additionally controls may contain a new property "enabled", which may also be either a javascript function or a string to be eval'd. The custom control config will be available to the enabled code as described above. The code is expected to return true if the component should be enabled or false if not.
2015-02-17 13:51:05 +01:00
Gina Häußge
56bce984fa Merge pull request #673 from fjriosp/reconnect_fix
BugFix to Reconnect on Debian
2015-02-17 09:42:42 +01:00
Gina Häußge
6cdd8de248 docs: Fixed a wrong reference 2015-02-13 15:50:09 +01:00
Gina Häußge
197ed7b912 More documentation 2015-02-13 12:50:02 +01:00
Gina Häußge
7de90e16f6 And of course I forgot a file again and overlooked a typo... 2015-02-12 13:34:57 +01:00
Gina Häußge
cad4e2f6dc Update some line numbers 2015-02-12 13:31:12 +01:00
Gina Häußge
4d5443ed6b Finalized plugin tutorial (for now) 2015-02-12 13:29:00 +01:00
Gina Häußge
00760ef1b3 If plugins only provide LESS or CSS files, they should still be properly included in the page regardless of stylesheet mode
Up until now OctoPrint would not include anything for plugins which didn't provide LESS files but CSS files when in LESS mode (and vice versa). This is not rectified to make development a bit easier and less restrictive - if a plugin author doesn't want to use LESS but just plain CSS, that's now fine too.
2015-02-12 13:28:37 +01:00
Gina Häußge
65557f670a Fixed copy paste error from way back 2015-02-11 12:26:18 +01:00
Gina Häußge
9cdb273cbc Tooltips for the serial connection settings 2015-02-11 12:22:41 +01:00
Gina Häußge
eb4156c02e Directly update color coding for success/failure in file list after finishing a print job 2015-02-10 10:55:47 +01:00
Gina Häußge
faccba1c86 Fix the system menu again (stupid comma...) 2015-02-09 21:43:15 +01:00
Gina Häußge
d3a00fc887 Properly disable UI elements again after change in templating 2015-02-09 16:12:07 +01:00
Gina Häußge
5c756768c8 Merge pull request #759 from mrbeam/vanilla_devel
bugfix. initialize counter for plugins of type generic.
2015-02-07 21:15:47 +01:00
Teja
7b92fb27c0 bugfix. initialize counter for plugins of type generic. 2015-02-07 19:23:07 +01:00
Gina Häußge
be9021d377 Some more unit tests for the plugin manager 2015-02-05 19:20:51 +01:00
Gina Häußge
e899050517 Rudimentary multi pass dependency resolution for view models
Largely based on a patch by @mrbeam - big thanks for that!
2015-02-03 22:23:32 +01:00
Gina Häußge
d8dffc9dd3 Fall back to unmodified default profile if the overridden version is invalid 2015-02-03 11:46:30 +01:00
Gina Häußge
5a68d26d59 We now depend on sarge >= 0.1.4 2015-02-03 11:45:26 +01:00
Gina Häußge
d5abf3f0f5 Merge remote-tracking branch 'origin/devel' into devel 2015-02-03 10:18:31 +01:00
Gina Häußge
9a476073cb Made call_plugin method more error resilient
Should catch any exceptions thrown by the plugin, log them and only hand them off if the caller requested to be informed about such things. This way if something goes wrong with a StartupPlugin there should be no problem anymore to still get the server up and running.
2015-02-03 10:17:39 +01:00
Gina Häußge
2da952e7ff Merge remote-tracking branch 'origin/devel' into devel 2015-02-01 17:27:53 +01:00
Gina Häußge
ce363ce409 Fixed a bug causing gcodeInterpreter to hiccup on GCODES containing invalid coordinates such as Xnan or Yinf, causing in turn the file API to fail until the offending file was deleted and its metadata removed 2015-02-01 17:27:12 +01:00
Gina Häußge
cc9e495042 Extracted common CSS styles for action button columns in various tables into LESS mixin
.actioncol now sets text align to center, color of contained links to black and disables wrapping on whitespace (thanks to @Renha for that one)
2015-01-31 17:10:32 +01:00
Gina Häußge
8f8b66fbff Merge pull request #742 from Renha/devel
Fixed wrapping of Icons at Action column in Access Controll settings page
2015-01-31 16:36:58 +01:00
Gina Häußge
8bfa3ef250 Adjusted discovery plugin to new blueprint and settings functionality for plugins 2015-01-30 22:22:39 +01:00
Gina Häußge
17d0b17a86 Blueprints of BlueprintPlugins now also get instantiated with defined template and static folder, plugins may override this via get_blueprint_kwargs 2015-01-30 22:22:08 +01:00
Gina Häußge
2f5e955367 Fixed an issue causing slicing not to work due to a change in how the used sarge library works
Starting commands asynchronously now necessitates a call to Pipeline.wait_events in order to be able to access the started Command instances. Not waiting causes the list of commands to be not fully populated and hence issues with code depending on that stuff being present.
2015-01-30 21:47:48 +01:00
Gina Häußge
6f52e7a008 More error resilience when (re)loading plugins 2015-01-30 18:06:52 +01:00
Gina Häußge
86734076e0 Fixed a bug which caused self.implementations to be able to return None instead of [] if no implementations were provided by a plugin 2015-01-30 18:04:15 +01:00
Gina Häußge
e6a0019cc7 Forgot to commit an image for the documentation 2015-01-30 13:56:41 +01:00
Gina Häußge
6b6bef4e86 First inject static additional injects, then follow up with factory created ones
This way plugins are already prepopulated with stuff like basefolder and logger and such when the factories are executed.
2015-01-30 13:56:18 +01:00
Gina Häußge
998420312e Adjusted CuraPlugin to use new blueprint and settings mechanisms for plugins 2015-01-30 13:24:34 +01:00
Gina Häußge
d3bd990009 The plugin system now also injects self._settings into SettingsPlugins and create the blueprint for BlueprintPlugins
Also adjusted a lot of documentation for that stuff and continued writing the Getting Started guide for plugin development.
2015-01-30 13:22:35 +01:00
Gina Häußge
e1e47abfbe Fixed selecting the first dialog in the settings dialog upon first opening it 2015-01-30 09:28:41 +01:00
Gina Häußge
8c2214fc09 Ordering of injected templates decoupled from template content
Internal templates get handled the same way as those from plugins. Plugins may also in theory now replace existing internal templates, however for that to not cause any errors on the client side due to missing expected elements that will for now stay an undocumented feature.
2015-01-29 16:39:09 +01:00
Gina Häußge
250d71b580 Added server side caching of main page
Index page will now be cached for up to five minutes, unless the
request contains "_refresh" in the query or the Cache-Control header
contains no-cache
2015-01-29 16:37:20 +01:00
Gina Häußge
151864f1d4 Always send responses to POST requests with Cache-Control: no-cache 2015-01-29 16:36:08 +01:00
Gina Häußge
f4df354cd0 Removed left overs from former cura integration 2015-01-28 15:36:44 +01:00
Gina Häußge
b4068f36e1 Highlighted changed lines 2015-01-27 16:08:10 +01:00
Gina Häußge
4223d48edd Docs: Started on a basic plugin tutorial 2015-01-27 14:21:41 +01:00
Gina Häußge
d96e56e3c7 Also include module_name in plugin origin tuple for entry points 2015-01-26 22:30:31 +01:00
Gina Häußge
c3bb575b48 Added plugin metadata to bundled plugins 2015-01-26 22:22:19 +01:00
Gina Häußge
2d2285861f Also track disabled plugins and allow defining/retrieving license information in plugins 2015-01-26 22:21:58 +01:00
Gina Häußge
19f9400b11 Read pkginfo data for plugins retrieved via entry_point and use that to populate author, version, name, description and url data in PluginInfo object
This data can still be overwritten from within the Plugin itself by setting the correponding __plugin_xyz__ variables, however it allows getting rid of some repetition if that data has already been specified in setup.py
2015-01-26 17:27:34 +01:00
Артем Груничев
344a505903 Icons at Action column in Access Controll settings page are now wrapped correctly with any translation language; regenerated .css file according to .less one. 2015-01-26 17:24:37 +03:00