Commit graph

1735 commits

Author SHA1 Message Date
Gina Häußge
fd90326fba Use [sys.executable, "-m", "pip"] for the CLI pip stuff too 2016-02-04 13:55:42 +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
e68ec435ea Made PipCaller compatible to pip 8.0.0
pip 8 doesn't output ANY of the generated stdout output from
setup.py anymore. So instead of transfering the info we need about
a pip environment on stdout, we now need a temporary folder.

Yay.
2016-02-04 13:54:03 +01:00
Gina Häußge
c3776106ec Merge branch 'maintenance' into devel 2016-02-03 12:53:12 +01:00
Gina Häußge
f79d496c7c Revert "Only trigger drag overlay for files, not texts"
This reverts commit 1e429606e1.

Commit used functionality that currently is only available in
Chrome and maybe Opera. No alternative solution could be found
that works reliably across browsers.
2016-02-03 11:43:55 +01:00
Gina Häußge
6f0bfb38d7 Merge branch 'maintenance' into devel
Conflicts:
	src/octoprint/static/css/octoprint.css
2016-02-03 09:16:20 +01:00
Gina Häußge
fac4aad05f Merge branch 'master' of https://github.com/2ndalpha/OctoPrint into pr/2ndalpha/master 2016-02-03 08:58:59 +01:00
Gina Häußge
c53c263805 Merge branch 'fix/includeReleasenotesInUpdateNotifications' into maintenance
Conflicts:
	src/octoprint/plugins/softwareupdate/__init__.py
	src/octoprint/static/css/octoprint.css
2016-02-02 20:23:02 +01:00
Gina Häußge
0223a11923 Merge branch 'fix/betterTimelapseRendering' into devel
Conflicts:
	src/octoprint/server/api/timelapse.py
	src/octoprint/static/css/octoprint.css
	src/octoprint/static/js/app/dataupdater.js
	src/octoprint/static/js/app/viewmodels/timelapse.js
