Commit graph

45 commits

Author SHA1 Message Date
Gina Häußge
9dfee34f01 Fix various popup buttons allowing multiple clicks
As suggested by @ntoff in #1914
2017-05-17 13:44:08 +02:00
Gina Häußge
51959319eb PGMR: Fix call to non existing onAlways
Closes #1919
2017-05-16 16:00:40 +02:00
Gina Häußge
e166765f7f Revert "Also use fastForEach in working dialogs of PMGR & software update"
This reverts commit 0f6edabea3.
2017-05-10 09:25:53 +02:00
Gina Häußge
0f6edabea3 Also use fastForEach in working dialogs of PMGR & software update 2017-04-12 18:54:08 +02:00
Gina Häußge
163fd83bf5 PGMR: Detect necessity to reinstall
So far using the "... from URL" or "... from an uploaded archive"
mechanism for installing a plugin would fail without further
information if the plugin to be installed was already installed.

The plugin manager will now detect this situation by parsing the
corresponding message from the pip output and trigger a reinstall
instantly.

A message about this will be logged to octoprint.log and the install
output.

Additionally the error handling for installation errors has been
slightly improved (install output no longer says "Done!" but "Error!"
with the reason as provided by the server) and the "could not install
plugin from URL unknown" issue should also be solved.
2017-04-04 15:18:37 +02:00
Gina Häußge
5c0a564592 PMGR: Better handling of plugins disabled on the repo
Switched button from "Incompatible" to "Disabled", added link to
plugin page on repo with the prominent alert box explaining the
reason for disabling.
2017-03-31 17:55:18 +02:00
Gina Häußge
52633d0433 PMGR: Support for plugin notices
Evaluates json data file as e.g. published on
plugins.octoprint.org/notices.json and displays notices for plugins
installed and matching (optional) version lists.
2017-03-31 16:52:48 +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
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
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
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
b2391322d4 Removed sudo stuff from plugin manager, don't display full pip command 2016-02-11 09:38:35 +01:00
Gina Häußge
7a7b0e7c68 Have the plugin manager use the LocalPipCaller
We don't need user-definable pip command paths here,
that will only lead to tears when the pip command belongs
to a wrong Python environment and nothing installs as
expected.
2016-02-04 13:55:10 +01:00
Gina Häußge
1e5cc9b086 Merge branch 'fix/knockout3.4' into devel
Conflicts:
	src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js
	src/octoprint/static/js/app/viewmodels/files.js
	src/octoprint/static/js/app/viewmodels/firstrun.js
	src/octoprint/static/js/app/viewmodels/loginstate.js
2016-01-27 17:37:31 +01:00
Gina Häußge
7f1394a8d6 Migrated ko.computed to ko.pureComputed where it made sense 2016-01-27 17:33:03 +01:00
Gina Häußge
085ab77c57 Added system API to client lib and migrated users to it 2015-10-01 14:57:41 +02:00
Gina Häußge
8875f257ea Merge branch 'devel' into dev/clientlib
Conflicts:
	src/octoprint/server/api/__init__.py
	src/octoprint/static/js/app/viewmodels/navigation.js
2015-10-01 14:22:15 +02:00
Gina Häußge
1837c74e8e PMGR: Show restart button on notification if restart command is configured
This will directly offer a "Restart Now" button on the "a restart is required" notification
for plugins which cannot be directly enabled/disabled without a restart, but only if
the restart command is configured on the server.

