Commit graph

61 commits

Author SHA1 Message Date
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
4e80d69e51 SWU: Always auto-hide up-to-date info
See #2042
2017-10-13 17:52:54 +02:00
Gina Häußge
0dcbffb9d2 Bundled plugins: Handle connectivity states
See also #2011
2017-07-19 18:42:29 +02:00
Gina Häußge
fb8c56be57 SWU: Track network connectivity & handle offline scenarios
See also #2011
2017-07-19 18:42:28 +02:00
Gina Häußge
d274a9c73d Fixed a couple of FontAwesome issues
* fa-circle-blank does not exist, replaced with fa-circle-o (see also
    report in #1928)
  * fa-trash-o instead of fa-trash (same look and feel)
  * fa-check instead of fa-check-circle (same look and feel)
  * fixed toggleContent binding to also be able to toggle fa icons
  * fix deletion spinner in file list (was still using old icon-
    classes which of course weren't there anymore and hence not
    toggleable)
  * icons-ul => fa-ul
  * remove superfluous fa class from some places

Follow-up to #1915.
2017-05-29 13:42:11 +02:00
Davide Depau
d8d9c7fe64 Merge branch 'maintenance' into fa-update 2017-05-17 17:46:01 +02:00
Davide Depau
700975d670 upgrade templates to use FontAwesome 4.7.0 classes [1/2] 2017-05-17 17:35:27 +02:00
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
3bfc4725d2 SWU: Added cache timestamp to UI
Implements #1521
2017-05-11 12:45:02 +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
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
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
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
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
Gina Häußge
bccc706329 First throw at caching of API methods
Most caching is left to the client, by utilizing ETag and Last-Modified headers.

Where it was easily achievable, an additional server side miniature cache of intermediary
results was introduced (e.g. for the files). The regular cached decorator was not used
since it targets caching full responses, and the responses in question already contained
client request specific data. Caching "one step earlier" allows better usage of the cache here.

Also introduced a dependency on the scandir module, to get a bit of a performance boost
on os.walk and os.listdir (which have been replaced with scandir.walk and scandir.listdir
respectively). See https://github.com/benhoyt/scandir#background on why that made
sense.
2016-08-30 19:02:30 +02:00
Gina Häußge
efca776102 Merge branch 'maintenance' into devel
Conflicts:
	src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2
	src/octoprint/plugins/softwareupdate/updaters/update_script.py
2016-08-26 14:24:13 +02:00
Gina Häußge
21b7339187 SWU: Move branch config to update check & fix release version detection again 2016-08-26 14:18:17 +02:00
Gina Häußge
d538b3fd38 Adjust swu plugin settings to selected update method 2016-08-25 15:45:25 +02:00
Gina Häußge
f8386649bf Fix release channel selector 2016-08-25 13:32:18 +02:00
Gina Häußge
b5bc03e711 First throw at release channels
We start out with master (Stable), rc/maintenance (Maintenance) and rc/devel (Devel)
2016-08-25 09:41:12 +02:00
Gina Häußge
a33338684e Merge branch 'fix/slicingDocs' into devel 2016-07-12 11:52:59 +02:00
Gina Häußge
d96a91ecc3 Fix modal background of update confirmation not vanishing 2016-07-06 15:30:36 +02:00
Gina Häußge
45a79b1939 Fixed a bunch of issues with the software update wizard 2016-03-30 15:45:13 +02:00
Gina Häußge
aecedfa57f Wizard for software update plugin 2016-03-30 11:28:41 +02: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
28eb436c88 Merge branch 'fix/includeReleasenotesInUpdateNotifications' into devel 2015-12-10 17:12:11 +01:00
Gina Häußge
1a4920fc36 Display remote version in update message, not local one... 2015-12-10 17:12:02 +01:00
Gina Häußge
dcd67e7645 Merge branch 'fix/includeReleasenotesInUpdateNotifications' into devel
Conflicts:
	src/octoprint/plugins/softwareupdate/static/css/softwareupdate.css
	src/octoprint/plugins/softwareupdate/static/js/softwareupdate.js
	src/octoprint/plugins/softwareupdate/static/less/softwareupdate.less
	src/octoprint/static/css/octoprint.css
	src/octoprint/static/less/octoprint.less
2015-12-10 14:45:39 +01:00
Gina Häußge
8149a3b4a8 Include release notes in update notification
... and confirmation dialog and settings dialog.

github_release fetches release notes link from github. Check configurations
can always set individual release notes links via the new `release_notes`
property. The URL also supports placeholders `{octoprint_version}`,
`{target_version}` and `{target_name}`. A custom release note URL
hence could be configured by a plugin via

    def get_update_information(self):
        return dict(
            myplugin=dict(
                [...]
                release_notes="https://me.github.io/MyPlugin/my/custom/releasenotes.html#version_{target_version}"
                [...]
            )
        )

and if a new release "1.3.4" was now to be released would be displayed to the user as

    https://me.github.io/MyPlugin/my/custom/releasenotes.html#version_1.3.4

The same of course is possible via config.yaml:

    plugins:
      softwareupdate:
        checks:
          myplugin:
            release_notes: 'https://me.github.io/MyPlugin/my/custom/releasenotes.html#version_{target_version}'
2015-12-10 14:41:46 +01:00
Gina Häußge
c5bc000b56 Increased timeout for waiting for restart after update
20sec is too little.
2015-12-02 17:12:04 +01: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
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
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
628a9f43e9 Let's up the restart-detection-timeout a bit
Just for experimental purposes.
2015-09-02 11:34:32 +02:00
Gina Häußge
a79e38a350 Settings saving now supports callbacks, SWU plugin utilizes those 2015-09-01 17:18:08 +02:00
Gina Häußge
098c169ca5 SWU: Do not show "settings refreshed" dialog when saving plugin settings 2015-09-01 10:43:52 +02:00
Gina Häußge
42e11acb44 Fixed a merge error 2015-09-01 09:42:44 +02:00
Gina Häußge
4f3e2d7f49 Merge branch 'maintenance' into devel
Conflicts:
	.versioneer-lookup
	CHANGELOG.md
	src/octoprint/plugins/softwareupdate/__init__.py
	src/octoprint/plugins/softwareupdate/static/js/softwareupdate.js
	src/octoprint/plugins/softwareupdate/updaters/pip.py
	src/octoprint/plugins/softwareupdate/updaters/update_script.py
	src/octoprint/plugins/virtual_printer/virtual.py
	src/octoprint/server/util/sockjs.py
	src/octoprint/server/views.py
	src/octoprint/static/css/octoprint.css
	src/octoprint/static/js/app/helpers.js
	src/octoprint/static/js/app/viewmodels/settings.js
	src/octoprint/templates/dialogs/settings.jinja2
	src/octoprint/templates/dialogs/settings/features.jinja2
	src/octoprint/templates/dialogs/settings/server.jinja2
	src/octoprint/translations/de/LC_MESSAGES/messages.mo
	src/octoprint/translations/de/LC_MESSAGES/messages.po
	src/octoprint/util/comm.py
	translations/de/LC_MESSAGES/messages.mo
	translations/de/LC_MESSAGES/messages.po
	translations/messages.pot
2015-09-01 08:34:24 +02:00
Gina Häußge
13d7d5f2f6 SWU: Various improvements for better usability
* Allow configuration of checkout folder and version tracking type
    via Plugin Configuration
  * Display message to use if checkout folder is not configured or a
    non-release version is running and version tracking against releases
    is enabled
  * Clear version cache when a change in the check configuration is
    detected
  * Mark check configurations for which an update is not possible with
    a little exclamation mark
(cherry picked from commit 8666a28)
2015-08-26 16:03:11 +02:00
Gina Häußge
93763a5563 Remove left over observables that are no longer needed
(cherry picked from commit 7986a2f)
2015-08-26 15:56:09 +02:00
Nicanor Romero Venier
57161dd9c3 Added migration step for new settings.
(cherry picked from commit 1cdd61f)
2015-08-26 15:54:17 +02:00
Gina Häußge
8666a28f64 SWU: Various improvements for better usability
* Allow configuration of checkout folder and version tracking type
    via Plugin Configuration
  * Display message to use if checkout folder is not configured or a
    non-release version is running and version tracking against releases
    is enabled
  * Clear version cache when a change in the check configuration is
    detected
  * Mark check configurations for which an update is not possible with
    a little exclamation mark
2015-08-26 15:50:57 +02:00
Gina Häußge
ea662849bc Construct message/confirmation dialogs programmatically
No need to have templates here, we do it directly from the helper methods.
That also leaves us more options regarding callbacks, classes etc.

Helper methods now take an options dictionary (but still can fallback to the
old signature) containing messages, titles, callbacks etc instead of using
positional arguments for that. Switched code over to utilize that new
calling approach.
2015-08-17 16:41:12 +02:00