2016-02-02 18:37:35 +01:00
Gina Häußge
4e31ccf4c5 Big overhaul of timelapse handling
* persistent notification on ongoing timelapse render job (#485)
  * non-colliding timelapse snapshot name generation to not delete
     existing snapshots when new print starts and timelapse has not
     yet been rendered, also only delete snapshots if timelapse rendered (#318)
  * list of unrendered timelapses, with option to delete files
    or to render timelapse
2016-02-02 18:03:56 +01:00
Siim Raud
c4e2a8982f Fixed formating 2016-02-02 00:40:52 +02:00
Siim Raud
42dafd7565 Fixed parsing of "retraction_combing" 2016-02-02 00:35:52 +02:00
Gina Häußge
5bab9f5bf9 Removed a doubled setting 2016-02-01 19:52:19 +01:00
Gina Häußge
adb77654f6 Merge branch 'fix/optionToIgnoreFirmwareErrors' into devel
Conflicts:
	src/octoprint/server/api/settings.py
	src/octoprint/settings.py
	src/octoprint/static/js/app/dataupdater.js
	src/octoprint/static/js/app/viewmodels/settings.js
	src/octoprint/templates/dialogs/settings/serialconnection.jinja2
2016-02-01 18:07:13 +01:00
Gina Häußge
6ce82ceb00 Merge branch 'fix/optionToIgnoreFirmwareErrors' into maintenance 2016-02-01 18:02:29 +01:00
Gina Häußge
6583691e85 Added setting to only cancel ongoing print on firmware error
Also added error popup in such a case so the error will be known even
if the terminal tab scrolled past it.
2016-02-01 18:02:21 +01:00
Gina Häußge
2f44f10eb0 Merge branch 'fix/knockout3.4' into maintenance 2016-02-01 16:56:13 +01:00
Gina Häußge
0e817d43cc Added option to ignore any errors reported by the firmware
Use this carefully. An error reported by your firmware usually hints
at something being off about your printer (e.g. thermistor troubles)
or the firmware not being fully compatible to OctoPrint since
it doesn't recognize a lot of commands.

If you print with this option enabled, it will still fail if you firmware goes
into lockdown, but now it will keep trying to send data to your printer.

That might cause issues. So best not use that option, only if you absolutely
have no other way to get some misbehaving printer to work with
OctoPrint.
2016-02-01 16:55:13 +01:00
Gina Häußge
9066c54d8d Fixed a typo, fixed a wrongly fixed typo 2016-01-29 09:09:04 +01:00
Gina Häußge
780794c466 Merge branch 'development' of https://github.com/bwgan/OctoPrint into pr/bwgan/development
Conflicts:
	src/octoprint/daemon.py
2016-01-29 09:04:58 +01:00
bwgan
f8c0df4e78 Typo and spelling fixes
Fixes various spelling issues and typos.
2016-01-28 18:59:38 +00: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
caaf1d229c Updated Knockout dependency to version 3.4.0
Closes #939
2016-01-27 17:32:40 +01:00
Gina Häußge
45e159742e Merge branch 'fix/terminalLoad' into devel
Conflicts:
	src/octoprint/static/css/octoprint.css
	src/octoprint/static/js/app/dataupdater.js
	src/octoprint/static/js/app/main.js
2016-01-27 12:37:03 +01:00
Gina Häußge
36ae6dd6b9 Added adaptive rate limiting to client
The client now tries to detect if it's fast enough to process the
state updates usually send every 500ms, and if not notifies the
server to throttle the rate (e.g. to 1/1s, 1/1.5s etc).

Additionally, since the terminal tab of the client turned out to
be quite CPU intense when line number calculation, filtering etc
is enabled, the terminal tab now also falls back into a bit less
fancy mode if it detects its being processed too slow and optionally
even disables logging completely during printing (where a lot
of log messages need to be processed in a minimum amount of
time).

That way the UI should stay responsive even on very low powered
clients (e.g. chromium on a Pi), while printing.
2016-01-27 12:04:17 +01:00
Gina Häußge
6945394fc2 Merge branch 'fix/disablePrintButtonWithoutFile' into devel 2016-01-25 16:29:29 +01:00
Gina Häußge
bcd7bb4d20 Don't enable Print button if no job is selected
Fixes #1007
2016-01-25 16:28:52 +01:00
Gina Häußge
b63e372e7e Merge remote-tracking branch 'origin/devel' into devel 2016-01-25 15:08:30 +01:00
Gina Häußge
9d924be5f9 Merge branch 'fix/uploadWhileOffline' into devel
Conflicts:
	src/octoprint/static/js/app/dataupdater.js
	src/octoprint/static/js/app/viewmodels/files.js
2016-01-25 15:05:50 +01:00
Gina Häußge
8151e617cc Merge branch 'maintenance' of github.com:foosel/OctoPrint into maintenance 2016-01-25 14:41:52 +01:00
Gina Häußge
1e429606e1 Only trigger drag overlay for files, not texts 2016-01-25 14:39:48 +01:00
Gina Häußge
7fbfaadc21 Do not read no return value as "False" return value for onServerDisconnect 2016-01-25 13:51:46 +01:00
Gina Häußge
814355e281 Do not show drag-n-drop overlay if server is offline
Fixes #1196
2016-01-25 13:51:10 +01:00
Gina Häußge
3d34411025 Merge branch 'fix/disableSettingsSaveWhileBusy' into devel
Conflicts:
	src/octoprint/static/js/app/viewmodels/settings.js
2016-01-19 11:52:25 +01:00
Gina Häußge
660de61997 Merge remote-tracking branch 'origin/maintenance' into maintenance 2016-01-19 11:51:15 +01:00
Gina Häußge
f4b3206d49 Disable the settings dialog's save button while sending or receiving 2016-01-19 11:19:51 +01:00
Gina Häußge
3b35d921d1 Merge branch 'fix/resetSettingsScrollPosition' into devel 2016-01-12 13:30:34 +01:00
Gina Häußge
2a059cf0cb Reset scroll position and selected tab in settings dialog
Also added means to open settings dialog navigating directly to a specific tab
2016-01-12 13:30:10 +01:00
Gina Häußge
4e84d62741 Reset scroll position and selected tab in about dialog 2016-01-12 11:00:35 +01:00
Gina Häußge
04bb262187 Fixed an issue with resolving various files as templates in source installs
Missing _data prefix
2016-01-12 10:59:48 +01:00
Gina Häußge
e4828450c9 Merge branch 'fix/slugifyFilenames' into devel
Conflicts:
	setup.py
2016-01-11 16:43:38 +01:00
Gina Häußge
7743372ee4 Slugify file names on local storage
Just stripping anything non-ASCII leads to errors with UTF-8 only
filenames.

Closes #1181
2016-01-11 16:42:05 +01:00
Gina Häußge
682dd902e6 Merge branch 'fix/refreshFilesButton' into devel 2016-01-11 15:42:06 +01:00
Gina Häußge
59027d349f Added button to refresh file list
Also added tooltips for all three file list buttons
2016-01-11 15:41:38 +01:00
Gina Häußge
62a25767a3 Merge branch 'maintenance' into devel 2016-01-05 11:43:20 +01:00
Gina Häußge
c020c7afe0 Merge branch 'master' of https://github.com/richjoyce/OctoPrint into pr/richjoyce/settings_remove_fix 2016-01-05 11:40:18 +01:00
Gina Häußge
5cdf45d218 Merge branch 'maintenance' into devel
Conflicts:
	src/octoprint/static/js/app/viewmodels/loginstate.js
2016-01-05 11:38:05 +01:00
Gina Häußge
384e150448 Fixed some whitespace 2016-01-05 11:32:55 +01:00
Gina Häußge
d4260468be Merge branch 'devel_knockout_bindings' of https://github.com/BillyBlaze/OctoPrint into pr/BillyBlaze/devel_knockout_bindings 2016-01-05 11:17:04 +01:00
Gina Häußge
a11774484e Merge branch 'files_sidebar' of https://github.com/BillyBlaze/OctoPrint into pr/BillyBlaze/files_sidebar 2016-01-05 11:04:24 +01:00
Gina Häußge
d3129a800f We also don't need the empty file anymore then 2016-01-05 10:56:13 +01:00
Richard Joyce
0d7965ebf1 Fix missing kwargs in PluginSettings remove 2016-01-04 09:25:58 -08:00
Paul de Vries
34ceb93509 Initialize loginUser and loginPass with an empty string
Clear loginUser and loginPass after a successful login (e.g. the user made a typo)
2016-01-03 22:02:49 +01:00
Paul de Vries
645c2da7a5 Moved custom bindings from main.js to bindings/{bindingname}.js
Added custom bindings files in the flask.py js list

Removed inline onclick with sliderToggle and made a custom binding
'toggleContent'

Add padding and line-height to intermediary heading for better readability
2015-12-30 17:54:22 +01:00
Paul de Vries
b987e2ac7d Remove 'folder' className to 'back' 2015-12-25 19:57:30 +00:00
Paul de Vries
1f878fefb0 Add .type as className for better styling 2015-12-25 19:50:26 +00:00
Paul de Vries
bff20bf4d9 If dynamic LESS or CSS is empty then do not parse the jinja2 assets block 2015-12-25 18:28:28 +00:00
Paul de Vries
da1ae91d9a Remove XHTML and make it HTML5 valid 2015-12-25 18:12:44 +00:00
Paul de Vries
ff96642f82 Upgrade LESS v1.3.3 to v2.5.3 2015-12-25 18:12:14 +00:00
Gina Häußge
c120261e2b Increased backend fail counter for intermediary page
Also made sure that baseURL always ends in a /
2015-12-18 17:39:30 +01:00
Gina Häußge
f0acacec6a Intermediary page needs to remove fragments for baseUrl
Otherwise image pinging won't work properly.
2015-12-18 14:30:53 +01:00
Gina Häußge
86b96b8d4a Don't allow empty folder names 2015-12-17 16:56:09 +01:00
Gina Häußge
9b3e4f5c2a Properly capture StorageErrors 2015-12-17 16:48:02 +01:00
Gina Häußge
376c832b0b Fixed a ReferenceError when processing the SlicingProgress events 2015-12-17 13:57:39 +01:00
Gina Häußge
9fbe130169 Merge branch 'fix/aclFirstRun' into maintenance 2015-12-17 13:19:26 +01:00
Gina Häußge
7791f7751f Merge branch 'fix/aclFirstRun' into devel
Conflicts:
	src/octoprint/server/__init__.py
	src/octoprint/server/api/__init__.py
	src/octoprint/server/views.py
	src/octoprint/static/js/app/dataupdater.js
	src/octoprint/static/js/app/viewmodels/firstrun.js
2015-12-17 13:16:51 +01:00
Gina Häußge
b96d1b51e0 Disabled ACL is now tracked through enabled flag on UserManager
That allows us to properly enable and disable it at runtime (during first run).
2015-12-17 13:08:45 +01:00
Gina Häußge
22ae7fecf4 Merge branch 'fix/timeoutOnUnknownCommands' into devel
Conflicts:
	src/octoprint/util/comm.py
2015-12-17 10:45:33 +01:00
Gina Häußge
570c66b6f3 Trigger command processing on unknown commands
We suffer from the same problem as commands being suppressed in the
send queue here. If a non-GCODE-command we send to the printer
produces no output, our _monitor loop will wait until the next response
produced by another command. Which we won't send though since
we are stuck waiting in the _monitor loop waiting for a response. Hence
we need to manually trigger further command processing from the
send loop here in order to ensure things keep going.
2015-12-17 10:44:43 +01:00
Gina Häußge
e64a9bd4b5 Added feature flag to toggle F command support
Defaults to off, set feature.supportFAsCommand to true to enable.
2015-12-17 10:37:32 +01:00
Gina Häußge
dd843c8f67 Also recognize F as standalone GCODE command
While 3D printers usually don't support that, at least Smoothieware
does combined with CNC operations.
2015-12-16 16:50:42 +01:00
Salandora
8c85ed8ce5 Fix for system menu not getting properly reloaded after entries changed.
Plus added a missing semicolon.
2015-12-16 12:28:41 +01:00
Salandora
f9f22daa4d Merge branch 'fix/systemMenu' into devel 2015-12-16 12:21:34 +01:00
Salandora
ccd2ddc056 Fixed a bug with access control during first run
Requests against restricted resources could fail even though the
first run wizard had been completed successfully.
2015-12-16 11:59:45 +01:00
Salandora
54f24b43f0 If no system actions were configured during rendering of the page, no system menu was added to the template.
hat caused system actions added during runtime (e.g. by API) to not show up until a re-rendering of the page.
2015-12-16 11:35:25 +01:00
Alexander Leisentritt
6962fad1ae added "Retraction Z-Hop" setting to timelapse and altered the capture function in z-change mode so not on every z change pictures are captured but only on a real layer change 2015-12-16 01:21:23 +00:00
Gina Häußge
7232df686a Merge branch 'fix/compatibilityCheck' into devel
Conflicts:
	src/octoprint/plugins/pluginmanager/__init__.py
2015-12-14 14:24:30 +01:00
Gina Häußge
eae68f04ca Use PEP440 compatible version compatibility check
Also make sure that if we have a pkg_resources version that returns
tuples we not only remove any intermediary version parts if the base
version is requested, but we also append "*final" to the tuple afterwards,
otherwise the compatibility check will fail.
2015-12-14 14:14:44 +01:00
Gina Häußge
7e947a8403 Merge branch 'maintenance' into devel
Conflicts:
	src/octoprint/server/__init__.py
2015-12-14 11:58:21 +01:00
Gina Häußge
7fcd04ae61 Also use pre-calculated revision information instead of fetching anew 2015-12-14 10:16:29 +01:00
Gina Häußge
365c852769 Merge branch 'fix/fasterUpdateCheck' into devel
Conflicts:
	src/octoprint/plugins/pluginmanager/__init__.py
	src/octoprint/plugins/softwareupdate/__init__.py
2015-12-14 09:57:20 +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
Salandora
e8bd29ef99 Replace get_versions() calls with octoprint.server.VERSION, to get some time improvment 2015-12-09 10:29:24 +01:00
Gina Häußge
8a7d234571 Merge branch 'fix/commTimeoutOnSupressedScriptCommands' into maintenance 2015-12-08 14:24:47 +01:00
Gina Häußge
f82d9817dc Merge branch 'maintenance' into devel 2015-12-08 14:24:17 +01:00
Gina Häußge
c5c5383e0e Fixed clean up of preemptive cache entries 2015-12-08 14:23:40 +01:00
Gina Häußge
b4d25db9c8 Merge branch 'fix/betterUiCaching' into maintenance 2015-12-08 13:45:37 +01:00
Gina Häußge
ed6834ac0b Merge branch 'fix/intermediaryStartupPage' into devel
Conflicts:
	src/octoprint/server/__init__.py
2015-12-08 13:36:01 +01:00
Gina Häußge
ef876cfd35 Fire up intermediary server on host and port
That way people will not see connection failed messages while the server is
still starting up.

Served intermediary page als "pings" an image on the backend to detect if
a) the backend is still responding at all ("intermediary.gif") and b) whether the
server has fully started up ("online.gif").

