Commit graph

1408 commits

Author SHA1 Message Date
Gina Häußge
2d1b198261 Some development utils in the octoprint.util package... 2015-10-30 13:02:22 +01:00
Gina Häußge
e3fa916364 Forgot to declare self.hooks on OctoPrintPluginCommands 2015-10-30 12:56:49 +01:00
Gina Häußge
c6f1088ccf <plugin identifier>:<command> => plugin:<plugin identifier> command 2015-10-30 10:14:21 +01:00
Gina Häußge
ec491c3d0d devel:newplugin => dev:plugin new, +dev:plugin install, +dev:plugin uninstall 2015-10-30 10:10:47 +01:00
Gina Häußge
bc7b17b66f Fixed an issue with compatibility across cookiecutter versions 2015-10-29 18:58:51 +01:00
Gina Häußge
628b9edbab CLI command devel:newplugin now allows specifying most of the parameters of the template 2015-10-29 18:41:51 +01:00
Gina Häußge
3c2d2b579d Documention for CLI and its development 2015-10-29 17:37:05 +01:00
Gina Häußge
d9f0fb1667 Consolidated common options into custom decorators 2015-10-29 16:26:50 +01:00
Gina Häußge
f68ce34351 Moved urllib3 ssl message to more suitable logging location 2015-10-29 15:26:58 +01:00
Gina Häußge
70fb385650 Try to ensure a sound SSL environment for the process
If the python version is < 2.7.9, we try to patch urllib3 with pyopenssl
to get rid of any InsecurePlatform issues.

That only works if pyopenssl plus dependencies are installed however,
hence we also log that.
2015-10-29 14:55:04 +01:00
Gina Häußge
d373d257e3 Slight changes on logging verbosity
Changed the intensity of logged warnings and ensured everything
but the octoprint package's log level to be WARN be default.
2015-10-29 14:52:14 +01:00
Gina Häußge
56805ab13d Refactored Daemon helper, added status command and added unit tests for all of it 2015-10-29 12:45:58 +01:00
Gina Häußge
4476545a55 Forgot to specify default value for daemon pidfile 2015-10-29 09:53:15 +01:00
Gina Häußge
9c56b2fd4e Variable output verbosity via CLI parameter -v 2015-10-28 19:18:40 +01:00
Gina Häußge
55c0e2ca95 Fixed a couple of bugs with daemon and serve commands 2015-10-27 18:15:24 +01:00
Gina Häußge
a6f11b9744 Started work on devel CLI commands
For now only devel:newplugin is available (if cookiecutter is installed)
2015-10-27 18:10:51 +01:00
Gina Häußge
2dd04574ce Moved CLI into its own module with submodules
Less chaos in one file
2015-10-27 18:08:27 +01:00
Gina Häußge
81dce6161a Moved startup log entry "up" a bit
Now that the plugin manager gets initialized before the server gets even constructed, we need
to log that entry right after we've set up logging in order to post any plugin manager related
log entries after.
2015-10-27 14:25:41 +01:00
Gina Häußge
150763fe2b CLI: debug is now part of the octoprint command context 2015-10-27 13:47:00 +01:00
Gina Häußge
12b1da9732 Some more comments to structure new click based CLI code 2015-10-27 11:13:19 +01:00
Gina Häußge
03830990ac New helper plugin_settings_for_settings_plugin, to use from cli hooks and internally 2015-10-27 10:48:23 +01:00
Gina Häußge
f4ae7b58e5 Renamed hook: octoprint.cli.command => octoprint.cli.commands 2015-10-27 10:22:08 +01:00
Gina Häußge
582cd1458d Plugin commands are now located on the same level as internal commands 2015-10-26 16:50:48 +01:00
Gina Häußge
6767a7e0a4 Plugins can now define a CLI via a hook 2015-10-26 13:47:50 +01:00
Gina Häußge
b326efbc3c Merge branch 'devel' into dev/click
Conflicts:
	setup.py
	src/octoprint/__init__.py
	src/octoprint/plugin/core.py
	src/octoprint/server/__init__.py