On click a confirmation dialog will be shown.
2015-10-01 14:20:37 +02:00
Gina Häußge
b432496b7f Merge branch 'devel' into dev/clientlib 2015-09-30 14:40:46 +02:00
Gina Häußge
2eb80c550f PMGR: Disable plugin remove button if plugin is not managable 2015-09-30 13:44:58 +02:00
Gina Häußge
e64975c85c PMGR: Debug output in frontend to indicate venv 2015-09-30 13:36:45 +02:00
Gina Häußge
4a97864e01 PMGR: Added option to force use of --user flag 2015-09-30 13:36:00 +02:00
Gina Häußge
62478fd98f More pip data in plugin manager front end 2015-09-29 14:51:58 +02:00
Gina Häußge
1178fe9e95 Support sudo for installing plugins, but warn about it 2015-09-28 19:53:30 +02:00
Gina Häußge
c5f0ccdb94 Migrated client to module factory pattern
This should _hopefully_ also make it compatible to AMD implementations,
but I have to admit that I haven't tried that yet...
2015-09-28 17:07:37 +02:00
Gina Häußge
eafca5d77a Some bug fixing of client migration 2015-09-25 17:09:07 +02:00
Gina Häußge
e5f12ae4c0 Merge branch 'devel' into dev/clientlib 2015-09-25 13:53:51 +02:00
Gina Häußge
bbd728c51b Migrated existing javascript application files to use client lib
TODO: Testing & Debugging
2015-09-25 13:53:42 +02:00
Gina Häußge
65bc28a03e PMGR: Added configuration dialog and info re used pip binary & version 2015-09-22 11:36:57 +02:00
Gina Häußge
4dd4a2cc9c Revert "Remove dependency_links support again"
This reverts commit be423e49fd.

Conflicts:
	src/octoprint/plugins/pluginmanager/__init__.py
	src/octoprint/plugins/softwareupdate/updaters/pip.py
(cherry picked from commit c24ba82)
2015-07-22 19:06:39 +02:00
Gina Häußge
c24ba824d6 Revert "Remove dependency_links support again"
This reverts commit be423e49fd.

Conflicts:
	src/octoprint/plugins/pluginmanager/__init__.py
	src/octoprint/plugins/softwareupdate/updaters/pip.py
2015-07-22 16:57:32 +02:00
Gina Häußge
3761995aff Removed unneeded parameter and added missing semicolon
(cherry picked from commit 29b3b62)
2015-07-08 17:42:47 +02:00
Mark Walker
677e583345 pluginmanager: case handling and submit binding
- Convert query term to lower case so that it is case insensitive both ways
    - Knockout submit binding takes the form element as parameter and return
    value determines whether the form submit occurs. See http://knockoutjs.com/documentation/submit-binding.html
(cherry picked from commit 4a2cc53)
2015-07-08 17:42:35 +02:00
Gina Häußge
29b3b62c0d Removed unneeded parameter and added missing semicolon 2015-07-08 08:45:36 +02:00
Mark Walker
4a2cc5382d pluginmanager: case handling and submit binding
- Convert query term to lower case so that it is case insensitive both ways
    - Knockout submit binding takes the form element as parameter and return
    value determines whether the form submit occurs. See http://knockoutjs.com/documentation/submit-binding.html
2015-07-07 14:24:27 -07:00
Gina Häußge
b3e547c60f Fix: Don't reload page on search form submits
Both file search and plugin repository search reloaded the page when
hitting enter in the search field. This fixes that.
(cherry picked from commit 60043cc)
2015-06-29 17:40:15 +02:00
Gina Häußge
be423e49fd Remove dependency_links support again
Doesn't work reliably across pip versions, and adding a special rule for each and every version also isn't fun. Plugin authors will need to use a different approach for pulling in dependencies that are not on pypi during install, e.g. extra install urls or something like that. For now, I give up here ;)
2015-06-23 16:22:45 +02:00
Gina Häußge
61bd803942 Fix: Properly report if a plugin simply could not be found after installation
Also more resilience towards odd version numbers that get mangled by python's package management (1.2.3a0 => 1.2.3a)
2015-06-20 00:56:26 +02:00
Gina Häußge
0ce1575e12 Don't allow plugin management while the printer is printing 2015-06-18 11:37:08 +02:00
Gina Häußge
46711ce365 pluginmanager: Support installing plugins that need --process-dependency-links
This might be necessary when plugins depend on (patched) library versions that are not yet released on PyPI
2015-06-10 19:34:33 +02:00
Gina Häußge
caef322b65 The Plugin Manager is now bundled with OctoPrint 2015-05-29 16:31:43 +02:00