If the backend stops responding for 5s, a message is output that tells the user
that something went really wrong and to please check the log file.

Once the server becomes online, the intermediary page reloads/switches to the
actual UI.
2015-12-08 13:28:12 +01:00
Gina Häußge
8d226dfbaa Merge branch 'maintenance' into devel
Conflicts:
	AUTHORS.md
	CHANGELOG.md
	src/octoprint/static/css/octoprint.css
2015-12-07 15:00:27 +01:00
Gina Häußge
cda399f11a Merge branch 'fix/ignoreCannotOpenSubdir' into maintenance 2015-12-07 13:21:57 +01:00
Gina Häußge
c98d3d1655 Also assume presence of heated bed in "add profile" dialog 2015-12-07 11:53:41 +01:00
Gina Häußge
5e96bd8b6a Fix: "Server Offline" should always win against "Please reload"
Nothing to reload if the server is offline, so show the offline message above
the reload one.
2015-12-07 11:51:20 +01:00
Gina Häußge
2b4a985d85 Assume the presence of a heated bed in the default profile 2015-12-07 11:04:09 +01:00
Gina Häußge
0982c8cc62 Ignore the "cannot (open|error) subdir" errors from Marlin 2015-12-07 09:26:25 +01:00
Mark Bastiaans
d90a9e7fc4 Fixed checks with os.path.realpath() for systems with symlinked paths
(cherry picked from commit b7c9949)
2015-12-04 17:36:49 +01:00
Gina Häußge
66b71199e4 Merge branch 'maintenance' into devel
Conflicts:
	CHANGELOG.md
	src/octoprint/plugins/softwareupdate/static/js/softwareupdate.js
