Commit graph

1130 commits

Author SHA1 Message Date
Gina Häußge
08c14e2e45 Wizard templates can now indicate they are mandatory
This will only style them in a special way and influence sorting. Plugins still need
to ensure that a step is not skipped through the use of the onWizardTabChange callback
in the view model.
2015-08-21 18:24:25 +02:00
Gina Häußge
990a44c7c9 Refactored cura settings dialog & fixed path check bug 2015-08-21 16:57:32 +02:00
Gina Häußge
c5cc3d0394 DRY - let's use some snippets in the webcam settings
Makes the dialog components reusable for our wizard. Should probably
be done throughout...
2015-08-21 10:50:33 +02:00
Gina Häußge
b8fb16a074 flipH, flipV and rotate90 might be useful not only for the webcam_container 2015-08-21 10:44:30 +02:00
Gina Häußge
1007d18fd0 Reorganization of the webcam settings dialog 2015-08-21 10:32:11 +02:00
Gina Häußge
74e33cef01 Final touches to the core wizards and the cura wizard 2015-08-21 10:31:53 +02:00
Gina Häußge
1425b20bd6 Always include timelapse view model in bundled js files
Even if the webcam URLs and the FFMPEG path is not yet configured. Otherwise
setting those URLs and the path will require a restart of OctoPrint to enable properly -
that's overkill.
2015-08-21 10:30:03 +02:00
Gina Häußge
6691cc00a5 Documentation of the wizard plugins & slight refactoring 2015-08-20 12:50:45 +02:00
Gina Häußge
92c666400b If firstRun is true, ignore any seen wizards 2015-08-20 10:27:48 +02:00
Gina Häußge
9aa51d4f74 The settings enqueuing stuff for wizards was a stupid idea
Always save all settings from the client instead. Otherwise EVERY wizard needs its
own view model just to call that method...
2015-08-20 10:27:25 +02:00
Gina Häußge
3a6d577924 Fixed acl status handling & ffmpeg path in corewizard 2015-08-19 17:30:41 +02:00
Gina Häußge
3d5eb18530 Less verbose logging for view model calling helper 2015-08-19 17:30:07 +02:00
Gina Häußge
370231e128 Moved some things around and fixed a bug 2015-08-19 17:29:46 +02:00
Gina Häußge
b6b1bfd33b Allow programmatic login in the UI 2015-08-19 17:29:25 +02:00
Gina Häußge
c33fcdb124 Track already seen wizards 2015-08-19 17:28:23 +02:00
Gina Häußge
f4a952ebe6 Use new view model calling helper where possible 2015-08-19 11:48:22 +02:00
Gina Häußge
f7117900e6 New helper methods to call methods on view models 2015-08-19 11:46:33 +02:00
Gina Häußge
b1e4a1d9dc New corewizard plugin taking care of first run setup
Also introduced wizard finish backend method and remove old
firstrun dialog remnants.

