Commit graph

2421 commits

Author SHA1 Message Date
Gina Häußge
880b99faaf Better feedback of current vs selected profile & available actions
Also part of fixing core reason of #1734
2017-03-21 10:43:45 +01:00
Gina Häußge
5535a9aeb0 Handle default printer profile like all other profiles
It now resides in a file on disk and can be deleted. If the profile
configured as default is not available (e.g. due to having been
manually deleted, or on first start), the default profile as defined
in the profile manager will be written as _default and that will be
used/set as default.

On first start after this change gets applied, OctoPrint will migrate
the old "default overlay" residing in config.yaml to a file on disk
and delete the old entries in config.yaml.

Solves core reason of #1734
2017-03-20 18:33:13 +01:00
Gina Häußge
3bc77ffe3d Always merge with basic default profile 2017-03-20 13:18:39 +01:00
Gina Häußge
896aad3ab0 Migrate printer profile before saving as well
We want to make sure that externally added profiles are up to current
format.
2017-03-20 13:18:39 +01:00
Claudiu Ceia
01e970553f Fix typo: Celcius to Celsius (#1826) 2017-03-20 10:26:53 +01:00
Gina Häußge
6613d580f2 Support daemon mode on linux AND freebsd 2017-03-19 10:53:44 +01:00
Gina Häußge
ac6900ffb6 REALLY remove "Hide empty folders" m)
See #1671
2017-03-16 16:33:58 +01:00
Gina Häußge
fa73fd3c14 Merge branch 'master' into maintenance
# Conflicts:
#	src/octoprint/server/api/settings.py
#	src/octoprint/settings.py
2017-03-16 15:16:52 +01:00
Gina Häußge
0a69dbeddb Preparing release of 1.3.2 2017-03-16 13:08:31 +01:00
Gina Häußge
13714dc8d9 Enable save button when marking "save as default" 2017-03-16 11:25:53 +01:00
Gina Häußge
5a6edefec1 Slight rewording 2017-03-16 11:25:48 +01:00
ntoff
87be930a68 timelapse tab unsaved warning and rearrange interval input box
Addition of a notification under the save button when there are unsaved
changes, and a notice under the save as default checkbox when unticked,
that changes are only temporary.

Also move the "interval" box up the top to position it underneath the
timelapse type dropdown list, and change the text to be a bit more
descriptive.

(cherry picked from commit 381a016)
2017-03-15 12:47:47 +01:00
Gina Häußge
627d11fa51 Remove some redundance & return 400 on all wrong option values 2017-03-14 17:25:39 +01:00
Gina Häußge
315a80a7a7 Fix wrong default value for postroll
Closes #1821
2017-03-14 17:25:13 +01:00
Gina Häußge
1b91790f5f Merge branch 'fix/fileAccessRaceCondition' into maintenance 2017-03-13 17:14:14 +01:00
Gina Häußge
3e5923b21e Consolidate API Key handling
System wide API key now offers a generate button like the user
API keys. Setting the API key directly to a value via the settings API
endpoint is now no longer possible, which should prevent setting it
accidentally thanks to the browser prefilling things where it shouldn't.

No delete button is offered for the system wide API key since it will
get automatically regenerated on server start if not set, so
regeneration is the only functionality here that makes sense.

If no API key is set in the user settings, the "delete" button is now
disabled. If a key is already set and a new one is to be generated, a
confirmation dialog makes sure this is really what the user wants. Same
for deleting an existing API key.

Both the system wide API key and the user specific API keys will now
only display a QRCode if there's actually a value for the key.
2017-03-13 17:09:56 +01:00
Gina Häußge
c1fdbaa1e7 Force refresh of settings on login/logout
Our access rights might have changed, so let's make sure our
view of the settings is up to date.
2017-03-13 17:07:27 +01:00
Gina Häußge
1c132c39ad Preparing release of 1.3.2rc1 2017-03-10 14:35:11 +01:00
Gina Häußge
7114462024 Fixed python setup.py babel_compile 2017-03-10 14:24:49 +01:00
Gina Häußge
ebae1b475b Don't apply navbar gradient to dropdown entries 2017-03-10 12:49:21 +01: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
b38884db63 Removed an obsolete (and broken) method from PipCaller 2017-03-10 11:20:13 +01:00
Gina Häußge
a49772fcf3 Removed bits from clean command made redundant by #732
Force --all on stock clean command unless --orig is specified, in
which case "python setup.py clean" behaves like the stock clean
command. Additionally there are now --noeggs to skip egg deletion and
--nopyc to skip pyc deletion.
2017-03-09 18:41:55 +01:00
Gina Häußge
052796d5d2 Merge branch 'feature/inherit-clean' of https://github.com/DanLipsitt/OctoPrint into improve/cleanCommand 2017-03-09 18:40:50 +01:00
Gina Häußge
559238ca3c More solid parsing of line number from resends
Matches:

  * Resend:23
  * Resend:N23
  * Resend:N:23
  * rs 23
  * rs N23
  * rs N:23
  * rs N23 Expected checksum 109

