Commit graph

357 commits

Author SHA1 Message Date
Gina Häußge
fec51ebc8e Fixed a merge error that caused duplicated code and missing auto migration of reverse proxy settings 2014-11-17 13:50:47 +01:00
Gina Häußge
50895a662a Updating the settings now fires a new event "SettingsUpdated" 2014-11-17 11:06:54 +01:00
Gina Häußge
048ad78778 Do not deliver API key on settings API unless user has admin rights. 2014-11-14 18:24:57 +01:00
Gina Häußge
e9beffc799 Properly recognize app session keys everywhere. Also fixed a bug where the ApiUser was not properly provisioned with his roles. 2014-11-14 17:58:42 +01:00
Gina Häußge
fe9dd5ef28 Send 401 Unauthorized instead of 403 Forbidden upon failed app session verification 2014-11-14 15:02:52 +01:00
Gina Häußge
468e4b6d55 Support for a new type of API key
In order to solve the initial handshake problem with apps, OctoPrint now supports so called app session keys which are basically API keys with a limited validity. Obtaining those keys is based on a handshake procedure backed by RSA signatures. OctoPrint needs to be aware of apps and their associated public keys (with the AppPlugin there exists a mechanism to add additional recognized apps by installing a plugin). Apps perform the handshake by first requesting a temporary key with very limited validity, then sending a message back to OctoPrint containing their id, version, the temporary key and a signature created with their private key over these three pieces of data. OctoPrint then tries to verify the signature and if successful unlocks the key to be used as a fully recognized API key.
2014-11-14 14:30:25 +01:00
Gina Häußge
b48ac505fd Allow to fetch whole tree from the settings merged with the defaults 2014-11-14 10:42:02 +01:00
Gina Häußge
4b9cd490ab Merge branch 'updateSettingsModal' of https://github.com/Booli/OctoPrint into Booli-updateSettingsModal 2014-11-12 11:26:23 +01:00
Gina Häußge
71bb760ce5 Small optimization 2014-11-12 11:22:55 +01:00
Philipp Engel
98a46e8caa including plugins' main template (='name of the plugin'.jinja2, e.g. cura.jinja2) to index.jinja2 2014-11-11 14:22:30 -08:00
Gina Häußge
dcdbd3652a Merge branch 'master' into devel 2014-11-10 09:21:23 +01:00
Gina Häußge
c35b7a66b0 Encoding has to be specified before any other line of code 2014-11-10 09:21:05 +01:00
Gina Häußge
9709b97adf GCODE viewer now doesn't stumble over completely extrusionless GCODE files 2014-11-08 15:27:03 +01:00
Gina Häußge
21bd664edf Merge branch 'devel' of github.com:foosel/OctoPrint into devel 2014-11-08 15:16:29 +01:00
Gina Häußge
5675f32a19 QR Code generation uses jquery.qrcode and a custom knockout binding
This way it will also be possible to easily add another qrcode to the user api key later. Refused to work for now (value binding doesn't update), so commented out right now, but works in theory.
2014-11-08 15:14:38 +01:00
Michael Ang
16801ad3e1 Disable autocapitalization for username
Makes it easier to login on iPhone (Mobile Safari)
2014-11-07 00:24:05 +01:00
Jarek Szczepanski
25cfed949d Added QR code with API key on Settings dialog 2014-11-05 12:24:51 +01:00
Gina Häußge
eacfcab187 Merge branch 'master' into devel
Conflicts:
	CHANGELOG.md
2014-11-04 10:43:11 +01:00
Gina Häußge
5acb04c180 Fixed a couple of more missing branch fields and added Changelog entry 2014-11-04 10:07:46 +01:00
Gina Häußge
ff96e2e4d6 Also interpret lines starting with "!!" as errors from the firmware
(see http://reprap.org/wiki/G-code#Replies_from_the_RepRap_machine_to_the_host_computer)
2014-11-03 21:40:21 +01:00
Pim Rutgers
2e96fa9e1e Request Settings data on opening modal
to counter different browser windows having different settings
2014-11-03 19:14:50 +01:00
Gina Häußge
ca6364e5d4 Correctly interpret Smoothieware temperature data for multiple extruders
Fixes #633
2014-10-31 14:08:52 +01:00
Gina Häußge
62667de4a8 Fix: Don't try to create a SessionUser for anonymous users 2014-10-30 12:22:58 +01:00
Gina Häußge
f8955c0d1b Fix of file type detection 2014-10-29 12:17:26 +01:00
Gina Häußge
0aac7813e4 More work on slicing integration:
- be able to handle slicers which can't report progress
- distinguish between registered and configured slicers (e.g. to allow uploading of profiles via the settings before having saved the path to the executable)
2014-10-29 12:16:49 +01:00
Gina Häußge
44cc9e7db8 Cura Plugin: Filament diameter and hotend temperature where not correctly extracted from profile and supplied to CuraEngine, resulting in low print quality
(using the default of 2.85mm filament diameter doesn't work well for 1.75mm machines...)
2014-10-29 11:57:43 +01:00
Gina Häußge
ff97fba0f0 Merge branch 'master' into devel
Conflicts:
	src/octoprint/server/api/__init__.py
2014-10-27 09:39:14 +01:00
Gina Häußge
ce67e28f96 Generate the salt used for hashing user passwords individually for each server instance 2014-10-27 09:37:39 +01:00
Gina Häußge
e149689249 Enable logging of tornado errors by default, to make sure octoprint.log will contain meaningful entries if something goes wrong in our tornado customization 2014-10-24 20:11:58 +02:00
Gina Häußge
b79d5e670a Tornado's StaticFileHandler now supports content streaming, use that instead of our own implementation
Also allow for definition of access validation and serving as attachment though.

Hopefully also fixes #606, since that was possibly called by our own implementation of content streaming, which now has been removed completely.
2014-10-24 19:59:59 +02:00
Gina Häußge
c23cb378cd Allow login of the same user from multiple browsers without side effects
So far when logging in from two different browsers, then logging out in one of them the user was logged out across all browsers. This should now be changed in so far as that each individual browser session is tracked and only that session is ended by a logout that belongs to the browser where the logout button was clicked.

Should fix #556
2014-10-24 13:05:07 +02:00
Gina Häußge
b4699825d6 Generate the key used for session hashing individually for each server instance
(cherry picked from commit 118a4f7)
2014-10-23 15:38:43 +02:00
Gina Häußge
118a4f7097 Generate the key used for session hashing individually for each server instance 2014-10-23 15:33:32 +02:00
Gina Häußge
7acb0657a7 Made "Streaming done" notification green 2014-10-23 14:45:12 +02:00
Gina Häußge
021ce44673 Don't die if you're not able to log a print (e.g. for prints from SD) 2014-10-23 14:45:11 +02:00
Gina Häußge
9a7733c9a3 Make "Slicing done" notification green
Implements #558
2014-10-22 09:45:42 +02:00
Gina Häußge
7150f5b536 Properly reselect default slicer and profile in slicing dialog after sending a slicing request 2014-10-22 09:12:50 +02:00
Gina Häußge
753b9e8d7a Automatically refresh slicing profiles in slicing dialog when profiles are added or removed via the Cura plugin settings 2014-10-22 09:09:37 +02:00
Gina Häußge
6e62ecc8c1 Keep track of files that are currently being used (file being printed, source and destination for slicing) so that they can't be deleted
Also added logging to exception branches where the exception was formerly just swallowed.
2014-10-21 19:18:59 +02:00
Jarek Szczepanski
6e4d35777b Fixed gcode analyzing after file upload 2014-10-21 18:35:08 +02:00
Gina Häußge
776e6aa498 Fixed a typo breaking slicing altogether 2014-10-21 15:03:36 +02:00
Gina Häußge
b7a21dd322 More error resilience in regards to defined printer parameters when converting the slicing profile for Cura 2014-10-21 14:56:59 +02:00
Gina Häußge
71d73c6562 Do not try to slice on local slicers when printing
Since slicing takes a lot of resources, that might lead to quality loss for the print job.
2014-10-21 14:14:00 +02:00
Gina Häußge
6732710d6f Added logging of CuraEngine output to Cura plugin
Should hopefully help debugging issues where the slicer appears to not be doing anything.
2014-10-21 12:08:16 +02:00
Gina Häußge
90618723d4 Parse slicing progress from Cura and provide it on sock.js socket
UI for now displays it in the "Slicing" progress bar text.
2014-10-20 18:58:04 +02:00
Gina Häußge
084ca956fb Cache metadata in an LRU cache instead of fetching it from disk everytime 2014-10-20 16:49:53 +02:00
Gina Häußge
44109f9d8f Automatically cancel running slicing jobs targeting the same output file if a new slicing request is received
This way there won't be two concurrent jobs trying to slice to the same file, which would practically render the cpu cycles from any slicing jobs than the final one wasted. Also adds a new event "SlicingCancelled" that will be sent in these cases.
2014-10-20 13:40:04 +02:00
Gina Häußge
606efd3da1 Pause button now changes icon when paused to indicate "Resume" state better, also added tooltips
Updated german translation accordingly, other translations will have to follow once the community translates the new strings.
2014-10-20 09:51:33 +02:00
Gina Häußge
1acbbbaf6c Merge branch 'master' into devel 2014-10-16 23:51:00 +02:00
Gina Häußge
a332b71463 Properly initialize settings dir
Since config.yaml gets now saved on server startup before settings basedir gets initialized by other means (e.g. first access of base folder for uploads), it was not created yet when the config.yaml was tried to be saved upon first start up, causing an error at server startup.

Closes #604
2014-10-16 23:49:26 +02:00