TODO: bound check won't work this way, needs to be redone
differently. Goal is to only call onWizardFinish for wizards which
are actually involved...
2015-08-18 17:08:51 +02:00
Gina Häußge
1bba5ca788 Refactored settings save API methods to make actual saving reusable 2015-08-18 17:06:49 +02:00
Gina Häußge
d5a083b0b5 Extracted FFMPEG path config into reusable snippet & added test button 2015-08-18 17:06:16 +02:00
Gina Häußge
bc97241eef Callback method for wizard plugins for when the wizard is finished 2015-08-18 17:03:31 +02:00
Gina Häußge
c5b355705a Inject user manager into plugins 2015-08-18 13:30:23 +02:00
Gina Häußge
36d07532fb Fix: Don't hiccup on non-HTML-strings for message dialogs 2015-08-18 13:17:17 +02:00
Gina Häußge
a64a0545f3 Display dialog on settings update if wizard is active 2015-08-17 16:49:20 +02:00
Gina Häußge
edbbc49edd Test buttons for webcam URLs & extraction into snippet 2015-08-17 16:47:40 +02:00
Gina Häußge
68431770d8 Allow view models to prevent settings refresh 2015-08-17 16:46:40 +02:00
Gina Häußge
f4bcbd7c7b Wizard also uses new confirmation dialog parameter format 2015-08-17 16:42:30 +02:00
Gina Häußge
18c0dc6bf8 URL test API now also supports returning the response content
Also fixed a bunch of errors with that while at it.
2015-08-17 16:41:51 +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
Gina Häußge
1238507806 Merge branch 'devel' into dev/firstRunWizard 2015-08-17 12:14:31 +02:00
Gina Häußge
31db13e0c3 Some more comments for the new settings processing 2015-08-17 12:12:45 +02:00
Gina Häußge
ea16615337 Map settings from observables automatically 2015-08-14 15:05:10 +02:00
Gina Häußge
833a618dbe More user control for server side settings update when dialog is open
The user will now be offered a dialog with two choices if a server side update
of the settings is detected while the user has the settings dialog opened and made
local changes: Either reload all changes, effectively overwriting any local changes,
or only set those settings changed on the server that are not also changed locally.
2015-08-14 14:34:41 +02:00
Gina Häußge
7518b44e6d Use configHash to check if frontend needs to be reloaded
If after a reconnect the server side configuration has changed, we want to reload.
Using the SettingsUpdated event the clients can track the current config hash during
runtime so that no unnecessary reloads during runtime should be demanded.
2015-08-14 14:11:50 +02:00
Gina Häußge
ff820837a5 Include config hash in SettingsUpdated event and SockJS connected message 2015-08-14 14:09:31 +02:00
Gina Häußge
4a49948223 FileMgr: Only remove callback if it exists. 2015-08-14 14:06:22 +02:00
Gina Häußge
d97f92ea3d Merge branch 'devel' into dev/firstRunWizard
Conflicts:
	src/octoprint/static/js/app/viewmodels/settings.js
2015-08-14 10:35:32 +02:00
Gina Häußge
2fe956e515 Use connection closing flag only for exception handling
Otherwise we kill the beforePrinterDisconnected gcode script...

See #1021
2015-08-13 17:22:43 +02:00
Gina Häußge
c829b27fdd Properly handle serial close on Macs
Readline could still be stuck in a read loop, leading to an exception on Mac
when closing the connection from another thread. This should now be captured
correctly.

Fixes #1021
2015-08-13 17:16:51 +02:00
Salandora
3866c1a112 Fix sorting of templates 2015-08-13 14:32:41 +02:00
Gina Häußge
8f11d2fd5d Fixed a description text in the UI 2015-08-13 13:31:20 +02:00
Gina Häußge
7dfa6ae4bd Never send empty/whitespace only commands 2015-08-13 13:09:06 +02:00
Gina Häußge
84b343a751 Added new serial config options to UI
Also pushed more advanced config option into an initially hidden
"Advanced Options" section, similar to other places.
2015-08-13 13:08:20 +02:00
Gina Häußge
5c2ae378e1 Improved handshake procedure on comm layer
"Hello" command sent to printer to trigger initial handshake can now be
configured. Commands that _always_ necessitate to be sent with checksum/
line number (e.g. M110 on Marlin) can be configured as such too.

Also fixed an issue causing the "Hello" command to not be actually enqueued
first thing on opening a connection. Seems to not have caused harm in the
wild, but was unintentional.
2015-08-13 13:07:18 +02:00
Gina Häußge
ac3409a223 Log exception on error while reading from serial 2015-08-13 12:05:08 +02:00
Gina Häußge
91539624df Virtual printer now has its own serial.log 2015-08-13 10:55:45 +02:00
Gina Häußge
963d590728 Allow specifying additional baud rates 2015-08-12 13:39:12 +02:00
Gina Häußge
7d6462b815 Fixed broken GCODE viewer / concurrent settings requests
The GCODE viewer settings callback was not properly called, hence the
viewer was not initialized properly.

Changed prevention of concurrent settings requests to properly handle
the situation where the registered settings callbacks might be extended
through another callback.
2015-08-12 12:30:56 +02:00
Gina Häußge
a43de4201f Made webassets folder cleanup win32-proof
If re-creation of the folder fails due to an access error, perform three retries. It might
be caused by the folder being open in the file explorer. Waiting a bit before retrying
seems to do the trick.

See also #1019
2015-08-11 18:14:20 +02:00
Gina Häußge
87721623b1 Added tooltip for additional data in file list
Also fixed tooltips to those buttons instead of the icons within the buttons.

Fixes #986
2015-08-11 14:04:52 +02:00