2015-10-26 13:47:17 +01:00
Nicanor Romero Venier
a9c38cb779 Small bug fix that prevented deleting profiles 2015-10-22 17:02:42 +02:00
Gina Häußge
2c5f2f0bf8 Merge branch 'fix/sdcardFilename' into devel 2015-10-22 13:55:27 +02:00
Gina Häußge
57bf457d97 Fix: current filename in job data should never be prefixed with /
That was a tiny detail missing in 8bef18c2a8 that
caused issues with detecting which file was currently selected on the printer's
SD card (for "do not delete that" checks on the API).
2015-10-22 13:42:57 +02:00
Gina Häußge
2f86a6acce Fixed some missing exception capturing 2015-10-22 12:35:23 +02:00
Gina Häußge
02c3bf8115 Fixed existing doctests, added some new ones, enabled doctests in nosetests 2015-10-22 12:34:53 +02:00
Gina Häußge
53a62ab44e Added Unit Tests for BlueprintPlugin mixin 2015-10-22 11:07:55 +02:00
Gina Häußge
bcd0f34fc3 Unit tests and some fixes for improved plugin settings processing 2015-10-20 17:57:05 +02:00
Gina Häußge
ffcbdba858 Use get_all_data instead of get([], ...) construct 2015-10-20 15:41:44 +02:00
Gina Häußge
aa5099340e Two new callbacks for RepeatedTimer when cancelled or condition untrue
(cherry picked from commit 9b9ecfe)
2015-10-20 12:07:24 +02:00
Gina Häußge
693633bd1d RepeatedTimer now supports callback when timer stops
(cherry picked from commit 3c5a976)
2015-10-20 12:05:12 +02:00
Gina Häußge
7ea1578bda Fix: Persist all data different from default, not just current changes
We need to merge with our current data since we only might get partial data
from our caller.
2015-10-20 10:35:47 +02:00
Gina Häußge
d70fe32750 Make sure only difference to default config is persisted for plugins
This change should make sure that only those settings actually make it into config.yaml
per plugin that do differ from the default settings. Up until now the full dictionary as received
e.g. from the REST API was saved, regardless whether it contained (only) default values or not.
That led to a lot of "null" entries in the config.yaml file, which for one looked horrible and also
led to problems when a plugin actually wanted to change its default values.

With this commit, two things are done. One, upon saving a configuration the default
implementation of the save routine in the settings plugin now first diffs the new data against
the defaults and only saves what is different. Two, upon server startup a cleanup method is
now called on settings plugins whose default implementation fetches the current data stored
in config.yaml, diffs that against the defaults and only writes back the diff result. If that is empty
the entry is completely deleted from config.yaml.
2015-10-19 20:17:17 +02:00
Gina Häußge
66fbd1fc6a Fix: Also provide custom control parameters to custom GCODE scripts
Closes #1085
2015-10-19 13:45:40 +02:00
Gina Häußge
4cfc74c344 Fix: Each divider action needs a custom action id
Closes #1084
2015-10-19 13:24:16 +02:00
Salandora
20676926e6 Fix a typo that broke custom control parameters 2015-10-12 13:54:52 +02:00
Salandora
1bf46d655d Fix SD disabled error 2015-10-12 10:20:32 +02:00
Gina Häußge
12403444c4 Merge branch 'fix/swuReloadDialog' into devel 2015-10-08 17:09:18 +02:00
Gina Häußge
c932e496fa SWU: Show reload dialog after update
The notification and the (forced) dialog afterwards were way too
redundant.
2015-10-08 17:08:36 +02:00
Gina Häußge
3767f83fe2 Slight timing changes in wizard finishing process
We now wait until the settings have been saved before we close the dialog.
That should hopefully reduce chances of an asynchronous "Oh no, the settings
were updated" message showing up just when finishing the dialog.
2015-10-08 15:23:19 +02:00
Gina Häußge
dd4bec3329 Fix: Do not cache templates if wizards are active
Otherwise wizards will be reshown until the cache is forcefully
cleared.
2015-10-08 13:49:57 +02:00
Gina Häußge
d3b7a77da7 Fix: Core wizard API didn't yet understand json-only requests 2015-10-08 12:22:22 +02:00
Gina Häußge
e5217813bd Merge branch 'fix/sdcardTimelapseWarning' into devel
Conflicts:
	src/octoprint/server/views.py
	src/octoprint/templates/initscript.jinja2
2015-10-08 10:25:18 +02:00
Gina Häußge
bbbdb3dde6 Note that z-based timelapses don't work when printing from SD 2015-10-08 10:22:09 +02:00
Gina Häußge
b9460b4890 Merge branch 'fix/uiEscaping' into maintenance 2015-10-08 09:52:08 +02:00
Gina Häußge
db05632677 Updated compiled CSS file 2015-10-07 18:58:42 +02:00