Based on issue reported via PR #300
2017-03-09 17:08:01 +01:00
Gina Häußge
d298c3c672 Apply analysis throttle only every n lines
Default n = 100, configurable via config.yaml. Should make analysis a
bit faster while still giving the Pi air to breathe.
2017-03-09 15:38:52 +01:00
Gina Häußge
136736d307 Reset line numbers if printer sends "start" when operational
Might have been an external reset of the printer we didn't otherwise
detect, and unless we reset the line numbers we'll now be off and run
into resend requests.

Solves #1676
2017-03-09 14:35:07 +01:00
Shawn Bruce
5d1a0eaa16 Only reset scroll position for settings content. (Fixes #1812)
(cherry picked from commit 5c81833)
2017-03-09 11:57:08 +01:00
Andy Werner
8a4934e6f8 Fix an issue in user settings
* UserSettings: crashed if overwrite an existing key with primitive value by same key with complex value. Also reduced number of calls to user.get_setting()

* Updated tests

(cherry picked from commit b75b53d)
2017-03-08 18:11:36 +01:00
Gina Häußge
a0e5f79483 Only load file into GCODE viewer when that is actually visible
Reduces needed bandwidth on page load, might help to mitigate
bandwidth related issues described in #1241.
2017-03-08 18:03:16 +01:00
Gina Häußge
ab42cc2a7f Better error resilience against garbage history data from plugins
See #1805
2017-03-06 15:32:30 +01:00
Gina Häußge
d8f2630fd4 Don't call onUserLoggedIn/Out on user reload 2017-03-06 14:11:41 +01:00
Gina Häußge
811c91955c Fix for new user settings getting lost until restart
On reload of the user settings a new user object was created but not
updated on the associated session user(s). That let to session user
(s) still referring to the old user instances with the only partially
updated user settings.

Behaviour changed such that on a reload of the users from file
(including user settings) all registered session users will now get
their reference updated as well.

Also made modelling of user id to session id a bit less redundant.
2017-03-06 14:02:39 +01:00
Gina Häußge
2dcd6e02b1 Remove webapp headers to play nice with Safari's session handling
Solves #1792
2017-03-06 11:37:00 +01:00
Gina Häußge
d845257cf4 Fixed caching of main page
Got broken by 62890ef73a
2017-03-01 18:28:37 +01:00
Gina Häußge
c765e6e228 Revert "Only do lookup by userid if session is None"
This reverts commit f02fac20ed.

The commit turned out to nuke the "remember me" functionality.
2017-03-01 15:49:19 +01:00
Gina Häußge
20e1219d9e Virtual printer: configurable ok format 2017-03-01 15:48:36 +01:00
Gina Häußge
14120f732b Only check if we need to close login dropdown if it's open 2017-02-28 10:00:51 +01:00
Gina Häußge
b7e2b0f794 Fixed login dropdown not auto closing on click outside of it
When two wrongs make one right...
2017-02-28 09:54:36 +01:00
Gina Häußge
f02fac20ed Only do lookup by userid if session is None 2017-02-27 15:51:24 +01:00
Gina Häußge
755bcaa311 Add current path to "Back" button in file list
Closes #1712
2017-02-24 15:05:26 +01:00
Gina Häußge
aab98a7c9f Disable "Slice" button when printing and local slicer is selected
Solves #1631
2017-02-24 13:21:33 +01:00
Gina Häußge
3a984d41ff Remove color option in printer profile editor
We don't use it anywhere and its presence keeps confusing users. Kept
in the model since we might want to use it at some later time.

Closes #1790
2017-02-24 12:38:37 +01:00
Gina Häußge
28d01e2fa6 Disable external heatup detection until firmware is detected 2017-02-24 12:32:05 +01:00
Gina Häußge
2198add8e6 SWU: Refresh cache on startup & prevent concurrent refresh & fix hash 2017-02-24 11:56:02 +01:00
Gina Häußge
1de307e15d Log version, safe mode & plugins to log on log roll over
We want to make sure that information is ALWAYS in each and every log.
2017-02-24 10:53:16 +01:00
Gina Häußge
aab7b7f797 Timelapse: ignore both z-hop flanks but allow z-hop to next layer
Former implementation tested for z-hop rising flank and anything that
is falling. That however causes issues with z-hop directly followed
by layer change (diff is not z-hop size but negative, image hence not
captured).

Instead of testing for positive flank == z-hop and any negative flank,
we now test for absolute value == z-hop.

Solves #1777
2017-02-23 17:17:38 +01:00
Gina Häußge
162e8c50d3 Fixed CSS and LESS bundling for core vs plugins vs all 2017-02-23 17:05:42 +01:00
Gina Häußge
636d8e0faa Eventhandling: Wait for command to finish before triggering next
Should solve #733
2017-02-23 16:50:04 +01:00
Gina Häußge
62890ef73a Fix a bunch of caching issues
Cache was not invalidated on change of:

  * snapshot URL presence
  * system menu entry presence
  * gcode viewer enabled/disabled
  * changes in access control availability

Refactored cache setup to add enable_timelapse, enable_gcodeviewer
and enable_accesscontrol to ETag calculation, removed system menu
check. Template filtering will now be done based on the values of
these flags at render time, not before.

See also #1776 for a related ticket.
2017-02-23 14:49:47 +01:00