2015-12-03 12:03:56 +01:00
Gina Häußge
af1cd1f9e3 profile.key => profile.id 2015-12-03 09:53:37 +01:00
Gina Häußge
1f9ebe7201 Fixed a typo 2015-12-02 21:42:30 +01:00
Gina Häußge
bad88da2fe Fixed a scrolling issue on the terminal tab 2015-12-02 18:12:08 +01:00
Gina Häußge
090671a044 Merge branch 'maintenance' into fix/commTimeoutOnSupressedScriptCommands 2015-12-02 17:26:25 +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
111cf2c140 Merge branch 'fix/commTimeoutOnSupressedScriptCommands' into devel
Conflicts:
	CHANGELOG.md
	src/octoprint/plugins/softwareupdate/__init__.py
	src/octoprint/plugins/virtual_printer/virtual.py
	src/octoprint/util/comm.py
2015-12-02 11:16:59 +01:00
Gina Häußge
c0774d0dd8 Fix: Do not stall comm when a command is supressed while printing 2015-12-02 11:08:51 +01:00
Gina Häußge
612005c4f6 Fixed a bug preventing OctoPrint from updating via github releases
Noticed while testing update path from 1.2.7 to 1.2.8

*bangs her head against a wall*
2015-12-02 09:25:15 +01:00
Gina Häußge
1d8cf86215 Updated translation source files and german translation 2015-12-01 11:42:57 +01:00
Gina Häußge
fbc0b8af91 Merge branch 'maintenance' into fix/betterUiCaching 2015-12-01 10:40:57 +01:00
Gina Häußge
966bec2bed Merge branch 'fix/onlyShowBedIfPrinterHasBed' into devel 2015-11-30 11:11:51 +01:00
Gina Häußge
93bbedae86 Only process bed temps & commands if printer profile has heated bed
Solves #1125
2015-11-30 11:11:35 +01:00
Gina Häußge
ecd7045b84 Only use data for preemptive caching from plugins if it's set 2015-11-27 16:35:33 +01:00
Gina Häußge
1fc50b9940 Merge branch 'fix/terminalMemoryUsage' into devel 2015-11-27 15:06:17 +01:00
Gina Häußge
40fe74ef45 Cut off terminal after 3000 lines
When autoscroll was disabled, terminal could run on endlessly, eating
memory until the browser crashes. Now a hard upper limit ensures
that not more than 3000 lines are ever stored in the terminal. If autoscroll
is disabled and the limit is reached, no more log lines will be added. That
ensures that the log will not scroll and the current log excerpt will stay put.
2015-11-27 15:05:55 +01:00
Gina Häußge
8eab664a34 Merge branch 'fix/wrongJsReference' into devel
Conflicts:
	src/octoprint/static/js/app/dataupdater.js
