Gina Häußge
d8eb57548d
Merge branch 'dev/granularPermissions' into devel
...
# Conflicts:
# src/octoprint/server/api/files.py
# src/octoprint/server/api/job.py
# src/octoprint/static/js/app/viewmodels/users.js
2018-04-26 19:27:11 +02:00
Gina Häußge
3d7016f500
Fixed/removed completely outdated & broken tests
2018-04-26 19:09:03 +02:00
Gina Häußge
135cf6a9cc
Migrate file storage metadata to json
...
As suggested by @CapnBry, that should give us a significant speed
boost considering that yaml serialization and deserialization is some
orders of magnitude slower than json.
We only do that for the file metadata for now - it has the biggest gain
to expect from a speed boost, and having the configuration as yaml
actually has its readability advantages.
2018-04-25 17:01:24 +02:00
Gina Häußge
08bfae216c
Merge branch 'devel' into dev/permission
...
# Conflicts:
# src/octoprint/plugins/printer_safety_check/__init__.py
# src/octoprint/server/__init__.py
# src/octoprint/server/util/sockjs.py
2018-04-12 16:37:27 +02:00
Gina Häußge
6f224bd825
Workaround for typo & whitespace in Malyan M115 responses
...
NAME. instead of NAME:, whitespace between key and value component.
2018-04-11 11:12:56 +02:00
Gina Häußge
025f545ef7
Better requirement detection in octoprint_setuptools
...
Plus unit tests.
2018-04-06 14:59:11 +02:00
Gina Häußge
1852578136
Merge branch 'devel' into dev/permission
...
# Conflicts:
# src/octoprint/plugins/logging/__init__.py
# src/octoprint/server/__init__.py
# src/octoprint/server/util/sockjs.py
# src/octoprint/static/css/octoprint.css
2018-04-04 16:47:51 +02:00
Gina Häußge
9f80aefcc9
thaw_frozendict should be fully recursive
...
So far it was only deep-diving into frozendicts, not dicts (which might
contain frozendicts).
In principle we probably should also dive into tuples and lists and
other containers, but in our current application we don't put
frozendicts into those so let's not overdo it.
2018-04-03 16:56:59 +02:00
Gina Häußge
f782cfe83f
Thaw the frozendict on printer.get_current_data
...
We don't want calling code to run into trouble because of that.
Fixes #2506
2018-03-22 12:58:52 +01:00
Gina Häußge
d1711f0376
Merge branch 'devel' into dev/permission
...
# Conflicts:
# src/octoprint/plugins/softwareupdate/static/js/softwareupdate.js
# src/octoprint/server/__init__.py
# src/octoprint/server/util/flask.py
# src/octoprint/server/util/sockjs.py
# src/octoprint/static/css/octoprint.css
# src/octoprint/static/js/app/viewmodels/printerstate.js
# src/octoprint/templates/tabs/timelapse.jinja2
2018-03-20 16:10:19 +01:00
Gina Häußge
2abff3b589
Fix broken unit test
2018-03-06 15:05:25 +01:00
Gina Häußge
2db2532c2f
Fix unit tests broken by implementation of #2208
2018-02-28 17:07:53 +01:00
Gina Häußge
b9a5e1db69
Merge branch 'devel' into dev/permission
...
# Conflicts:
# src/octoprint/plugins/corewizard/__init__.py
# src/octoprint/plugins/pluginmanager/__init__.py
# src/octoprint/plugins/softwareupdate/__init__.py
# src/octoprint/printer/standard.py
# src/octoprint/server/__init__.py
# src/octoprint/server/api/job.py
# src/octoprint/server/api/log.py
# src/octoprint/server/util/__init__.py
# src/octoprint/server/views.py
# src/octoprint/static/css/octoprint.css
# src/octoprint/static/js/app/main.js
# src/octoprint/static/js/app/viewmodels/log.js
# src/octoprint/static/js/app/viewmodels/loginstate.js
# src/octoprint/static/js/app/viewmodels/printerstate.js
# src/octoprint/static/js/app/viewmodels/users.js
# src/octoprint/static/less/octoprint.less
# src/octoprint/templates/dialogs/settings/logs.jinja2
# src/octoprint/templates/tabs/control.jinja2
# src/octoprint/util/__init__.py
2018-02-20 15:42:43 +01:00
Gina Häußge
ec12bd7cd4
Introduce CaseInsensitiveSet & use for valid boolean trues
...
Follow up to #2385
2018-02-06 10:15:57 +01:00
Gina Häußge
ef6b39757b
Merge branch 'maintenance' of github.com:foosel/OctoPrint into maintenance
2017-12-08 16:22:19 +01:00
Gina Häußge
86934c8863
Support M114 response from RepRapFirmware
...
RRF uses format X:... Y:... Z:... E0:... E1:... instead of
X:... Y:... Z:... E:...
2017-12-06 16:03:19 +01:00
Gina Häußge
13eb5ec7ed
Merge pull request #2250 from kantlivelong/resettable_timer
...
Added ResettableTimer class
2017-12-06 11:42:45 +01:00
Shawn Bruce
6ce6160f3d
Added ResettableTimer class
2017-12-05 12:00:12 -05:00
Gina Häußge
06816fb8dc
Test: checksum missing => missing checksum
2017-12-04 16:04:38 +01:00
Gina Häußge
cc0a17f2ac
Unit tests for MachineCom._handle_errors
...
With various Marlin and Repetier error variants.
2017-12-04 15:56:31 +01:00
Gina Häußge
088b0cf1e7
Merge branch 'devel' into dev/permission
...
# Conflicts:
# src/octoprint/server/__init__.py
# src/octoprint/server/api/__init__.py
# src/octoprint/server/util/flask.py
2017-11-28 13:19:54 +01:00
Gina Häußge
14bd0632c0
parse_requirements => Requirement.parse
...
Since we only ever handle one requirement here, the parse_requirements
generator (which btw needs a next m() is not the best choice.
Also extracted install command cleanup into class method and added tests
for that.
cc @markwal
2017-11-28 12:02:43 +01:00
Gina Häußge
022c59a094
Fix unit tests again
2017-11-21 14:36:30 +01:00
Gina Häußge
d8cffc4b22
Merge branch 'devel' into dev/permission
...
# Conflicts:
# src/octoprint/plugins/announcements/static/js/announcements.js
# src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js
# src/octoprint/plugins/softwareupdate/static/js/softwareupdate.js
# src/octoprint/server/__init__.py
# src/octoprint/static/css/octoprint.css
# src/octoprint/static/js/app/viewmodels/connection.js
# src/octoprint/static/js/app/viewmodels/control.js
# src/octoprint/static/js/app/viewmodels/files.js
# src/octoprint/static/js/app/viewmodels/gcode.js
# src/octoprint/static/js/app/viewmodels/log.js
# src/octoprint/static/js/app/viewmodels/loginstate.js
# src/octoprint/static/js/app/viewmodels/navigation.js
# src/octoprint/static/js/app/viewmodels/printerprofiles.js
# src/octoprint/static/js/app/viewmodels/printerstate.js
# src/octoprint/static/js/app/viewmodels/settings.js
# src/octoprint/static/js/app/viewmodels/temperature.js
# src/octoprint/static/js/app/viewmodels/terminal.js
# src/octoprint/static/js/app/viewmodels/timelapse.js
# src/octoprint/static/js/app/viewmodels/users.js
2017-11-21 11:42:28 +01:00
Gina Häußge
ebfc6f2f26
More dynamic detection of plugin mixins
...
Instead of hardcoding a list of supported mixins, we now instead define
a base class (or a list thereof) from which mixins might inherit and use
inspection to determine the set of mixins each plugin implementation
implements. Not only will that reduce the risk of forgetting to add a
new mixin to the whitelist, but it will also allow mixins defined by
plugins.
2017-11-13 16:01:37 +01:00
Gina Häußge
1180e4e27b
Fix & extend environment detection on Pi
2017-11-10 18:27:52 +01:00
Gina Häußge
b2d70de144
Environment detection & logging on startup
...
Incl. OctoPi version & RPi model through bundled plugin that only
gets loaded if OctoPi is detected.
2017-11-10 17:32:59 +01:00
Gina Häußge
69f9c523f9
Add utm tags to announcement links
2017-11-09 10:49:39 +01:00
Gina Häußge
e974cb8ec5
Refactored (Permissions|Group|User)Manager
...
* Removed PermissionsManager and merged functionality of that into
Permissions class
* Decoupled GroupManager from UserManager
* Renamed some things for less redundancy
* Removed unused YAML conversion methods
* Stricter differentiation between Manager parent class and concrete
implementations
* Marked broken tests as skipped and broken, separated them further
and added some
2017-11-08 15:59:31 +01:00
Gina Häußge
4e0d3725cb
Refactor someName => some_name in access classes
2017-11-02 14:30:35 +01:00
Gina Häußge
f45cb1560f
Fix SessionUserTestCase
2017-11-02 14:14:57 +01:00
Marc Hannappel
d88b1fbec0
Merge branch 'devel' of github.com:foosel/OctoPrint into dev/permission
2017-10-25 09:11:13 +02:00
Gina Häußge
42ac133436
Support full UTF8 file names
...
Files (and folders) are still slugified to ASCII for storage on disk,
but now the original filename is stored alongside in metadata.yaml
and used for display in the file list and print status.
The slicing dialog also inherits that display name for use as base
for the suggested GCODE name.
Internally, everything still depends completely on the slugified
ASCII version.
This implements #2094
2017-10-12 18:08:41 +02:00
Marc Hannappel
ff0e4f50da
Merge branch 'devel' of github.com:foosel/OctoPrint into dev/permission
2017-10-11 10:19:18 +02:00
Gina Häußge
abfcc6e5aa
Fix deletion of unrendered timelapses
...
If the filename contained a [] pair, the file would not match the glob
pattern used for selecting for deletion.
Backporting the glob.escape function from Python 3.4 and using it here
should fix that. We only use our own ported version if glob.escape
doesn't exist - that should reduce redundant code once we become Python
3 compatible.
2017-10-10 12:41:47 +02:00
Gina Häußge
7fc0f48659
Adjust unit tests for script root in cookie suffix
2017-09-28 17:43:53 +02:00
Marc Hannappel
fbd8a97ffd
Merge branch 'devel' of github:foosel/OctoPrint into dev/permission
2017-07-17 09:02:32 +02:00
Gina Häußge
cf053ddbed
Temperatures may in fact be negative
...
E.g. in case of a disconnected thermistor, or when it is really
really cold. Make sure our parsing doesn't get confuse by this and
thinks that
ok T:150.0/210.0 T0:-55.7/0 T1:150.0/210.0
is actually only T and T1 being reported by the firmware, causing
stuff to be wrongly canonicalized thanks to T/T1 being Smoothie's way
of reporting dual extruder setups.
Fixes #2007
2017-07-14 11:18:04 +02:00
Gina Häußge
f8d225a768
Support for parsing GCODE subcodes
...
Hook handlers will get any parsed subcode as optional keyword argument
"subcode".
2017-07-05 17:56:46 +02:00
Marc Hannappel
120406d115
Merge branch 'devel' of github:foosel/OctoPrint into dev/permission
2017-07-05 11:44:24 +02:00
Marc Hannappel
d72ae6102b
Added missing files/folders
2017-07-05 10:07:20 +02:00
Marc Hannappel
4ec1a9af39
Refactor a huge amount of code thanks to design failure, also add some comments and make things more translatable
2017-07-05 08:16:31 +02:00
Gina Häußge
7ab4d12548
Better error resilience against wrong user manager
...
Also improved get_class by using importlib instead of complicated
climbing through the whole module tree.
2017-06-29 15:07:17 +02:00
Gina Häußge
f6c3e5991d
PMGR: Detect if plugin needs printer reconnect
2017-06-28 10:30:35 +02:00
Gina Häußge
12d40122d1
Use wrapt.ObjectProxy for SessionUser wrapper class
...
Our old manual wrapped didn't properly work in some aspects, this
version now should hopefully take care of most common proxy object
pitfalls.
2017-06-27 15:03:37 +02:00
Gina Häußge
6a1b162e7b
Support for temperature autoreporting instead of polling
...
Now also detects capabilities reported by (extended) M115 output and
if AUTOREPORT_TEMP is available enables it with the configured
autoreport interval and disables active polling.
Implements #1679
2017-06-06 18:46:23 +02:00
Marc Hannappel
422f1b2b5e
Combine user, permissions and group tests as access test, Fix a problem with GroupsCantbeChanged
2017-06-02 11:23:44 +02:00
Gina Häußge
832c27ed18
Filter source maps from bundled assets
...
At least for now. Might be re-evaluated in the future. URL rewrite
filter for such a case already in place.
2017-05-19 12:28:20 +02:00
Marc Hannappel
1bea7654b8
More work on the tests
2017-05-19 11:46:06 +02:00
Marc Hannappel
31f300f6d8
Use lower case names for method names split with an underscore
2017-05-19 11:44:54 +02:00