2015-11-27 11:32:41 +01:00
Gina Häußge
043b213a96 Move event processing for gcodefiles into corresponding viewmodel
Also fixes a javascript error (gcodeFileViewModel unknown)
2015-11-27 11:31:17 +01:00
Gina Häußge
8a7cf88f8d A method that's called putJson should actually put JSON and not formdata... 2015-11-27 10:06:34 +01:00
Gina Häußge
6f83a175da Replaced way too lax SourceRootFileLoader with SelectedFileLoader 2015-11-26 19:51:57 +01:00
Gina Häußge
fc4e786745 Merge branch 'fix/betterUiCaching' into dev/betterUiCaching
Conflicts:
	src/octoprint/util/jinja.py
2015-11-26 19:49:32 +01:00
Gina Häußge
63d095ab00 Refactored implementation of get_all_template_paths 2015-11-26 19:48:44 +01:00
Gina Häußge
4fc43ebd1c Merge branch 'fix/betterUiCaching' into dev/betterUiCaching
Conflicts:
	src/octoprint/server/util/flask.py
	src/octoprint/server/views.py
	src/octoprint/static/js/app/dataupdater.js
	src/octoprint/util/jinja.py
2015-11-26 19:45:17 +01:00
Gina Häußge
47670a1bbd Merge branch 'fix/1120' into devel 2015-11-26 16:07:53 +01:00
Gina Häußge
6db57122b4 Catch and log all exceptions that might be raised in the watchdog
Solves #1120
2015-11-26 16:07:29 +01:00
Gina Häußge
c595d02f22 reload(true) shouldn't be necessary any more
UI + assets should actually have ETag and LastModified headers and proper
IfMatch handling on the server side and hence the server should do the
right thing on its own.
2015-11-26 14:15:06 +01:00
Gina Häußge
2e23cd39a4 Added ETag and LastModified headers + processing to UI index
That should improve performance tremendously.

Both ETag and LastModified depend on all files the template rendering
depends on. If any of the depended on files changes, both values will
change as well. That allows us to track whether our cached copy is
still current (and force a refresh if not) and also process IfMatch request
headers and reply with a 304 directly so that we do not even have to
transfer the data if nothing changed and the browser still has it.
2015-11-26 13:32:32 +01:00
Gina Häußge
b3e6fe622d Merge branch 'fix/preemptiveUiCaching' into dev/preemptiveUiCachingWithUiPlugins
Conflicts:
	src/octoprint/server/__init__.py
	src/octoprint/server/views.py
2015-11-24 18:46:58 +01:00
Gina Häußge
3de4f91f50 Decoupled decorator from PreemptiveCache class
Coupling it led to problems (naturally) when there was no
PreemptiveCache instance available yet.
2015-11-24 18:41:53 +01:00
Gina Häußge
53a2e6e27e Merge branch 'fix/preemptiveUiCaching' into dev/preemptiveUiCachingWithUiPlugins
Conflicts:
	src/octoprint/server/__init__.py
	src/octoprint/server/util/flask.py
	src/octoprint/server/views.py
	src/octoprint/util/__init__.py
2015-11-24 17:18:55 +01:00
Gina Häußge
6473937b75 Refactore preemptive flask cache into a proper class
Also now tracks timestamps of last access to a preemptively cached
resource and cleans up stuff that hasn't been accessed in a while (7 days
by default)
2015-11-24 14:37:30 +01:00
Gina Häußge
0ef9f85a94 Merge branch 'fix/preemptiveUiCaching' into devel
Conflicts:
	src/octoprint/server/views.py
2015-11-23 19:55:13 +01:00
Gina Häußge
fab5fc4899 Added preemptive caching of / and /i18n/<locale>/messages.js
Introduced a @preemptively_cached decorator that for decorated views
persists the provided data in ~/.octoprint/data/preemptive_flask_cache.yaml
in a list indexed by the view's path if the data is not yet part of the list.

During initialization the server will iterate over the persisted paths and data
and for each persisted path and entry in the list initialize a temporary WSGI
environment based on the data (which is interpretated as keyword arguments
to werkzeug's EnvironmentBuilder) which will then be used to call the view
function in the correct context.

The current implementation for / and /i18n/<locale>/messages.js utilizes
that decorator to allow preemptive caching of those views (/ being probably
the most expensive one in the whole core application) utilizing request base URLs
(internal access, external access, reverse proxy with prefix url etc) that had been
encountered in the past.

Through the new config setting server.preemptiveCaching.exceptions it is
possible to define a set of base URLs to never cache. Preemptive caching can
be globally disabled by setting devel.cache.preemptive to false.
2015-11-23 17:35:25 +01:00
Gina Häußge
ab13a99b09 Merge branch 'fix/prefixAwareCache' into devel
Conflicts:
	src/octoprint/server/views.py
2015-11-23 12:21:42 +01:00
Gina Häußge
d0eca800fb Make the current request's baseurl to a part of the cache key
This way we create separate caches for URLs access via different schemes/prefixes/etc.
Otherwise our generated page might not work when accessing OctoPrint from external
after accessing it from internal once.
2015-11-23 12:17:57 +01:00
Gina Häußge
a379724963 Fixed a bug in octoprint dev plugin:new command 2015-11-23 11:13:50 +01:00
Gina Häußge
3ea77c76ef Fixed an import error introduced through moving the jinja trycatch extension 2015-11-20 11:46:28 +01:00
Gina Häußge
91ade13ded Merge branch 'fix/browserTabAwareness' into devel
Conflicts:
	src/octoprint/static/js/app/main.js
	src/octoprint/static/js/app/viewmodels/control.js
	src/octoprint/static/js/app/viewmodels/gcode.js
2015-11-20 11:44:09 +01:00
Gina Häußge
a52a5ca338 GCodeViewer: Even if off screen render 100% view on PrintDone event
Otherwise the GCODE Viewer will get stuck "half way through" if
"sync with progress" is enabled but the tab/browser tab loses focus
during printing and only regains it after the print has finished.
2015-11-20 11:40:06 +01:00
Gina Häußge
acc85127c5 Track browser tab visibility, only activate webcam/gcode viewer when visible
This might help with #1065 if indeed is related to background tab suspending behaviours in
browsers, but is a completely blind guess at this point since I still have not been able to
reproduce that issue myself.

Backported.

(cherry picked from commit 720cdad)
2015-11-20 11:06:25 +01:00
Gina Häußge
73d8ff9991 Merge branch 'fix/useIsHiddenPath' into devel
Conflicts:
	tests/util/test_file_helpers.py
2015-11-20 10:07:46 +01:00
Gina Häußge
a731f748d9 Moved existing hidden file checks to utilize octoprint.util.is_hidden_path 2015-11-20 10:02:06 +01:00
Gina Häußge
3d0fc8d674 Moved jinja ExceptionHandlerExtension to octoprint.util.jinja 2015-11-19 19:08:10 +01:00
Gina Häußge
1f90096a89 Merge branch 'fix/hiddenTemplatesListed' into devel
Conflicts:
	src/octoprint/util/__init__.py
	tests/util/test_file_helpers.py
2015-11-19 19:04:21 +01:00
Gina Häußge
9a7bddd530 Also don't include hidden files in other templates 2015-11-19 19:03:04 +01:00
Gina Häußge
83f66e133e Do not include hidden files in listed gcode scripts 2015-11-19 18:58:56 +01:00
Gina Häußge
ab97abf13e Some fixes and unit tests for octoprint.util.atomic_write, .bom_aware_open and .tempdir
(cherry picked from commit 4fcb853)
2015-11-19 15:15:35 +01:00
Gina Häußge
a4e805685a Merge branch 'dev/folderSupport' into devel 2015-11-19 12:52:49 +01:00
Gina Häußge
5062c1ce68 Merge branch 'maintenance' into devel
Conflicts:
	src/octoprint/plugins/cura/__init__.py
	src/octoprint/plugins/cura/templates/cura_settings.jinja2
2015-11-19 11:51:16 +01:00
Gina Häußge
7820c17d08 [Cura] Make plugin a bit more verbose regarding usage & setup 2015-11-19 11:42:12 +01:00