From 57a58b3bd7fbe27ac62777e6f54ce4d1564911b6 Mon Sep 17 00:00:00 2001 From: Bernd Zeimetz Date: Mon, 18 Dec 2017 00:38:20 +0100 Subject: [PATCH 01/38] Trust basic authentication headers for user login. This is my suggestion on how to handle basic authentication for users mananaged by OctoPrint's UserManager. In my opinion OctoPrint should not be doing Basic Authentication on its own. The commen case is that it runs on some slow hardware which its not able to handle stupid bots trying out thousands of passwords in short time. Also you want to protect it as much as possible from the outside to ensure that the basd internet can't break your 72h print after 71 hours by brute-forcing passwords. So I'm introducing an accessControl: trustBasicAuthentication config option. If enabled, it will take the user name from the Authorization header, check if the user exists and is enabled - and if so, just login the user. --- AUTHORS.md | 1 + src/octoprint/server/__init__.py | 18 ++++++++++++++++ src/octoprint/server/api/__init__.py | 3 ++- src/octoprint/server/util/__init__.py | 31 +++++++++++++++++++++++++++ src/octoprint/settings.py | 3 ++- 5 files changed, 54 insertions(+), 2 deletions(-) diff --git a/AUTHORS.md b/AUTHORS.md index a08602296..b8b427a2b 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -86,6 +86,7 @@ date of first contribution): * [Peter Backx](https://github.com/pbackx) * [Josh Major](https://github.com/astateofblank) * ["alex-gh"](https://github.com/alex-gh) + * [Bernd Zeimetz](https://github.com/bzed) OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by [Daid Braam](https://github.com/daid). Parts of its communication layer and diff --git a/src/octoprint/server/__init__.py b/src/octoprint/server/__init__.py index a9488a765..b034f613b 100644 --- a/src/octoprint/server/__init__.py +++ b/src/octoprint/server/__init__.py @@ -147,6 +147,19 @@ def load_user(id): return None +def load_user_from_request(request): + header = request.headers.get('Authorization') + if header: + header = header.replace('Basic ', '', 1) + try: + header = base64.b64decode(header) + except TypeError: + return None + id = header.split(':')[0] + user = userManager.findUser(userid=id) + if user: + return user + return None def unauthorized_user(): from flask import abort @@ -446,6 +459,11 @@ class Server(object): loginManager.session_protection = "strong" loginManager.user_callback = load_user loginManager.unauthorized_callback = unauthorized_user + + # login users authenticated by basic auth + if self._settings.get(["accessControl", "trustBasicAuthentication"]): + loginManager.request_callback = load_user_from_request + if not userManager.enabled: loginManager.anonymous_user = users.DummyUser principals.identity_loaders.appendleft(users.dummy_identity_loader) diff --git a/src/octoprint/server/api/__init__.py b/src/octoprint/server/api/__init__.py index 184567afe..c68844a40 100644 --- a/src/octoprint/server/api/__init__.py +++ b/src/octoprint/server/api/__init__.py @@ -19,7 +19,7 @@ import octoprint.server import octoprint.plugin from octoprint.server import admin_permission, NO_CONTENT from octoprint.settings import settings as s, valid_boolean_trues -from octoprint.server.util import noCachingExceptGetResponseHandler, enforceApiKeyRequestHandler, loginFromApiKeyRequestHandler, corsRequestHandler, corsResponseHandler +from octoprint.server.util import noCachingExceptGetResponseHandler, enforceApiKeyRequestHandler, loginFromApiKeyRequestHandler, loginFromRequest, corsRequestHandler, corsResponseHandler from octoprint.server.util.flask import restricted_access, get_json_command_from_request, passive_login @@ -47,6 +47,7 @@ api.after_request(noCachingExceptGetResponseHandler) api.before_request(corsRequestHandler) api.before_request(enforceApiKeyRequestHandler) +api.before_request(loginFromRequest) api.before_request(loginFromApiKeyRequestHandler) api.after_request(corsResponseHandler) diff --git a/src/octoprint/server/util/__init__.py b/src/octoprint/server/util/__init__.py index f18d05a7c..ab5940533 100644 --- a/src/octoprint/server/util/__init__.py +++ b/src/octoprint/server/util/__init__.py @@ -5,6 +5,8 @@ __author__ = "Gina Häußge " __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' __copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License" +import base64 + from octoprint.settings import settings import octoprint.timelapse import octoprint.server @@ -75,6 +77,35 @@ def loginFromApiKeyRequestHandler(): return _flask.make_response("Invalid API key", 403) +def loginFromRequest(): + """ + ``before_request`` handler for creating login sessions based on the Authorization header. + """ + + if not settings().get(["accessControl", "trustBasicAuthentication"]): + return + + header = _flask.request.headers.get('Authorization') + if header: + header = header.replace('Basic ', '', 1) + try: + header = base64.b64decode(header) + except TypeError: + return + id = header.split(':')[0] + if octoprint.server.userManager.enabled: + user = octoprint.server.userManager.findUser(userid=id) + else: + # what should we really do if the user manager is disabled + # and basic auth activated? + return + + if user is not None and _flask.ext.login.login_user(user, remember=False): + _flask.ext.principal.identity_changed.send(_flask.current_app._get_current_object(), + identity=_flask.ext.principal.Identity(user.get_id())) + return + + def corsRequestHandler(): """ ``before_request`` handler for blueprints which sets CORS headers for OPTIONS requests if enabled diff --git a/src/octoprint/settings.py b/src/octoprint/settings.py index f8e5b09dc..f42ff6677 100644 --- a/src/octoprint/settings.py +++ b/src/octoprint/settings.py @@ -301,7 +301,8 @@ default_settings = { "userfile": None, "autologinLocal": False, "localNetworks": ["127.0.0.0/8"], - "autologinAs": None + "autologinAs": None, + "trustBasicAuthentication": False }, "slicing": { "enabled": True, From 3e236dc57d1f61160966299593d03f8b9b01ba74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 5 Feb 2018 12:27:57 +0100 Subject: [PATCH 02/38] Temperature graph: Small axis fixes * remove "just now" X axis tick, we just don't show anything for less than a minute ago now * add unit to Y axis ticks Closes #2371 --- src/octoprint/static/js/app/viewmodels/temperature.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/octoprint/static/js/app/viewmodels/temperature.js b/src/octoprint/static/js/app/viewmodels/temperature.js index a9957f92a..af328424b 100644 --- a/src/octoprint/static/js/app/viewmodels/temperature.js +++ b/src/octoprint/static/js/app/viewmodels/temperature.js @@ -329,7 +329,12 @@ $(function() { yaxis: { min: 0, max: Math.max(Math.max.apply(null, plotInfo.max) * 1.1, 310), - ticks: 10 + ticks: 10, + tickFormatter: function(val, axis) { + if (val === undefined || val === 0) + return ""; + return val + "°C"; + } }, xaxis: { mode: "time", @@ -347,7 +352,8 @@ $(function() { // convert to minutes var diffInMins = Math.round(diff / (60 * 1000)); if (diffInMins === 0) { - return gettext("just now"); + // don't write anything for "just now" + return ""; } else if (diffInMins < 0) { // we can't look into the future return ""; From fcf7358855e851451e66c95588339004243a3e44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 5 Feb 2018 15:37:46 +0100 Subject: [PATCH 03/38] BasicAuth: Check PW too by default Also slightly refactored to deduplicate. --- src/octoprint/server/__init__.py | 13 +---- src/octoprint/server/api/__init__.py | 4 +- src/octoprint/server/util/__init__.py | 79 +++++++++++++++++++-------- src/octoprint/settings.py | 3 +- 4 files changed, 60 insertions(+), 39 deletions(-) diff --git a/src/octoprint/server/__init__.py b/src/octoprint/server/__init__.py index b034f613b..cc8b6bcfb 100644 --- a/src/octoprint/server/__init__.py +++ b/src/octoprint/server/__init__.py @@ -148,18 +148,7 @@ def load_user(id): return None def load_user_from_request(request): - header = request.headers.get('Authorization') - if header: - header = header.replace('Basic ', '', 1) - try: - header = base64.b64decode(header) - except TypeError: - return None - id = header.split(':')[0] - user = userManager.findUser(userid=id) - if user: - return user - return None + return util.get_user_for_authorization_header(request.headers.get('Authorization')) def unauthorized_user(): from flask import abort diff --git a/src/octoprint/server/api/__init__.py b/src/octoprint/server/api/__init__.py index c68844a40..f0dfaa6e8 100644 --- a/src/octoprint/server/api/__init__.py +++ b/src/octoprint/server/api/__init__.py @@ -19,7 +19,7 @@ import octoprint.server import octoprint.plugin from octoprint.server import admin_permission, NO_CONTENT from octoprint.settings import settings as s, valid_boolean_trues -from octoprint.server.util import noCachingExceptGetResponseHandler, enforceApiKeyRequestHandler, loginFromApiKeyRequestHandler, loginFromRequest, corsRequestHandler, corsResponseHandler +from octoprint.server.util import noCachingExceptGetResponseHandler, enforceApiKeyRequestHandler, loginFromApiKeyRequestHandler, loginFromAuthorizationHeaderRequestHandler, corsRequestHandler, corsResponseHandler from octoprint.server.util.flask import restricted_access, get_json_command_from_request, passive_login @@ -47,7 +47,7 @@ api.after_request(noCachingExceptGetResponseHandler) api.before_request(corsRequestHandler) api.before_request(enforceApiKeyRequestHandler) -api.before_request(loginFromRequest) +api.before_request(loginFromAuthorizationHeaderRequestHandler) api.before_request(loginFromApiKeyRequestHandler) api.after_request(corsResponseHandler) diff --git a/src/octoprint/server/util/__init__.py b/src/octoprint/server/util/__init__.py index ab5940533..30f13d2fc 100644 --- a/src/octoprint/server/util/__init__.py +++ b/src/octoprint/server/util/__init__.py @@ -70,40 +70,36 @@ def loginFromApiKeyRequestHandler(): return user = get_user_for_apikey(apikey) - if user is not None and _flask.ext.login.login_user(user, remember=False): - _flask.ext.principal.identity_changed.send(_flask.current_app._get_current_object(), - identity=_flask.ext.principal.Identity(user.get_id())) - else: + if not loginUser(user): return _flask.make_response("Invalid API key", 403) -def loginFromRequest(): +def loginFromAuthorizationHeaderRequestHandler(): """ ``before_request`` handler for creating login sessions based on the Authorization header. """ - if not settings().get(["accessControl", "trustBasicAuthentication"]): - return + authorization_header = get_authorization_header(_flask.request) + user = get_user_for_authorization_header(authorization_header) + loginUser(user) - header = _flask.request.headers.get('Authorization') - if header: - header = header.replace('Basic ', '', 1) - try: - header = base64.b64decode(header) - except TypeError: - return - id = header.split(':')[0] - if octoprint.server.userManager.enabled: - user = octoprint.server.userManager.findUser(userid=id) - else: - # what should we really do if the user manager is disabled - # and basic auth activated? - return - if user is not None and _flask.ext.login.login_user(user, remember=False): - _flask.ext.principal.identity_changed.send(_flask.current_app._get_current_object(), +def loginUser(user, remember=False): + """ + Logs the provided ``user`` into Flask Login and Principal if not None and active + + Args: + user: the User to login. May be None in which case the login will fail + remember: Whether to set the ``remember`` flag on the Flask Login operation + + Returns: (bool) True if the login succeeded, False otherwise + + """ + if user is not None and user.is_active() and _flask.ext.login.login_user(user, remember=remember): + _flask.ext.principal.identity_changed.send(_flask.current_app._get_current_object(), identity=_flask.ext.principal.Identity(user.get_id())) - return + return True + return False def corsRequestHandler(): @@ -202,6 +198,36 @@ def get_user_for_apikey(apikey): return None +def get_user_for_authorization_header(header): + if not settings().getBoolean(["accessControl", "trustBasicAuthentication"]): + return None + + if header is None: + return None + + if not header.startswith("Basic "): + # we currently only support Basic Authentication + return None + + header = header.replace('Basic ', '', 1) + try: + header = base64.b64decode(header) + except TypeError: + return None + + name, password = header.split(':', 1) + if not octoprint.server.userManager.enabled: + return None + + user = octoprint.server.userManager.findUser(userid=name) + if settings().getBoolean(["accessControl", "checkBasicAuthenticationPassword"]) \ + and not octoprint.server.userManager.checkPassword(name, password): + # password check enabled and password don't match + return None + + return user + + def get_api_key(request): # Check Flask GET/POST arguments if hasattr(request, "values") and "apikey" in request.values: @@ -219,6 +245,11 @@ def get_api_key(request): return None +def get_authorization_header(request): + # Tornado and Flask headers + return request.headers.get("Authorization") + + def get_plugin_hash(): from octoprint.plugin import plugin_manager diff --git a/src/octoprint/settings.py b/src/octoprint/settings.py index f42ff6677..e65af226c 100644 --- a/src/octoprint/settings.py +++ b/src/octoprint/settings.py @@ -302,7 +302,8 @@ default_settings = { "autologinLocal": False, "localNetworks": ["127.0.0.0/8"], "autologinAs": None, - "trustBasicAuthentication": False + "trustBasicAuthentication": False, + "checkBasicAuthenticationPassword": True }, "slicing": { "enabled": True, From fca7005bfaf65a662f765177790bc74689b29fa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 5 Feb 2018 15:54:12 +0100 Subject: [PATCH 04/38] [Docs] Document basic auth config settings --- docs/configuration/config_yaml.rst | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/configuration/config_yaml.rst b/docs/configuration/config_yaml.rst index f469c2086..c5df5727f 100644 --- a/docs/configuration/config_yaml.rst +++ b/docs/configuration/config_yaml.rst @@ -36,7 +36,7 @@ Use the following settings to enable access control: # If set to true, will automatically log on clients originating from any of the networks defined in # "localNetworks" as the user defined in "autologinAs". Defaults to false. - autologinLocal: true + autologinLocal: false # The name of the user to automatically log on clients originating from "localNetworks" as. Must # be the name of one of your configured users. @@ -51,6 +51,17 @@ Use the following settings to enable access control: - 127.0.0.0/8 - 192.168.1.0/24 + # Whether to trust Basic Authentication headers. If you have setup Basic Authentication in front of + # OctoPrint and the user names you use there match OctoPrint accounts, by setting this to true users will + # be logged into OctoPrint as the user user during Basic Authentication. Your should ONLY ENABLE THIS if your + # OctoPrint instance is only accessible through a connection locked down through Basic Authentication! + trustBasicAuthentication: false + + # Whether to also check the password provided through Basic Authentication if the Basic Authentication + # header is to be trusted. Disabling this will only match the user name in the Basic Authentication + # header and login the user without further checks. Use with caution. + checkBasicAuthenticationPassword: true + .. _sec-configuration-config_yaml-api: API From 9f1abee023618515f1a1b801ee014f1f281f4931 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Tue, 6 Feb 2018 09:30:13 +0100 Subject: [PATCH 05/38] Add refresh button to the connection panel --- src/octoprint/server/views.py | 4 ++-- src/octoprint/templates/sidebar/connection_header.jinja2 | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 src/octoprint/templates/sidebar/connection_header.jinja2 diff --git a/src/octoprint/server/views.py b/src/octoprint/server/views.py index 094d400f2..37746b25e 100644 --- a/src/octoprint/server/views.py +++ b/src/octoprint/server/views.py @@ -473,7 +473,7 @@ def _process_templates(): else: # Finally everything else return u"2:{}".format(to_unicode(d[0])) - + template_sorting = dict( navbar=dict(add="prepend", key=None), sidebar=dict(add="append", key="name"), @@ -535,7 +535,7 @@ def _process_templates(): # sidebar templates["sidebar"]["entries"]= dict( - connection=(gettext("Connection"), dict(template="sidebar/connection.jinja2", _div="connection", icon="signal", styles_wrapper=["display: none"], data_bind="visible: loginState.isUser")), + connection=(gettext("Connection"), dict(template="sidebar/connection.jinja2", _div="connection", icon="signal", styles_wrapper=["display: none"], data_bind="visible: loginState.isUser", template_header="sidebar/connection_header.jinja2")), state=(gettext("State"), dict(template="sidebar/state.jinja2", _div="state", icon="info-circle")), files=(gettext("Files"), dict(template="sidebar/files.jinja2", _div="files", icon="list", classes_content=["overflow_visible"], template_header="sidebar/files_header.jinja2")) ) diff --git a/src/octoprint/templates/sidebar/connection_header.jinja2 b/src/octoprint/templates/sidebar/connection_header.jinja2 new file mode 100644 index 000000000..c9d4dadb1 --- /dev/null +++ b/src/octoprint/templates/sidebar/connection_header.jinja2 @@ -0,0 +1,5 @@ + From b3b19dc136fa5708d9978c44a4a778083e103971 Mon Sep 17 00:00:00 2001 From: tedder Date: Thu, 25 Jan 2018 07:33:38 -0800 Subject: [PATCH 06/38] add 'True' as a string as a boolean This allows pythonic API clients to pass boolean values in: requests.get('/api/printer', params={'history': True}) Previously this didn't work, as Octoprint doesn't see True as a boolean, it gets a sting. So it never matches True, it only matches "True". Easy to test: curl -H "X-Api-Key: x" http://octopi.local/api/printer?history=true | grep history curl -H "X-Api-Key: x" http://octopi.local/api/printer?history=True | grep history --- src/octoprint/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/octoprint/settings.py b/src/octoprint/settings.py index f8e5b09dc..8df4ffa71 100644 --- a/src/octoprint/settings.py +++ b/src/octoprint/settings.py @@ -405,7 +405,7 @@ default_settings = { } """The default settings of the core application.""" -valid_boolean_trues = [True, "true", "yes", "y", "1"] +valid_boolean_trues = [True, "True", "true", "yes", "y", "1"] """ Values that are considered to be equivalent to the boolean ``True`` value, used for type conversion in various places.""" From ec12bd7cd410378059a495e8819d2de25b02032c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Tue, 6 Feb 2018 10:15:57 +0100 Subject: [PATCH 07/38] Introduce CaseInsensitiveSet & use for valid boolean trues Follow up to #2385 --- src/octoprint/settings.py | 4 +-- src/octoprint/util/__init__.py | 25 ++++++++++++++++++- tests/test_settings.py | 34 ++++++++++++++++++++++++++ tests/util/test_caseinsensitive_set.py | 25 +++++++++++++++++++ 4 files changed, 85 insertions(+), 3 deletions(-) create mode 100644 tests/test_settings.py create mode 100644 tests/util/test_caseinsensitive_set.py diff --git a/src/octoprint/settings.py b/src/octoprint/settings.py index 8df4ffa71..d4e880312 100644 --- a/src/octoprint/settings.py +++ b/src/octoprint/settings.py @@ -43,7 +43,7 @@ try: except ImportError: from chainmap import ChainMap -from octoprint.util import atomic_write, is_hidden_path, dict_merge +from octoprint.util import atomic_write, is_hidden_path, dict_merge, CaseInsensitiveSet _APPNAME = "OctoPrint" @@ -405,7 +405,7 @@ default_settings = { } """The default settings of the core application.""" -valid_boolean_trues = [True, "True", "true", "yes", "y", "1"] +valid_boolean_trues = CaseInsensitiveSet(True, "true", "yes", "y", "1", 1) """ Values that are considered to be equivalent to the boolean ``True`` value, used for type conversion in various places.""" diff --git a/src/octoprint/util/__init__.py b/src/octoprint/util/__init__.py index 45dad8a07..63c63e7c8 100644 --- a/src/octoprint/util/__init__.py +++ b/src/octoprint/util/__init__.py @@ -1167,7 +1167,7 @@ class ResettableTimer(threading.Thread): on_cancelled (callable): Callback to call when the timer finishes due to being cancelled. on_reset (callable): Callback to call when the timer is reset. """ - + def __init__(self, interval, function, args=None, kwargs=None, on_reset=None, on_cancelled=None): threading.Thread.__init__(self) self._event = threading.Event() @@ -1501,3 +1501,26 @@ class ConnectivityChecker(object): "online" if new_value else "offline")) if callable(self._on_change): self._on_change(old_value, new_value) + + +class CaseInsensitiveSet(collections.Set): + """ + Basic case insensitive set + + Any str or unicode values will be stored and compared in lower case. Other value types are left as-is. + """ + + def __init__(self, *args): + self.data = set([x.lower() if isinstance(x, (str, unicode)) else x for x in args]) + + def __contains__(self, item): + if isinstance(item, (str, unicode)): + return item.lower() in self.data + else: + return item in self.data + + def __iter__(self): + return iter(self.data) + + def __len__(self): + return len(self.data) diff --git a/tests/test_settings.py b/tests/test_settings.py new file mode 100644 index 000000000..3a811bc79 --- /dev/null +++ b/tests/test_settings.py @@ -0,0 +1,34 @@ +# coding=utf-8 +from __future__ import absolute_import, division, print_function + +__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' +__copyright__ = "Copyright (C) 2018 The OctoPrint Project - Released under terms of the AGPLv3 License" + +import unittest +import ddt + +import octoprint.settings + +@ddt.ddt +class TestHelpers(unittest.TestCase): + + @ddt.data( + (True, True), + ("true", True), + ("True", True), + ("tRuE", True), + ("yes", True), + ("YES", True), + ("y", True), + ("Y", True), + ("1", True), + (1, True), + + (False, False), + ("Truuuuuuuuue", False), + ("Nope", False), + (None, False) + ) + @ddt.unpack + def test_valid_boolean_trues(self, value, expected): + self.assertEqual(expected, value in octoprint.settings.valid_boolean_trues) diff --git a/tests/util/test_caseinsensitive_set.py b/tests/util/test_caseinsensitive_set.py new file mode 100644 index 000000000..9dfbf7443 --- /dev/null +++ b/tests/util/test_caseinsensitive_set.py @@ -0,0 +1,25 @@ +# coding=utf-8 +from __future__ import absolute_import + +__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' +__copyright__ = "Copyright (C) 2018 The OctoPrint Project - Released under terms of the AGPLv3 License" + + +import unittest +import ddt + +import octoprint.util + +@ddt.ddt +class TestCaseInsensitiveSet(unittest.TestCase): + + def setUp(self): + self.set = octoprint.util.CaseInsensitiveSet("A", "FoO", True, 23) + + @ddt.data("A", "a", "foo", True, 23) + def test_contained(self, value): + self.assertTrue(value in self.set) + + @ddt.data("b", "fnord", False, 42) + def test_not_contained(self, value): + self.assertFalse(value in self.set) From 48f87b2979d68e2ffea035b122c2999f8c59eadd Mon Sep 17 00:00:00 2001 From: Shawn Bruce Date: Tue, 6 Feb 2018 11:20:55 -0500 Subject: [PATCH 08/38] Fix showTab function --- src/octoprint/static/js/app/viewmodels/about.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/octoprint/static/js/app/viewmodels/about.js b/src/octoprint/static/js/app/viewmodels/about.js index 75423d28d..5e037e430 100644 --- a/src/octoprint/static/js/app/viewmodels/about.js +++ b/src/octoprint/static/js/app/viewmodels/about.js @@ -33,7 +33,7 @@ $(function() { }; self.showTab = function(tab) { - $("a[href=#" + tab + "]", self.aboutTabs).tab("show"); + $('a[href="#' + tab + '"]', self.aboutTabs).tab("show"); }; } From 986591aed4c1771fe4992dae19357c83bb11e731 Mon Sep 17 00:00:00 2001 From: Shawn Bruce Date: Tue, 22 Aug 2017 15:56:53 -0400 Subject: [PATCH 09/38] Logging: extract log managment into bundled plugin --- src/octoprint/plugins/logs/__init__.py | 170 ++++++++++++++++++ src/octoprint/plugins/logs/static/js/logs.js | 148 +++++++++++++++ .../logs/templates/logs_settings.jinja2 | 91 ++++++++++ src/octoprint/server/__init__.py | 1 - src/octoprint/server/api/__init__.py | 1 - src/octoprint/server/api/log.py | 72 -------- src/octoprint/server/util/flask.py | 1 - src/octoprint/server/views.py | 1 - src/octoprint/settings.py | 2 +- src/octoprint/static/js/app/client/logs.js | 30 ---- src/octoprint/static/js/app/viewmodels/log.js | 66 ------- src/octoprint/static/less/octoprint.less | 2 + .../templates/dialogs/settings/logs.jinja2 | 46 ----- 13 files changed, 412 insertions(+), 219 deletions(-) create mode 100644 src/octoprint/plugins/logs/__init__.py create mode 100644 src/octoprint/plugins/logs/static/js/logs.js create mode 100644 src/octoprint/plugins/logs/templates/logs_settings.jinja2 delete mode 100644 src/octoprint/server/api/log.py delete mode 100644 src/octoprint/static/js/app/client/logs.js delete mode 100644 src/octoprint/static/js/app/viewmodels/log.js delete mode 100644 src/octoprint/templates/dialogs/settings/logs.jinja2 diff --git a/src/octoprint/plugins/logs/__init__.py b/src/octoprint/plugins/logs/__init__.py new file mode 100644 index 000000000..26777eba4 --- /dev/null +++ b/src/octoprint/plugins/logs/__init__.py @@ -0,0 +1,170 @@ +# coding=utf-8 +from __future__ import absolute_import, division, print_function + +__author__ = "" +__license__ = '' +__copyright__ = "" + + +import octoprint.plugin +from octoprint.settings import settings + +from octoprint.server import NO_CONTENT, admin_permission +from octoprint.server.util.flask import redirect_to_tornado, restricted_access + +from flask import request, jsonify, url_for, make_response +from werkzeug.utils import secure_filename +import yaml +import json + + +import os +try: + from os import scandir +except ImportError: + from scandir import scandir + +class LogsPlugin(octoprint.plugin.AssetPlugin, + octoprint.plugin.SettingsPlugin, + octoprint.plugin.TemplatePlugin, + octoprint.plugin.BlueprintPlugin, + octoprint.plugin.SimpleApiPlugin): + + + @octoprint.plugin.BlueprintPlugin.route("/logs", methods=["GET"]) + @restricted_access + @admin_permission.require(403) + def getLogFiles(self): + import psutil + usage = psutil.disk_usage(settings().getBaseFolder("logs")) + + files = self._getLogFiles() + + return jsonify(files=files, free=usage.free, total=usage.total) + + + @octoprint.plugin.BlueprintPlugin.route("/logs/", methods=["GET"]) + @restricted_access + @admin_permission.require(403) + def downloadLog(self, filename): + return redirect_to_tornado(request, url_for("index") + "downloads/logs/" + filename) + + + @octoprint.plugin.BlueprintPlugin.route("/logs/", methods=["DELETE"]) + @restricted_access + @admin_permission.require(403) + def deleteLog(self, filename): + secure = os.path.join(settings().getBaseFolder("logs"), secure_filename(filename)) + if not os.path.exists(secure): + return make_response("File not found: %s" % filename, 404) + + os.remove(secure) + + return NO_CONTENT + + + def _getLogFiles(self): + files = [] + basedir = settings().getBaseFolder("logs") + for entry in scandir(basedir): + files.append({ + "name": entry.name, + "date": int(entry.stat().st_mtime), + "size": entry.stat().st_size, + "refs": { + "resource": url_for(".downloadLog", filename=entry.name, _external=True), + "download": url_for("index", _external=True) + "downloads/logs/" + entry.name + } + }) + + return files + + def get_available_loggers(self): + return self._logger.manager.loggerDict.keys() + + def get_logging_config(self): + logging_file = os.path.join(self._settings.getBaseFolder("base"), "logging.yaml") + + config_from_file = {} + if os.path.exists(logging_file) and os.path.isfile(logging_file): + import yaml + with open(logging_file, "r") as f: + config_from_file = yaml.safe_load(f) + + if config_from_file is not None and isinstance(config_from_file, dict): + return config_from_file + else: + return dict() + + def set_logging_config(self, new_config): + import logging + + logging_file = os.path.join(self._settings.getBaseFolder("base"), "logging.yaml") + config = self.get_logging_config(); + + # clear all configured logging levels + if config.has_key("loggers"): + for component in config["loggers"]: + try: + del config["loggers"][component]["level"] + self._logger.manager.loggerDict[component].setLevel(logging.INFO) + except: + pass + else: + config["loggers"] = dict() + + # update all logging levels + for logger in new_config: + if not config["loggers"].has_key(logger["component"]): + config["loggers"][logger["component"]] = dict() + config["loggers"][logger["component"]]["level"] = logger["level"] + + # save + with octoprint.util.atomic_write(logging_file, "wb", max_permissions=0o666) as f: + yaml.safe_dump(config, f, default_flow_style=False, indent=" ", allow_unicode=True) + + # set runtime logging levels now + for logger in new_config: + level = logging.getLevelName(logger["level"]) + + self._logger.info("Setting logger {} level to {}".format(logger["component"], logger["level"])) + self._logger.manager.loggerDict[logger["component"]].setLevel(level) + + def get_api_commands(self): + return dict( + getAvailableLoggers=[], + getLoggingConfig=[], + setLoggingConfig=["config"] + ) + + def on_api_command(self, command, data): + if not admin_permission.can(): + return make_response("Insufficient rights", 403) + if command == 'getAvailableLoggers': + return jsonify(result=self.get_available_loggers()) + elif command == 'getLoggingConfig': + return jsonify(result=self.get_logging_config()) + elif command == 'setLoggingConfig': + config = json.loads(data["config"]) + return self.set_logging_config(config) + + def get_template_configs(self): + return [ + dict(type="settings", custom_bindings=True) + ] + + def get_assets(self): + return dict(js=["js/logs.js"]) + +__plugin_name__ = "Logs" +__plugin_author__ = "" +__plugin_description__ = "Provides access to OctoPrint Logs." +__plugin_license__ = "" +#__plugin_implementation__ = LogsPlugin() + + +# Required for regular plugin +def __plugin_load__(): + global __plugin_implementation__ + __plugin_implementation__ = LogsPlugin() + diff --git a/src/octoprint/plugins/logs/static/js/logs.js b/src/octoprint/plugins/logs/static/js/logs.js new file mode 100644 index 000000000..949190d2d --- /dev/null +++ b/src/octoprint/plugins/logs/static/js/logs.js @@ -0,0 +1,148 @@ +$(function() { + function LogsViewModel(parameters) { + var self = this; + var logsURL = "plugin/logs/logs" + + self.loginState = parameters[0]; + self.availableLoggers = ko.observableArray(); + self.availableLoggersName = ko.observable(); + self.availableLoggersLevel = ko.observable(); + self.configuredLoggers = ko.observableArray(); + self.configuredLoggersChanged = false; + + + self.availableLoggersSorted = ko.computed(function() { + return _.sortBy(self.availableLoggers()); + }); + + self.configuredLoggersSorted = ko.computed(function() { + return _.sortBy(self.configuredLoggers(), function (o) { + o.level(); + return o.component; + }); + }); + + // initialize list helper + self.listHelper = new ItemListHelper( + "logFiles", + { + "name": function(a, b) { + // sorts ascending + if (a["name"].toLocaleLowerCase() < b["name"].toLocaleLowerCase()) return -1; + if (a["name"].toLocaleLowerCase() > b["name"].toLocaleLowerCase()) return 1; + return 0; + }, + "modification": function(a, b) { + // sorts descending + if (a["date"] > b["date"]) return -1; + if (a["date"] < b["date"]) return 1; + return 0; + }, + "size": function(a, b) { + // sorts descending + if (a["size"] > b["size"]) return -1; + if (a["size"] < b["size"]) return 1; + return 0; + } + }, + { + }, + "name", + [], + [], + CONFIG_LOGFILESPERPAGE + ); + + self.requestData = function() { + OctoPrint.get(logsURL) + .done(self.fromResponse); + + OctoPrint.simpleApiCommand("logs", "getLoggingConfig") + .done(self.fromGetLoggingConfigResponse); + + OctoPrint.simpleApiCommand("logs", "getAvailableLoggers") + .done(self.fromGetAvailableLoggersResponse); + }; + + self.fromResponse = function(response) { + var files = response.files; + if (files === undefined) + return; + + self.listHelper.updateItems(files); + }; + + self.fromGetLoggingConfigResponse = function(data) { + self.configuredLoggers([]); + + $.each(data.result.loggers, function(component, options) { + if (options.level !== undefined) { + self.configuredLoggers.push({component: component, level: ko.observable(options.level)}); + } + }); + + self.configuredLoggersChanged = false; + }; + + self.fromGetAvailableLoggersResponse = function(data) { + self.availableLoggers([]); + + $.each(data.result, function(key, component) { + if (component.toLowerCase().indexOf("octoprint") >= 0) { + self.availableLoggers.push(component); + } + }); + + $.each(self.configuredLoggers(), function(key, logger) { + self.availableLoggers.remove(logger.component); + }); + }; + + self.configuredLoggersHasChanged = function () { + self.configuredLoggersChanged = true; + }; + + self.addLogger = function() { + component = self.availableLoggersName(); + level = self.availableLoggersLevel(); + + self.configuredLoggers.push({component: component, level: ko.observable(level)}); + self.availableLoggers.remove(component); + + self.configuredLoggersHasChanged(); + }; + + self.removeLogger = function(logger) { + self.configuredLoggers.remove(logger); + self.availableLoggers.push(logger.component); + + self.configuredLoggersHasChanged(); + }; + + self.removeFile = function(filename) { + OctoPrint.delete(logsURL + "/" + filename) + .done(self.requestData); + }; + + self.onSettingsShown = function() { + self.requestData(); + }; + + + self.onSettingsBeforeSave = function () { + if ( self.configuredLoggersChanged ) { + console.log("ConfiguredLoggers has changed. Saving!"); + OctoPrint.simpleApiCommand("logs", "setLoggingConfig", {'config': ko.toJSON(self.configuredLoggers)}); + } else { + console.log("ConfiguredLoggers has not changed. Not saving."); + } + }; + } + + + OCTOPRINT_VIEWMODELS.push([ + LogsViewModel, + ["loginStateViewModel"], + "#settings_plugin_logs" + ]); +}); diff --git a/src/octoprint/plugins/logs/templates/logs_settings.jinja2 b/src/octoprint/plugins/logs/templates/logs_settings.jinja2 new file mode 100644 index 000000000..8a95f340f --- /dev/null +++ b/src/octoprint/plugins/logs/templates/logs_settings.jinja2 @@ -0,0 +1,91 @@ +

{{ _('Logs') }}

+ + + + + + + + + + + + + + + + + + + +
{{ _('Name') }}{{ _('Size') }}{{ _('Date') }}{{ _('Action') }}
+  |  +
+ + +

Logging Levels

+
+ +
+
Name
+
Level
+
+
+
+
+ +
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+ +
+
+ +
+
+
+
\ No newline at end of file diff --git a/src/octoprint/server/__init__.py b/src/octoprint/server/__init__.py index a9488a765..7bbfa00b9 100644 --- a/src/octoprint/server/__init__.py +++ b/src/octoprint/server/__init__.py @@ -1223,7 +1223,6 @@ class Server(object): "js/app/client/files.js", "js/app/client/job.js", "js/app/client/languages.js", - "js/app/client/logs.js", "js/app/client/printer.js", "js/app/client/printerprofiles.js", "js/app/client/settings.js", diff --git a/src/octoprint/server/api/__init__.py b/src/octoprint/server/api/__init__.py index 184567afe..12a10dbec 100644 --- a/src/octoprint/server/api/__init__.py +++ b/src/octoprint/server/api/__init__.py @@ -34,7 +34,6 @@ from . import files as api_files from . import settings as api_settings from . import timelapse as api_timelapse from . import users as api_users -from . import log as api_logs from . import slicing as api_slicing from . import printer_profiles as api_printer_profiles from . import languages as api_languages diff --git a/src/octoprint/server/api/log.py b/src/octoprint/server/api/log.py deleted file mode 100644 index 3a35e4ce6..000000000 --- a/src/octoprint/server/api/log.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -from __future__ import absolute_import, division, print_function - -__author__ = "Marc Hannappel Salandora" -__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' -__copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License" - - -import os -try: - from os import scandir -except ImportError: - from scandir import scandir - -from flask import request, jsonify, url_for, make_response -from werkzeug.utils import secure_filename - -from octoprint.settings import settings - -from octoprint.server import NO_CONTENT, admin_permission -from octoprint.server.util.flask import redirect_to_tornado, restricted_access -from octoprint.server.api import api - - -@api.route("/logs", methods=["GET"]) -@restricted_access -@admin_permission.require(403) -def getLogFiles(): - import psutil - usage = psutil.disk_usage(settings().getBaseFolder("logs")) - - files = _getLogFiles() - - return jsonify(files=files, free=usage.free, total=usage.total) - - -@api.route("/logs/", methods=["GET"]) -@restricted_access -@admin_permission.require(403) -def downloadLog(filename): - return redirect_to_tornado(request, url_for("index") + "downloads/logs/" + filename) - - -@api.route("/logs/", methods=["DELETE"]) -@restricted_access -@admin_permission.require(403) -def deleteLog(filename): - secure = os.path.join(settings().getBaseFolder("logs"), secure_filename(filename)) - if not os.path.exists(secure): - return make_response("File not found: %s" % filename, 404) - - os.remove(secure) - - return NO_CONTENT - - -def _getLogFiles(): - files = [] - basedir = settings().getBaseFolder("logs") - for entry in scandir(basedir): - files.append({ - "name": entry.name, - "date": int(entry.stat().st_mtime), - "size": entry.stat().st_size, - "refs": { - "resource": url_for(".downloadLog", filename=entry.name, _external=True), - "download": url_for("index", _external=True) + "downloads/logs/" + entry.name - } - }) - - return files - diff --git a/src/octoprint/server/util/flask.py b/src/octoprint/server/util/flask.py index 248737a0c..58dc8b448 100644 --- a/src/octoprint/server/util/flask.py +++ b/src/octoprint/server/util/flask.py @@ -1324,7 +1324,6 @@ def collect_core_assets(enable_gcodeviewer=True, preferred_stylesheet="css"): 'js/app/viewmodels/terminal.js', 'js/app/viewmodels/timelapse.js', 'js/app/viewmodels/users.js', - 'js/app/viewmodels/log.js', 'js/app/viewmodels/usersettings.js', 'js/app/viewmodels/wizard.js', 'js/app/viewmodels/about.js' diff --git a/src/octoprint/server/views.py b/src/octoprint/server/views.py index 37746b25e..02c46dc99 100644 --- a/src/octoprint/server/views.py +++ b/src/octoprint/server/views.py @@ -573,7 +573,6 @@ def _process_templates(): accesscontrol=(gettext("Access Control"), dict(template="dialogs/settings/accesscontrol.jinja2", _div="settings_users", custom_bindings=False)), folders=(gettext("Folders"), dict(template="dialogs/settings/folders.jinja2", _div="settings_folders", custom_bindings=False)), appearance=(gettext("Appearance"), dict(template="dialogs/settings/appearance.jinja2", _div="settings_appearance", custom_bindings=False)), - logs=(gettext("Logs"), dict(template="dialogs/settings/logs.jinja2", _div="settings_logs")), server=(gettext("Server"), dict(template="dialogs/settings/server.jinja2", _div="settings_server", custom_bindings=False)), ) diff --git a/src/octoprint/settings.py b/src/octoprint/settings.py index d4e880312..487e479ad 100644 --- a/src/octoprint/settings.py +++ b/src/octoprint/settings.py @@ -273,7 +273,7 @@ default_settings = { "settings": [ "section_printer", "serial", "printerprofiles", "temperatures", "terminalfilters", "gcodescripts", "section_features", "features", "webcam", "accesscontrol", "gcodevisualizer", "api", - "section_octoprint", "server", "folders", "appearance", "logs", "plugin_pluginmanager", "plugin_softwareupdate", "plugin_announcements" + "section_octoprint", "server", "folders", "appearance", "plugin_logs", "plugin_pluginmanager", "plugin_softwareupdate", "plugin_announcements" ], "usersettings": ["access", "interface"], "wizard": ["access"], diff --git a/src/octoprint/static/js/app/client/logs.js b/src/octoprint/static/js/app/client/logs.js deleted file mode 100644 index c30b888ba..000000000 --- a/src/octoprint/static/js/app/client/logs.js +++ /dev/null @@ -1,30 +0,0 @@ -(function (global, factory) { - if (typeof define === "function" && define.amd) { - define(["OctoPrintClient"], factory); - } else { - factory(global.OctoPrintClient); - } -})(this, function(OctoPrintClient) { - var url = "api/logs"; - - var OctoPrintLogsClient = function(base) { - this.base = base; - }; - - OctoPrintLogsClient.prototype.list = function(opts) { - return this.base.get(url, opts); - }; - - OctoPrintLogsClient.prototype.delete = function(file, opts) { - var fileUrl = url + "/" + file; - return this.base.delete(fileUrl, opts); - }; - - OctoPrintLogsClient.prototype.download = function(file, opts) { - var fileUrl = url + "/" + file; - return this.base.download(fileUrl, opts); - }; - - OctoPrintClient.registerComponent("logs", OctoPrintLogsClient); - return OctoPrintLogsClient; -}); diff --git a/src/octoprint/static/js/app/viewmodels/log.js b/src/octoprint/static/js/app/viewmodels/log.js deleted file mode 100644 index 5fa7174f7..000000000 --- a/src/octoprint/static/js/app/viewmodels/log.js +++ /dev/null @@ -1,66 +0,0 @@ -$(function() { - function LogViewModel(parameters) { - var self = this; - - self.loginState = parameters[0]; - - // initialize list helper - self.listHelper = new ItemListHelper( - "logFiles", - { - "name": function(a, b) { - // sorts ascending - if (a["name"].toLocaleLowerCase() < b["name"].toLocaleLowerCase()) return -1; - if (a["name"].toLocaleLowerCase() > b["name"].toLocaleLowerCase()) return 1; - return 0; - }, - "modification": function(a, b) { - // sorts descending - if (a["date"] > b["date"]) return -1; - if (a["date"] < b["date"]) return 1; - return 0; - }, - "size": function(a, b) { - // sorts descending - if (a["size"] > b["size"]) return -1; - if (a["size"] < b["size"]) return 1; - return 0; - } - }, - { - }, - "name", - [], - [], - CONFIG_LOGFILESPERPAGE - ); - - self.requestData = function() { - OctoPrint.logs.list() - .done(self.fromResponse); - }; - - self.fromResponse = function(response) { - var files = response.files; - if (files === undefined) - return; - - self.listHelper.updateItems(files); - }; - - self.removeFile = function(filename) { - OctoPrint.logs.delete(filename) - .done(self.requestData); - }; - - self.onSettingsShown = function() { - self.requestData(); - }; - } - - OCTOPRINT_VIEWMODELS.push({ - construct: LogViewModel, - dependencies: ["loginStateViewModel"], - elements: ["#logs"] - }); -}); diff --git a/src/octoprint/static/less/octoprint.less b/src/octoprint/static/less/octoprint.less index eb2af3dbe..051a60a66 100644 --- a/src/octoprint/static/less/octoprint.less +++ b/src/octoprint/static/less/octoprint.less @@ -364,6 +364,7 @@ table { .actioncol; } +/* // log files &.settings_logs_name { text-overflow: ellipsis; @@ -384,6 +385,7 @@ table { width: 70px; .actioncol; } +*/ // Printer profiles &.settings_printerProfiles_profiles_name { diff --git a/src/octoprint/templates/dialogs/settings/logs.jinja2 b/src/octoprint/templates/dialogs/settings/logs.jinja2 deleted file mode 100644 index 22fbec75e..000000000 --- a/src/octoprint/templates/dialogs/settings/logs.jinja2 +++ /dev/null @@ -1,46 +0,0 @@ -
-

{{ _('Logs') }}

- - - - - - - - - - - - - - - - - - - -
{{ _('Name') }}{{ _('Size') }}{{ _('Date') }}{{ _('Action') }}
-  |  -
- -
From de253e5086326cb4bc723ed0770400da2c27d94d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Wed, 7 Feb 2018 10:12:37 +0100 Subject: [PATCH 10/38] Logging: some refactoring and fixes * logs => logging * i18n * Add JS client & streamline API * Whitespace and metadata fix * Add LESS/CSS files * camelCase => snake_case * fix log deletion & add missing var --- src/octoprint/plugins/logging/__init__.py | 203 +++++++++++++++++ .../plugins/logging/static/js/logging.js | 214 ++++++++++++++++++ .../plugins/logging/static/less/logging.less | 34 +++ .../templates/logging_settings.jinja2} | 12 +- src/octoprint/plugins/logs/__init__.py | 170 -------------- src/octoprint/plugins/logs/static/js/logs.js | 148 ------------ src/octoprint/settings.py | 2 +- src/octoprint/static/css/octoprint.css | 2 +- src/octoprint/static/less/octoprint.less | 23 -- 9 files changed, 459 insertions(+), 349 deletions(-) create mode 100644 src/octoprint/plugins/logging/__init__.py create mode 100644 src/octoprint/plugins/logging/static/js/logging.js create mode 100644 src/octoprint/plugins/logging/static/less/logging.less rename src/octoprint/plugins/{logs/templates/logs_settings.jinja2 => logging/templates/logging_settings.jinja2} (90%) delete mode 100644 src/octoprint/plugins/logs/__init__.py delete mode 100644 src/octoprint/plugins/logs/static/js/logs.js diff --git a/src/octoprint/plugins/logging/__init__.py b/src/octoprint/plugins/logging/__init__.py new file mode 100644 index 000000000..d227b3958 --- /dev/null +++ b/src/octoprint/plugins/logging/__init__.py @@ -0,0 +1,203 @@ +# coding=utf-8 +from __future__ import absolute_import, division, print_function + +__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' +__copyright__ = "Copyright (C) 2018 The OctoPrint Project - Released under terms of the AGPLv3 License" + +import octoprint.plugin +from octoprint.settings import settings + +from octoprint.server import NO_CONTENT, admin_permission +from octoprint.server.util.flask import redirect_to_tornado, restricted_access + +from flask import request, jsonify, url_for, make_response +from werkzeug.utils import secure_filename +from werkzeug.exceptions import BadRequest +import yaml + +import os + +try: + from os import scandir +except ImportError: + from scandir import scandir + +class LoggingPlugin(octoprint.plugin.AssetPlugin, + octoprint.plugin.SettingsPlugin, + octoprint.plugin.TemplatePlugin, + octoprint.plugin.BlueprintPlugin): + @octoprint.plugin.BlueprintPlugin.route("/", methods=["GET"]) + @restricted_access + @admin_permission.require(403) + def get_all(self): + files = self._getLogFiles() + free, total = self._get_usage() + loggers = self._get_available_loggers() + levels = self._get_logging_levels() + return jsonify(logs=dict(files=files, free=free, total=total), + setup=dict(loggers=loggers, levels=levels)) + + @octoprint.plugin.BlueprintPlugin.route("/logs", methods=["GET"]) + @restricted_access + @admin_permission.require(403) + def get_log_files(self): + files = self._getLogFiles() + free, total = self._get_usage() + return jsonify(files=files, free=free, total=total) + + @octoprint.plugin.BlueprintPlugin.route("/logs/", methods=["GET"]) + @restricted_access + @admin_permission.require(403) + def download_log(self, filename): + return redirect_to_tornado(request, url_for("index") + "downloads/logs/" + filename) + + @octoprint.plugin.BlueprintPlugin.route("/logs/", methods=["DELETE"]) + @restricted_access + @admin_permission.require(403) + def delete_log(self, filename): + secure = os.path.join(settings().getBaseFolder("logs"), secure_filename(filename)) + if not os.path.exists(secure): + return make_response("File not found: %s" % filename, 404) + + os.remove(secure) + + return NO_CONTENT + + @octoprint.plugin.BlueprintPlugin.route("/setup", methods=["GET"]) + @restricted_access + @admin_permission.require(403) + def get_logging_setup(self): + loggers = self._get_available_loggers() + levels = self._get_logging_levels() + return jsonify(loggers=loggers, levels=levels) + + @octoprint.plugin.BlueprintPlugin.route("/setup/levels", methods=["GET"]) + @restricted_access + @admin_permission.require(403) + def get_logging_levels_api(self): + return jsonify(self._get_logging_levels) + + @octoprint.plugin.BlueprintPlugin.route("/setup/levels", methods=["PUT"]) + @restricted_access + @admin_permission.require(403) + def set_logging_levels_api(self): + if not "application/json" in request.headers["Content-Type"]: + return make_response("Expected content-type JSON", 400) + + try: + json_data = request.json + except BadRequest: + return make_response("Malformed JSON body in request", 400) + + if not isinstance(json_data, dict): + return make_response("Invalid log level configuration", 400) + + # TODO validate further + + self._set_logging_levels(json_data) + return self.get_logging_levels_api() + + def _get_usage(self): + import psutil + usage = psutil.disk_usage(settings().getBaseFolder("logs")) + return usage.free, usage.total + + def _getLogFiles(self): + files = [] + basedir = settings().getBaseFolder("logs") + for entry in scandir(basedir): + files.append({ + "name": entry.name, + "date": int(entry.stat().st_mtime), + "size": entry.stat().st_size, + "refs": { + "resource": url_for(".download_log", filename=entry.name, _external=True), + "download": url_for("index", _external=True) + "downloads/logs/" + entry.name + } + }) + + return files + + def _get_available_loggers(self): + return filter(lambda x: self._is_managed_logger(x), self._logger.manager.loggerDict.keys()) + + def _get_logging_file(self): + # TODO this might not be the logging config we are actually using here (command line parameter...) + return os.path.join(self._settings.getBaseFolder("base"), "logging.yaml") + + def _get_logging_config(self): + logging_file = self._get_logging_file() + + config_from_file = {} + if os.path.exists(logging_file) and os.path.isfile(logging_file): + import yaml + with open(logging_file, "r") as f: + config_from_file = yaml.safe_load(f) + return config_from_file + + def _get_logging_levels(self): + config = self._get_logging_config() + if config is None or not isinstance(config, dict): + return dict() + + return dict((key, value.get("level")) + for key, value in config.get("loggers", dict()).items() + if isinstance(value, dict) and "level" in value) + + def _set_logging_levels(self, new_levels): + import logging + + config = self._get_logging_config() + + # clear all configured logging levels + if config.has_key("loggers"): + purge = [] + for component in config["loggers"]: + if not self._is_managed_logger(component): continue + try: + del config["loggers"][component]["level"] + self._logger.manager.loggerDict[component].setLevel(logging.INFO) + except: + pass + if len(config["loggers"][component]) == 0: + purge.append(component) + else: + config["loggers"] = dict() + + # update all logging levels + for logger, level in new_levels.items(): + if not config["loggers"].has_key(logger): + config["loggers"][logger] = dict() + config["loggers"][logger]["level"] = level + + # delete empty entries + config["loggers"] = {k: v for k, v in config["loggers"].items() if len(v)} + + # save + with octoprint.util.atomic_write(self._get_logging_file(), "wb", max_permissions=0o666) as f: + yaml.safe_dump(config, f, default_flow_style=False, indent=" ", allow_unicode=True) + + # set runtime logging levels now + for logger, level in new_levels.items(): + level = logging.getLevelName(level) + + self._logger.info("Setting logger {} level to {}".format(logger, level)) + self._logger.manager.loggerDict[logger].setLevel(level) + + def _is_managed_logger(self, logger): + return logger and (logger.startswith("octoprint") or logger.startswith("tornado")) + + def get_template_configs(self): + return [ + dict(type="settings", custom_bindings=True) + ] + + def get_assets(self): + return dict(js=["js/logging.js"], + less=["less/logging.less"], + css=["css/logging.css"]) + +__plugin_name__ = "Logging" +__plugin_author__ = "Shawn Bruce, based on work by Gina Häußge and Marc Hannappel" +__plugin_description__ = "Provides access to OctoPrint's logs and logging configuration." +__plugin_implementation__ = LoggingPlugin() diff --git a/src/octoprint/plugins/logging/static/js/logging.js b/src/octoprint/plugins/logging/static/js/logging.js new file mode 100644 index 000000000..edc84c327 --- /dev/null +++ b/src/octoprint/plugins/logging/static/js/logging.js @@ -0,0 +1,214 @@ +(function (global, factory) { + if (typeof define === "function" && define.amd) { + define(["OctoPrintClient"], factory); + } else { + factory(global.OctoPrintClient); + } +})(this, function(OctoPrintClient) { + + var OctoPrintLoggingClient = function(base) { + this.base = base; + + this.baseUrl = this.base.getBlueprintUrl("logging"); + this.logsUrl = this.baseUrl + "logs"; + this.setupUrl = this.baseUrl + "setup"; + }; + + OctoPrintLoggingClient.prototype.get = function(opts) { + return this.base.get(this.baseUrl, opts); + }; + + OctoPrintLoggingClient.prototype.listLogs = function(opts) { + return this.base.get(this.logsUrl, opts); + }; + + OctoPrintLoggingClient.prototype.deleteLog = function(file, opts) { + var fileUrl = this.logsUrl + "/" + file; + return this.base.delete(fileUrl, opts); + }; + + OctoPrintLoggingClient.prototype.downloadLog = function(file, opts) { + var fileUrl = this.logsUrl + "/" + file; + return this.base.download(fileUrl, opts); + }; + + OctoPrintLoggingClient.prototype.updateLevels = function(config, opts) { + return this.base.putJson(this.setupUrl + "/levels", config, opts); + }; + + //~~ wrapper for backwards compatibility + + var DeprecatedOctoPrintLogsClient = function(base) { + this.base = base; + this.wrapped = this.base.plugins.logging; + }; + + DeprecatedOctoPrintLogsClient.prototype.list = function(opts) { + log.warn("OctoPrintClient.logs.list has been deprecated, use OctoPrintClient.plugins.logging.listLogs instead"); + return this.wrapped.listLogs(opts); + }; + + DeprecatedOctoPrintLogsClient.prototype.delete = function(file, opts) { + log.warn("OctoPrintClient.logs.delete has been deprecated, use OctoPrintClient.plugins.logging.deleteLog instead"); + return this.wrapped.deleteLog(file, opts); + }; + + DeprecatedOctoPrintLogsClient.prototype.download = function(file, opts) { + log.warn("OctoPrintClient.logs.download has been deprecated, use OctoPrintClient.plugins.logging.downloadLog instead"); + return this.wrapped.downloadLog(file, opts); + }; + + // register plugin component + OctoPrintClient.registerPluginComponent("logging", OctoPrintLoggingClient); + + // also register deprecated client under old endpoint + OctoPrintClient.registerComponent("logs", DeprecatedOctoPrintLogsClient); + + return OctoPrintLoggingClient; +}); + +$(function() { + function LoggingViewModel(parameters) { + var self = this; + + self.loginState = parameters[0]; + self.availableLoggers = ko.observableArray(); + self.availableLoggersName = ko.observable(); + self.availableLoggersLevel = ko.observable(); + self.configuredLoggers = ko.observableArray(); + self.configuredLoggersChanged = false; + + self.availableLoggersSorted = ko.computed(function() { + return _.sortBy(self.availableLoggers()); + }); + + self.configuredLoggersSorted = ko.computed(function() { + return _.sortBy(self.configuredLoggers(), function (o) { + o.level(); + return o.component; + }); + }); + + // initialize list helper + self.listHelper = new ItemListHelper( + "logFiles", + { + "name": function(a, b) { + // sorts ascending + if (a["name"].toLocaleLowerCase() < b["name"].toLocaleLowerCase()) return -1; + if (a["name"].toLocaleLowerCase() > b["name"].toLocaleLowerCase()) return 1; + return 0; + }, + "modification": function(a, b) { + // sorts descending + if (a["date"] > b["date"]) return -1; + if (a["date"] < b["date"]) return 1; + return 0; + }, + "size": function(a, b) { + // sorts descending + if (a["size"] > b["size"]) return -1; + if (a["size"] < b["size"]) return 1; + return 0; + } + }, + { + }, + "name", + [], + [], + CONFIG_LOGFILESPERPAGE + ); + + self.requestData = function() { + OctoPrint.plugins.logging.get() + .done(self.fromResponse); + }; + + self.fromResponse = function(response) { + self.fromLogsResponse(response.logs); + self.fromSetupResponse(response.setup); + }; + + self.fromLogsResponse = function(response) { + if (!response) return; + + var files = response.files; + if (files === undefined) + return; + + self.listHelper.updateItems(files); + }; + + self.fromSetupResponse = function(response) { + if (!response) return; + + // levels + var levels = []; + var configuredLoggers = []; + _.each(response.levels, function(level, logger) { + var item = {component: logger, level: ko.observable(level)}; + item.level.subscribe(function() { + self.configuredLoggersHasChanged(); + }); + levels.push(item); + configuredLoggers.push(logger); + }); + self.configuredLoggers(levels); + + // loggers + var availableLoggers = _.without(response.loggers, configuredLoggers); + self.availableLoggers(availableLoggers); + }; + + self.configuredLoggersHasChanged = function () { + self.configuredLoggersChanged = true; + }; + + self.addLogger = function() { + var component = self.availableLoggersName(); + var level = self.availableLoggersLevel(); + + self.configuredLoggers.push({component: component, level: ko.observable(level)}); + self.availableLoggers.remove(component); + + self.configuredLoggersHasChanged(); + }; + + self.removeLogger = function(logger) { + self.configuredLoggers.remove(logger); + self.availableLoggers.push(logger.component); + + self.configuredLoggersHasChanged(); + }; + + self.removeFile = function(filename) { + OctoPrint.plugins.logging.deleteLog(filename) + .done(self.requestData); + }; + + self.onSettingsShown = function() { + self.requestData(); + }; + + self.onSettingsBeforeSave = function () { + if ( self.configuredLoggersChanged ) { + console.log("ConfiguredLoggers has changed. Saving!"); + var levels = {}; + _.each(self.configuredLoggers(), function(data) { + levels[data.component] = data.level(); + }); + OctoPrint.plugins.logging.updateLevels(levels); + } else { + console.log("ConfiguredLoggers has not changed. Not saving."); + } + }; + } + + OCTOPRINT_VIEWMODELS.push({ + construct: LoggingViewModel, + additionalNames: ["logsViewModel"], + dependencies: ["loginStateViewModel"], + elements: ["#settings_plugin_logging"] + }); +}); diff --git a/src/octoprint/plugins/logging/static/less/logging.less b/src/octoprint/plugins/logging/static/less/logging.less new file mode 100644 index 000000000..dfcb1c1f7 --- /dev/null +++ b/src/octoprint/plugins/logging/static/less/logging.less @@ -0,0 +1,34 @@ +table { + th, td { + &.settings_logs_name { + text-overflow: ellipsis; + text-align: left; + } + + &.settings_logs_size { + text-align: right; + width: 70px; + } + + &.settings_logs_date { + text-align: left; + width: 130px; + } + + &.settings_logs_action { + width: 70px; + text-align: center; + white-space: nowrap; + + a { + text-decoration: none; + color: #000; + + &.disabled { + color: #ccc; + cursor: default; + } + } + } + } +} diff --git a/src/octoprint/plugins/logs/templates/logs_settings.jinja2 b/src/octoprint/plugins/logging/templates/logging_settings.jinja2 similarity index 90% rename from src/octoprint/plugins/logs/templates/logs_settings.jinja2 rename to src/octoprint/plugins/logging/templates/logging_settings.jinja2 index 8a95f340f..7a082ec6b 100644 --- a/src/octoprint/plugins/logs/templates/logs_settings.jinja2 +++ b/src/octoprint/plugins/logging/templates/logging_settings.jinja2 @@ -43,12 +43,12 @@ -

Logging Levels

+

{{ _('Logging Levels') }}

-
Name
-
Level
+
{{ _('Name') }}
+
{{ _('Level') }}
@@ -65,7 +65,7 @@
- +
@@ -84,8 +84,8 @@
- +
-
\ No newline at end of file + diff --git a/src/octoprint/plugins/logs/__init__.py b/src/octoprint/plugins/logs/__init__.py deleted file mode 100644 index 26777eba4..000000000 --- a/src/octoprint/plugins/logs/__init__.py +++ /dev/null @@ -1,170 +0,0 @@ -# coding=utf-8 -from __future__ import absolute_import, division, print_function - -__author__ = "" -__license__ = '' -__copyright__ = "" - - -import octoprint.plugin -from octoprint.settings import settings - -from octoprint.server import NO_CONTENT, admin_permission -from octoprint.server.util.flask import redirect_to_tornado, restricted_access - -from flask import request, jsonify, url_for, make_response -from werkzeug.utils import secure_filename -import yaml -import json - - -import os -try: - from os import scandir -except ImportError: - from scandir import scandir - -class LogsPlugin(octoprint.plugin.AssetPlugin, - octoprint.plugin.SettingsPlugin, - octoprint.plugin.TemplatePlugin, - octoprint.plugin.BlueprintPlugin, - octoprint.plugin.SimpleApiPlugin): - - - @octoprint.plugin.BlueprintPlugin.route("/logs", methods=["GET"]) - @restricted_access - @admin_permission.require(403) - def getLogFiles(self): - import psutil - usage = psutil.disk_usage(settings().getBaseFolder("logs")) - - files = self._getLogFiles() - - return jsonify(files=files, free=usage.free, total=usage.total) - - - @octoprint.plugin.BlueprintPlugin.route("/logs/", methods=["GET"]) - @restricted_access - @admin_permission.require(403) - def downloadLog(self, filename): - return redirect_to_tornado(request, url_for("index") + "downloads/logs/" + filename) - - - @octoprint.plugin.BlueprintPlugin.route("/logs/", methods=["DELETE"]) - @restricted_access - @admin_permission.require(403) - def deleteLog(self, filename): - secure = os.path.join(settings().getBaseFolder("logs"), secure_filename(filename)) - if not os.path.exists(secure): - return make_response("File not found: %s" % filename, 404) - - os.remove(secure) - - return NO_CONTENT - - - def _getLogFiles(self): - files = [] - basedir = settings().getBaseFolder("logs") - for entry in scandir(basedir): - files.append({ - "name": entry.name, - "date": int(entry.stat().st_mtime), - "size": entry.stat().st_size, - "refs": { - "resource": url_for(".downloadLog", filename=entry.name, _external=True), - "download": url_for("index", _external=True) + "downloads/logs/" + entry.name - } - }) - - return files - - def get_available_loggers(self): - return self._logger.manager.loggerDict.keys() - - def get_logging_config(self): - logging_file = os.path.join(self._settings.getBaseFolder("base"), "logging.yaml") - - config_from_file = {} - if os.path.exists(logging_file) and os.path.isfile(logging_file): - import yaml - with open(logging_file, "r") as f: - config_from_file = yaml.safe_load(f) - - if config_from_file is not None and isinstance(config_from_file, dict): - return config_from_file - else: - return dict() - - def set_logging_config(self, new_config): - import logging - - logging_file = os.path.join(self._settings.getBaseFolder("base"), "logging.yaml") - config = self.get_logging_config(); - - # clear all configured logging levels - if config.has_key("loggers"): - for component in config["loggers"]: - try: - del config["loggers"][component]["level"] - self._logger.manager.loggerDict[component].setLevel(logging.INFO) - except: - pass - else: - config["loggers"] = dict() - - # update all logging levels - for logger in new_config: - if not config["loggers"].has_key(logger["component"]): - config["loggers"][logger["component"]] = dict() - config["loggers"][logger["component"]]["level"] = logger["level"] - - # save - with octoprint.util.atomic_write(logging_file, "wb", max_permissions=0o666) as f: - yaml.safe_dump(config, f, default_flow_style=False, indent=" ", allow_unicode=True) - - # set runtime logging levels now - for logger in new_config: - level = logging.getLevelName(logger["level"]) - - self._logger.info("Setting logger {} level to {}".format(logger["component"], logger["level"])) - self._logger.manager.loggerDict[logger["component"]].setLevel(level) - - def get_api_commands(self): - return dict( - getAvailableLoggers=[], - getLoggingConfig=[], - setLoggingConfig=["config"] - ) - - def on_api_command(self, command, data): - if not admin_permission.can(): - return make_response("Insufficient rights", 403) - if command == 'getAvailableLoggers': - return jsonify(result=self.get_available_loggers()) - elif command == 'getLoggingConfig': - return jsonify(result=self.get_logging_config()) - elif command == 'setLoggingConfig': - config = json.loads(data["config"]) - return self.set_logging_config(config) - - def get_template_configs(self): - return [ - dict(type="settings", custom_bindings=True) - ] - - def get_assets(self): - return dict(js=["js/logs.js"]) - -__plugin_name__ = "Logs" -__plugin_author__ = "" -__plugin_description__ = "Provides access to OctoPrint Logs." -__plugin_license__ = "" -#__plugin_implementation__ = LogsPlugin() - - -# Required for regular plugin -def __plugin_load__(): - global __plugin_implementation__ - __plugin_implementation__ = LogsPlugin() - diff --git a/src/octoprint/plugins/logs/static/js/logs.js b/src/octoprint/plugins/logs/static/js/logs.js deleted file mode 100644 index 949190d2d..000000000 --- a/src/octoprint/plugins/logs/static/js/logs.js +++ /dev/null @@ -1,148 +0,0 @@ -$(function() { - function LogsViewModel(parameters) { - var self = this; - var logsURL = "plugin/logs/logs" - - self.loginState = parameters[0]; - self.availableLoggers = ko.observableArray(); - self.availableLoggersName = ko.observable(); - self.availableLoggersLevel = ko.observable(); - self.configuredLoggers = ko.observableArray(); - self.configuredLoggersChanged = false; - - - self.availableLoggersSorted = ko.computed(function() { - return _.sortBy(self.availableLoggers()); - }); - - self.configuredLoggersSorted = ko.computed(function() { - return _.sortBy(self.configuredLoggers(), function (o) { - o.level(); - return o.component; - }); - }); - - // initialize list helper - self.listHelper = new ItemListHelper( - "logFiles", - { - "name": function(a, b) { - // sorts ascending - if (a["name"].toLocaleLowerCase() < b["name"].toLocaleLowerCase()) return -1; - if (a["name"].toLocaleLowerCase() > b["name"].toLocaleLowerCase()) return 1; - return 0; - }, - "modification": function(a, b) { - // sorts descending - if (a["date"] > b["date"]) return -1; - if (a["date"] < b["date"]) return 1; - return 0; - }, - "size": function(a, b) { - // sorts descending - if (a["size"] > b["size"]) return -1; - if (a["size"] < b["size"]) return 1; - return 0; - } - }, - { - }, - "name", - [], - [], - CONFIG_LOGFILESPERPAGE - ); - - self.requestData = function() { - OctoPrint.get(logsURL) - .done(self.fromResponse); - - OctoPrint.simpleApiCommand("logs", "getLoggingConfig") - .done(self.fromGetLoggingConfigResponse); - - OctoPrint.simpleApiCommand("logs", "getAvailableLoggers") - .done(self.fromGetAvailableLoggersResponse); - }; - - self.fromResponse = function(response) { - var files = response.files; - if (files === undefined) - return; - - self.listHelper.updateItems(files); - }; - - self.fromGetLoggingConfigResponse = function(data) { - self.configuredLoggers([]); - - $.each(data.result.loggers, function(component, options) { - if (options.level !== undefined) { - self.configuredLoggers.push({component: component, level: ko.observable(options.level)}); - } - }); - - self.configuredLoggersChanged = false; - }; - - self.fromGetAvailableLoggersResponse = function(data) { - self.availableLoggers([]); - - $.each(data.result, function(key, component) { - if (component.toLowerCase().indexOf("octoprint") >= 0) { - self.availableLoggers.push(component); - } - }); - - $.each(self.configuredLoggers(), function(key, logger) { - self.availableLoggers.remove(logger.component); - }); - }; - - self.configuredLoggersHasChanged = function () { - self.configuredLoggersChanged = true; - }; - - self.addLogger = function() { - component = self.availableLoggersName(); - level = self.availableLoggersLevel(); - - self.configuredLoggers.push({component: component, level: ko.observable(level)}); - self.availableLoggers.remove(component); - - self.configuredLoggersHasChanged(); - }; - - self.removeLogger = function(logger) { - self.configuredLoggers.remove(logger); - self.availableLoggers.push(logger.component); - - self.configuredLoggersHasChanged(); - }; - - self.removeFile = function(filename) { - OctoPrint.delete(logsURL + "/" + filename) - .done(self.requestData); - }; - - self.onSettingsShown = function() { - self.requestData(); - }; - - - self.onSettingsBeforeSave = function () { - if ( self.configuredLoggersChanged ) { - console.log("ConfiguredLoggers has changed. Saving!"); - OctoPrint.simpleApiCommand("logs", "setLoggingConfig", {'config': ko.toJSON(self.configuredLoggers)}); - } else { - console.log("ConfiguredLoggers has not changed. Not saving."); - } - }; - } - - - OCTOPRINT_VIEWMODELS.push([ - LogsViewModel, - ["loginStateViewModel"], - "#settings_plugin_logs" - ]); -}); diff --git a/src/octoprint/settings.py b/src/octoprint/settings.py index 487e479ad..6892b1880 100644 --- a/src/octoprint/settings.py +++ b/src/octoprint/settings.py @@ -273,7 +273,7 @@ default_settings = { "settings": [ "section_printer", "serial", "printerprofiles", "temperatures", "terminalfilters", "gcodescripts", "section_features", "features", "webcam", "accesscontrol", "gcodevisualizer", "api", - "section_octoprint", "server", "folders", "appearance", "plugin_logs", "plugin_pluginmanager", "plugin_softwareupdate", "plugin_announcements" + "section_octoprint", "server", "folders", "appearance", "plugin_logging", "plugin_pluginmanager", "plugin_softwareupdate", "plugin_announcements" ], "usersettings": ["access", "interface"], "wizard": ["access"], diff --git a/src/octoprint/static/css/octoprint.css b/src/octoprint/static/css/octoprint.css index 997982e7a..b133ab956 100644 --- a/src/octoprint/static/css/octoprint.css +++ b/src/octoprint/static/css/octoprint.css @@ -1 +1 @@ -.btn{display:inline-block;*display:inline;*zoom:1;padding:4px 12px;margin-bottom:0;font-size:14px;line-height:20px;text-align:center;vertical-align:middle;cursor:pointer;color:#333;text-shadow:0 1px 1px rgba(255,255,255,.75);background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;*background-color:#e6e6e6;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);border:1px solid #ccc;*border:0;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*margin-left:.3em;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}.btn.active,.btn.disabled,.btn:active,.btn:focus,.btn:hover,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn.active,.btn:active{background-color:#ccc \9}.btn:first-child{*margin-left:0}.btn:focus,.btn:hover{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:#333 dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:11px 19px;font-size:17.5px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.btn-large [class*=" icon-"],.btn-large [class^=icon-]{margin-top:4px}.btn-small{padding:2px 10px;font-size:11.9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-small [class*=" icon-"],.btn-small [class^=icon-]{margin-top:0}.btn-mini [class*=" icon-"],.btn-mini [class^=icon-]{margin-top:-1px}.btn-mini{padding:0 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-block{display:block;width:100%;padding-left:0;padding-right:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#04c;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-primary.active,.btn-primary.disabled,.btn-primary:active,.btn-primary:focus,.btn-primary:hover,.btn-primary[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.btn-primary.active,.btn-primary:active{background-color:#039 \9}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#f89406;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-warning.active,.btn-warning.disabled,.btn-warning:active,.btn-warning:focus,.btn-warning:hover,.btn-warning[disabled]{color:#fff;background-color:#f89406;*background-color:#df8505}.btn-warning.active,.btn-warning:active{background-color:#c67605 \9}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#da4f49;background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to bottom,#ee5f5b,#bd362f);background-repeat:repeat-x;border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#bd362f;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-danger.active,.btn-danger.disabled,.btn-danger:active,.btn-danger:focus,.btn-danger:hover,.btn-danger[disabled]{color:#fff;background-color:#bd362f;*background-color:#a9302a}.btn-danger.active,.btn-danger:active{background-color:#942a25 \9}.btn-success{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#5bb75b;background-image:-moz-linear-gradient(top,#62c462,#51a351);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#51a351));background-image:-webkit-linear-gradient(top,#62c462,#51a351);background-image:-o-linear-gradient(top,#62c462,#51a351);background-image:linear-gradient(to bottom,#62c462,#51a351);background-repeat:repeat-x;border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#51a351;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-success.active,.btn-success.disabled,.btn-success:active,.btn-success:focus,.btn-success:hover,.btn-success[disabled]{color:#fff;background-color:#51a351;*background-color:#499249}.btn-success.active,.btn-success:active{background-color:#408140 \9}.btn-info{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#49afcd;background-image:-moz-linear-gradient(top,#5bc0de,#2f96b4);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#2f96b4));background-image:-webkit-linear-gradient(top,#5bc0de,#2f96b4);background-image:-o-linear-gradient(top,#5bc0de,#2f96b4);background-image:linear-gradient(to bottom,#5bc0de,#2f96b4);background-repeat:repeat-x;border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#2f96b4;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-info.active,.btn-info.disabled,.btn-info:active,.btn-info:focus,.btn-info:hover,.btn-info[disabled]{color:#fff;background-color:#2f96b4;*background-color:#2a85a0}.btn-info.active,.btn-info:active{background-color:#24748c \9}.btn-inverse{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#363636;background-image:-moz-linear-gradient(top,#444,#222);background-image:-webkit-gradient(linear,0 0,0 100%,from(#444),to(#222));background-image:-webkit-linear-gradient(top,#444,#222);background-image:-o-linear-gradient(top,#444,#222);background-image:linear-gradient(to bottom,#444,#222);background-repeat:repeat-x;border-color:#222 #222 #000;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#222;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-inverse.active,.btn-inverse.disabled,.btn-inverse:active,.btn-inverse:focus,.btn-inverse:hover,.btn-inverse[disabled]{color:#fff;background-color:#222;*background-color:#151515}.btn-inverse.active,.btn-inverse:active{background-color:#080808 \9}button.btn,input[type=submit].btn{*padding-top:3px;*padding-bottom:3px}button.btn::-moz-focus-inner,input[type=submit].btn::-moz-focus-inner{padding:0;border:0}button.btn.btn-large,input[type=submit].btn.btn-large{*padding-top:7px;*padding-bottom:7px}button.btn.btn-small,input[type=submit].btn.btn-small{*padding-top:3px;*padding-bottom:3px}button.btn.btn-mini,input[type=submit].btn.btn-mini{*padding-top:1px;*padding-bottom:1px}.btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-link{border-color:transparent;cursor:pointer;color:#08c;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-link:focus,.btn-link:hover{color:#005580;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover{color:#333;text-decoration:none}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:"";line-height:0}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.nowrap{white-space:nowrap}.actioncol{text-align:center;white-space:nowrap}.actioncol a{text-decoration:none;color:#000}.actioncol a.disabled{color:#ccc;cursor:default}#navbar .navbar-inner{background-color:#ebebeb;background-image:-moz-linear-gradient(top,#fff,#ccc);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#ccc));background-image:-webkit-linear-gradient(top,#fff,#ccc);background-image:-o-linear-gradient(top,#fff,#ccc);background-image:linear-gradient(to bottom,#fff,#ccc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffcccccc', GradientType=0)}#navbar .navbar-inner .brand,#navbar .navbar-inner .nav>li>a{text-shadow:0 1px 0 #ccc;color:#333}#navbar .navbar-inner .brand .caret,#navbar .navbar-inner .nav>li>a .caret{border-bottom-color:#939393;border-top-color:#939393}#navbar .navbar-inner .brand:focus .caret,#navbar .navbar-inner .brand:hover .caret,#navbar .navbar-inner .nav>li>a:focus .caret,#navbar .navbar-inner .nav>li>a:hover .caret{border-bottom-color:#636363;border-top-color:#636363}#navbar .navbar-inner .brand span{background-image:url(../img/tentacle-20x20.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner .brand span{background-image:url(../img/tentacle-20x20@2x.png)}}#navbar .navbar-inner .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner .nav>li.dropdown.open>.dropdown-toggle{background-color:#e0e0e0;background-image:-moz-linear-gradient(top,#ccc,#fff);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ccc),to(#fff));background-image:-webkit-linear-gradient(top,#ccc,#fff);background-image:-o-linear-gradient(top,#ccc,#fff);background-image:linear-gradient(to bottom,#ccc,#fff);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffcccccc', endColorstr='#ffffffff', GradientType=0)}#navbar .navbar-inner .nav>li>a:hover{background-color:#dedede;background-image:-moz-linear-gradient(top,#f2f2f2,#bfbfbf);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#bfbfbf));background-image:-webkit-linear-gradient(top,#f2f2f2,#bfbfbf);background-image:-o-linear-gradient(top,#f2f2f2,#bfbfbf);background-image:linear-gradient(to bottom,#f2f2f2,#bfbfbf);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffbfbfbf', GradientType=0)}#navbar .navbar-inner.transparent{background-color:rgba(235,235,235,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(255,255,255,.6),rgba(204,204,204,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(255,255,255,.6)),to(rgba(204,204,204,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(255,255,255,.6),rgba(204,204,204,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(255,255,255,.6),rgba(204,204,204,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(255,255,255,.6),rgba(204,204,204,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99ffffff', endColorstr='#99cccccc', GradientType=0)}#navbar .navbar-inner.transparent .brand,#navbar .navbar-inner.transparent .nav>li>a{text-shadow:0 1px 0 #ccc;color:#333}#navbar .navbar-inner.transparent .brand .caret,#navbar .navbar-inner.transparent .nav>li>a .caret{border-bottom-color:#939393;border-top-color:#939393}#navbar .navbar-inner.transparent .brand:focus .caret,#navbar .navbar-inner.transparent .brand:hover .caret,#navbar .navbar-inner.transparent .nav>li>a:focus .caret,#navbar .navbar-inner.transparent .nav>li>a:hover .caret{border-bottom-color:#636363;border-top-color:#636363}#navbar .navbar-inner.transparent .brand span{background-image:url(../img/tentacle-20x20.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner.transparent .brand span{background-image:url(../img/tentacle-20x20@2x.png)}}#navbar .navbar-inner.transparent .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner.transparent .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner.transparent .nav>li.dropdown.open>.dropdown-toggle{background-color:rgba(224,224,224,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(204,204,204,.6),rgba(255,255,255,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(204,204,204,.6)),to(rgba(255,255,255,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(204,204,204,.6),rgba(255,255,255,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(204,204,204,.6),rgba(255,255,255,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(204,204,204,.6),rgba(255,255,255,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99cccccc', endColorstr='#99ffffff', GradientType=0)}#navbar .navbar-inner.transparent .nav>li>a:hover{background-color:rgba(222,222,222,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(242,242,242,.6),rgba(191,191,191,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(242,242,242,.6)),to(rgba(191,191,191,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(242,242,242,.6),rgba(191,191,191,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(242,242,242,.6),rgba(191,191,191,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(242,242,242,.6),rgba(191,191,191,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99f2f2f2', endColorstr='#99bfbfbf', GradientType=0)}#navbar .navbar-inner.red{background-color:#bb645f;background-image:-moz-linear-gradient(top,#e28e8a,#802420);background-image:-webkit-gradient(linear,0 0,0 100%,from(#e28e8a),to(#802420));background-image:-webkit-linear-gradient(top,#e28e8a,#802420);background-image:-o-linear-gradient(top,#e28e8a,#802420);background-image:linear-gradient(to bottom,#e28e8a,#802420);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe28e8a', endColorstr='#ff802420', GradientType=0)}#navbar .navbar-inner.red .brand,#navbar .navbar-inner.red .nav>li>a{text-shadow:0 1px 0 #d86761;color:#f2f2f2}#navbar .navbar-inner.red .brand .caret,#navbar .navbar-inner.red .nav>li>a .caret{border-bottom-color:#d89491;border-top-color:#d89491}#navbar .navbar-inner.red .brand:focus .caret,#navbar .navbar-inner.red .brand:hover .caret,#navbar .navbar-inner.red .nav>li>a:focus .caret,#navbar .navbar-inner.red .nav>li>a:hover .caret{border-bottom-color:#e5c3c1;border-top-color:#e5c3c1}#navbar .navbar-inner.red .brand span{background-image:url(../img/tentacle-20x20-light.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner.red .brand span{background-image:url(../img/tentacle-20x20-light@2x.png)}}#navbar .navbar-inner.red .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner.red .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner.red .nav>li.dropdown.open>.dropdown-toggle{background-color:#a74f4a;background-image:-moz-linear-gradient(top,#802420,#e28e8a);background-image:-webkit-gradient(linear,0 0,0 100%,from(#802420),to(#e28e8a));background-image:-webkit-linear-gradient(top,#802420,#e28e8a);background-image:-o-linear-gradient(top,#802420,#e28e8a);background-image:linear-gradient(to bottom,#802420,#e28e8a);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff802420', endColorstr='#ffe28e8a', GradientType=0)}#navbar .navbar-inner.red .nav>li>a:hover{background-color:#af5651;background-image:-moz-linear-gradient(top,#dd7a75,#6b1f1b);background-image:-webkit-gradient(linear,0 0,0 100%,from(#dd7a75),to(#6b1f1b));background-image:-webkit-linear-gradient(top,#dd7a75,#6b1f1b);background-image:-o-linear-gradient(top,#dd7a75,#6b1f1b);background-image:linear-gradient(to bottom,#dd7a75,#6b1f1b);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdd7a75', endColorstr='#ff6b1f1b', GradientType=0)}#navbar .navbar-inner.red.transparent{background-color:rgba(187,100,95,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(226,142,138,.6),rgba(128,36,32,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(226,142,138,.6)),to(rgba(128,36,32,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(226,142,138,.6),rgba(128,36,32,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(226,142,138,.6),rgba(128,36,32,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(226,142,138,.6),rgba(128,36,32,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99e28e8a', endColorstr='#99802420', GradientType=0)}#navbar .navbar-inner.red.transparent .brand,#navbar .navbar-inner.red.transparent .nav>li>a{text-shadow:0 1px 0 #d86761;color:#f2f2f2}#navbar .navbar-inner.red.transparent .brand .caret,#navbar .navbar-inner.red.transparent .nav>li>a .caret{border-bottom-color:#d89491;border-top-color:#d89491}#navbar .navbar-inner.red.transparent .brand:focus .caret,#navbar .navbar-inner.red.transparent .brand:hover .caret,#navbar .navbar-inner.red.transparent .nav>li>a:focus .caret,#navbar .navbar-inner.red.transparent .nav>li>a:hover .caret{border-bottom-color:#e5c3c1;border-top-color:#e5c3c1}#navbar .navbar-inner.red.transparent .brand span{background-image:url(../img/tentacle-20x20-light.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner.red.transparent .brand span{background-image:url(../img/tentacle-20x20-light@2x.png)}}#navbar .navbar-inner.red.transparent .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner.red.transparent .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner.red.transparent .nav>li.dropdown.open>.dropdown-toggle{background-color:rgba(167,79,74,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(128,36,32,.6),rgba(226,142,138,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(128,36,32,.6)),to(rgba(226,142,138,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(128,36,32,.6),rgba(226,142,138,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(128,36,32,.6),rgba(226,142,138,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(128,36,32,.6),rgba(226,142,138,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99802420', endColorstr='#99e28e8a', GradientType=0)}#navbar .navbar-inner.red.transparent .nav>li>a:hover{background-color:rgba(175,86,81,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(221,122,117,.6),rgba(107,31,27,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(221,122,117,.6)),to(rgba(107,31,27,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(221,122,117,.6),rgba(107,31,27,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(221,122,117,.6),rgba(107,31,27,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(221,122,117,.6),rgba(107,31,27,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99dd7a75', endColorstr='#996b1f1b', GradientType=0)}#navbar .navbar-inner.orange{background-color:#e39665;background-image:-moz-linear-gradient(top,#f9c3a0,#c2530c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f9c3a0),to(#c2530c));background-image:-webkit-linear-gradient(top,#f9c3a0,#c2530c);background-image:-o-linear-gradient(top,#f9c3a0,#c2530c);background-image:linear-gradient(to bottom,#f9c3a0,#c2530c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff9c3a0', endColorstr='#ffc2530c', GradientType=0)}#navbar .navbar-inner.orange .brand,#navbar .navbar-inner.orange .nav>li>a{text-shadow:0 1px 0 #f6a570;color:#f2f2f2}#navbar .navbar-inner.orange .brand .caret,#navbar .navbar-inner.orange .nav>li>a .caret{border-bottom-color:#f2b58d;border-top-color:#f2b58d}#navbar .navbar-inner.orange .brand:focus .caret,#navbar .navbar-inner.orange .brand:hover .caret,#navbar .navbar-inner.orange .nav>li>a:focus .caret,#navbar .navbar-inner.orange .nav>li>a:hover .caret{border-bottom-color:#f2d3bf;border-top-color:#f2d3bf}#navbar .navbar-inner.orange .brand span{background-image:url(../img/tentacle-20x20-light.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner.orange .brand span{background-image:url(../img/tentacle-20x20-light@2x.png)}}#navbar .navbar-inner.orange .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner.orange .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner.orange .nav>li.dropdown.open>.dropdown-toggle{background-color:#d88047;background-image:-moz-linear-gradient(top,#c2530c,#f9c3a0);background-image:-webkit-gradient(linear,0 0,0 100%,from(#c2530c),to(#f9c3a0));background-image:-webkit-linear-gradient(top,#c2530c,#f9c3a0);background-image:-o-linear-gradient(top,#c2530c,#f9c3a0);background-image:linear-gradient(to bottom,#c2530c,#f9c3a0);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffc2530c', endColorstr='#fff9c3a0', GradientType=0)}#navbar .navbar-inner.orange .nav>li>a:hover{background-color:#d98956;background-image:-moz-linear-gradient(top,#f8b488,#aa490a);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f8b488),to(#aa490a));background-image:-webkit-linear-gradient(top,#f8b488,#aa490a);background-image:-o-linear-gradient(top,#f8b488,#aa490a);background-image:linear-gradient(to bottom,#f8b488,#aa490a);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff8b488', endColorstr='#ffaa490a', GradientType=0)}#navbar .navbar-inner.orange.transparent{background-color:rgba(227,150,101,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(249,195,160,.6),rgba(194,83,12,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(249,195,160,.6)),to(rgba(194,83,12,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(249,195,160,.6),rgba(194,83,12,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(249,195,160,.6),rgba(194,83,12,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(249,195,160,.6),rgba(194,83,12,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99f9c3a0', endColorstr='#99c2530c', GradientType=0)}#navbar .navbar-inner.orange.transparent .brand,#navbar .navbar-inner.orange.transparent .nav>li>a{text-shadow:0 1px 0 #f6a570;color:#f2f2f2}#navbar .navbar-inner.orange.transparent .brand .caret,#navbar .navbar-inner.orange.transparent .nav>li>a .caret{border-bottom-color:#f2b58d;border-top-color:#f2b58d}#navbar .navbar-inner.orange.transparent .brand:focus .caret,#navbar .navbar-inner.orange.transparent .brand:hover .caret,#navbar .navbar-inner.orange.transparent .nav>li>a:focus .caret,#navbar .navbar-inner.orange.transparent .nav>li>a:hover .caret{border-bottom-color:#f2d3bf;border-top-color:#f2d3bf}#navbar .navbar-inner.orange.transparent .brand span{background-image:url(../img/tentacle-20x20-light.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner.orange.transparent .brand span{background-image:url(../img/tentacle-20x20-light@2x.png)}}#navbar .navbar-inner.orange.transparent .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner.orange.transparent .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner.orange.transparent .nav>li.dropdown.open>.dropdown-toggle{background-color:rgba(216,128,71,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(194,83,12,.6),rgba(249,195,160,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(194,83,12,.6)),to(rgba(249,195,160,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(194,83,12,.6),rgba(249,195,160,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(194,83,12,.6),rgba(249,195,160,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(194,83,12,.6),rgba(249,195,160,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99c2530c', endColorstr='#99f9c3a0', GradientType=0)}#navbar .navbar-inner.orange.transparent .nav>li>a:hover{background-color:rgba(217,137,86,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(248,180,136,.6),rgba(170,73,10,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(248,180,136,.6)),to(rgba(170,73,10,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(248,180,136,.6),rgba(170,73,10,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(248,180,136,.6),rgba(170,73,10,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(248,180,136,.6),rgba(170,73,10,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99f8b488', endColorstr='#99aa490a', GradientType=0)}#navbar .navbar-inner.yellow{background-color:#e3d765;background-image:-moz-linear-gradient(top,#f9f0a0,#c2b00c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f9f0a0),to(#c2b00c));background-image:-webkit-linear-gradient(top,#f9f0a0,#c2b00c);background-image:-o-linear-gradient(top,#f9f0a0,#c2b00c);background-image:linear-gradient(to bottom,#f9f0a0,#c2b00c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff9f0a0', endColorstr='#ffc2b00c', GradientType=0)}#navbar .navbar-inner.yellow .brand,#navbar .navbar-inner.yellow .nav>li>a{text-shadow:0 1px 0 #c2b00c;color:#f2f2f2}#navbar .navbar-inner.yellow .brand .caret,#navbar .navbar-inner.yellow .nav>li>a .caret{border-bottom-color:#f2e88d;border-top-color:#f2e88d}#navbar .navbar-inner.yellow .brand:focus .caret,#navbar .navbar-inner.yellow .brand:hover .caret,#navbar .navbar-inner.yellow .nav>li>a:focus .caret,#navbar .navbar-inner.yellow .nav>li>a:hover .caret{border-bottom-color:#f2edbf;border-top-color:#f2edbf}#navbar .navbar-inner.yellow .brand span{background-image:url(../img/tentacle-20x20-light.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner.yellow .brand span{background-image:url(../img/tentacle-20x20-light@2x.png)}}#navbar .navbar-inner.yellow .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner.yellow .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner.yellow .nav>li.dropdown.open>.dropdown-toggle{background-color:#d8ca47;background-image:-moz-linear-gradient(top,#c2b00c,#f9f0a0);background-image:-webkit-gradient(linear,0 0,0 100%,from(#c2b00c),to(#f9f0a0));background-image:-webkit-linear-gradient(top,#c2b00c,#f9f0a0);background-image:-o-linear-gradient(top,#c2b00c,#f9f0a0);background-image:linear-gradient(to bottom,#c2b00c,#f9f0a0);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffc2b00c', endColorstr='#fff9f0a0', GradientType=0)}#navbar .navbar-inner.yellow .nav>li>a:hover{background-color:#d9cc56;background-image:-moz-linear-gradient(top,#f8ed88,#aa9a0a);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f8ed88),to(#aa9a0a));background-image:-webkit-linear-gradient(top,#f8ed88,#aa9a0a);background-image:-o-linear-gradient(top,#f8ed88,#aa9a0a);background-image:linear-gradient(to bottom,#f8ed88,#aa9a0a);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff8ed88', endColorstr='#ffaa9a0a', GradientType=0)}#navbar .navbar-inner.yellow.transparent{background-color:rgba(227,215,101,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(249,240,160,.6),rgba(194,176,12,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(249,240,160,.6)),to(rgba(194,176,12,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(249,240,160,.6),rgba(194,176,12,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(249,240,160,.6),rgba(194,176,12,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(249,240,160,.6),rgba(194,176,12,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99f9f0a0', endColorstr='#99c2b00c', GradientType=0)}#navbar .navbar-inner.yellow.transparent .brand,#navbar .navbar-inner.yellow.transparent .nav>li>a{text-shadow:0 1px 0 #c2b00c;color:#f2f2f2}#navbar .navbar-inner.yellow.transparent .brand .caret,#navbar .navbar-inner.yellow.transparent .nav>li>a .caret{border-bottom-color:#f2e88d;border-top-color:#f2e88d}#navbar .navbar-inner.yellow.transparent .brand:focus .caret,#navbar .navbar-inner.yellow.transparent .brand:hover .caret,#navbar .navbar-inner.yellow.transparent .nav>li>a:focus .caret,#navbar .navbar-inner.yellow.transparent .nav>li>a:hover .caret{border-bottom-color:#f2edbf;border-top-color:#f2edbf}#navbar .navbar-inner.yellow.transparent .brand span{background-image:url(../img/tentacle-20x20-light.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner.yellow.transparent .brand span{background-image:url(../img/tentacle-20x20-light@2x.png)}}#navbar .navbar-inner.yellow.transparent .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner.yellow.transparent .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner.yellow.transparent .nav>li.dropdown.open>.dropdown-toggle{background-color:rgba(216,202,71,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(194,176,12,.6),rgba(249,240,160,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(194,176,12,.6)),to(rgba(249,240,160,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(194,176,12,.6),rgba(249,240,160,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(194,176,12,.6),rgba(249,240,160,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(194,176,12,.6),rgba(249,240,160,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99c2b00c', endColorstr='#99f9f0a0', GradientType=0)}#navbar .navbar-inner.yellow.transparent .nav>li>a:hover{background-color:rgba(217,204,86,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(248,237,136,.6),rgba(170,154,10,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(248,237,136,.6)),to(rgba(170,154,10,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(248,237,136,.6),rgba(170,154,10,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(248,237,136,.6),rgba(170,154,10,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(248,237,136,.6),rgba(170,154,10,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99f8ed88', endColorstr='#99aa9a0a', GradientType=0)}#navbar .navbar-inner.green{background-color:#98f064;background-image:-moz-linear-gradient(top,#c8ffa7,#50da00);background-image:-webkit-gradient(linear,0 0,0 100%,from(#c8ffa7),to(#50da00));background-image:-webkit-linear-gradient(top,#c8ffa7,#50da00);background-image:-o-linear-gradient(top,#c8ffa7,#50da00);background-image:linear-gradient(to bottom,#c8ffa7,#50da00);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffc8ffa7', endColorstr='#ff50da00', GradientType=0)}#navbar .navbar-inner.green .brand,#navbar .navbar-inner.green .nav>li>a{text-shadow:0 1px 0 #50da00;color:#333}#navbar .navbar-inner.green .brand .caret,#navbar .navbar-inner.green .nav>li>a .caret{border-bottom-color:#55992e;border-top-color:#55992e}#navbar .navbar-inner.green .brand:focus .caret,#navbar .navbar-inner.green .brand:hover .caret,#navbar .navbar-inner.green .nav>li>a:focus .caret,#navbar .navbar-inner.green .nav>li>a:hover .caret{border-bottom-color:#446630;border-top-color:#446630}#navbar .navbar-inner.green .brand span{background-image:url(../img/tentacle-20x20.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner.green .brand span{background-image:url(../img/tentacle-20x20@2x.png)}}#navbar .navbar-inner.green .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner.green .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner.green .nav>li.dropdown.open>.dropdown-toggle{background-color:#80e943;background-image:-moz-linear-gradient(top,#50da00,#c8ffa7);background-image:-webkit-gradient(linear,0 0,0 100%,from(#50da00),to(#c8ffa7));background-image:-webkit-linear-gradient(top,#50da00,#c8ffa7);background-image:-o-linear-gradient(top,#50da00,#c8ffa7);background-image:linear-gradient(to bottom,#50da00,#c8ffa7);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff50da00', endColorstr='#ffc8ffa7', GradientType=0)}#navbar .navbar-inner.green .nav>li>a:hover{background-color:#8ae655;background-image:-moz-linear-gradient(top,#b8ff8e,#47c100);background-image:-webkit-gradient(linear,0 0,0 100%,from(#b8ff8e),to(#47c100));background-image:-webkit-linear-gradient(top,#b8ff8e,#47c100);background-image:-o-linear-gradient(top,#b8ff8e,#47c100);background-image:linear-gradient(to bottom,#b8ff8e,#47c100);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffb8ff8e', endColorstr='#ff47c100', GradientType=0)}#navbar .navbar-inner.green.transparent{background-color:rgba(152,240,100,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(200,255,167,.6),rgba(80,218,0,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(200,255,167,.6)),to(rgba(80,218,0,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(200,255,167,.6),rgba(80,218,0,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(200,255,167,.6),rgba(80,218,0,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(200,255,167,.6),rgba(80,218,0,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99c8ffa7', endColorstr='#9950da00', GradientType=0)}#navbar .navbar-inner.green.transparent .brand,#navbar .navbar-inner.green.transparent .nav>li>a{text-shadow:0 1px 0 #50da00;color:#333}#navbar .navbar-inner.green.transparent .brand .caret,#navbar .navbar-inner.green.transparent .nav>li>a .caret{border-bottom-color:#55992e;border-top-color:#55992e}#navbar .navbar-inner.green.transparent .brand:focus .caret,#navbar .navbar-inner.green.transparent .brand:hover .caret,#navbar .navbar-inner.green.transparent .nav>li>a:focus .caret,#navbar .navbar-inner.green.transparent .nav>li>a:hover .caret{border-bottom-color:#446630;border-top-color:#446630}#navbar .navbar-inner.green.transparent .brand span{background-image:url(../img/tentacle-20x20.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner.green.transparent .brand span{background-image:url(../img/tentacle-20x20@2x.png)}}#navbar .navbar-inner.green.transparent .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner.green.transparent .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner.green.transparent .nav>li.dropdown.open>.dropdown-toggle{background-color:rgba(128,233,67,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(80,218,0,.6),rgba(200,255,167,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(80,218,0,.6)),to(rgba(200,255,167,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(80,218,0,.6),rgba(200,255,167,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(80,218,0,.6),rgba(200,255,167,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(80,218,0,.6),rgba(200,255,167,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#9950da00', endColorstr='#99c8ffa7', GradientType=0)}#navbar .navbar-inner.green.transparent .nav>li>a:hover{background-color:rgba(138,230,85,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(184,255,142,.6),rgba(71,193,0,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(184,255,142,.6)),to(rgba(71,193,0,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(184,255,142,.6),rgba(71,193,0,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(184,255,142,.6),rgba(71,193,0,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(184,255,142,.6),rgba(71,193,0,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99b8ff8e', endColorstr='#9947c100', GradientType=0)}#navbar .navbar-inner.blue{background-color:#2e63cc;background-image:-moz-linear-gradient(top,#4d88ff,#002b80);background-image:-webkit-gradient(linear,0 0,0 100%,from(#4d88ff),to(#002b80));background-image:-webkit-linear-gradient(top,#4d88ff,#002b80);background-image:-o-linear-gradient(top,#4d88ff,#002b80);background-image:linear-gradient(to bottom,#4d88ff,#002b80);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff4d88ff', endColorstr='#ff002b80', GradientType=0)}#navbar .navbar-inner.blue .brand,#navbar .navbar-inner.blue .nav>li>a{text-shadow:0 1px 0 #1a66ff;color:#f2f2f2}#navbar .navbar-inner.blue .brand .caret,#navbar .navbar-inner.blue .nav>li>a .caret{border-bottom-color:#799bdf;border-top-color:#799bdf}#navbar .navbar-inner.blue .brand:focus .caret,#navbar .navbar-inner.blue .brand:hover .caret,#navbar .navbar-inner.blue .nav>li>a:focus .caret,#navbar .navbar-inner.blue .nav>li>a:hover .caret{border-bottom-color:#b6c7e9;border-top-color:#b6c7e9}#navbar .navbar-inner.blue .brand span{background-image:url(../img/tentacle-20x20-light.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner.blue .brand span{background-image:url(../img/tentacle-20x20-light@2x.png)}}#navbar .navbar-inner.blue .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner.blue .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner.blue .nav>li.dropdown.open>.dropdown-toggle{background-color:#1f50b3;background-image:-moz-linear-gradient(top,#002b80,#4d88ff);background-image:-webkit-gradient(linear,0 0,0 100%,from(#002b80),to(#4d88ff));background-image:-webkit-linear-gradient(top,#002b80,#4d88ff);background-image:-o-linear-gradient(top,#002b80,#4d88ff);background-image:linear-gradient(to bottom,#002b80,#4d88ff);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff002b80', endColorstr='#ff4d88ff', GradientType=0)}#navbar .navbar-inner.blue .nav>li>a:hover{background-color:#1f55c2;background-image:-moz-linear-gradient(top,#37f,#026);background-image:-webkit-gradient(linear,0 0,0 100%,from(#37f),to(#026));background-image:-webkit-linear-gradient(top,#37f,#026);background-image:-o-linear-gradient(top,#37f,#026);background-image:linear-gradient(to bottom,#37f,#026);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3377ff', endColorstr='#ff002266', GradientType=0)}#navbar .navbar-inner.blue.transparent{background-color:rgba(46,99,204,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(77,136,255,.6),rgba(0,43,128,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(77,136,255,.6)),to(rgba(0,43,128,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(77,136,255,.6),rgba(0,43,128,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(77,136,255,.6),rgba(0,43,128,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(77,136,255,.6),rgba(0,43,128,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#994d88ff', endColorstr='#99002b80', GradientType=0)}#navbar .navbar-inner.blue.transparent .brand,#navbar .navbar-inner.blue.transparent .nav>li>a{text-shadow:0 1px 0 #1a66ff;color:#f2f2f2}#navbar .navbar-inner.blue.transparent .brand .caret,#navbar .navbar-inner.blue.transparent .nav>li>a .caret{border-bottom-color:#799bdf;border-top-color:#799bdf}#navbar .navbar-inner.blue.transparent .brand:focus .caret,#navbar .navbar-inner.blue.transparent .brand:hover .caret,#navbar .navbar-inner.blue.transparent .nav>li>a:focus .caret,#navbar .navbar-inner.blue.transparent .nav>li>a:hover .caret{border-bottom-color:#b6c7e9;border-top-color:#b6c7e9}#navbar .navbar-inner.blue.transparent .brand span{background-image:url(../img/tentacle-20x20-light.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner.blue.transparent .brand span{background-image:url(../img/tentacle-20x20-light@2x.png)}}#navbar .navbar-inner.blue.transparent .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner.blue.transparent .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner.blue.transparent .nav>li.dropdown.open>.dropdown-toggle{background-color:rgba(31,80,179,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(0,43,128,.6),rgba(77,136,255,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(0,43,128,.6)),to(rgba(77,136,255,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(0,43,128,.6),rgba(77,136,255,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(0,43,128,.6),rgba(77,136,255,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(0,43,128,.6),rgba(77,136,255,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99002b80', endColorstr='#994d88ff', GradientType=0)}#navbar .navbar-inner.blue.transparent .nav>li>a:hover{background-color:rgba(31,85,194,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(51,119,255,.6),rgba(0,34,102,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(51,119,255,.6)),to(rgba(0,34,102,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(51,119,255,.6),rgba(0,34,102,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(51,119,255,.6),rgba(0,34,102,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(51,119,255,.6),rgba(0,34,102,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#993377ff', endColorstr='#99002266', GradientType=0)}#navbar .navbar-inner.violet{background-color:#9864f0;background-image:-moz-linear-gradient(top,#c8a7ff,#5000da);background-image:-webkit-gradient(linear,0 0,0 100%,from(#c8a7ff),to(#5000da));background-image:-webkit-linear-gradient(top,#c8a7ff,#5000da);background-image:-o-linear-gradient(top,#c8a7ff,#5000da);background-image:linear-gradient(to bottom,#c8a7ff,#5000da);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffc8a7ff', endColorstr='#ff5000da', GradientType=0)}#navbar .navbar-inner.violet .brand,#navbar .navbar-inner.violet .nav>li>a{text-shadow:0 1px 0 #a774ff;color:#f2f2f2}#navbar .navbar-inner.violet .brand .caret,#navbar .navbar-inner.violet .nav>li>a .caret{border-bottom-color:#b58df9;border-top-color:#b58df9}#navbar .navbar-inner.violet .brand:focus .caret,#navbar .navbar-inner.violet .brand:hover .caret,#navbar .navbar-inner.violet .nav>li>a:focus .caret,#navbar .navbar-inner.violet .nav>li>a:hover .caret{border-bottom-color:#d3bff5;border-top-color:#d3bff5}#navbar .navbar-inner.violet .brand span{background-image:url(../img/tentacle-20x20-light.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner.violet .brand span{background-image:url(../img/tentacle-20x20-light@2x.png)}}#navbar .navbar-inner.violet .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner.violet .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner.violet .nav>li.dropdown.open>.dropdown-toggle{background-color:#8043e9;background-image:-moz-linear-gradient(top,#5000da,#c8a7ff);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5000da),to(#c8a7ff));background-image:-webkit-linear-gradient(top,#5000da,#c8a7ff);background-image:-o-linear-gradient(top,#5000da,#c8a7ff);background-image:linear-gradient(to bottom,#5000da,#c8a7ff);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5000da', endColorstr='#ffc8a7ff', GradientType=0)}#navbar .navbar-inner.violet .nav>li>a:hover{background-color:#8a55e6;background-image:-moz-linear-gradient(top,#b88eff,#4700c1);background-image:-webkit-gradient(linear,0 0,0 100%,from(#b88eff),to(#4700c1));background-image:-webkit-linear-gradient(top,#b88eff,#4700c1);background-image:-o-linear-gradient(top,#b88eff,#4700c1);background-image:linear-gradient(to bottom,#b88eff,#4700c1);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffb88eff', endColorstr='#ff4700c1', GradientType=0)}#navbar .navbar-inner.violet.transparent{background-color:rgba(152,100,240,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(200,167,255,.6),rgba(80,0,218,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(200,167,255,.6)),to(rgba(80,0,218,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(200,167,255,.6),rgba(80,0,218,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(200,167,255,.6),rgba(80,0,218,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(200,167,255,.6),rgba(80,0,218,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99c8a7ff', endColorstr='#995000da', GradientType=0)}#navbar .navbar-inner.violet.transparent .brand,#navbar .navbar-inner.violet.transparent .nav>li>a{text-shadow:0 1px 0 #a774ff;color:#f2f2f2}#navbar .navbar-inner.violet.transparent .brand .caret,#navbar .navbar-inner.violet.transparent .nav>li>a .caret{border-bottom-color:#b58df9;border-top-color:#b58df9}#navbar .navbar-inner.violet.transparent .brand:focus .caret,#navbar .navbar-inner.violet.transparent .brand:hover .caret,#navbar .navbar-inner.violet.transparent .nav>li>a:focus .caret,#navbar .navbar-inner.violet.transparent .nav>li>a:hover .caret{border-bottom-color:#d3bff5;border-top-color:#d3bff5}#navbar .navbar-inner.violet.transparent .brand span{background-image:url(../img/tentacle-20x20-light.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner.violet.transparent .brand span{background-image:url(../img/tentacle-20x20-light@2x.png)}}#navbar .navbar-inner.violet.transparent .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner.violet.transparent .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner.violet.transparent .nav>li.dropdown.open>.dropdown-toggle{background-color:rgba(128,67,233,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(80,0,218,.6),rgba(200,167,255,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(80,0,218,.6)),to(rgba(200,167,255,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(80,0,218,.6),rgba(200,167,255,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(80,0,218,.6),rgba(200,167,255,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(80,0,218,.6),rgba(200,167,255,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#995000da', endColorstr='#99c8a7ff', GradientType=0)}#navbar .navbar-inner.violet.transparent .nav>li>a:hover{background-color:rgba(138,85,230,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(184,142,255,.6),rgba(71,0,193,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(184,142,255,.6)),to(rgba(71,0,193,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(184,142,255,.6),rgba(71,0,193,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(184,142,255,.6),rgba(71,0,193,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(184,142,255,.6),rgba(71,0,193,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99b88eff', endColorstr='#994700c1', GradientType=0)}#navbar .navbar-inner.black{background-color:#4f4f4f;background-image:-moz-linear-gradient(top,#787878,#121212);background-image:-webkit-gradient(linear,0 0,0 100%,from(#787878),to(#121212));background-image:-webkit-linear-gradient(top,#787878,#121212);background-image:-o-linear-gradient(top,#787878,#121212);background-image:linear-gradient(to bottom,#787878,#121212);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff787878', endColorstr='#ff121212', GradientType=0)}#navbar .navbar-inner.black .brand,#navbar .navbar-inner.black .nav>li>a{text-shadow:0 1px 0 #5e5e5e;color:#f2f2f2}#navbar .navbar-inner.black .brand .caret,#navbar .navbar-inner.black .nav>li>a .caret{border-bottom-color:#959595;border-top-color:#959595}#navbar .navbar-inner.black .brand:focus .caret,#navbar .navbar-inner.black .brand:hover .caret,#navbar .navbar-inner.black .nav>li>a:focus .caret,#navbar .navbar-inner.black .nav>li>a:hover .caret{border-bottom-color:#c4c4c4;border-top-color:#c4c4c4}#navbar .navbar-inner.black .brand span{background-image:url(../img/tentacle-20x20-light.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner.black .brand span{background-image:url(../img/tentacle-20x20-light@2x.png)}}#navbar .navbar-inner.black .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner.black .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner.black .nav>li.dropdown.open>.dropdown-toggle{background-color:#3b3b3b;background-image:-moz-linear-gradient(top,#121212,#787878);background-image:-webkit-gradient(linear,0 0,0 100%,from(#121212),to(#787878));background-image:-webkit-linear-gradient(top,#121212,#787878);background-image:-o-linear-gradient(top,#121212,#787878);background-image:linear-gradient(to bottom,#121212,#787878);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff121212', endColorstr='#ff787878', GradientType=0)}#navbar .navbar-inner.black .nav>li>a:hover{background-color:#424242;background-image:-moz-linear-gradient(top,#6b6b6b,#050505);background-image:-webkit-gradient(linear,0 0,0 100%,from(#6b6b6b),to(#050505));background-image:-webkit-linear-gradient(top,#6b6b6b,#050505);background-image:-o-linear-gradient(top,#6b6b6b,#050505);background-image:linear-gradient(to bottom,#6b6b6b,#050505);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff6b6b6b', endColorstr='#ff050505', GradientType=0)}#navbar .navbar-inner.black.transparent{background-color:rgba(79,79,79,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(120,120,120,.6),rgba(18,18,18,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(120,120,120,.6)),to(rgba(18,18,18,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(120,120,120,.6),rgba(18,18,18,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(120,120,120,.6),rgba(18,18,18,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(120,120,120,.6),rgba(18,18,18,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99787878', endColorstr='#99121212', GradientType=0)}#navbar .navbar-inner.black.transparent .brand,#navbar .navbar-inner.black.transparent .nav>li>a{text-shadow:0 1px 0 #5e5e5e;color:#f2f2f2}#navbar .navbar-inner.black.transparent .brand .caret,#navbar .navbar-inner.black.transparent .nav>li>a .caret{border-bottom-color:#959595;border-top-color:#959595}#navbar .navbar-inner.black.transparent .brand:focus .caret,#navbar .navbar-inner.black.transparent .brand:hover .caret,#navbar .navbar-inner.black.transparent .nav>li>a:focus .caret,#navbar .navbar-inner.black.transparent .nav>li>a:hover .caret{border-bottom-color:#c4c4c4;border-top-color:#c4c4c4}#navbar .navbar-inner.black.transparent .brand span{background-image:url(../img/tentacle-20x20-light.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner.black.transparent .brand span{background-image:url(../img/tentacle-20x20-light@2x.png)}}#navbar .navbar-inner.black.transparent .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner.black.transparent .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner.black.transparent .nav>li.dropdown.open>.dropdown-toggle{background-color:rgba(59,59,59,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(18,18,18,.6),rgba(120,120,120,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(18,18,18,.6)),to(rgba(120,120,120,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(18,18,18,.6),rgba(120,120,120,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(18,18,18,.6),rgba(120,120,120,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(18,18,18,.6),rgba(120,120,120,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99121212', endColorstr='#99787878', GradientType=0)}#navbar .navbar-inner.black.transparent .nav>li>a:hover{background-color:rgba(66,66,66,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(107,107,107,.6),rgba(5,5,5,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(107,107,107,.6)),to(rgba(5,5,5,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(107,107,107,.6),rgba(5,5,5,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(107,107,107,.6),rgba(5,5,5,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(107,107,107,.6),rgba(5,5,5,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#996b6b6b', endColorstr='#99050505', GradientType=0)}#navbar .navbar-inner.white{background-color:#e9e9e9;background-image:-moz-linear-gradient(top,#fff,#c8c8c8);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#c8c8c8));background-image:-webkit-linear-gradient(top,#fff,#c8c8c8);background-image:-o-linear-gradient(top,#fff,#c8c8c8);background-image:linear-gradient(to bottom,#fff,#c8c8c8);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffc8c8c8', GradientType=0)}#navbar .navbar-inner.white .brand,#navbar .navbar-inner.white .nav>li>a{text-shadow:0 1px 0 #c8c8c8;color:#333}#navbar .navbar-inner.white .brand .caret,#navbar .navbar-inner.white .nav>li>a .caret{border-bottom-color:#919191;border-top-color:#919191}#navbar .navbar-inner.white .brand:focus .caret,#navbar .navbar-inner.white .brand:hover .caret,#navbar .navbar-inner.white .nav>li>a:focus .caret,#navbar .navbar-inner.white .nav>li>a:hover .caret{border-bottom-color:#626262;border-top-color:#626262}#navbar .navbar-inner.white .brand span{background-image:url(../img/tentacle-20x20.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner.white .brand span{background-image:url(../img/tentacle-20x20@2x.png)}}#navbar .navbar-inner.white .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner.white .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner.white .nav>li.dropdown.open>.dropdown-toggle{background-color:#dedede;background-image:-moz-linear-gradient(top,#c8c8c8,#fff);background-image:-webkit-gradient(linear,0 0,0 100%,from(#c8c8c8),to(#fff));background-image:-webkit-linear-gradient(top,#c8c8c8,#fff);background-image:-o-linear-gradient(top,#c8c8c8,#fff);background-image:linear-gradient(to bottom,#c8c8c8,#fff);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffc8c8c8', endColorstr='#ffffffff', GradientType=0)}#navbar .navbar-inner.white .nav>li>a:hover{background-color:#dcdcdc;background-image:-moz-linear-gradient(top,#f2f2f2,#bbb);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#bbb));background-image:-webkit-linear-gradient(top,#f2f2f2,#bbb);background-image:-o-linear-gradient(top,#f2f2f2,#bbb);background-image:linear-gradient(to bottom,#f2f2f2,#bbb);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffbbbbbb', GradientType=0)}#navbar .navbar-inner.white.transparent{background-color:rgba(233,233,233,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(255,255,255,.6),rgba(200,200,200,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(255,255,255,.6)),to(rgba(200,200,200,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(255,255,255,.6),rgba(200,200,200,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(255,255,255,.6),rgba(200,200,200,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(255,255,255,.6),rgba(200,200,200,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99ffffff', endColorstr='#99c8c8c8', GradientType=0)}#navbar .navbar-inner.white.transparent .brand,#navbar .navbar-inner.white.transparent .nav>li>a{text-shadow:0 1px 0 #c8c8c8;color:#333}#navbar .navbar-inner.white.transparent .brand .caret,#navbar .navbar-inner.white.transparent .nav>li>a .caret{border-bottom-color:#919191;border-top-color:#919191}#navbar .navbar-inner.white.transparent .brand:focus .caret,#navbar .navbar-inner.white.transparent .brand:hover .caret,#navbar .navbar-inner.white.transparent .nav>li>a:focus .caret,#navbar .navbar-inner.white.transparent .nav>li>a:hover .caret{border-bottom-color:#626262;border-top-color:#626262}#navbar .navbar-inner.white.transparent .brand span{background-image:url(../img/tentacle-20x20.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner.white.transparent .brand span{background-image:url(../img/tentacle-20x20@2x.png)}}#navbar .navbar-inner.white.transparent .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner.white.transparent .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner.white.transparent .nav>li.dropdown.open>.dropdown-toggle{background-color:rgba(222,222,222,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(200,200,200,.6),rgba(255,255,255,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(200,200,200,.6)),to(rgba(255,255,255,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(200,200,200,.6),rgba(255,255,255,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(200,200,200,.6),rgba(255,255,255,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(200,200,200,.6),rgba(255,255,255,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99c8c8c8', endColorstr='#99ffffff', GradientType=0)}#navbar .navbar-inner.white.transparent .nav>li>a:hover{background-color:rgba(220,220,220,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(242,242,242,.6),rgba(187,187,187,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(242,242,242,.6)),to(rgba(187,187,187,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(242,242,242,.6),rgba(187,187,187,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(242,242,242,.6),rgba(187,187,187,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(242,242,242,.6),rgba(187,187,187,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99f2f2f2', endColorstr='#99bbbbbb', GradientType=0)}#navbar .navbar-inner .brand{padding:10px 20px 6px}#navbar .navbar-inner .brand span{padding-left:26px;background-size:20px 20px;background-repeat:no-repeat;display:inline-block;max-width:250px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:top;line-height:20px;height:24px}#navbar_login a.dropdown-toggle span{display:inline-block;max-width:100px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:top}.octoprint-container{margin-top:20px}.octoprint-container .tab-content{padding:9px 15px;border-left:1px solid #DDD;border-right:1px solid #DDD;border-bottom:1px solid #DDD;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px}.octoprint-container .nav{margin-bottom:0}.octoprint-container .tab-content h1{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:40px;color:#333;border:0;border-bottom:1px solid #E5E5E5;font-weight:400}.octoprint-container .accordion-heading .accordion-heading-button{float:right}.octoprint-container .accordion-heading .accordion-heading-button a{display:inline-block;padding:8px 15px;font-size:14px;line-height:20px;color:#000;text-decoration:none;background:0 0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.octoprint-container .accordion-heading a.accordion-toggle{display:inline-block}.octoprint-container .accordion-heading [class*=" icon-"],.octoprint-container .accordion-heading [class^=icon-]{color:#000}.print-control .btn{padding-left:4px;padding-right:4px}.upload-buttons .btn{margin-right:0}table{table-layout:fixed}table .popover-title{text-overflow:ellipsis;word-break:break-all}table td,table th{overflow:hidden}table td.gcode_files_name,table th.gcode_files_name{text-overflow:ellipsis;text-align:left;white-space:nowrap}table td.gcode_files_action,table th.gcode_files_action{width:90px;text-align:center;white-space:nowrap}table td.gcode_files_action a,table th.gcode_files_action a{text-decoration:none;color:#000}table td.gcode_files_action a.disabled,table th.gcode_files_action a.disabled{color:#ccc;cursor:default}table td.timelapse_files_checkbox,table td.timelapse_unrendered_checkbox,table th.timelapse_files_checkbox,table th.timelapse_unrendered_checkbox{text-align:center;width:10px}table td.timelapse_files_checkbox input[type=checkbox],table td.timelapse_unrendered_checkbox input[type=checkbox],table th.timelapse_files_checkbox input[type=checkbox],table th.timelapse_unrendered_checkbox input[type=checkbox]{margin-top:0}table td.timelapse_files_name,table td.timelapse_unrendered_name,table th.timelapse_files_name,table th.timelapse_unrendered_name{text-overflow:ellipsis;text-align:left}table td.timelapse_files_size,table td.timelapse_unrendered_size,table th.timelapse_files_size,table th.timelapse_unrendered_size{text-align:right;width:55px}table td.timelapse_unrendered_count,table th.timelapse_unrendered_count{text-align:right;width:45px}table td.timelapse_files_action,table td.timelapse_unrendered_action,table th.timelapse_files_action,table th.timelapse_unrendered_action{width:45px;text-align:center;white-space:nowrap}table td.timelapse_files_action a,table td.timelapse_unrendered_action a,table th.timelapse_files_action a,table th.timelapse_unrendered_action a{text-decoration:none;color:#000}table td.timelapse_files_action a.disabled,table td.timelapse_unrendered_action a.disabled,table th.timelapse_files_action a.disabled,table th.timelapse_unrendered_action a.disabled{color:#ccc;cursor:default}table td.settings_users_name,table th.settings_users_name{text-overflow:ellipsis;text-align:left}table td.settings_users_active,table td.settings_users_admin,table th.settings_users_active,table th.settings_users_admin{text-align:center;width:55px}table td.settings_users_actions,table th.settings_users_actions{width:60px;text-align:center;white-space:nowrap}table td.settings_users_actions a,table th.settings_users_actions a{text-decoration:none;color:#000}table td.settings_users_actions a.disabled,table th.settings_users_actions a.disabled{color:#ccc;cursor:default}table td.settings_logs_name,table th.settings_logs_name{text-overflow:ellipsis;text-align:left}table td.settings_logs_size,table th.settings_logs_size{text-align:right;width:70px}table td.settings_logs_date,table th.settings_logs_date{text-align:left;width:130px}table td.settings_logs_action,table th.settings_logs_action{width:70px;text-align:center;white-space:nowrap}table td.settings_logs_action a,table th.settings_logs_action a{text-decoration:none;color:#000}table td.settings_logs_action a.disabled,table th.settings_logs_action a.disabled{color:#ccc;cursor:default}table td.settings_printerProfiles_profiles_name,table th.settings_printerProfiles_profiles_name{text-overflow:ellipsis;text-align:left}table td.settings_printerProfiles_profiles_model,table th.settings_printerProfiles_profiles_model{text-align:left;width:250px}table td.settings_printerProfiles_profiles_action,table th.settings_printerProfiles_profiles_action{width:80px;text-align:center;white-space:nowrap}table td.settings_printerProfiles_profiles_action a,table th.settings_printerProfiles_profiles_action a{text-decoration:none;color:#000}table td.settings_printerProfiles_profiles_action a.disabled,table th.settings_printerProfiles_profiles_action a.disabled{color:#ccc;cursor:default}#temperature-graph{height:350px;width:100%;background:url(../img/graph-background.png) center no-repeat}#temperature-table{table-layout:fixed;width:100%;margin-top:20px}#temperature-table td.temperature_actual,#temperature-table td.temperature_offset,#temperature-table td.temperature_target,#temperature-table td.temperature_tool,#temperature-table th.temperature_actual,#temperature-table th.temperature_offset,#temperature-table th.temperature_target,#temperature-table th.temperature_tool{vertical-align:middle;text-align:center}#temperature-table td.temperature_actual form,#temperature-table td.temperature_offset form,#temperature-table td.temperature_target form,#temperature-table td.temperature_tool form,#temperature-table th.temperature_actual form,#temperature-table th.temperature_offset form,#temperature-table th.temperature_target form,#temperature-table th.temperature_tool form{margin:0}#temperature-table td.temperature_actual .dropdown-menu,#temperature-table td.temperature_offset .dropdown-menu,#temperature-table td.temperature_target .dropdown-menu,#temperature-table td.temperature_tool .dropdown-menu,#temperature-table th.temperature_actual .dropdown-menu,#temperature-table th.temperature_offset .dropdown-menu,#temperature-table th.temperature_target .dropdown-menu,#temperature-table th.temperature_tool .dropdown-menu{text-align:left}#temperature-table td.temperature_tool,#temperature-table th.temperature_tool{width:16%;text-align:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#temperature-table td.temperature_actual,#temperature-table th.temperature_actual{width:12%}#temperature-table td.temperature_target,#temperature-table th.temperature_target{width:42%;overflow:visible}#temperature-table td.temperature_offset,#temperature-table th.temperature_offset{width:30%}.tab-content,.tab-pane{overflow:visible}#speed_fill,#speed_innerWall,#speed_outerWall,#speed_support,#temp_newBedTemp,#temp_newTemp,#webcam_timelapse_fps,#webcam_timelapse_interval,#webcam_timelapse_postRoll,#webcam_timelapse_retractionZHop{text-align:right}ul.dropdown-menu li a{cursor:pointer}#connection_baudrates,#connection_ports,#connection_printers{width:100%}#offline_overlay,#reloadui_overlay{position:fixed;top:0;left:0;width:100%;height:100%;display:none}#offline_overlay{z-index:10002}#reloadui_overlay{z-index:10001}#offline_overlay_background,#reloadui_overlay_background{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#000;filter:alpha(opacity=50);-moz-opacity:.5;-khtml-opacity:.5;opacity:.5}#offline_overlay_wrapper,#reloadui_overlay_wrapper{position:absolute;top:0;bottom:0;left:0;right:0;padding-top:60px}#offline_overlay_wrapper .container,#reloadui_overlay_wrapper .container{margin:auto}#webcam_container{width:100%;position:relative;outline:0;background-color:#000}#webcam_container .keycontrol_overlay{position:absolute;left:10px;right:10px;bottom:10px;background:rgba(0,0,0,.5);font-size:85%;color:#fff;padding:0}#webcam_container .keycontrol_overlay kbd{border:1px solid #eee;border-radius:3px;margin-left:2px;margin-right:2px;font-size:90%;padding:2px;min-width:1em}#webcam_container .keycontrol_overlay .keycontrol_overlay_heading{position:relative;padding:10px;font-weight:700}#webcam_container .keycontrol_overlay .keycontrol_overlay_column{position:relative;width:45%;padding:10px;float:left}#webcam_container .nowebcam{position:absolute;top:0;left:0;right:0;bottom:0}#webcam_container .nowebcam .text{color:#fff;text-align:center;position:relative;margin:auto;width:80%;top:50%;transform:translateY(-50%);display:block}#webcam_container .nowebcam .text.webcam_loading{animation:pulsate 3s ease-out;animation-iteration-count:infinite}#webcam_container .webcam_rotated{position:relative;width:100%;padding-bottom:100%;pointer-events:none}#webcam_container .webcam_rotated .webcam_fixed_ratio{position:absolute;transform:rotate(-90deg);top:0;bottom:0;pointer-events:none}#webcam_container .webcam_rotated .webcam_fixed_ratio .webcam_fixed_ratio_inner{width:100%;height:100%;pointer-events:none}#webcam_container .webcam_unrotated .webcam_fixed_ratio{width:100%;pointer-events:none;padding-bottom:100%;position:relative}#webcam_container .webcam_unrotated .webcam_fixed_ratio.ratio43{padding-bottom:75%}#webcam_container .webcam_unrotated .webcam_fixed_ratio.ratio169{padding-bottom:56.25%}#webcam_container .webcam_unrotated .webcam_fixed_ratio.ratio1610{padding-bottom:62.5%}#webcam_container .webcam_unrotated .webcam_fixed_ratio .webcam_fixed_ratio_inner{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:none}#webcam_container img{width:100%;height:100%;object-fit:contain}#state_wrapper hr{margin:5px 0}#files .gcode_files{padding-right:12px}#files .gcode_files .entry{padding:5px;line-height:20px;border-bottom:1px solid #ddd;position:relative}#files .gcode_files .entry:hover{background-color:#f5f5f5}#files .gcode_files .entry .title{text-overflow:ellipsis;word-break:break-all}#files .gcode_files .entry .additionalInfo,#files .gcode_files .entry .internal,#files .gcode_files .entry .size,#files .gcode_files .entry .uploaded{font-size:85%;color:#999}#files .gcode_files .entry .internal{word-break:break-all}#files .gcode_files .entry .action-buttons{position:absolute;bottom:5px;right:5px}#files .gcode_files .entry .additionalInfo{padding-bottom:22px}@keyframes highlightframes{0%{background:#ff0}100%{background:0 0}}#files .gcode_files .entry.highlight{animation:highlightframes 2s}#files .gcode_files .back .back-path{white-space:nowrap}#files .gcode_files .back .back-path span{word-wrap:break-word;white-space:pre-line}#files .upload-buttons{margin-top:10px}#files .form-search{text-align:center;margin-bottom:5px!important}#control{overflow:hidden}#control .jog-panel{float:left;margin-right:19px}#control h1{text-align:left}#control .jog-panel>div{text-align:center}#control .jog-panel>div.distance{text-align:left}#control .jog-panel .slider{margin-bottom:10px}#control .box{width:30px;height:30px;margin-right:10px;margin-bottom:10px;padding-left:8px}#control .control-box{display:block;height:30px;margin-bottom:10px}#control .btn-group{margin-bottom:10px}#control .btn-group.distance>.btn{width:43px;padding:3px 0;height:30px}#control .slider-handle{width:14px;height:14px;margin-left:-7px;margin-top:-3px}#control .custom_section h1{cursor:pointer}#control .custom_section_horizontal>.custom_control{display:inline-block}#control .custom_section_vertical>.custom_control{display:block}#control .custom_control .slider{margin-left:10px;margin-right:10px;margin-bottom:2px}#gcode .progress{width:588px}#gcode .progress .bar{-webkit-transition:width 0s linear;-moz-transition:width 0s linear;-o-transition:width 0s linear;transition:width 0s linear}#gcode .canvas_container{position:relative}#gcode .canvas_container:active,#gcode .canvas_container:hover{outline:0}#gcode .layer-buttons{padding-top:5px;padding-bottom:7px}#gcode #gcode_layer_slider{position:absolute;right:0;top:0;height:568px;float:right}#gcode #gcode_layer_slider .slider-handle{width:14px;height:14px;margin-left:-3px;margin-top:-7px}#gcode #gcode_command_slider .slider-handle{width:14px;height:14px;margin-left:-7px;margin-top:-3px}#term .terminal{margin-bottom:30px}#term .terminal #terminal-output,#term .terminal #terminal-output-lowfi{min-height:340px;margin-bottom:5px}#settings_dialog .aboutlink{float:left}#settings_dialog_menu,#wizard_dialog_menu{margin-left:0}#wizard_firstrun_acl .acl_decision{margin-top:1em}#wizard_firstrun_end p,#wizard_firstrun_start p{margin-bottom:1.5em;line-height:1.5}#settings_appearance_managelanguagesdialog_emptylist{overflow:hidden;width:100%;height:300px;text-align:center;display:table}#settings_appearance_managelanguagesdialog_emptylist div{display:table-cell;vertical-align:middle}.footer ul{margin:0}.footer ul li{display:inline;margin-left:1em;font-size:85%}.footer ul li:first-child{margin-left:0}.footer ul li a{color:#555}.footer #footer_link,.footer #footer_version{max-width:50%}.ui-pnotify .alert a{color:#c09853}.ui-pnotify .alert-danger a,.ui-pnotify .alert-error a{color:#b94a48}.ui-pnotify .alert-success a{color:#468847}.ui-pnotify .alert-info a{color:#3a87ad}.pnotify_additional_info .pnotify_more{font-size:85%}.text-right{text-align:right}.text-center{text-align:center}.text-block{display:block}.overflow_visible{overflow:visible!important}.clickable{cursor:pointer}.border_box{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.hidden{display:none}textarea.block{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%}@keyframes pulsate{0%{opacity:.5}50%{opacity:1}100%{opacity:.5}}#drop_overlay{position:fixed;top:0;left:0;width:100%;height:100%;z-index:10000;display:none}#drop_overlay.in{display:block}#drop_overlay #drop_overlay_background{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#000;filter:alpha(opacity=50);-moz-opacity:.5;-khtml-opacity:.5;opacity:.5}#drop_overlay #drop_overlay_wrapper{position:absolute;top:0;bottom:0;left:0;right:0;padding-top:60px}#drop_overlay #drop_overlay_wrapper #drop,#drop_overlay #drop_overlay_wrapper #drop_background{position:absolute;top:0;left:0;margin-left:0;width:100%}#drop_overlay #drop_overlay_wrapper #drop_locally,#drop_overlay #drop_overlay_wrapper #drop_locally_background{position:absolute;top:0;left:50%;margin-left:-50%;width:50%;border-right:2px dashed #ccc}#drop_overlay #drop_overlay_wrapper #drop_sd,#drop_overlay #drop_overlay_wrapper #drop_sd_background{position:absolute;top:0;left:50%;margin-left:0;width:50%;border-left:2px dashed #ccc}#drop_overlay #drop_overlay_wrapper .dropzone{height:100%;z-index:10001;color:#fff;font-size:30px}#drop_overlay #drop_overlay_wrapper .dropzone i{font-size:50px}#drop_overlay #drop_overlay_wrapper .dropzone .text{display:block;text-align:center;line-height:40px;position:absolute;width:100%;bottom:5%;filter:alpha(opacity=100);-moz-opacity:1;-khtml-opacity:1;opacity:1}#drop_overlay #drop_overlay_wrapper .dropzone_background{width:50%;height:100%;background-color:#000;filter:alpha(opacity=25);-moz-opacity:.25;-khtml-opacity:.25;opacity:.25}#drop_overlay #drop_overlay_wrapper .dropzone_background.hover{background-color:#000;filter:alpha(opacity=50);-moz-opacity:.5;-khtml-opacity:.5;opacity:.5}#drop_overlay #drop_overlay_wrapper .dropzone_background.fade{-webkit-transition:all .3s ease-out;-moz-transition:all .3s ease-out;-ms-transition:all .3s ease-out;-o-transition:all .3s ease-out;transition:all .3s ease-out;opacity:1}.icon-sd-black-14{background:url(../img/icon-sd-black-14.png) 0 3px no-repeat;width:11px;height:17px;display:inline-block!important}.center{float:none;margin-left:auto;margin-right:auto}.flipH{-webkit-transform:scaleX(-1);-moz-transform:scaleX(-1);-ms-transform:scaleX(-1);transform:scaleX(-1)}.flipV{-webkit-transform:scaleY(-1);-moz-transform:scaleY(-1);-ms-transform:scaleY(-1);transform:scaleY(-1)}.flipH.flipV{-webkit-transform:scaleX(-1) scaleY(-1);-moz-transform:scaleX(-1) scaleY(-1);-ms-transform:scaleX(-1) scaleY(-1);transform:scaleX(-1) scaleY(-1)}.rotate90{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.ui-pnotify a{text-decoration:underline}.btn-mini .caret,.btn-small .caret{margin-top:8px}.dropdown-menu-right{right:0;left:auto}.slider .slider-selection{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#04c;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.slider .slider-selection.active,.slider .slider-selection.disabled,.slider .slider-selection:active,.slider .slider-selection:focus,.slider .slider-selection:hover,.slider .slider-selection[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.slider .slider-selection.active,.slider .slider-selection:active{background-color:#039 \9}.slider.slider-disabled .slider-selection{background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.slider .slider-track{background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.slider.slider-disabled .slider-track{background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.slider .slider-handle{display:inline-block;*display:inline;*zoom:1;font-size:14px;line-height:20px;text-align:center;vertical-align:middle;cursor:pointer;color:#333;text-shadow:0 1px 1px rgba(255,255,255,.75);background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;*background-color:#e6e6e6;border:1px solid #ccc;*border:0;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*margin-left:.3em;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);padding:0;margin-bottom:0;opacity:1;filter:alpha(opacity=100)}.slider .slider-handle.active,.slider .slider-handle.disabled,.slider .slider-handle:active,.slider .slider-handle:focus,.slider .slider-handle:hover,.slider .slider-handle[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.slider .slider-handle.active,.slider .slider-handle:active{background-color:#ccc \9}.slider .slider-handle:first-child{*margin-left:0}.slider .slider-handle:focus,.slider .slider-handle:hover{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.slider .slider-handle:focus{outline:#333 dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.slider .slider-handle.active,.slider .slider-handle:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.slider .slider-handle.disabled,.slider .slider-handle[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.slider .slider-handle.hide{display:none}.slider .slider-handle.round{-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%}.modal.large{width:975px;margin-left:-487px}.full-sized-box{position:absolute;bottom:0;left:0;right:0;top:0;padding:15px}.full-sized-box .row-fluid{height:100%}@media (max-width:979px){.full-sized-box{position:static}}:root .full-sized-box,_::-webkit-full-page-media,_:future{position:static}.scrollable{height:100%;overflow:auto;-webkit-overflow-scrolling:touch}.pre-output span{display:block}.input-append .add-on.add-on-limited,.input-prepend .add-on.add-on-limited{overflow-x:hidden;text-overflow:ellipsis;width:inherit}.input-append .btn-group:first-child .btn:first-child,.input-prepend .btn-group:first-child .btn:first-child{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-append .btn-group .btn:first-child,.input-prepend .btn-group .btn:first-child{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-append.input-block-level,.input-prepend.input-block-level{display:table}.input-append.input-block-level .add-on,.input-prepend.input-block-level .add-on{display:table-cell;width:1%}.input-append.input-block-level>input,.input-prepend.input-block-level>input{box-sizing:border-box;display:table;min-height:inherit;width:100%}.input-append.input-block-level :not(:last-child),.input-prepend.input-block-level :not(:last-child){border-right:0}.control-group.error .input-append .fileinput-button,.control-group.error .input-prepend .fileinput-button{border-color:#b94a48}.control-text{padding-top:5px;cursor:default}input[type=number]{text-align:right}input[type=number].input-nospin::-webkit-inner-spin-button,input[type=number].input-nospin::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number].input-nospin{-moz-appearance:textfield}.progress-text,.progress-text-centered{position:relative}.progress-text .progress-text-back,.progress-text .progress-text-front,.progress-text-centered .progress-text-back,.progress-text-centered .progress-text-front{white-space:nowrap}.progress-text .progress-text-front,.progress-text-centered .progress-text-front{box-sizing:border-box;padding:0 10px;width:100%;display:block}.progress-text .progress-text-back,.progress-text-centered .progress-text-back{position:absolute;font-size:12px;line-height:20px;display:block;box-sizing:border-box;text-align:center;padding:0 10px}.progress-text .bar,.progress-text-centered .bar{position:absolute;overflow:hidden}.progress-text-centered .progress-text-front{position:absolute;font-size:12px;line-height:20px;display:block;text-align:center;color:#fff}.progress-text-centered .progress-text-back{width:100%}#navbar_login:not(.open) #login_dropdown_loggedout{display:block;z-index:-1;height:0;width:0;padding:0!important;overflow:hidden;border:0;box-shadow:none;left:-9999px}#navbar_login:not(.open) #login_dropdown_loggedout.hide{display:none}#loginForm{margin:0}#loginForm button{margin-top:20px} \ No newline at end of file +.btn{display:inline-block;*display:inline;*zoom:1;padding:4px 12px;margin-bottom:0;font-size:14px;line-height:20px;text-align:center;vertical-align:middle;cursor:pointer;color:#333;text-shadow:0 1px 1px rgba(255,255,255,.75);background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;*background-color:#e6e6e6;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);border:1px solid #ccc;*border:0;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*margin-left:.3em;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}.btn.active,.btn.disabled,.btn:active,.btn:focus,.btn:hover,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn.active,.btn:active{background-color:#ccc \9}.btn:first-child{*margin-left:0}.btn:focus,.btn:hover{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:#333 dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:11px 19px;font-size:17.5px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.btn-large [class*=" icon-"],.btn-large [class^=icon-]{margin-top:4px}.btn-small{padding:2px 10px;font-size:11.9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-small [class*=" icon-"],.btn-small [class^=icon-]{margin-top:0}.btn-mini [class*=" icon-"],.btn-mini [class^=icon-]{margin-top:-1px}.btn-mini{padding:0 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-block{display:block;width:100%;padding-left:0;padding-right:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#04c;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-primary.active,.btn-primary.disabled,.btn-primary:active,.btn-primary:focus,.btn-primary:hover,.btn-primary[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.btn-primary.active,.btn-primary:active{background-color:#039 \9}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#f89406;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-warning.active,.btn-warning.disabled,.btn-warning:active,.btn-warning:focus,.btn-warning:hover,.btn-warning[disabled]{color:#fff;background-color:#f89406;*background-color:#df8505}.btn-warning.active,.btn-warning:active{background-color:#c67605 \9}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#da4f49;background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to bottom,#ee5f5b,#bd362f);background-repeat:repeat-x;border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#bd362f;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-danger.active,.btn-danger.disabled,.btn-danger:active,.btn-danger:focus,.btn-danger:hover,.btn-danger[disabled]{color:#fff;background-color:#bd362f;*background-color:#a9302a}.btn-danger.active,.btn-danger:active{background-color:#942a25 \9}.btn-success{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#5bb75b;background-image:-moz-linear-gradient(top,#62c462,#51a351);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#51a351));background-image:-webkit-linear-gradient(top,#62c462,#51a351);background-image:-o-linear-gradient(top,#62c462,#51a351);background-image:linear-gradient(to bottom,#62c462,#51a351);background-repeat:repeat-x;border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#51a351;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-success.active,.btn-success.disabled,.btn-success:active,.btn-success:focus,.btn-success:hover,.btn-success[disabled]{color:#fff;background-color:#51a351;*background-color:#499249}.btn-success.active,.btn-success:active{background-color:#408140 \9}.btn-info{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#49afcd;background-image:-moz-linear-gradient(top,#5bc0de,#2f96b4);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#2f96b4));background-image:-webkit-linear-gradient(top,#5bc0de,#2f96b4);background-image:-o-linear-gradient(top,#5bc0de,#2f96b4);background-image:linear-gradient(to bottom,#5bc0de,#2f96b4);background-repeat:repeat-x;border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#2f96b4;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-info.active,.btn-info.disabled,.btn-info:active,.btn-info:focus,.btn-info:hover,.btn-info[disabled]{color:#fff;background-color:#2f96b4;*background-color:#2a85a0}.btn-info.active,.btn-info:active{background-color:#24748c \9}.btn-inverse{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#363636;background-image:-moz-linear-gradient(top,#444,#222);background-image:-webkit-gradient(linear,0 0,0 100%,from(#444),to(#222));background-image:-webkit-linear-gradient(top,#444,#222);background-image:-o-linear-gradient(top,#444,#222);background-image:linear-gradient(to bottom,#444,#222);background-repeat:repeat-x;border-color:#222 #222 #000;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#222;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-inverse.active,.btn-inverse.disabled,.btn-inverse:active,.btn-inverse:focus,.btn-inverse:hover,.btn-inverse[disabled]{color:#fff;background-color:#222;*background-color:#151515}.btn-inverse.active,.btn-inverse:active{background-color:#080808 \9}button.btn,input[type=submit].btn{*padding-top:3px;*padding-bottom:3px}button.btn::-moz-focus-inner,input[type=submit].btn::-moz-focus-inner{padding:0;border:0}button.btn.btn-large,input[type=submit].btn.btn-large{*padding-top:7px;*padding-bottom:7px}button.btn.btn-small,input[type=submit].btn.btn-small{*padding-top:3px;*padding-bottom:3px}button.btn.btn-mini,input[type=submit].btn.btn-mini{*padding-top:1px;*padding-bottom:1px}.btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-link{border-color:transparent;cursor:pointer;color:#08c;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-link:focus,.btn-link:hover{color:#005580;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover{color:#333;text-decoration:none}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:"";line-height:0}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.nowrap{white-space:nowrap}.actioncol{text-align:center;white-space:nowrap}.actioncol a{text-decoration:none;color:#000}.actioncol a.disabled{color:#ccc;cursor:default}#navbar .navbar-inner{background-color:#ebebeb;background-image:-moz-linear-gradient(top,#fff,#ccc);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#ccc));background-image:-webkit-linear-gradient(top,#fff,#ccc);background-image:-o-linear-gradient(top,#fff,#ccc);background-image:linear-gradient(to bottom,#fff,#ccc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffcccccc', GradientType=0)}#navbar .navbar-inner .brand,#navbar .navbar-inner .nav>li>a{text-shadow:0 1px 0 #ccc;color:#333}#navbar .navbar-inner .brand .caret,#navbar .navbar-inner .nav>li>a .caret{border-bottom-color:#939393;border-top-color:#939393}#navbar .navbar-inner .brand:focus .caret,#navbar .navbar-inner .brand:hover .caret,#navbar .navbar-inner .nav>li>a:focus .caret,#navbar .navbar-inner .nav>li>a:hover .caret{border-bottom-color:#636363;border-top-color:#636363}#navbar .navbar-inner .brand span{background-image:url(../img/tentacle-20x20.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner .brand span{background-image:url(../img/tentacle-20x20@2x.png)}}#navbar .navbar-inner .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner .nav>li.dropdown.open>.dropdown-toggle{background-color:#e0e0e0;background-image:-moz-linear-gradient(top,#ccc,#fff);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ccc),to(#fff));background-image:-webkit-linear-gradient(top,#ccc,#fff);background-image:-o-linear-gradient(top,#ccc,#fff);background-image:linear-gradient(to bottom,#ccc,#fff);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffcccccc', endColorstr='#ffffffff', GradientType=0)}#navbar .navbar-inner .nav>li>a:hover{background-color:#dedede;background-image:-moz-linear-gradient(top,#f2f2f2,#bfbfbf);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#bfbfbf));background-image:-webkit-linear-gradient(top,#f2f2f2,#bfbfbf);background-image:-o-linear-gradient(top,#f2f2f2,#bfbfbf);background-image:linear-gradient(to bottom,#f2f2f2,#bfbfbf);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffbfbfbf', GradientType=0)}#navbar .navbar-inner.transparent{background-color:rgba(235,235,235,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(255,255,255,.6),rgba(204,204,204,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(255,255,255,.6)),to(rgba(204,204,204,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(255,255,255,.6),rgba(204,204,204,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(255,255,255,.6),rgba(204,204,204,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(255,255,255,.6),rgba(204,204,204,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99ffffff', endColorstr='#99cccccc', GradientType=0)}#navbar .navbar-inner.transparent .brand,#navbar .navbar-inner.transparent .nav>li>a{text-shadow:0 1px 0 #ccc;color:#333}#navbar .navbar-inner.transparent .brand .caret,#navbar .navbar-inner.transparent .nav>li>a .caret{border-bottom-color:#939393;border-top-color:#939393}#navbar .navbar-inner.transparent .brand:focus .caret,#navbar .navbar-inner.transparent .brand:hover .caret,#navbar .navbar-inner.transparent .nav>li>a:focus .caret,#navbar .navbar-inner.transparent .nav>li>a:hover .caret{border-bottom-color:#636363;border-top-color:#636363}#navbar .navbar-inner.transparent .brand span{background-image:url(../img/tentacle-20x20.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner.transparent .brand span{background-image:url(../img/tentacle-20x20@2x.png)}}#navbar .navbar-inner.transparent .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner.transparent .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner.transparent .nav>li.dropdown.open>.dropdown-toggle{background-color:rgba(224,224,224,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(204,204,204,.6),rgba(255,255,255,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(204,204,204,.6)),to(rgba(255,255,255,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(204,204,204,.6),rgba(255,255,255,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(204,204,204,.6),rgba(255,255,255,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(204,204,204,.6),rgba(255,255,255,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99cccccc', endColorstr='#99ffffff', GradientType=0)}#navbar .navbar-inner.transparent .nav>li>a:hover{background-color:rgba(222,222,222,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(242,242,242,.6),rgba(191,191,191,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(242,242,242,.6)),to(rgba(191,191,191,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(242,242,242,.6),rgba(191,191,191,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(242,242,242,.6),rgba(191,191,191,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(242,242,242,.6),rgba(191,191,191,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99f2f2f2', endColorstr='#99bfbfbf', GradientType=0)}#navbar .navbar-inner.red{background-color:#bb645f;background-image:-moz-linear-gradient(top,#e28e8a,#802420);background-image:-webkit-gradient(linear,0 0,0 100%,from(#e28e8a),to(#802420));background-image:-webkit-linear-gradient(top,#e28e8a,#802420);background-image:-o-linear-gradient(top,#e28e8a,#802420);background-image:linear-gradient(to bottom,#e28e8a,#802420);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe28e8a', endColorstr='#ff802420', GradientType=0)}#navbar .navbar-inner.red .brand,#navbar .navbar-inner.red .nav>li>a{text-shadow:0 1px 0 #d86761;color:#f2f2f2}#navbar .navbar-inner.red .brand .caret,#navbar .navbar-inner.red .nav>li>a .caret{border-bottom-color:#d89491;border-top-color:#d89491}#navbar .navbar-inner.red .brand:focus .caret,#navbar .navbar-inner.red .brand:hover .caret,#navbar .navbar-inner.red .nav>li>a:focus .caret,#navbar .navbar-inner.red .nav>li>a:hover .caret{border-bottom-color:#e5c3c1;border-top-color:#e5c3c1}#navbar .navbar-inner.red .brand span{background-image:url(../img/tentacle-20x20-light.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner.red .brand span{background-image:url(../img/tentacle-20x20-light@2x.png)}}#navbar .navbar-inner.red .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner.red .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner.red .nav>li.dropdown.open>.dropdown-toggle{background-color:#a74f4a;background-image:-moz-linear-gradient(top,#802420,#e28e8a);background-image:-webkit-gradient(linear,0 0,0 100%,from(#802420),to(#e28e8a));background-image:-webkit-linear-gradient(top,#802420,#e28e8a);background-image:-o-linear-gradient(top,#802420,#e28e8a);background-image:linear-gradient(to bottom,#802420,#e28e8a);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff802420', endColorstr='#ffe28e8a', GradientType=0)}#navbar .navbar-inner.red .nav>li>a:hover{background-color:#af5651;background-image:-moz-linear-gradient(top,#dd7a75,#6b1f1b);background-image:-webkit-gradient(linear,0 0,0 100%,from(#dd7a75),to(#6b1f1b));background-image:-webkit-linear-gradient(top,#dd7a75,#6b1f1b);background-image:-o-linear-gradient(top,#dd7a75,#6b1f1b);background-image:linear-gradient(to bottom,#dd7a75,#6b1f1b);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdd7a75', endColorstr='#ff6b1f1b', GradientType=0)}#navbar .navbar-inner.red.transparent{background-color:rgba(187,100,95,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(226,142,138,.6),rgba(128,36,32,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(226,142,138,.6)),to(rgba(128,36,32,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(226,142,138,.6),rgba(128,36,32,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(226,142,138,.6),rgba(128,36,32,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(226,142,138,.6),rgba(128,36,32,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99e28e8a', endColorstr='#99802420', GradientType=0)}#navbar .navbar-inner.red.transparent .brand,#navbar .navbar-inner.red.transparent .nav>li>a{text-shadow:0 1px 0 #d86761;color:#f2f2f2}#navbar .navbar-inner.red.transparent .brand .caret,#navbar .navbar-inner.red.transparent .nav>li>a .caret{border-bottom-color:#d89491;border-top-color:#d89491}#navbar .navbar-inner.red.transparent .brand:focus .caret,#navbar .navbar-inner.red.transparent .brand:hover .caret,#navbar .navbar-inner.red.transparent .nav>li>a:focus .caret,#navbar .navbar-inner.red.transparent .nav>li>a:hover .caret{border-bottom-color:#e5c3c1;border-top-color:#e5c3c1}#navbar .navbar-inner.red.transparent .brand span{background-image:url(../img/tentacle-20x20-light.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner.red.transparent .brand span{background-image:url(../img/tentacle-20x20-light@2x.png)}}#navbar .navbar-inner.red.transparent .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner.red.transparent .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner.red.transparent .nav>li.dropdown.open>.dropdown-toggle{background-color:rgba(167,79,74,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(128,36,32,.6),rgba(226,142,138,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(128,36,32,.6)),to(rgba(226,142,138,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(128,36,32,.6),rgba(226,142,138,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(128,36,32,.6),rgba(226,142,138,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(128,36,32,.6),rgba(226,142,138,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99802420', endColorstr='#99e28e8a', GradientType=0)}#navbar .navbar-inner.red.transparent .nav>li>a:hover{background-color:rgba(175,86,81,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(221,122,117,.6),rgba(107,31,27,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(221,122,117,.6)),to(rgba(107,31,27,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(221,122,117,.6),rgba(107,31,27,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(221,122,117,.6),rgba(107,31,27,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(221,122,117,.6),rgba(107,31,27,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99dd7a75', endColorstr='#996b1f1b', GradientType=0)}#navbar .navbar-inner.orange{background-color:#e39665;background-image:-moz-linear-gradient(top,#f9c3a0,#c2530c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f9c3a0),to(#c2530c));background-image:-webkit-linear-gradient(top,#f9c3a0,#c2530c);background-image:-o-linear-gradient(top,#f9c3a0,#c2530c);background-image:linear-gradient(to bottom,#f9c3a0,#c2530c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff9c3a0', endColorstr='#ffc2530c', GradientType=0)}#navbar .navbar-inner.orange .brand,#navbar .navbar-inner.orange .nav>li>a{text-shadow:0 1px 0 #f6a570;color:#f2f2f2}#navbar .navbar-inner.orange .brand .caret,#navbar .navbar-inner.orange .nav>li>a .caret{border-bottom-color:#f2b58d;border-top-color:#f2b58d}#navbar .navbar-inner.orange .brand:focus .caret,#navbar .navbar-inner.orange .brand:hover .caret,#navbar .navbar-inner.orange .nav>li>a:focus .caret,#navbar .navbar-inner.orange .nav>li>a:hover .caret{border-bottom-color:#f2d3bf;border-top-color:#f2d3bf}#navbar .navbar-inner.orange .brand span{background-image:url(../img/tentacle-20x20-light.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner.orange .brand span{background-image:url(../img/tentacle-20x20-light@2x.png)}}#navbar .navbar-inner.orange .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner.orange .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner.orange .nav>li.dropdown.open>.dropdown-toggle{background-color:#d88047;background-image:-moz-linear-gradient(top,#c2530c,#f9c3a0);background-image:-webkit-gradient(linear,0 0,0 100%,from(#c2530c),to(#f9c3a0));background-image:-webkit-linear-gradient(top,#c2530c,#f9c3a0);background-image:-o-linear-gradient(top,#c2530c,#f9c3a0);background-image:linear-gradient(to bottom,#c2530c,#f9c3a0);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffc2530c', endColorstr='#fff9c3a0', GradientType=0)}#navbar .navbar-inner.orange .nav>li>a:hover{background-color:#d98956;background-image:-moz-linear-gradient(top,#f8b488,#aa490a);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f8b488),to(#aa490a));background-image:-webkit-linear-gradient(top,#f8b488,#aa490a);background-image:-o-linear-gradient(top,#f8b488,#aa490a);background-image:linear-gradient(to bottom,#f8b488,#aa490a);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff8b488', endColorstr='#ffaa490a', GradientType=0)}#navbar .navbar-inner.orange.transparent{background-color:rgba(227,150,101,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(249,195,160,.6),rgba(194,83,12,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(249,195,160,.6)),to(rgba(194,83,12,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(249,195,160,.6),rgba(194,83,12,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(249,195,160,.6),rgba(194,83,12,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(249,195,160,.6),rgba(194,83,12,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99f9c3a0', endColorstr='#99c2530c', GradientType=0)}#navbar .navbar-inner.orange.transparent .brand,#navbar .navbar-inner.orange.transparent .nav>li>a{text-shadow:0 1px 0 #f6a570;color:#f2f2f2}#navbar .navbar-inner.orange.transparent .brand .caret,#navbar .navbar-inner.orange.transparent .nav>li>a .caret{border-bottom-color:#f2b58d;border-top-color:#f2b58d}#navbar .navbar-inner.orange.transparent .brand:focus .caret,#navbar .navbar-inner.orange.transparent .brand:hover .caret,#navbar .navbar-inner.orange.transparent .nav>li>a:focus .caret,#navbar .navbar-inner.orange.transparent .nav>li>a:hover .caret{border-bottom-color:#f2d3bf;border-top-color:#f2d3bf}#navbar .navbar-inner.orange.transparent .brand span{background-image:url(../img/tentacle-20x20-light.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner.orange.transparent .brand span{background-image:url(../img/tentacle-20x20-light@2x.png)}}#navbar .navbar-inner.orange.transparent .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner.orange.transparent .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner.orange.transparent .nav>li.dropdown.open>.dropdown-toggle{background-color:rgba(216,128,71,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(194,83,12,.6),rgba(249,195,160,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(194,83,12,.6)),to(rgba(249,195,160,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(194,83,12,.6),rgba(249,195,160,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(194,83,12,.6),rgba(249,195,160,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(194,83,12,.6),rgba(249,195,160,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99c2530c', endColorstr='#99f9c3a0', GradientType=0)}#navbar .navbar-inner.orange.transparent .nav>li>a:hover{background-color:rgba(217,137,86,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(248,180,136,.6),rgba(170,73,10,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(248,180,136,.6)),to(rgba(170,73,10,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(248,180,136,.6),rgba(170,73,10,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(248,180,136,.6),rgba(170,73,10,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(248,180,136,.6),rgba(170,73,10,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99f8b488', endColorstr='#99aa490a', GradientType=0)}#navbar .navbar-inner.yellow{background-color:#e3d765;background-image:-moz-linear-gradient(top,#f9f0a0,#c2b00c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f9f0a0),to(#c2b00c));background-image:-webkit-linear-gradient(top,#f9f0a0,#c2b00c);background-image:-o-linear-gradient(top,#f9f0a0,#c2b00c);background-image:linear-gradient(to bottom,#f9f0a0,#c2b00c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff9f0a0', endColorstr='#ffc2b00c', GradientType=0)}#navbar .navbar-inner.yellow .brand,#navbar .navbar-inner.yellow .nav>li>a{text-shadow:0 1px 0 #c2b00c;color:#f2f2f2}#navbar .navbar-inner.yellow .brand .caret,#navbar .navbar-inner.yellow .nav>li>a .caret{border-bottom-color:#f2e88d;border-top-color:#f2e88d}#navbar .navbar-inner.yellow .brand:focus .caret,#navbar .navbar-inner.yellow .brand:hover .caret,#navbar .navbar-inner.yellow .nav>li>a:focus .caret,#navbar .navbar-inner.yellow .nav>li>a:hover .caret{border-bottom-color:#f2edbf;border-top-color:#f2edbf}#navbar .navbar-inner.yellow .brand span{background-image:url(../img/tentacle-20x20-light.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner.yellow .brand span{background-image:url(../img/tentacle-20x20-light@2x.png)}}#navbar .navbar-inner.yellow .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner.yellow .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner.yellow .nav>li.dropdown.open>.dropdown-toggle{background-color:#d8ca47;background-image:-moz-linear-gradient(top,#c2b00c,#f9f0a0);background-image:-webkit-gradient(linear,0 0,0 100%,from(#c2b00c),to(#f9f0a0));background-image:-webkit-linear-gradient(top,#c2b00c,#f9f0a0);background-image:-o-linear-gradient(top,#c2b00c,#f9f0a0);background-image:linear-gradient(to bottom,#c2b00c,#f9f0a0);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffc2b00c', endColorstr='#fff9f0a0', GradientType=0)}#navbar .navbar-inner.yellow .nav>li>a:hover{background-color:#d9cc56;background-image:-moz-linear-gradient(top,#f8ed88,#aa9a0a);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f8ed88),to(#aa9a0a));background-image:-webkit-linear-gradient(top,#f8ed88,#aa9a0a);background-image:-o-linear-gradient(top,#f8ed88,#aa9a0a);background-image:linear-gradient(to bottom,#f8ed88,#aa9a0a);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff8ed88', endColorstr='#ffaa9a0a', GradientType=0)}#navbar .navbar-inner.yellow.transparent{background-color:rgba(227,215,101,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(249,240,160,.6),rgba(194,176,12,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(249,240,160,.6)),to(rgba(194,176,12,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(249,240,160,.6),rgba(194,176,12,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(249,240,160,.6),rgba(194,176,12,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(249,240,160,.6),rgba(194,176,12,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99f9f0a0', endColorstr='#99c2b00c', GradientType=0)}#navbar .navbar-inner.yellow.transparent .brand,#navbar .navbar-inner.yellow.transparent .nav>li>a{text-shadow:0 1px 0 #c2b00c;color:#f2f2f2}#navbar .navbar-inner.yellow.transparent .brand .caret,#navbar .navbar-inner.yellow.transparent .nav>li>a .caret{border-bottom-color:#f2e88d;border-top-color:#f2e88d}#navbar .navbar-inner.yellow.transparent .brand:focus .caret,#navbar .navbar-inner.yellow.transparent .brand:hover .caret,#navbar .navbar-inner.yellow.transparent .nav>li>a:focus .caret,#navbar .navbar-inner.yellow.transparent .nav>li>a:hover .caret{border-bottom-color:#f2edbf;border-top-color:#f2edbf}#navbar .navbar-inner.yellow.transparent .brand span{background-image:url(../img/tentacle-20x20-light.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner.yellow.transparent .brand span{background-image:url(../img/tentacle-20x20-light@2x.png)}}#navbar .navbar-inner.yellow.transparent .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner.yellow.transparent .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner.yellow.transparent .nav>li.dropdown.open>.dropdown-toggle{background-color:rgba(216,202,71,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(194,176,12,.6),rgba(249,240,160,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(194,176,12,.6)),to(rgba(249,240,160,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(194,176,12,.6),rgba(249,240,160,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(194,176,12,.6),rgba(249,240,160,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(194,176,12,.6),rgba(249,240,160,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99c2b00c', endColorstr='#99f9f0a0', GradientType=0)}#navbar .navbar-inner.yellow.transparent .nav>li>a:hover{background-color:rgba(217,204,86,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(248,237,136,.6),rgba(170,154,10,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(248,237,136,.6)),to(rgba(170,154,10,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(248,237,136,.6),rgba(170,154,10,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(248,237,136,.6),rgba(170,154,10,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(248,237,136,.6),rgba(170,154,10,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99f8ed88', endColorstr='#99aa9a0a', GradientType=0)}#navbar .navbar-inner.green{background-color:#98f064;background-image:-moz-linear-gradient(top,#c8ffa7,#50da00);background-image:-webkit-gradient(linear,0 0,0 100%,from(#c8ffa7),to(#50da00));background-image:-webkit-linear-gradient(top,#c8ffa7,#50da00);background-image:-o-linear-gradient(top,#c8ffa7,#50da00);background-image:linear-gradient(to bottom,#c8ffa7,#50da00);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffc8ffa7', endColorstr='#ff50da00', GradientType=0)}#navbar .navbar-inner.green .brand,#navbar .navbar-inner.green .nav>li>a{text-shadow:0 1px 0 #50da00;color:#333}#navbar .navbar-inner.green .brand .caret,#navbar .navbar-inner.green .nav>li>a .caret{border-bottom-color:#55992e;border-top-color:#55992e}#navbar .navbar-inner.green .brand:focus .caret,#navbar .navbar-inner.green .brand:hover .caret,#navbar .navbar-inner.green .nav>li>a:focus .caret,#navbar .navbar-inner.green .nav>li>a:hover .caret{border-bottom-color:#446630;border-top-color:#446630}#navbar .navbar-inner.green .brand span{background-image:url(../img/tentacle-20x20.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner.green .brand span{background-image:url(../img/tentacle-20x20@2x.png)}}#navbar .navbar-inner.green .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner.green .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner.green .nav>li.dropdown.open>.dropdown-toggle{background-color:#80e943;background-image:-moz-linear-gradient(top,#50da00,#c8ffa7);background-image:-webkit-gradient(linear,0 0,0 100%,from(#50da00),to(#c8ffa7));background-image:-webkit-linear-gradient(top,#50da00,#c8ffa7);background-image:-o-linear-gradient(top,#50da00,#c8ffa7);background-image:linear-gradient(to bottom,#50da00,#c8ffa7);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff50da00', endColorstr='#ffc8ffa7', GradientType=0)}#navbar .navbar-inner.green .nav>li>a:hover{background-color:#8ae655;background-image:-moz-linear-gradient(top,#b8ff8e,#47c100);background-image:-webkit-gradient(linear,0 0,0 100%,from(#b8ff8e),to(#47c100));background-image:-webkit-linear-gradient(top,#b8ff8e,#47c100);background-image:-o-linear-gradient(top,#b8ff8e,#47c100);background-image:linear-gradient(to bottom,#b8ff8e,#47c100);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffb8ff8e', endColorstr='#ff47c100', GradientType=0)}#navbar .navbar-inner.green.transparent{background-color:rgba(152,240,100,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(200,255,167,.6),rgba(80,218,0,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(200,255,167,.6)),to(rgba(80,218,0,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(200,255,167,.6),rgba(80,218,0,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(200,255,167,.6),rgba(80,218,0,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(200,255,167,.6),rgba(80,218,0,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99c8ffa7', endColorstr='#9950da00', GradientType=0)}#navbar .navbar-inner.green.transparent .brand,#navbar .navbar-inner.green.transparent .nav>li>a{text-shadow:0 1px 0 #50da00;color:#333}#navbar .navbar-inner.green.transparent .brand .caret,#navbar .navbar-inner.green.transparent .nav>li>a .caret{border-bottom-color:#55992e;border-top-color:#55992e}#navbar .navbar-inner.green.transparent .brand:focus .caret,#navbar .navbar-inner.green.transparent .brand:hover .caret,#navbar .navbar-inner.green.transparent .nav>li>a:focus .caret,#navbar .navbar-inner.green.transparent .nav>li>a:hover .caret{border-bottom-color:#446630;border-top-color:#446630}#navbar .navbar-inner.green.transparent .brand span{background-image:url(../img/tentacle-20x20.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner.green.transparent .brand span{background-image:url(../img/tentacle-20x20@2x.png)}}#navbar .navbar-inner.green.transparent .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner.green.transparent .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner.green.transparent .nav>li.dropdown.open>.dropdown-toggle{background-color:rgba(128,233,67,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(80,218,0,.6),rgba(200,255,167,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(80,218,0,.6)),to(rgba(200,255,167,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(80,218,0,.6),rgba(200,255,167,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(80,218,0,.6),rgba(200,255,167,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(80,218,0,.6),rgba(200,255,167,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#9950da00', endColorstr='#99c8ffa7', GradientType=0)}#navbar .navbar-inner.green.transparent .nav>li>a:hover{background-color:rgba(138,230,85,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(184,255,142,.6),rgba(71,193,0,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(184,255,142,.6)),to(rgba(71,193,0,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(184,255,142,.6),rgba(71,193,0,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(184,255,142,.6),rgba(71,193,0,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(184,255,142,.6),rgba(71,193,0,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99b8ff8e', endColorstr='#9947c100', GradientType=0)}#navbar .navbar-inner.blue{background-color:#2e63cc;background-image:-moz-linear-gradient(top,#4d88ff,#002b80);background-image:-webkit-gradient(linear,0 0,0 100%,from(#4d88ff),to(#002b80));background-image:-webkit-linear-gradient(top,#4d88ff,#002b80);background-image:-o-linear-gradient(top,#4d88ff,#002b80);background-image:linear-gradient(to bottom,#4d88ff,#002b80);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff4d88ff', endColorstr='#ff002b80', GradientType=0)}#navbar .navbar-inner.blue .brand,#navbar .navbar-inner.blue .nav>li>a{text-shadow:0 1px 0 #1a66ff;color:#f2f2f2}#navbar .navbar-inner.blue .brand .caret,#navbar .navbar-inner.blue .nav>li>a .caret{border-bottom-color:#799bdf;border-top-color:#799bdf}#navbar .navbar-inner.blue .brand:focus .caret,#navbar .navbar-inner.blue .brand:hover .caret,#navbar .navbar-inner.blue .nav>li>a:focus .caret,#navbar .navbar-inner.blue .nav>li>a:hover .caret{border-bottom-color:#b6c7e9;border-top-color:#b6c7e9}#navbar .navbar-inner.blue .brand span{background-image:url(../img/tentacle-20x20-light.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner.blue .brand span{background-image:url(../img/tentacle-20x20-light@2x.png)}}#navbar .navbar-inner.blue .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner.blue .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner.blue .nav>li.dropdown.open>.dropdown-toggle{background-color:#1f50b3;background-image:-moz-linear-gradient(top,#002b80,#4d88ff);background-image:-webkit-gradient(linear,0 0,0 100%,from(#002b80),to(#4d88ff));background-image:-webkit-linear-gradient(top,#002b80,#4d88ff);background-image:-o-linear-gradient(top,#002b80,#4d88ff);background-image:linear-gradient(to bottom,#002b80,#4d88ff);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff002b80', endColorstr='#ff4d88ff', GradientType=0)}#navbar .navbar-inner.blue .nav>li>a:hover{background-color:#1f55c2;background-image:-moz-linear-gradient(top,#37f,#026);background-image:-webkit-gradient(linear,0 0,0 100%,from(#37f),to(#026));background-image:-webkit-linear-gradient(top,#37f,#026);background-image:-o-linear-gradient(top,#37f,#026);background-image:linear-gradient(to bottom,#37f,#026);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3377ff', endColorstr='#ff002266', GradientType=0)}#navbar .navbar-inner.blue.transparent{background-color:rgba(46,99,204,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(77,136,255,.6),rgba(0,43,128,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(77,136,255,.6)),to(rgba(0,43,128,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(77,136,255,.6),rgba(0,43,128,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(77,136,255,.6),rgba(0,43,128,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(77,136,255,.6),rgba(0,43,128,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#994d88ff', endColorstr='#99002b80', GradientType=0)}#navbar .navbar-inner.blue.transparent .brand,#navbar .navbar-inner.blue.transparent .nav>li>a{text-shadow:0 1px 0 #1a66ff;color:#f2f2f2}#navbar .navbar-inner.blue.transparent .brand .caret,#navbar .navbar-inner.blue.transparent .nav>li>a .caret{border-bottom-color:#799bdf;border-top-color:#799bdf}#navbar .navbar-inner.blue.transparent .brand:focus .caret,#navbar .navbar-inner.blue.transparent .brand:hover .caret,#navbar .navbar-inner.blue.transparent .nav>li>a:focus .caret,#navbar .navbar-inner.blue.transparent .nav>li>a:hover .caret{border-bottom-color:#b6c7e9;border-top-color:#b6c7e9}#navbar .navbar-inner.blue.transparent .brand span{background-image:url(../img/tentacle-20x20-light.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner.blue.transparent .brand span{background-image:url(../img/tentacle-20x20-light@2x.png)}}#navbar .navbar-inner.blue.transparent .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner.blue.transparent .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner.blue.transparent .nav>li.dropdown.open>.dropdown-toggle{background-color:rgba(31,80,179,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(0,43,128,.6),rgba(77,136,255,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(0,43,128,.6)),to(rgba(77,136,255,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(0,43,128,.6),rgba(77,136,255,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(0,43,128,.6),rgba(77,136,255,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(0,43,128,.6),rgba(77,136,255,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99002b80', endColorstr='#994d88ff', GradientType=0)}#navbar .navbar-inner.blue.transparent .nav>li>a:hover{background-color:rgba(31,85,194,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(51,119,255,.6),rgba(0,34,102,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(51,119,255,.6)),to(rgba(0,34,102,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(51,119,255,.6),rgba(0,34,102,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(51,119,255,.6),rgba(0,34,102,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(51,119,255,.6),rgba(0,34,102,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#993377ff', endColorstr='#99002266', GradientType=0)}#navbar .navbar-inner.violet{background-color:#9864f0;background-image:-moz-linear-gradient(top,#c8a7ff,#5000da);background-image:-webkit-gradient(linear,0 0,0 100%,from(#c8a7ff),to(#5000da));background-image:-webkit-linear-gradient(top,#c8a7ff,#5000da);background-image:-o-linear-gradient(top,#c8a7ff,#5000da);background-image:linear-gradient(to bottom,#c8a7ff,#5000da);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffc8a7ff', endColorstr='#ff5000da', GradientType=0)}#navbar .navbar-inner.violet .brand,#navbar .navbar-inner.violet .nav>li>a{text-shadow:0 1px 0 #a774ff;color:#f2f2f2}#navbar .navbar-inner.violet .brand .caret,#navbar .navbar-inner.violet .nav>li>a .caret{border-bottom-color:#b58df9;border-top-color:#b58df9}#navbar .navbar-inner.violet .brand:focus .caret,#navbar .navbar-inner.violet .brand:hover .caret,#navbar .navbar-inner.violet .nav>li>a:focus .caret,#navbar .navbar-inner.violet .nav>li>a:hover .caret{border-bottom-color:#d3bff5;border-top-color:#d3bff5}#navbar .navbar-inner.violet .brand span{background-image:url(../img/tentacle-20x20-light.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner.violet .brand span{background-image:url(../img/tentacle-20x20-light@2x.png)}}#navbar .navbar-inner.violet .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner.violet .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner.violet .nav>li.dropdown.open>.dropdown-toggle{background-color:#8043e9;background-image:-moz-linear-gradient(top,#5000da,#c8a7ff);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5000da),to(#c8a7ff));background-image:-webkit-linear-gradient(top,#5000da,#c8a7ff);background-image:-o-linear-gradient(top,#5000da,#c8a7ff);background-image:linear-gradient(to bottom,#5000da,#c8a7ff);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5000da', endColorstr='#ffc8a7ff', GradientType=0)}#navbar .navbar-inner.violet .nav>li>a:hover{background-color:#8a55e6;background-image:-moz-linear-gradient(top,#b88eff,#4700c1);background-image:-webkit-gradient(linear,0 0,0 100%,from(#b88eff),to(#4700c1));background-image:-webkit-linear-gradient(top,#b88eff,#4700c1);background-image:-o-linear-gradient(top,#b88eff,#4700c1);background-image:linear-gradient(to bottom,#b88eff,#4700c1);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffb88eff', endColorstr='#ff4700c1', GradientType=0)}#navbar .navbar-inner.violet.transparent{background-color:rgba(152,100,240,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(200,167,255,.6),rgba(80,0,218,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(200,167,255,.6)),to(rgba(80,0,218,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(200,167,255,.6),rgba(80,0,218,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(200,167,255,.6),rgba(80,0,218,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(200,167,255,.6),rgba(80,0,218,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99c8a7ff', endColorstr='#995000da', GradientType=0)}#navbar .navbar-inner.violet.transparent .brand,#navbar .navbar-inner.violet.transparent .nav>li>a{text-shadow:0 1px 0 #a774ff;color:#f2f2f2}#navbar .navbar-inner.violet.transparent .brand .caret,#navbar .navbar-inner.violet.transparent .nav>li>a .caret{border-bottom-color:#b58df9;border-top-color:#b58df9}#navbar .navbar-inner.violet.transparent .brand:focus .caret,#navbar .navbar-inner.violet.transparent .brand:hover .caret,#navbar .navbar-inner.violet.transparent .nav>li>a:focus .caret,#navbar .navbar-inner.violet.transparent .nav>li>a:hover .caret{border-bottom-color:#d3bff5;border-top-color:#d3bff5}#navbar .navbar-inner.violet.transparent .brand span{background-image:url(../img/tentacle-20x20-light.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner.violet.transparent .brand span{background-image:url(../img/tentacle-20x20-light@2x.png)}}#navbar .navbar-inner.violet.transparent .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner.violet.transparent .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner.violet.transparent .nav>li.dropdown.open>.dropdown-toggle{background-color:rgba(128,67,233,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(80,0,218,.6),rgba(200,167,255,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(80,0,218,.6)),to(rgba(200,167,255,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(80,0,218,.6),rgba(200,167,255,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(80,0,218,.6),rgba(200,167,255,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(80,0,218,.6),rgba(200,167,255,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#995000da', endColorstr='#99c8a7ff', GradientType=0)}#navbar .navbar-inner.violet.transparent .nav>li>a:hover{background-color:rgba(138,85,230,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(184,142,255,.6),rgba(71,0,193,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(184,142,255,.6)),to(rgba(71,0,193,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(184,142,255,.6),rgba(71,0,193,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(184,142,255,.6),rgba(71,0,193,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(184,142,255,.6),rgba(71,0,193,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99b88eff', endColorstr='#994700c1', GradientType=0)}#navbar .navbar-inner.black{background-color:#4f4f4f;background-image:-moz-linear-gradient(top,#787878,#121212);background-image:-webkit-gradient(linear,0 0,0 100%,from(#787878),to(#121212));background-image:-webkit-linear-gradient(top,#787878,#121212);background-image:-o-linear-gradient(top,#787878,#121212);background-image:linear-gradient(to bottom,#787878,#121212);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff787878', endColorstr='#ff121212', GradientType=0)}#navbar .navbar-inner.black .brand,#navbar .navbar-inner.black .nav>li>a{text-shadow:0 1px 0 #5e5e5e;color:#f2f2f2}#navbar .navbar-inner.black .brand .caret,#navbar .navbar-inner.black .nav>li>a .caret{border-bottom-color:#959595;border-top-color:#959595}#navbar .navbar-inner.black .brand:focus .caret,#navbar .navbar-inner.black .brand:hover .caret,#navbar .navbar-inner.black .nav>li>a:focus .caret,#navbar .navbar-inner.black .nav>li>a:hover .caret{border-bottom-color:#c4c4c4;border-top-color:#c4c4c4}#navbar .navbar-inner.black .brand span{background-image:url(../img/tentacle-20x20-light.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner.black .brand span{background-image:url(../img/tentacle-20x20-light@2x.png)}}#navbar .navbar-inner.black .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner.black .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner.black .nav>li.dropdown.open>.dropdown-toggle{background-color:#3b3b3b;background-image:-moz-linear-gradient(top,#121212,#787878);background-image:-webkit-gradient(linear,0 0,0 100%,from(#121212),to(#787878));background-image:-webkit-linear-gradient(top,#121212,#787878);background-image:-o-linear-gradient(top,#121212,#787878);background-image:linear-gradient(to bottom,#121212,#787878);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff121212', endColorstr='#ff787878', GradientType=0)}#navbar .navbar-inner.black .nav>li>a:hover{background-color:#424242;background-image:-moz-linear-gradient(top,#6b6b6b,#050505);background-image:-webkit-gradient(linear,0 0,0 100%,from(#6b6b6b),to(#050505));background-image:-webkit-linear-gradient(top,#6b6b6b,#050505);background-image:-o-linear-gradient(top,#6b6b6b,#050505);background-image:linear-gradient(to bottom,#6b6b6b,#050505);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff6b6b6b', endColorstr='#ff050505', GradientType=0)}#navbar .navbar-inner.black.transparent{background-color:rgba(79,79,79,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(120,120,120,.6),rgba(18,18,18,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(120,120,120,.6)),to(rgba(18,18,18,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(120,120,120,.6),rgba(18,18,18,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(120,120,120,.6),rgba(18,18,18,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(120,120,120,.6),rgba(18,18,18,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99787878', endColorstr='#99121212', GradientType=0)}#navbar .navbar-inner.black.transparent .brand,#navbar .navbar-inner.black.transparent .nav>li>a{text-shadow:0 1px 0 #5e5e5e;color:#f2f2f2}#navbar .navbar-inner.black.transparent .brand .caret,#navbar .navbar-inner.black.transparent .nav>li>a .caret{border-bottom-color:#959595;border-top-color:#959595}#navbar .navbar-inner.black.transparent .brand:focus .caret,#navbar .navbar-inner.black.transparent .brand:hover .caret,#navbar .navbar-inner.black.transparent .nav>li>a:focus .caret,#navbar .navbar-inner.black.transparent .nav>li>a:hover .caret{border-bottom-color:#c4c4c4;border-top-color:#c4c4c4}#navbar .navbar-inner.black.transparent .brand span{background-image:url(../img/tentacle-20x20-light.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner.black.transparent .brand span{background-image:url(../img/tentacle-20x20-light@2x.png)}}#navbar .navbar-inner.black.transparent .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner.black.transparent .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner.black.transparent .nav>li.dropdown.open>.dropdown-toggle{background-color:rgba(59,59,59,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(18,18,18,.6),rgba(120,120,120,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(18,18,18,.6)),to(rgba(120,120,120,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(18,18,18,.6),rgba(120,120,120,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(18,18,18,.6),rgba(120,120,120,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(18,18,18,.6),rgba(120,120,120,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99121212', endColorstr='#99787878', GradientType=0)}#navbar .navbar-inner.black.transparent .nav>li>a:hover{background-color:rgba(66,66,66,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(107,107,107,.6),rgba(5,5,5,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(107,107,107,.6)),to(rgba(5,5,5,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(107,107,107,.6),rgba(5,5,5,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(107,107,107,.6),rgba(5,5,5,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(107,107,107,.6),rgba(5,5,5,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#996b6b6b', endColorstr='#99050505', GradientType=0)}#navbar .navbar-inner.white{background-color:#e9e9e9;background-image:-moz-linear-gradient(top,#fff,#c8c8c8);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#c8c8c8));background-image:-webkit-linear-gradient(top,#fff,#c8c8c8);background-image:-o-linear-gradient(top,#fff,#c8c8c8);background-image:linear-gradient(to bottom,#fff,#c8c8c8);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffc8c8c8', GradientType=0)}#navbar .navbar-inner.white .brand,#navbar .navbar-inner.white .nav>li>a{text-shadow:0 1px 0 #c8c8c8;color:#333}#navbar .navbar-inner.white .brand .caret,#navbar .navbar-inner.white .nav>li>a .caret{border-bottom-color:#919191;border-top-color:#919191}#navbar .navbar-inner.white .brand:focus .caret,#navbar .navbar-inner.white .brand:hover .caret,#navbar .navbar-inner.white .nav>li>a:focus .caret,#navbar .navbar-inner.white .nav>li>a:hover .caret{border-bottom-color:#626262;border-top-color:#626262}#navbar .navbar-inner.white .brand span{background-image:url(../img/tentacle-20x20.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner.white .brand span{background-image:url(../img/tentacle-20x20@2x.png)}}#navbar .navbar-inner.white .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner.white .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner.white .nav>li.dropdown.open>.dropdown-toggle{background-color:#dedede;background-image:-moz-linear-gradient(top,#c8c8c8,#fff);background-image:-webkit-gradient(linear,0 0,0 100%,from(#c8c8c8),to(#fff));background-image:-webkit-linear-gradient(top,#c8c8c8,#fff);background-image:-o-linear-gradient(top,#c8c8c8,#fff);background-image:linear-gradient(to bottom,#c8c8c8,#fff);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffc8c8c8', endColorstr='#ffffffff', GradientType=0)}#navbar .navbar-inner.white .nav>li>a:hover{background-color:#dcdcdc;background-image:-moz-linear-gradient(top,#f2f2f2,#bbb);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#bbb));background-image:-webkit-linear-gradient(top,#f2f2f2,#bbb);background-image:-o-linear-gradient(top,#f2f2f2,#bbb);background-image:linear-gradient(to bottom,#f2f2f2,#bbb);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffbbbbbb', GradientType=0)}#navbar .navbar-inner.white.transparent{background-color:rgba(233,233,233,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(255,255,255,.6),rgba(200,200,200,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(255,255,255,.6)),to(rgba(200,200,200,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(255,255,255,.6),rgba(200,200,200,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(255,255,255,.6),rgba(200,200,200,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(255,255,255,.6),rgba(200,200,200,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99ffffff', endColorstr='#99c8c8c8', GradientType=0)}#navbar .navbar-inner.white.transparent .brand,#navbar .navbar-inner.white.transparent .nav>li>a{text-shadow:0 1px 0 #c8c8c8;color:#333}#navbar .navbar-inner.white.transparent .brand .caret,#navbar .navbar-inner.white.transparent .nav>li>a .caret{border-bottom-color:#919191;border-top-color:#919191}#navbar .navbar-inner.white.transparent .brand:focus .caret,#navbar .navbar-inner.white.transparent .brand:hover .caret,#navbar .navbar-inner.white.transparent .nav>li>a:focus .caret,#navbar .navbar-inner.white.transparent .nav>li>a:hover .caret{border-bottom-color:#626262;border-top-color:#626262}#navbar .navbar-inner.white.transparent .brand span{background-image:url(../img/tentacle-20x20.png)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#navbar .navbar-inner.white.transparent .brand span{background-image:url(../img/tentacle-20x20@2x.png)}}#navbar .navbar-inner.white.transparent .nav>li.dropdown.active>.dropdown-toggle,#navbar .navbar-inner.white.transparent .nav>li.dropdown.open.active>.dropdown-toggle,#navbar .navbar-inner.white.transparent .nav>li.dropdown.open>.dropdown-toggle{background-color:rgba(222,222,222,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(200,200,200,.6),rgba(255,255,255,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(200,200,200,.6)),to(rgba(255,255,255,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(200,200,200,.6),rgba(255,255,255,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(200,200,200,.6),rgba(255,255,255,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(200,200,200,.6),rgba(255,255,255,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99c8c8c8', endColorstr='#99ffffff', GradientType=0)}#navbar .navbar-inner.white.transparent .nav>li>a:hover{background-color:rgba(220,220,220,.6);background-image:"../img/trans-background.png";background-image:-moz-linear-gradient(top,rgba(242,242,242,.6),rgba(187,187,187,.6)),url(../img/trans-background.png);background-image:-webkit-gradient(linear,0 0,0 100%,from(rgba(242,242,242,.6)),to(rgba(187,187,187,.6))),url(../img/trans-background.png);background-image:-webkit-linear-gradient(top,rgba(242,242,242,.6),rgba(187,187,187,.6)),url(../img/trans-background.png);background-image:-o-linear-gradient(top,rgba(242,242,242,.6),rgba(187,187,187,.6)),url(../img/trans-background.png);background-image:linear-gradient(to bottom,rgba(242,242,242,.6),rgba(187,187,187,.6)),url(../img/trans-background.png);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#99f2f2f2', endColorstr='#99bbbbbb', GradientType=0)}#navbar .navbar-inner .brand{padding:10px 20px 6px}#navbar .navbar-inner .brand span{padding-left:26px;background-size:20px 20px;background-repeat:no-repeat;display:inline-block;max-width:250px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:top;line-height:20px;height:24px}#navbar_login a.dropdown-toggle span{display:inline-block;max-width:100px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:top}.octoprint-container{margin-top:20px}.octoprint-container .tab-content{padding:9px 15px;border-left:1px solid #DDD;border-right:1px solid #DDD;border-bottom:1px solid #DDD;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px}.octoprint-container .nav{margin-bottom:0}.octoprint-container .tab-content h1{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:40px;color:#333;border:0;border-bottom:1px solid #E5E5E5;font-weight:400}.octoprint-container .accordion-heading .accordion-heading-button{float:right}.octoprint-container .accordion-heading .accordion-heading-button a{display:inline-block;padding:8px 15px;font-size:14px;line-height:20px;color:#000;text-decoration:none;background:0 0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.octoprint-container .accordion-heading a.accordion-toggle{display:inline-block}.octoprint-container .accordion-heading [class*=" icon-"],.octoprint-container .accordion-heading [class^=icon-]{color:#000}.print-control .btn{padding-left:4px;padding-right:4px}.upload-buttons .btn{margin-right:0}table{table-layout:fixed}table .popover-title{text-overflow:ellipsis;word-break:break-all}table td,table th{overflow:hidden}table td.gcode_files_name,table th.gcode_files_name{text-overflow:ellipsis;text-align:left;white-space:nowrap}table td.gcode_files_action,table th.gcode_files_action{width:90px;text-align:center;white-space:nowrap}table td.gcode_files_action a,table th.gcode_files_action a{text-decoration:none;color:#000}table td.gcode_files_action a.disabled,table th.gcode_files_action a.disabled{color:#ccc;cursor:default}table td.timelapse_files_checkbox,table td.timelapse_unrendered_checkbox,table th.timelapse_files_checkbox,table th.timelapse_unrendered_checkbox{text-align:center;width:10px}table td.timelapse_files_checkbox input[type=checkbox],table td.timelapse_unrendered_checkbox input[type=checkbox],table th.timelapse_files_checkbox input[type=checkbox],table th.timelapse_unrendered_checkbox input[type=checkbox]{margin-top:0}table td.timelapse_files_name,table td.timelapse_unrendered_name,table th.timelapse_files_name,table th.timelapse_unrendered_name{text-overflow:ellipsis;text-align:left}table td.timelapse_files_size,table td.timelapse_unrendered_size,table th.timelapse_files_size,table th.timelapse_unrendered_size{text-align:right;width:55px}table td.timelapse_unrendered_count,table th.timelapse_unrendered_count{text-align:right;width:45px}table td.timelapse_files_action,table td.timelapse_unrendered_action,table th.timelapse_files_action,table th.timelapse_unrendered_action{width:45px;text-align:center;white-space:nowrap}table td.timelapse_files_action a,table td.timelapse_unrendered_action a,table th.timelapse_files_action a,table th.timelapse_unrendered_action a{text-decoration:none;color:#000}table td.timelapse_files_action a.disabled,table td.timelapse_unrendered_action a.disabled,table th.timelapse_files_action a.disabled,table th.timelapse_unrendered_action a.disabled{color:#ccc;cursor:default}table td.settings_users_name,table th.settings_users_name{text-overflow:ellipsis;text-align:left}table td.settings_users_active,table td.settings_users_admin,table th.settings_users_active,table th.settings_users_admin{text-align:center;width:55px}table td.settings_users_actions,table th.settings_users_actions{width:60px;text-align:center;white-space:nowrap}table td.settings_users_actions a,table th.settings_users_actions a{text-decoration:none;color:#000}table td.settings_users_actions a.disabled,table th.settings_users_actions a.disabled{color:#ccc;cursor:default}table td.settings_printerProfiles_profiles_name,table th.settings_printerProfiles_profiles_name{text-overflow:ellipsis;text-align:left}table td.settings_printerProfiles_profiles_model,table th.settings_printerProfiles_profiles_model{text-align:left;width:250px}table td.settings_printerProfiles_profiles_action,table th.settings_printerProfiles_profiles_action{width:80px;text-align:center;white-space:nowrap}table td.settings_printerProfiles_profiles_action a,table th.settings_printerProfiles_profiles_action a{text-decoration:none;color:#000}table td.settings_printerProfiles_profiles_action a.disabled,table th.settings_printerProfiles_profiles_action a.disabled{color:#ccc;cursor:default}#temperature-graph{height:350px;width:100%;background:url(../img/graph-background.png) center no-repeat}#temperature-table{table-layout:fixed;width:100%;margin-top:20px}#temperature-table td.temperature_actual,#temperature-table td.temperature_offset,#temperature-table td.temperature_target,#temperature-table td.temperature_tool,#temperature-table th.temperature_actual,#temperature-table th.temperature_offset,#temperature-table th.temperature_target,#temperature-table th.temperature_tool{vertical-align:middle;text-align:center}#temperature-table td.temperature_actual form,#temperature-table td.temperature_offset form,#temperature-table td.temperature_target form,#temperature-table td.temperature_tool form,#temperature-table th.temperature_actual form,#temperature-table th.temperature_offset form,#temperature-table th.temperature_target form,#temperature-table th.temperature_tool form{margin:0}#temperature-table td.temperature_actual .dropdown-menu,#temperature-table td.temperature_offset .dropdown-menu,#temperature-table td.temperature_target .dropdown-menu,#temperature-table td.temperature_tool .dropdown-menu,#temperature-table th.temperature_actual .dropdown-menu,#temperature-table th.temperature_offset .dropdown-menu,#temperature-table th.temperature_target .dropdown-menu,#temperature-table th.temperature_tool .dropdown-menu{text-align:left}#temperature-table td.temperature_tool,#temperature-table th.temperature_tool{width:16%;text-align:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#temperature-table td.temperature_actual,#temperature-table th.temperature_actual{width:12%}#temperature-table td.temperature_target,#temperature-table th.temperature_target{width:42%;overflow:visible}#temperature-table td.temperature_offset,#temperature-table th.temperature_offset{width:30%}.tab-content,.tab-pane{overflow:visible}#speed_fill,#speed_innerWall,#speed_outerWall,#speed_support,#temp_newBedTemp,#temp_newTemp,#webcam_timelapse_fps,#webcam_timelapse_interval,#webcam_timelapse_postRoll,#webcam_timelapse_retractionZHop{text-align:right}ul.dropdown-menu li a{cursor:pointer}#connection_baudrates,#connection_ports,#connection_printers{width:100%}#offline_overlay,#reloadui_overlay{position:fixed;top:0;left:0;width:100%;height:100%;display:none}#offline_overlay{z-index:10002}#reloadui_overlay{z-index:10001}#offline_overlay_background,#reloadui_overlay_background{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#000;filter:alpha(opacity=50);-moz-opacity:.5;-khtml-opacity:.5;opacity:.5}#offline_overlay_wrapper,#reloadui_overlay_wrapper{position:absolute;top:0;bottom:0;left:0;right:0;padding-top:60px}#offline_overlay_wrapper .container,#reloadui_overlay_wrapper .container{margin:auto}#webcam_container{width:100%;position:relative;outline:0;background-color:#000}#webcam_container .keycontrol_overlay{position:absolute;left:10px;right:10px;bottom:10px;background:rgba(0,0,0,.5);font-size:85%;color:#fff;padding:0}#webcam_container .keycontrol_overlay kbd{border:1px solid #eee;border-radius:3px;margin-left:2px;margin-right:2px;font-size:90%;padding:2px;min-width:1em}#webcam_container .keycontrol_overlay .keycontrol_overlay_heading{position:relative;padding:10px;font-weight:700}#webcam_container .keycontrol_overlay .keycontrol_overlay_column{position:relative;width:45%;padding:10px;float:left}#webcam_container .nowebcam{position:absolute;top:0;left:0;right:0;bottom:0}#webcam_container .nowebcam .text{color:#fff;text-align:center;position:relative;margin:auto;width:80%;top:50%;transform:translateY(-50%);display:block}#webcam_container .nowebcam .text.webcam_loading{animation:pulsate 3s ease-out;animation-iteration-count:infinite}#webcam_container .webcam_rotated{position:relative;width:100%;padding-bottom:100%;pointer-events:none}#webcam_container .webcam_rotated .webcam_fixed_ratio{position:absolute;transform:rotate(-90deg);top:0;bottom:0;pointer-events:none}#webcam_container .webcam_rotated .webcam_fixed_ratio .webcam_fixed_ratio_inner{width:100%;height:100%;pointer-events:none}#webcam_container .webcam_unrotated .webcam_fixed_ratio{width:100%;pointer-events:none;padding-bottom:100%;position:relative}#webcam_container .webcam_unrotated .webcam_fixed_ratio.ratio43{padding-bottom:75%}#webcam_container .webcam_unrotated .webcam_fixed_ratio.ratio169{padding-bottom:56.25%}#webcam_container .webcam_unrotated .webcam_fixed_ratio.ratio1610{padding-bottom:62.5%}#webcam_container .webcam_unrotated .webcam_fixed_ratio .webcam_fixed_ratio_inner{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:none}#webcam_container img{width:100%;height:100%;object-fit:contain}#state_wrapper hr{margin:5px 0}#files .gcode_files{padding-right:7px}#files .gcode_files .entry{padding:5px;line-height:20px;border-bottom:1px solid #ddd;position:relative}#files .gcode_files .entry:hover{background-color:#f5f5f5}#files .gcode_files .entry .title{text-overflow:ellipsis;word-break:break-all}#files .gcode_files .entry .additionalInfo,#files .gcode_files .entry .size,#files .gcode_files .entry .uploaded{font-size:85%;color:#999}#files .gcode_files .entry .action-buttons{position:absolute;bottom:5px;right:5px}#files .gcode_files .entry .additionalInfo{padding-bottom:22px}@keyframes highlightframes{0%{background:#ff0}100%{background:0 0}}#files .gcode_files .entry.highlight{animation:highlightframes 2s}#files .gcode_files .back .back-path{white-space:nowrap}#files .gcode_files .back .back-path span{word-wrap:break-word;white-space:pre-line}#files .upload-buttons{margin-top:10px}#files .form-search{text-align:center;margin-bottom:5px!important}#control{overflow:hidden}#control .jog-panel{float:left;margin-right:19px}#control h1{text-align:left}#control .jog-panel>div{text-align:center}#control .jog-panel>div.distance{text-align:left}#control .jog-panel .slider{margin-bottom:10px}#control .box{width:30px;height:30px;margin-right:10px;margin-bottom:10px;padding-left:8px}#control .control-box{display:block;height:30px;margin-bottom:10px}#control .btn-group{margin-bottom:10px}#control .btn-group.distance>.btn{width:43px;padding:3px 0;height:30px}#control .slider-handle{width:14px;height:14px;margin-left:-7px;margin-top:-3px}#control .custom_section h1{cursor:pointer}#control .custom_section_horizontal>.custom_control{display:inline-block}#control .custom_section_vertical>.custom_control{display:block}#control .custom_control .slider{margin-left:10px;margin-right:10px;margin-bottom:2px}#gcode .progress{width:588px}#gcode .progress .bar{-webkit-transition:width 0s linear;-moz-transition:width 0s linear;-o-transition:width 0s linear;transition:width 0s linear}#gcode .canvas_container{position:relative}#gcode .canvas_container:active,#gcode .canvas_container:hover{outline:0}#gcode .layer-buttons{padding-top:5px;padding-bottom:7px}#gcode #gcode_layer_slider{position:absolute;right:0;top:0;height:568px;float:right}#gcode #gcode_layer_slider .slider-handle{width:14px;height:14px;margin-left:-3px;margin-top:-7px}#gcode #gcode_command_slider .slider-handle{width:14px;height:14px;margin-left:-7px;margin-top:-3px}#term .terminal{margin-bottom:30px}#term .terminal #terminal-output,#term .terminal #terminal-output-lowfi{min-height:340px;margin-bottom:5px}#settings_dialog .aboutlink{float:left}#settings_dialog_menu,#wizard_dialog_menu{margin-left:0}#wizard_firstrun_acl .acl_decision{margin-top:1em}#settings_appearance_managelanguagesdialog_emptylist{overflow:hidden;width:100%;height:300px;text-align:center;display:table}#settings_appearance_managelanguagesdialog_emptylist div{display:table-cell;vertical-align:middle}.footer ul{margin:0}.footer ul li{display:inline;margin-left:1em;font-size:85%}.footer ul li:first-child{margin-left:0}.footer ul li a{color:#555}.ui-pnotify .alert a{color:#c09853}.ui-pnotify .alert-danger a,.ui-pnotify .alert-error a{color:#b94a48}.ui-pnotify .alert-success a{color:#468847}.ui-pnotify .alert-info a{color:#3a87ad}.pnotify_additional_info .pnotify_more{font-size:85%}.text-right{text-align:right}.text-center{text-align:center}.overflow_visible{overflow:visible!important}.clickable{cursor:pointer}.border_box{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.hidden{display:none}textarea.block{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%}@keyframes pulsate{0%{opacity:.5}50%{opacity:1}100%{opacity:.5}}#drop_overlay{position:fixed;top:0;left:0;width:100%;height:100%;z-index:10000;display:none}#drop_overlay.in{display:block}#drop_overlay #drop_overlay_background{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#000;filter:alpha(opacity=50);-moz-opacity:.5;-khtml-opacity:.5;opacity:.5}#drop_overlay #drop_overlay_wrapper{position:absolute;top:0;bottom:0;left:0;right:0;padding-top:60px}#drop_overlay #drop_overlay_wrapper #drop,#drop_overlay #drop_overlay_wrapper #drop_background{position:absolute;top:0;left:0;margin-left:0;width:100%}#drop_overlay #drop_overlay_wrapper #drop_locally,#drop_overlay #drop_overlay_wrapper #drop_locally_background{position:absolute;top:0;left:50%;margin-left:-50%;width:50%;border-right:2px dashed #ccc}#drop_overlay #drop_overlay_wrapper #drop_sd,#drop_overlay #drop_overlay_wrapper #drop_sd_background{position:absolute;top:0;left:50%;margin-left:0;width:50%;border-left:2px dashed #ccc}#drop_overlay #drop_overlay_wrapper .dropzone{height:100%;z-index:10001;color:#fff;font-size:30px}#drop_overlay #drop_overlay_wrapper .dropzone i{font-size:50px}#drop_overlay #drop_overlay_wrapper .dropzone .text{display:block;text-align:center;line-height:40px;position:absolute;width:100%;bottom:5%;filter:alpha(opacity=100);-moz-opacity:1;-khtml-opacity:1;opacity:1}#drop_overlay #drop_overlay_wrapper .dropzone_background{width:50%;height:100%;background-color:#000;filter:alpha(opacity=25);-moz-opacity:.25;-khtml-opacity:.25;opacity:.25}#drop_overlay #drop_overlay_wrapper .dropzone_background.hover{background-color:#000;filter:alpha(opacity=50);-moz-opacity:.5;-khtml-opacity:.5;opacity:.5}#drop_overlay #drop_overlay_wrapper .dropzone_background.fade{-webkit-transition:all .3s ease-out;-moz-transition:all .3s ease-out;-ms-transition:all .3s ease-out;-o-transition:all .3s ease-out;transition:all .3s ease-out;opacity:1}.icon-sd-black-14{background:url(../img/icon-sd-black-14.png) 0 3px no-repeat;width:11px;height:17px;display:inline-block!important}.center{float:none;margin-left:auto;margin-right:auto}.flipH{-webkit-transform:scaleX(-1);-moz-transform:scaleX(-1);-ms-transform:scaleX(-1);transform:scaleX(-1)}.flipV{-webkit-transform:scaleY(-1);-moz-transform:scaleY(-1);-ms-transform:scaleY(-1);transform:scaleY(-1)}.flipH.flipV{-webkit-transform:scaleX(-1) scaleY(-1);-moz-transform:scaleX(-1) scaleY(-1);-ms-transform:scaleX(-1) scaleY(-1);transform:scaleX(-1) scaleY(-1)}.rotate90{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.ui-pnotify a{text-decoration:underline}.btn-mini .caret,.btn-small .caret{margin-top:8px}.dropdown-menu-right{right:0;left:auto}.slider .slider-selection{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#04c;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.slider .slider-selection.active,.slider .slider-selection.disabled,.slider .slider-selection:active,.slider .slider-selection:focus,.slider .slider-selection:hover,.slider .slider-selection[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.slider .slider-selection.active,.slider .slider-selection:active{background-color:#039 \9}.slider.slider-disabled .slider-selection{background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.slider .slider-track{background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.slider.slider-disabled .slider-track{background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.slider .slider-handle{display:inline-block;*display:inline;*zoom:1;font-size:14px;line-height:20px;text-align:center;vertical-align:middle;cursor:pointer;color:#333;text-shadow:0 1px 1px rgba(255,255,255,.75);background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;*background-color:#e6e6e6;border:1px solid #ccc;*border:0;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*margin-left:.3em;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);padding:0;margin-bottom:0;opacity:1;filter:alpha(opacity=100)}.slider .slider-handle.active,.slider .slider-handle.disabled,.slider .slider-handle:active,.slider .slider-handle:focus,.slider .slider-handle:hover,.slider .slider-handle[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.slider .slider-handle.active,.slider .slider-handle:active{background-color:#ccc \9}.slider .slider-handle:first-child{*margin-left:0}.slider .slider-handle:focus,.slider .slider-handle:hover{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.slider .slider-handle:focus{outline:#333 dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.slider .slider-handle.active,.slider .slider-handle:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.slider .slider-handle.disabled,.slider .slider-handle[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.slider .slider-handle.hide{display:none}.slider .slider-handle.round{-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%}.modal.large{width:975px;margin-left:-487px}.full-sized-box{position:absolute;bottom:0;left:0;right:0;top:0;padding:15px}.full-sized-box .row-fluid{height:100%}@media (max-width:979px){.full-sized-box{position:static}}:root .full-sized-box,_::-webkit-full-page-media,_:future{position:static}.scrollable{height:100%;overflow:auto;-webkit-overflow-scrolling:touch}.pre-output span{display:block}.input-append .add-on.add-on-limited,.input-prepend .add-on.add-on-limited{overflow-x:hidden;text-overflow:ellipsis;width:inherit}.input-append .btn-group:first-child .btn:first-child,.input-prepend .btn-group:first-child .btn:first-child{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-append .btn-group .btn:first-child,.input-prepend .btn-group .btn:first-child{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-append.input-block-level,.input-prepend.input-block-level{display:table}.input-append.input-block-level .add-on,.input-prepend.input-block-level .add-on{display:table-cell;width:1%}.input-append.input-block-level>input,.input-prepend.input-block-level>input{box-sizing:border-box;display:table;min-height:inherit;width:100%}.input-append.input-block-level>input{border-right:0}.input-prepend.input-block-level>input{border-left:0}.control-group.error .input-append .fileinput-button,.control-group.error .input-prepend .fileinput-button{border-color:#b94a48}.control-text{padding-top:5px;cursor:default}input[type=number]{text-align:right}input[type=number].input-nospin::-webkit-inner-spin-button,input[type=number].input-nospin::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number].input-nospin{-moz-appearance:textfield}.progress-text,.progress-text-centered{position:relative}.progress-text .progress-text-back,.progress-text .progress-text-front,.progress-text-centered .progress-text-back,.progress-text-centered .progress-text-front{white-space:nowrap}.progress-text .progress-text-front,.progress-text-centered .progress-text-front{box-sizing:border-box;padding:0 10px;width:100%;display:block}.progress-text .progress-text-back,.progress-text-centered .progress-text-back{position:absolute;font-size:12px;line-height:20px;display:block;box-sizing:border-box;text-align:center;padding:0 10px}.progress-text .bar,.progress-text-centered .bar{position:absolute;overflow:hidden}.progress-text-centered .progress-text-front{position:absolute;font-size:12px;line-height:20px;display:block;text-align:center;color:#fff}.progress-text-centered .progress-text-back{width:100%}#navbar_login:not(.open) #login_dropdown_loggedout{display:block;z-index:-1;height:0;width:0;padding:0!important;overflow:hidden;border:0;box-shadow:none;left:-9999px}#navbar_login:not(.open) #login_dropdown_loggedout.hide{display:none}#loginForm{margin:0}#loginForm button{margin-top:20px} \ No newline at end of file diff --git a/src/octoprint/static/less/octoprint.less b/src/octoprint/static/less/octoprint.less index 051a60a66..afc82f098 100644 --- a/src/octoprint/static/less/octoprint.less +++ b/src/octoprint/static/less/octoprint.less @@ -364,29 +364,6 @@ table { .actioncol; } -/* - // log files - &.settings_logs_name { - text-overflow: ellipsis; - text-align: left; - } - - &.settings_logs_size { - text-align: right; - width: 70px; - } - - &.settings_logs_date { - text-align: left; - width: 130px; - } - - &.settings_logs_action { - width: 70px; - .actioncol; - } -*/ - // Printer profiles &.settings_printerProfiles_profiles_name { text-overflow: ellipsis; From 77aeb6146e60ddcf34a425f9b3bb544414194d70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Wed, 7 Feb 2018 13:24:50 +0100 Subject: [PATCH 11/38] Logging: redirects for backwards compatibility --- .../plugins/logging/static/js/logging.js | 6 +++--- src/octoprint/server/__init__.py | 6 +++++- src/octoprint/server/util/tornado.py | 20 +++++++++++++++++++ 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/src/octoprint/plugins/logging/static/js/logging.js b/src/octoprint/plugins/logging/static/js/logging.js index edc84c327..c4131debb 100644 --- a/src/octoprint/plugins/logging/static/js/logging.js +++ b/src/octoprint/plugins/logging/static/js/logging.js @@ -44,17 +44,17 @@ }; DeprecatedOctoPrintLogsClient.prototype.list = function(opts) { - log.warn("OctoPrintClient.logs.list has been deprecated, use OctoPrintClient.plugins.logging.listLogs instead"); + log.warn("OctoPrintClient.logs.list has been deprecated as of OctoPrint 1.3.7, use OctoPrintClient.plugins.logging.listLogs instead"); return this.wrapped.listLogs(opts); }; DeprecatedOctoPrintLogsClient.prototype.delete = function(file, opts) { - log.warn("OctoPrintClient.logs.delete has been deprecated, use OctoPrintClient.plugins.logging.deleteLog instead"); + log.warn("OctoPrintClient.logs.delete has been deprecated as of OctoPrint 1.3.7, use OctoPrintClient.plugins.logging.deleteLog instead"); return this.wrapped.deleteLog(file, opts); }; DeprecatedOctoPrintLogsClient.prototype.download = function(file, opts) { - log.warn("OctoPrintClient.logs.download has been deprecated, use OctoPrintClient.plugins.logging.downloadLog instead"); + log.warn("OctoPrintClient.logs.download has been deprecated as of OctoPrint 1.3.7, use OctoPrintClient.plugins.logging.downloadLog instead"); return this.wrapped.downloadLog(file, opts); }; diff --git a/src/octoprint/server/__init__.py b/src/octoprint/server/__init__.py index 7bbfa00b9..53a5fc07d 100644 --- a/src/octoprint/server/__init__.py +++ b/src/octoprint/server/__init__.py @@ -527,7 +527,11 @@ class Server(object): # online indicators - text file with "online" as content and a transparent gif (r"/online.txt", util.tornado.StaticDataHandler, dict(data="online\n")), (r"/online.gif", util.tornado.StaticDataHandler, dict(data=bytes(base64.b64decode("R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")), - content_type="image/gif")) + content_type="image/gif")), + + # deprecated endpoints + (r"/api/logs", util.tornado.DeprecatedEndpointHandler, dict(url="/plugin/logging/logs")), + (r"/api/logs/(.*)", util.tornado.DeprecatedEndpointHandler, dict(url="/plugin/logging/logs/{0}")), ] # fetch additional routes from plugins diff --git a/src/octoprint/server/util/tornado.py b/src/octoprint/server/util/tornado.py index b7610b07b..f63a1c5f6 100644 --- a/src/octoprint/server/util/tornado.py +++ b/src/octoprint/server/util/tornado.py @@ -1075,6 +1075,26 @@ class StaticDataHandler(RequestlessExceptionLoggingMixin, tornado.web.RequestHan self.finish() +class DeprecatedEndpointHandler(tornado.web.RequestHandler): + def initialize(self, url): + self._url = url + self._logger = logging.getLogger(__name__) + + def _handle_method(self, *args, **kwargs): + to_url = self._url.format(*args) + self._logger.info("Redirecting deprecated endpoint {} to {}".format(self.request.path, to_url)) + self.redirect(to_url, permanent=True) + + # make all http methods trigger _handle_method + get = _handle_method + post = _handle_method + put = _handle_method + patch = _handle_method + delete = _handle_method + head = _handle_method + options = _handle_method + + class GlobalHeaderTransform(tornado.web.OutputTransform): HEADERS = dict() From bb822fb9ddd5c2fbd4c4e7950592b1a95e933288 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Wed, 7 Feb 2018 13:52:17 +0100 Subject: [PATCH 12/38] Logging: add/move docs for the plugin --- docs/api/logs.rst | 173 +------------ docs/bundledplugins/cura.rst | 2 +- docs/bundledplugins/index.rst | 1 + docs/bundledplugins/logging.rst | 238 ++++++++++++++++++ .../bundledplugins-logging-settings.png | Bin 0 -> 69633 bytes docs/jsclientlib/logs.rst | 38 +-- 6 files changed, 250 insertions(+), 202 deletions(-) create mode 100644 docs/bundledplugins/logging.rst create mode 100644 docs/images/bundledplugins-logging-settings.png diff --git a/docs/api/logs.rst b/docs/api/logs.rst index ee1c19561..f357494df 100644 --- a/docs/api/logs.rst +++ b/docs/api/logs.rst @@ -4,172 +4,9 @@ Log file management ******************* -.. note:: +Log file management (and logging configuration) was moved into a bundled plugin in OctoPrint 1.3.7. Refer to +:ref:`the Logging's plugins API ` for the API documentation. - All log file management operations require admin rights. - -.. contents:: - -.. _sec-api-logs-list: - -Retrieve a list of available log files -====================================== - -.. http:get:: /api/logs - - Retrieve information regarding all log files currently available and regarding the disk space still available - in the system on the location the log files are being stored. - - Returns a :ref:`Logfile Retrieve response `. - - **Example** - - .. sourcecode:: http - - GET /api/logs HTTP/1.1 - Host: example.com - X-Api-Key: abcdef... - - .. sourcecode:: http - - HTTP/1.1 200 OK - Content-Type: application/json - - { - "files" : [ - { - "date" : 1393158814, - "name" : "octoprint.log", - "size" : 43712, - "refs": { - "resource": "http://example.com/api/logs/octoprint.log", - "download": "http://example.com/downloads/logs/octoprint.log" - } - }, - { - "date" : 1392628936, - "name" : "octoprint.log.2014-02-17", - "size" : 13205, - "refs": { - "resource": "http://example.com/api/logs/octoprint.log.2014-02-17", - "download": "http://example.com/downloads/logs/octoprint.log.2014-02-17" - } - }, - { - "date" : 1393158814, - "name" : "serial.log", - "size" : 1798419, - "refs": { - "resource": "http://example.com/api/logs/serial.log", - "download": "http://example.com/downloads/logs/serial.log" - } - } - ], - "free": 12237201408 - } - - :statuscode 200: No error - :statuscode 403: If the given API token did not have admin rights associated with it - -.. _sec-api-logs-delete: - -Delete a specific logfile -========================= - -.. http:delete:: /api/logs/(path:filename) - - Delete the selected log file with name `filename`. - - Returns a :http:statuscode:`204` after successful deletion. - - **Example Request** - - .. sourcecode:: http - - DELETE /api/logs/octoprint.log.2014-02-17 HTTP/1.1 - Host: example.com - X-Api-Key: abcdef... - - :param filename: The filename of the log file to delete - :statuscode 204: No error - :statuscode 403: If the given API token did not have admin rights associated with it - :statuscode 404: If the file was not found - -.. _sec-api-logs-datamodel: - -Data model -========== - -.. _sec-api-logs-datamodel-retrieveresponse: - -Logfile Retrieve Response -------------------------- - -.. list-table:: - :widths: 15 5 10 30 - :header-rows: 1 - - * - Name - - Multiplicity - - Type - - Description - * - ``files`` - - 0..* - - Array of :ref:`File information items ` - - The list of requested files. Might be an empty list if no files are available - * - ``free`` - - 1 - - String - - The amount of disk space in bytes available in the local disk space (refers to OctoPrint's ``logs`` folder). - -.. _sec-api-logs-datamodel-fileinfo: - -File information ----------------- - -.. list-table:: - :widths: 15 5 10 30 - :header-rows: 1 - - * - Name - - Multiplicity - - Type - - Description - * - ``name`` - - 1 - - String - - The name of the file - * - ``size`` - - 1 - - Number - - The size of the file in bytes. - * - ``date`` - - 1 - - Unix timestamp - - The timestamp when this file was last modified. - * - ``refs`` - - 1 - - :ref:`sec-api-logs-datamodel-ref` - - References relevant to this file - -.. _sec-api-logs-datamodel-ref: - -References ----------- - -.. list-table:: - :widths: 15 5 10 30 - :header-rows: 1 - - * - Name - - Multiplicity - - Type - - Description - * - ``resource`` - - 1 - - URL - - The resource that represents the file (e.g. for deleting) - * - ``download`` - - 1 - - URL - - The download URL for the file +The former endpoints ``/api/logs`` and ``api/logs/`` are marked as deprecated but still work for now. New +client implementations should directly use the new endpoints provided by the bundled plugin. Existing implementations +should adapt their endpoints as soon as possible. diff --git a/docs/bundledplugins/cura.rst b/docs/bundledplugins/cura.rst index aac96397f..d365e9ac3 100644 --- a/docs/bundledplugins/cura.rst +++ b/docs/bundledplugins/cura.rst @@ -1,4 +1,4 @@ -.. _sec-bundledplugins_cura: +.. _sec-bundledplugins-cura: Cura ==== diff --git a/docs/bundledplugins/index.rst b/docs/bundledplugins/index.rst index d5935a96a..53516474c 100644 --- a/docs/bundledplugins/index.rst +++ b/docs/bundledplugins/index.rst @@ -9,5 +9,6 @@ Bundled Plugins cura.rst discovery.rst + logging.rst pluginmanager.rst softwareupdate.rst diff --git a/docs/bundledplugins/logging.rst b/docs/bundledplugins/logging.rst new file mode 100644 index 000000000..0fccc9e1a --- /dev/null +++ b/docs/bundledplugins/logging.rst @@ -0,0 +1,238 @@ +.. _sec-bundledplugins-logging: + +Logging +======= + +The OctoPrint Logging plugin comes bundled with OctoPrint starting with version 1.3.7. + +It implements the log management functionality that was formerly part of the core application and adds features to +configure logging levels for sub modules through the included settings dialog. + +.. _fig-bundledplugins-pluginmanager-mainscreen: +.. figure:: ../images/bundledplugins-logging-settings.png + :align: center + :alt: Logging plugin + + The settings dialog of the Logging plugin + +.. _sec-bundledplugins-logging-api: + +API +--- + +.. note:: + + All log file management operations require admin rights. + +.. _sec-bundledplugins-logging-api-list_logs: + +Retrieve a list of available log files +++++++++++++++++++++++++++++++++++++++ + +.. http:get:: /plugin/logging/logs + + Retrieve information regarding all log files currently available and regarding the disk space still available + in the system on the location the log files are being stored. + + Returns a :ref:`Logfile Retrieve response `. + + **Example** + + .. sourcecode:: http + + GET /plugin/logging/logs HTTP/1.1 + Host: example.com + X-Api-Key: abcdef... + + .. sourcecode:: http + + HTTP/1.1 200 OK + Content-Type: application/json + + { + "files" : [ + { + "date" : 1393158814, + "name" : "octoprint.log", + "size" : 43712, + "refs": { + "resource": "http://example.com/plugin/logging/logs/octoprint.log", + "download": "http://example.com/downloads/logs/octoprint.log" + } + }, + { + "date" : 1392628936, + "name" : "octoprint.log.2014-02-17", + "size" : 13205, + "refs": { + "resource": "http://example.com/plugin/logging/logs/octoprint.log.2014-02-17", + "download": "http://example.com/downloads/logs/octoprint.log.2014-02-17" + } + }, + { + "date" : 1393158814, + "name" : "serial.log", + "size" : 1798419, + "refs": { + "resource": "http://example.com/plugin/logging/logs/serial.log", + "download": "http://example.com/downloads/logs/serial.log" + } + } + ], + "free": 12237201408 + } + + :statuscode 200: No error + :statuscode 403: If the given API token did not have admin rights associated with it + +.. _sec-bundledplugins-logging-api-delete_logs: + +Delete a specific logfile ++++++++++++++++++++++++++ + +.. http:delete:: /plugin/logging/logs/(path:filename) + + Delete the selected log file with name `filename`. + + Returns a :http:statuscode:`204` after successful deletion. + + **Example Request** + + .. sourcecode:: http + + DELETE /plugin/logging/logs/octoprint.log.2014-02-17 HTTP/1.1 + Host: example.com + X-Api-Key: abcdef... + + :param filename: The filename of the log file to delete + :statuscode 204: No error + :statuscode 403: If the given API token did not have admin rights associated with it + :statuscode 404: If the file was not found + +.. _sec-bundledplugins-logging-api-datamodel: + +Data model +++++++++++ + +.. _sec-bundledplugins-logging-api-datamodel-retrieveresponse: + +Logfile Retrieve Response +~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. list-table:: + :widths: 15 5 10 30 + :header-rows: 1 + + * - Name + - Multiplicity + - Type + - Description + * - ``files`` + - 0..* + - Array of :ref:`File information items ` + - The list of requested files. Might be an empty list if no files are available + * - ``free`` + - 1 + - String + - The amount of disk space in bytes available in the local disk space (refers to OctoPrint's ``logs`` folder). + +.. _sec-bundledplugins-logging-api-datamodel-fileinfo: + +File information +~~~~~~~~~~~~~~~~ + +.. list-table:: + :widths: 15 5 10 30 + :header-rows: 1 + + * - Name + - Multiplicity + - Type + - Description + * - ``name`` + - 1 + - String + - The name of the file + * - ``size`` + - 1 + - Number + - The size of the file in bytes. + * - ``date`` + - 1 + - Unix timestamp + - The timestamp when this file was last modified. + * - ``refs`` + - 1 + - :ref:`References ` + - References relevant to this file + +.. _sec-bundledplugins-logging-api-datamodel-ref: + +References +~~~~~~~~~~ + +.. list-table:: + :widths: 15 5 10 30 + :header-rows: 1 + + * - Name + - Multiplicity + - Type + - Description + * - ``resource`` + - 1 + - URL + - The resource that represents the file (e.g. for deleting) + * - ``download`` + - 1 + - URL + - The download URL for the file + +.. _sec-bundledplugins-logging-jsclientlib: + +JS Client Library +----------------- + +:mod:`OctoPrintClient.plugins.logging` +-------------------------------------- + +.. note:: + + All methods here require that the used API token or a the existing browser session + has admin rights. + +.. js:function:: OctoPrintClient.plugins.logging.listLogs(opts) + + Retrieves a list of log files. + + See :ref:`Retrieve a list of available log files ` for details. + + :param object opts: Additional options for the request + :returns Promise: A `jQuery Promise `_ for the request's response + +.. js:function:: OctoPrintClient.plugins.logging.deleteLog(path, opts) + + Deletes the specified log ``path``. + + See :ref:`Delete a specific log file ` for details. + + :param string path: The path to the log file to delete + :param object opts: Additional options for the request + :returns Promise: A `jQuery Promise `_ for the request's response + +.. js:function:: OctoPrintClient.plugins.logging.downloadLog(path, opts) + + Downloads the specified log ``file``. + + See :js:func:`OctoPrint.download` for more details on the underlying library download mechanism. + + :param string path: The path to the log file to download + :param object opts: Additional options for the request + :returns Promise: A `jQuery Promise `_ for the request's response + +.. _sec-bundledplugins-logging-sourcecode: + +Source Code +----------- + +The source of the Logging plugin is bundled with OctoPrint and can be found in its source repository under ``src/octoprint/plugins/logging``. diff --git a/docs/images/bundledplugins-logging-settings.png b/docs/images/bundledplugins-logging-settings.png new file mode 100644 index 0000000000000000000000000000000000000000..c5b7612462ab10b88f03eecc17de35cdaae1b9bb GIT binary patch literal 69633 zcmdSB2UJsO8!pPs{DU(i=r|TS{9{3pCM_s+tPCZBw9tcuP69)d8kqS}RO%?bi!^Bg zq_-d{ATo zNc0EEAB2R2M2&yFWho@|4FUMk`%W0R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cS^B0&Z@tQ6#+JZh=r-bY~u79=1UNqT^6(yPE(J%P6$as&4Xu4e<; zCpMAdh3m0Xm?+nR&Ow(PYj~b99RT3GbYC# zP0lqt?IM|<_6k5-v?-HGnwd$Ma+m4px273}(5d>eSFDUtm#O+^=JdImn~RDt%enX6 z+oX}#)4{P7@!kWwF$eYz(G4^nXm`SPC7{5z;Ii=f;Yv&U@+_FCEk@?PVe`f zdACDHW^}e(c6Gf+!Ka9gi?ZFR6` for details. - - :param object opts: Additional options for the request - :returns Promise: A `jQuery Promise `_ for the request's response - -.. js:function:: OctoPrintClient.logs.delete(path, opts) - - Deletes the specified log ``path``. - - See :ref:`Delete a specific log file ` for details. - - :param string path: The path to the log file to delete - :param object opts: Additional options for the request - :returns Promise: A `jQuery Promise `_ for the request's response - -.. js:function:: OctoPrintClient.logs.download(path, opts) - - Downloads the specified log ``file``. - - See :js:func:`OctoPrint.download` for more details on the underlying library download mechanism. - - :param string path: The path to the log file to download - :param object opts: Additional options for the request - :returns Promise: A `jQuery Promise `_ for the request's response +Log file management (and logging configuration) was moved into a bundled plugin in OctoPrint 1.3.7. Refer to +:ref:`the Logging's plugins JS Client Library ` for the JS Client documentation. +The former module ``OctoPrintClient.logs`` and its methods are marked as deprecated but still work for now. New +client implementations should directly use the new module provided by the bundled plugin. Existing implementations +should adapt their used module as soon as possible. From b8d23c8bc123a7cefd786aa7001b71bb4fee6d39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Wed, 7 Feb 2018 16:43:08 +0100 Subject: [PATCH 13/38] Logging: Fix a return value --- src/octoprint/plugins/logging/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/octoprint/plugins/logging/__init__.py b/src/octoprint/plugins/logging/__init__.py index d227b3958..06fcab632 100644 --- a/src/octoprint/plugins/logging/__init__.py +++ b/src/octoprint/plugins/logging/__init__.py @@ -75,7 +75,7 @@ class LoggingPlugin(octoprint.plugin.AssetPlugin, @restricted_access @admin_permission.require(403) def get_logging_levels_api(self): - return jsonify(self._get_logging_levels) + return jsonify(self._get_logging_levels()) @octoprint.plugin.BlueprintPlugin.route("/setup/levels", methods=["PUT"]) @restricted_access From b79f6693516da89c47b107ebf57a0c284eef5018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Thu, 8 Feb 2018 12:28:10 +0100 Subject: [PATCH 14/38] Fix "copy all" on Terminal tab Closes #2392 --- src/octoprint/static/js/app/viewmodels/terminal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/octoprint/static/js/app/viewmodels/terminal.js b/src/octoprint/static/js/app/viewmodels/terminal.js index 0140e6e15..f5125f2d6 100644 --- a/src/octoprint/static/js/app/viewmodels/terminal.js +++ b/src/octoprint/static/js/app/viewmodels/terminal.js @@ -306,7 +306,7 @@ $(function() { }; self.copyAll = function() { - copyToClipboard(self.plainLogLines().join("\n")); + copyToClipboard(_.map(self.log(), "line").join("\n")); }; // command matching regex From f35fe32a927863008445be1fdc164dc5c824b9d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Thu, 8 Feb 2018 12:36:31 +0100 Subject: [PATCH 15/38] Better fix of "copy all" on Terminal tab See also #2392 --- src/octoprint/static/js/app/viewmodels/terminal.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/octoprint/static/js/app/viewmodels/terminal.js b/src/octoprint/static/js/app/viewmodels/terminal.js index f5125f2d6..09a9188ca 100644 --- a/src/octoprint/static/js/app/viewmodels/terminal.js +++ b/src/octoprint/static/js/app/viewmodels/terminal.js @@ -306,7 +306,15 @@ $(function() { }; self.copyAll = function() { - copyToClipboard(_.map(self.log(), "line").join("\n")); + var lines; + + if (self.fancyFunctionality()) { + lines = _.map(self.log(), "line"); + } else { + lines = self.plainLogLines(); + } + + copyToClipboard(lines.join("\n")); }; // command matching regex From 77989d2a763ac94ef0367a5a735db5ee8bc6ca40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Thu, 8 Feb 2018 15:04:36 +0100 Subject: [PATCH 16/38] Update to pyserial 3.4 --- setup.py | 2 +- src/octoprint/util/comm.py | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 2f22d210d..21bed8506 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ INSTALL_REQUIRES = [ "Flask-Babel>=0.9,<0.10", "Flask-Assets>=0.10,<0.11", "markdown>=2.6.4,<2.7", - "pyserial>=2.7,<2.8", + "pyserial>=3.4,<3.5", "netaddr>=0.7.17,<0.8", "watchdog>=0.8.3,<0.9", "sarge>=0.1.4,<0.2", diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index 6079c88d3..5d431d417 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -1954,9 +1954,17 @@ class MachineCom(object): self._log("Connecting to: %s" % port) if baudrate == 0: baudrates = baudrateList() - serial_obj = serial.Serial(str(port), 115200 if 115200 in baudrates else baudrates[0], timeout=read_timeout, writeTimeout=10000, parity=serial.PARITY_ODD) + serial_obj = serial.Serial(str(port), + 115200 if 115200 in baudrates else baudrates[0], + timeout=read_timeout, + write_timeout=10000, + parity=serial.PARITY_ODD) else: - serial_obj = serial.Serial(str(port), baudrate, timeout=read_timeout, writeTimeout=10000, parity=serial.PARITY_ODD) + serial_obj = serial.Serial(str(port), + baudrate, + timeout=read_timeout, + write_timeout=10000, + parity=serial.PARITY_ODD) serial_obj.close() serial_obj.parity = serial.PARITY_NONE serial_obj.open() From 98b71a587041287dfb6418ceed425b7227d03b64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Thu, 8 Feb 2018 15:17:12 +0100 Subject: [PATCH 17/38] Tell PySerial to cancel reads & writes on connection close Only done if the methods needed for that exist and are callable though (to prevent issues with custom serial port implementations provided through hooks, or operating systems that don't have support for cancel_read/cancel_write in PySerial. Fixes #2333 (at least as far as we'll ever be able to fix it) --- src/octoprint/util/comm.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index 5d431d417..8f063bc83 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -736,6 +736,18 @@ class MachineCom(object): deactivate_monitoring_and_send_queue() + try: + if hasattr(self._serial, "cancel_read") and callable(self._serial.cancel_read): + self._serial.cancel_read() + except: + self._logger.exception("Error while cancelling pending reads from the serial port") + + try: + if hasattr(self._serial, "cancel_write") and callable(self._serial.cancel_write): + self._serial.cancel_write() + except: + self._logger.exception("Error while cancelling pending writes to the serial port") + try: self._serial.close() except: From 066d3d7422f618096096c3444c570d38052556c8 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Sat, 27 Jan 2018 11:05:38 +0100 Subject: [PATCH 18/38] timelapse: add m4v and mkv as supported container formats Not every player can handle non-mpeg2 codecs inside a .mpg. QuickTime Player on OSX goes a step further and won't play h264-in-mp4, only h264-in-m4v. --- src/octoprint/server/__init__.py | 2 +- src/octoprint/server/api/timelapse.py | 2 +- src/octoprint/timelapse.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/octoprint/server/__init__.py b/src/octoprint/server/__init__.py index 53a5fc07d..1d80ba291 100644 --- a/src/octoprint/server/__init__.py +++ b/src/octoprint/server/__init__.py @@ -505,7 +505,7 @@ class Server(object): server_routes = self._router.urls + [ # various downloads # .mpg and .mp4 timelapses: - (r"/downloads/timelapse/([^/]*\.mp[g4])", util.tornado.LargeResponseHandler, joined_dict(dict(path=self._settings.getBaseFolder("timelapse")), + (r"/downloads/timelapse/([^/]*\.m(.*))", util.tornado.LargeResponseHandler, joined_dict(dict(path=self._settings.getBaseFolder("timelapse")), download_handler_kwargs, no_hidden_files_validator)), (r"/downloads/files/local/(.*)", util.tornado.LargeResponseHandler, joined_dict(dict(path=self._settings.getBaseFolder("uploads"), diff --git a/src/octoprint/server/api/timelapse.py b/src/octoprint/server/api/timelapse.py index 1c4b5920d..2c5af7336 100644 --- a/src/octoprint/server/api/timelapse.py +++ b/src/octoprint/server/api/timelapse.py @@ -128,7 +128,7 @@ def downloadTimelapse(filename): @api.route("/timelapse/", methods=["DELETE"]) @restricted_access def deleteTimelapse(filename): - if util.is_allowed_file(filename, ["mpg", "mpeg", "mp4"]): + if util.is_allowed_file(filename, ["mpg", "mpeg", "mp4", "m4v", "mkv"]): timelapse_folder = settings().getBaseFolder("timelapse") full_path = os.path.realpath(os.path.join(timelapse_folder, filename)) if full_path.startswith(timelapse_folder) and os.path.exists(full_path): diff --git a/src/octoprint/timelapse.py b/src/octoprint/timelapse.py index dcd2708de..e8ae50c3f 100644 --- a/src/octoprint/timelapse.py +++ b/src/octoprint/timelapse.py @@ -86,7 +86,7 @@ def get_finished_timelapses(): files = [] basedir = settings().getBaseFolder("timelapse") for entry in scandir(basedir): - if not fnmatch.fnmatch(entry.name, "*.mp[g4]"): + if not fnmatch.fnmatch(entry.name, "*.m*"): continue files.append({ "name": entry.name, From 60c7974aa43ba05ced86437f900a872ec5e29a4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Thu, 8 Feb 2018 16:53:45 +0100 Subject: [PATCH 19/38] Revert "Update to pyserial 3.4" This is causing issues on update thanks to the PySerial installation logging an error if the former version was installed through dependency resolution during OctoPrint's python setup.py install run (which is most likely the case for pretty much all live installations out there). Update (and hence activation of fix for #2333) postponed until a solution for this issue is found. This reverts commit 77989d2a763ac94ef0367a5a735db5ee8bc6ca40. --- setup.py | 2 +- src/octoprint/util/comm.py | 12 ++---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/setup.py b/setup.py index 21bed8506..2f22d210d 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ INSTALL_REQUIRES = [ "Flask-Babel>=0.9,<0.10", "Flask-Assets>=0.10,<0.11", "markdown>=2.6.4,<2.7", - "pyserial>=3.4,<3.5", + "pyserial>=2.7,<2.8", "netaddr>=0.7.17,<0.8", "watchdog>=0.8.3,<0.9", "sarge>=0.1.4,<0.2", diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index 8f063bc83..d1e8c53c2 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -1966,17 +1966,9 @@ class MachineCom(object): self._log("Connecting to: %s" % port) if baudrate == 0: baudrates = baudrateList() - serial_obj = serial.Serial(str(port), - 115200 if 115200 in baudrates else baudrates[0], - timeout=read_timeout, - write_timeout=10000, - parity=serial.PARITY_ODD) + serial_obj = serial.Serial(str(port), 115200 if 115200 in baudrates else baudrates[0], timeout=read_timeout, writeTimeout=10000, parity=serial.PARITY_ODD) else: - serial_obj = serial.Serial(str(port), - baudrate, - timeout=read_timeout, - write_timeout=10000, - parity=serial.PARITY_ODD) + serial_obj = serial.Serial(str(port), baudrate, timeout=read_timeout, writeTimeout=10000, parity=serial.PARITY_ODD) serial_obj.close() serial_obj.parity = serial.PARITY_NONE serial_obj.open() From a7a78c11d4ab16a8bd6601350b94529aca01da0e Mon Sep 17 00:00:00 2001 From: Shawn Bruce Date: Thu, 8 Feb 2018 11:44:55 -0500 Subject: [PATCH 20/38] Terminal: Autoscroll Enhancements * Disable autoscroll when scrolling up. * Scroll to bottom when autoscroll is toggled to enable. --- .../static/js/app/viewmodels/terminal.js | 15 +++++++++++++++ src/octoprint/templates/tabs/terminal.jinja2 | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/octoprint/static/js/app/viewmodels/terminal.js b/src/octoprint/static/js/app/viewmodels/terminal.js index 09a9188ca..6ee6586ce 100644 --- a/src/octoprint/static/js/app/viewmodels/terminal.js +++ b/src/octoprint/static/js/app/viewmodels/terminal.js @@ -277,6 +277,17 @@ $(function() { } }; + self.terminalScrollEvent = _.throttle(function () { + if (self.autoscrollEnabled()) { + var container = self.fancyFunctionality() ? $("#terminal-output") : $("#terminal-output-lowfi"); + var maxScroll = container[0].scrollHeight - container[0].offsetHeight; + + if (container.scrollTop() <= maxScroll ) { + self.autoscrollEnabled(false); + } + } + }, 250); + self.gotoTerminalCommand = function() { // skip if user highlights text. var sel = getSelection().toString(); @@ -289,6 +300,10 @@ $(function() { self.toggleAutoscroll = function() { self.autoscrollEnabled(!self.autoscrollEnabled()); + + if (self.autoscrollEnabled()) { + self.updateOutput(); + } }; self.selectAll = function() { diff --git a/src/octoprint/templates/tabs/terminal.jinja2 b/src/octoprint/templates/tabs/terminal.jinja2 index df5762601..ba6c20482 100644 --- a/src/octoprint/templates/tabs/terminal.jinja2 +++ b/src/octoprint/templates/tabs/terminal.jinja2 @@ -1,5 +1,5 @@
-
+
+
+
+ + s +
+ {{ _('busy protocol support detected')}}
diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index 6e86c4b0f..de2afab6f 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -420,6 +420,7 @@ class MachineCom(object): self._firmware_capabilities = dict() self._temperature_autoreporting = False + self._busy_protocol_detected = False self._supportResendsWithoutOk = settings().getBoolean(["serial", "supportResendsWithoutOk"]) @@ -1229,7 +1230,7 @@ class MachineCom(object): self._changeState(self.STATE_CONNECTING) #Start monitoring the serial port. - self._timeout = get_new_timeout("communication", self._timeout_intervals) + self._timeout = get_new_timeout("communicationBusy" if self._busy_protocol_detected else "communication", self._timeout_intervals) startSeen = False supportRepetierTargetTemp = settings().getBoolean(["feature", "repetierTargetTemp"]) @@ -1250,13 +1251,33 @@ class MachineCom(object): break if line.strip() is not "": self._consecutive_timeouts = 0 - self._timeout = get_new_timeout("communication", self._timeout_intervals) + self._timeout = get_new_timeout("communicationBusy" if self._busy_protocol_detected else "communication", self._timeout_intervals) if self._dwelling_until and now > self._dwelling_until: self._dwelling_until = False + ##~~ busy protocol handling + if line.startswith("echo:busy:") or line.startswith("busy:"): + # make sure the printer sends busy in a small enough interval to match our timeout + if not self._busy_protocol_detected: + self._log("Printer seems to support the busy protocol, adjusting timeouts and setting busy " + "interval accordingly") + self._busy_protocol_detected = True + + new_communication_timeout = self._timeout_intervals.get("communicationBusy", 2) + self._serial.timeout = new_communication_timeout + busy_interval = max(int(new_communication_timeout) - 1, 1) + + self._logger.info("Printer seems to support the busy protocol, telling it to set the busy " + "interval to our \"communicationBusy\" timeout - 1s = {}s".format(busy_interval)) + + self._set_busy_protocol_interval(interval=busy_interval) + + if self._state not in (self.STATE_CONNECTING, self.STATE_DETECT_BAUDRATE): + continue + ##~~ debugging output handling - if line.startswith("//"): + elif line.startswith("//"): debugging_output = line[2:].strip() if debugging_output.startswith("action:"): action_command = debugging_output[len("action:"):].strip() @@ -1277,7 +1298,8 @@ class MachineCom(object): except: self._logger.exception("Error while calling hook {} with action command {}".format(self._printer_action_hooks[hook], action_command)) continue - else: + + if self._state not in (self.STATE_CONNECTING, self.STATE_DETECT_BAUDRATE): continue def convert_line(line): @@ -1488,7 +1510,7 @@ class MachineCom(object): if capability == self.CAPABILITY_AUTOREPORT_TEMP and enabled: self._logger.info("Firmware states that it supports temperature autoreporting") - self._set_autoreport_temperature() + self._set_autoreport_temperature_interval() ##~~ SD Card handling elif 'SD init fail' in line or 'volume.init failed' in line or 'openRoot failed' in line: @@ -1594,7 +1616,7 @@ class MachineCom(object): self._serial.timeout = connection_timeout self._log("Trying baudrate: %d" % (baudrate)) self._baudrateDetectRetry = 5 - self._timeout = get_new_timeout("communication", self._timeout_intervals) + self._timeout = get_new_timeout("communicationBusy" if self._busy_protocol_detected else "communication", self._timeout_intervals) self._serial.write('\n') self.sayHello() except: @@ -1830,7 +1852,7 @@ class MachineCom(object): if self.isOperational() and not self._connection_closing and self.isSdPrinting() and not self._long_running_command and not self._dwelling_until and not self._heating: self.sendCommand("M27", cmd_type="sd_status_poll") - def _set_autoreport_temperature(self, interval=None): + def _set_autoreport_temperature_interval(self, interval=None): if interval is None: try: interval = int(self._timeout_intervals.get("temperatureAutoreport", 2)) @@ -1838,6 +1860,14 @@ class MachineCom(object): interval = 2 self.sendCommand("M155 S{}".format(interval)) + def _set_busy_protocol_interval(self, interval=None): + if interval is None: + try: + interval = max(int(self._timeout_intervals.get("communicationBusy", 3)) - 1, 1) + except: + interval = 2 + self.sendCommand("M113 S{}".format(interval)) + def _onConnected(self): self._serial.timeout = settings().getFloat(["serial", "timeout", "communication"]) self._temperature_timer = RepeatedTimer(self._getTemperatureTimerInterval, self._poll_temperature, run_first=True) @@ -1862,7 +1892,9 @@ class MachineCom(object): self.resetLineNumbers() if self._temperature_autoreporting: - self._set_autoreport_temperature() + self._set_autoreport_temperature_interval() + if self._busy_protocol_detected: + self._set_busy_protocol_interval() def _getTemperatureTimerInterval(self): busy_default = 4.0 @@ -2803,7 +2835,7 @@ class MachineCom(object): elif s_match: _timeout = float(s_match.group("value")) - self._timeout = get_new_timeout("communication", self._timeout_intervals) + _timeout + self._timeout = get_new_timeout("communicationBusy" if self._busy_protocol_detected else "communication", self._timeout_intervals) + _timeout self._dwelling_until = time.time() + _timeout ##~~ command phase handlers From 8732ec9756d2b43c06d35160582a7542babda138 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Wed, 14 Feb 2018 16:59:53 +0100 Subject: [PATCH 27/38] Introduce ok timeout to detect stalls in auto report scenarios If a printer supports auto reporting the temperature but doesn't also support sending "wait" if the command buffer runs dry, it can happen that a lost "ok" never gets detected properly because no timeout is ever triggered (the printer is in fact sending data after all), but we should actually try to get comms running again. Introducing a custom ok timeout solves this. We reset this every time we see an "ok", "wait" or "busy", but if we run into it while printing we perform the same steps as if we hadn't received any data at all from the printer over the duration of the currently active communication timeout value (whether to choose "communication" or "communicationBusy" here depends on whether we also detected support of the busy protocol or not). --- src/octoprint/util/comm.py | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index de2afab6f..48dbfd514 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -375,6 +375,7 @@ class MachineCom(object): self._connection_closing = False self._timeout = None + self._ok_timeout = None self._timeout_intervals = dict() for key, value in settings().get(["serial", "timeout"], merged=True, asdict=True).items(): try: @@ -1231,6 +1232,7 @@ class MachineCom(object): #Start monitoring the serial port. self._timeout = get_new_timeout("communicationBusy" if self._busy_protocol_detected else "communication", self._timeout_intervals) + self._ok_timeout = get_new_timeout("communicationBusy" if self._busy_protocol_detected else "communication", self._timeout_intervals) startSeen = False supportRepetierTargetTemp = settings().getBoolean(["feature", "repetierTargetTemp"]) @@ -1258,6 +1260,9 @@ class MachineCom(object): ##~~ busy protocol handling if line.startswith("echo:busy:") or line.startswith("busy:"): + # reset the ok timeout, the regular comm timeout has already been reset + self._ok_timeout = get_new_timeout("communicationBusy" if self._busy_protocol_detected else "communication", self._timeout_intervals) + # make sure the printer sends busy in a small enough interval to match our timeout if not self._busy_protocol_detected: self._log("Printer seems to support the busy protocol, adjusting timeouts and setting busy " @@ -1358,10 +1363,25 @@ class MachineCom(object): handled = True # process timeouts - elif line == "" and (not self._blockWhileDwelling or not self._dwelling_until or now > self._dwelling_until) and now > self._timeout: - # timeout only considered handled if the printer is printing + elif ((line == "" and now > self._timeout) or (self.isPrinting() and now > self._ok_timeout)) \ + and (not self._blockWhileDwelling or not self._dwelling_until or now > self._dwelling_until): + # We have two timeout variants: + # + # Variant 1: No line at all received within the communication timeout. This can always happen. + # + # Variant 2: No ok received while printing within the communication timeout. This can happen if + # temperatures are auto reported, because then we'll continue to receive data from the + # firmware in fairly regular intervals, even if an ok got lost somewhere and the firmware + # is running dry but not sending a wait. + # + # Both variants can only happen if we are not currently blocked by a dwelling command + self._handle_timeout() - handled = self.isPrinting() + self._ok_timeout = get_new_timeout("communicationBusy" if self._busy_protocol_detected else "communication", self._timeout_intervals) + + # timeout only considered handled if the printer is printing and it was a comm timeout, not an ok + # timeout + handled = self.isPrinting() and line == "" # we don't have to process the rest if the line has already been handled fully if handled and self._state not in (self.STATE_CONNECTING, self.STATE_DETECT_BAUDRATE): @@ -1681,6 +1701,7 @@ class MachineCom(object): self._log("Connection closed, closing down monitor") def _handle_ok(self): + self._ok_timeout = get_new_timeout("communicationBusy" if self._busy_protocol_detected else "communication", self._timeout_intervals) self._clear_to_send.set() # reset long running commands, persisted current tools and heatup counters on ok From be3907c7d1268425ca1b0a976c2ecbdf6d6135ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Thu, 15 Feb 2018 11:52:13 +0100 Subject: [PATCH 28/38] Allow disabling busy & autoreport support --- src/octoprint/server/api/settings.py | 6 +++++- src/octoprint/settings.py | 5 +++++ .../static/js/app/viewmodels/settings.js | 2 ++ .../dialogs/settings/serialconnection.jinja2 | 14 +++++++++++++ src/octoprint/util/comm.py | 21 +++++++++++++++---- 5 files changed, 43 insertions(+), 5 deletions(-) diff --git a/src/octoprint/server/api/settings.py b/src/octoprint/server/api/settings.py index 8e74e22c7..3f035f22e 100644 --- a/src/octoprint/server/api/settings.py +++ b/src/octoprint/server/api/settings.py @@ -162,7 +162,9 @@ def getSettings(): "supportResendsWithoutOk": s.getBoolean(["serial", "supportResendsWithoutOk"]), "maxTimeoutsIdle": s.getInt(["serial", "maxCommunicationTimeouts", "idle"]), "maxTimeoutsPrinting": s.getInt(["serial", "maxCommunicationTimeouts", "printing"]), - "maxTimeoutsLong": s.getInt(["serial", "maxCommunicationTimeouts", "long"]) + "maxTimeoutsLong": s.getInt(["serial", "maxCommunicationTimeouts", "long"]), + "capAutoreportTemp": s.getBoolean(["serial", "capabilities", "autoreport_temp"]), + "capBusyProtocol": s.getBoolean(["serial", "capabilities", "busy_protocol"]) }, "folder": { "uploads": s.getBaseFolder("uploads"), @@ -389,6 +391,8 @@ def _saveSettings(data): if "maxTimeoutsIdle" in data["serial"]: s.setInt(["serial", "maxCommunicationTimeouts", "idle"], data["serial"]["maxTimeoutsIdle"]) if "maxTimeoutsPrinting" in data["serial"]: s.setInt(["serial", "maxCommunicationTimeouts", "printing"], data["serial"]["maxTimeoutsPrinting"]) if "maxTimeoutsLong" in data["serial"]: s.setInt(["serial", "maxCommunicationTimeouts", "long"], data["serial"]["maxTimeoutsLong"]) + if "capAutoreportTemp" in data["serial"]: s.setBoolean(["serial", "capabilities", "autoreport_temp"], data["serial"]["capAutoreportTemp"]) + if "capBusyProtocol" in data["serial"]: s.setBoolean(["serial", "capabilities", "busy_protocol"], data["serial"]["capBusyProtocol"]) oldLog = s.getBoolean(["serial", "log"]) if "log" in data["serial"]: s.setBoolean(["serial", "log"], data["serial"]["log"]) diff --git a/src/octoprint/settings.py b/src/octoprint/settings.py index b35db756f..4b9301705 100644 --- a/src/octoprint/settings.py +++ b/src/octoprint/settings.py @@ -119,6 +119,11 @@ default_settings = { "logPositionOnPause": True, "logPositionOnCancel": True, + "capabilities": { + "autoreport_temp": True, + "busy_protocol": True + }, + # command specific flags "triggerOkForM29": True }, diff --git a/src/octoprint/static/js/app/viewmodels/settings.js b/src/octoprint/static/js/app/viewmodels/settings.js index d6d6fb73d..6997b94d1 100644 --- a/src/octoprint/static/js/app/viewmodels/settings.js +++ b/src/octoprint/static/js/app/viewmodels/settings.js @@ -181,6 +181,8 @@ $(function() { self.serial_maxTimeoutsIdle = ko.observable(undefined); self.serial_maxTimeoutsPrinting = ko.observable(undefined); self.serial_maxTimeoutsLong = ko.observable(undefined); + self.serial_capAutoreportTemp = ko.observable(undefined); + self.serial_capBusyProtocol = ko.observable(undefined); self.folder_uploads = ko.observable(undefined); self.folder_timelapse = ko.observable(undefined); diff --git a/src/octoprint/templates/dialogs/settings/serialconnection.jinja2 b/src/octoprint/templates/dialogs/settings/serialconnection.jinja2 index c7d0f12e3..626244265 100644 --- a/src/octoprint/templates/dialogs/settings/serialconnection.jinja2 +++ b/src/octoprint/templates/dialogs/settings/serialconnection.jinja2 @@ -128,6 +128,20 @@
+
+
+ +
+
+
+
+ +
+
diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index 48dbfd514..ae1d8ed21 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -333,6 +333,11 @@ class MachineCom(object): STATE_TRANSFERING_FILE = 11 CAPABILITY_AUTOREPORT_TEMP = "AUTOREPORT_TEMP" + CAPABILITY_BUSY_PROTOCOL = "BUSY_PROTOCOL" + + CAPABILITY_SUPPORT_ENABLED = "enabled" + CAPABILITY_SUPPORT_DETECTED = "detected" + CAPABILITY_SUPPORT_DISABLED = "disabled" def __init__(self, port = None, baudrate=None, callbackObject=None, printerProfileManager=None): self._logger = logging.getLogger(__name__) @@ -408,6 +413,12 @@ class MachineCom(object): self._currentLine = 1 self._line_mutex = threading.RLock() self._resendDelta = None + + self._capability_support = { + self.CAPABILITY_AUTOREPORT_TEMP: settings().getBoolean(["serial", "capabilities", "autoreport_temp"]), + self.CAPABILITY_BUSY_PROTOCOL: settings().getBoolean(["serial", "capabilities", "busy_protocol"]) + } + self._lastLines = deque([], 50) self._lastCommError = None self._lastResendNumber = None @@ -1264,7 +1275,8 @@ class MachineCom(object): self._ok_timeout = get_new_timeout("communicationBusy" if self._busy_protocol_detected else "communication", self._timeout_intervals) # make sure the printer sends busy in a small enough interval to match our timeout - if not self._busy_protocol_detected: + if not self._busy_protocol_detected and self._capability_support.get(self.CAPABILITY_BUSY_PROTOCOL, + False): self._log("Printer seems to support the busy protocol, adjusting timeouts and setting busy " "interval accordingly") self._busy_protocol_detected = True @@ -1528,9 +1540,10 @@ class MachineCom(object): capability, enabled = parsed self._firmware_capabilities[capability] = enabled - if capability == self.CAPABILITY_AUTOREPORT_TEMP and enabled: - self._logger.info("Firmware states that it supports temperature autoreporting") - self._set_autoreport_temperature_interval() + if self._capability_support.get(capability, False): + if capability == self.CAPABILITY_AUTOREPORT_TEMP and enabled: + self._logger.info("Firmware states that it supports temperature autoreporting") + self._set_autoreport_temperature_interval() ##~~ SD Card handling elif 'SD init fail' in line or 'volume.init failed' in line or 'openRoot failed' in line: From 5c63e618b1df6e9e468d59672b4617f3bf96a39f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Thu, 15 Feb 2018 16:59:27 +0100 Subject: [PATCH 29/38] Refactor serial settings * migrate several actually serial & protocol related settings from feature settings to serial settings * migrate terminal auto uppercase blacklist from serial settings to feature settings * restructure the serial settings dialog * adjust docs accordingly --- docs/configuration/config_yaml.rst | 118 ++-- src/octoprint/server/api/settings.py | 48 +- src/octoprint/settings.py | 80 ++- .../static/js/app/viewmodels/settings.js | 74 ++- .../static/js/app/viewmodels/terminal.js | 2 +- .../dialogs/settings/features.jinja2 | 78 +-- .../dialogs/settings/serialconnection.jinja2 | 534 +++++++++++------- 7 files changed, 534 insertions(+), 400 deletions(-) diff --git a/docs/configuration/config_yaml.rst b/docs/configuration/config_yaml.rst index c5df5727f..d3d76de2b 100644 --- a/docs/configuration/config_yaml.rst +++ b/docs/configuration/config_yaml.rst @@ -533,52 +533,16 @@ Use the following settings to enable or disable OctoPrint features: .. code-block:: yaml feature: + # Whether to enable the gcode viewer in the UI or not gCodeVisualizer: true # Whether to enable the temperature graph in the UI or not temperatureGraph: true - # Specifies whether OctoPrint should wait for the start response from the printer before trying to send commands - # during connect. - waitForStartOnConnect: false - - # Specifies whether OctoPrint should send linenumber + checksum with every printer command. Needed for - # successful communication with Repetier firmware - alwaysSendChecksum: false - - # Specifies whether OctoPrint should also send linenumber + checksum with commands that are *not* - # detected as valid GCODE (as in, they do not match the regular expression "^\s*([GM]\d+|T)"). - sendChecksumWithUnknownCommands: false - - # Specifies whether OctoPrint should also use up acknowledgments ("ok") for commands that are *not* - # detected as valid GCODE (as in, they do not match the regular expression "^\s*([GM]\d+|T)"). - unknownCommandsNeedAck: false - - # Whether to ignore the first ok after a resend response. Needed for successful communication with - # Repetier firmware - swallowOkAfterResend: false - # Specifies whether support for SD printing and file management should be enabled sdSupport: true - # Specifies whether firmware expects relative paths for selecting SD files - sdRelativePath: false - - # Whether to always assume that an SD card is present in the printer. - # Needed by some firmwares which don't report the SD card status properly. - sdAlwaysAvailable: false - - # Whether the printer sends repetier style target temperatures in the format - # TargetExtr0: - # instead of attaching that information to the regular M105 responses - repetierTargetTemp: false - - # Whether to enable external heatup detection (to detect heatup triggered e.g. through the printer's LCD panel or - # while printing from SD) or not. Causes issues with Repetier's "first ok then response" approach to - # communication, so disable for printers running Repetier firmware. - externalHeatupDetection: true - # Whether to enable the keyboard control feature in the control tab keyboardControl: true @@ -586,28 +550,16 @@ Use the following settings to enable or disable OctoPrint features: # notifications instead (false) pollWatched: false - # Whether to ignore identical resends from the printer (true, repetier) or not (false) - ignoreIdenticalResends: false - - # If ignoredIdenticalResends is true, how many consecutive identical resends to ignore - identicalResendsCount: 7 - - # Whether to support F on its own as a valid GCODE command (true) or not (false) - supportFAsCommand: false - # Whether to enable model size detection and warning (true) or not (false) modelSizeDetection: true - # Whether to attempt to auto detect the firmware of the printer and adjust settings - # accordingly (true) or not and rely on manual configuration (false) - firmwareDetection: true - # Whether to show a confirmation on print cancelling (true) or not (false) printCancelConfirmation: true - # Whether to block all sending to the printer while a G4 (dwell) command is active (true, repetier) - # or not (false) - blockWhileDwelling: false + # Commands that should never be auto-uppercased when sent to the printer through the Terminal tab. + # Defaults to only M117. + autoUppercaseBlacklist: + - M117 .. _sec-configuration-config_yaml-folder: @@ -835,7 +787,7 @@ Use the following settings to configure the serial connection to the printer: # Maximum number of write attempts to serial during which nothing can be written before the communication # with the printer is considered dead and OctoPrint will disconnect with an error - maxWritePasses: + maxWritePasses: 5 # Use this to define additional patterns to consider for serial port listing. Must be a valid # "glob" pattern (see http://docs.python.org/2/library/glob.html). Defaults to not set. @@ -869,10 +821,6 @@ Use the following settings to configure the serial connection to the printer: helloCommand: - M110 N0 - # Commands that should never be auto-uppercased when sent to the printer. Defaults to only M117. - autoUppercaseBlacklist: - - M117 - # Whether to disconnect on errors or not disconnectOnErrors: true @@ -883,6 +831,60 @@ Use the following settings to configure the serial connection to the printer: # impact, leave on if possible please logResends: true + # Specifies whether OctoPrint should wait for the start response from the printer before trying to send commands + # during connect. + waitForStartOnConnect: false + + # Specifies whether OctoPrint should send linenumber + checksum with every printer command. Needed for + # successful communication with Repetier firmware + alwaysSendChecksum: false + + # Specifies whether OctoPrint should also send linenumber + checksum with commands that are *not* + # detected as valid GCODE (as in, they do not match the regular expression "^\s*([GM]\d+|T)"). + sendChecksumWithUnknownCommands: false + + # Specifies whether OctoPrint should also use up acknowledgments ("ok") for commands that are *not* + # detected as valid GCODE (as in, they do not match the regular expression "^\s*([GM]\d+|T)"). + unknownCommandsNeedAck: false + + # Whether to ignore the first ok after a resend response. Needed for successful communication with + # Repetier firmware + swallowOkAfterResend: false + + # Specifies whether firmware expects relative paths for selecting SD files + sdRelativePath: false + + # Whether to always assume that an SD card is present in the printer. + # Needed by some firmwares which don't report the SD card status properly. + sdAlwaysAvailable: false + + # Whether the printer sends repetier style target temperatures in the format + # TargetExtr0: + # instead of attaching that information to the regular M105 responses + repetierTargetTemp: false + + # Whether to enable external heatup detection (to detect heatup triggered e.g. through the printer's LCD panel or + # while printing from SD) or not. Causes issues with Repetier's "first ok then response" approach to + # communication, so disable for printers running Repetier firmware. + externalHeatupDetection: true + + # Whether to ignore identical resends from the printer (true, repetier) or not (false) + ignoreIdenticalResends: false + + # If ignoredIdenticalResends is true, how many consecutive identical resends to ignore + identicalResendsCount: 7 + + # Whether to support F on its own as a valid GCODE command (true) or not (false) + supportFAsCommand: false + + # Whether to attempt to auto detect the firmware of the printer and adjust settings + # accordingly (true) or not and rely on manual configuration (false) + firmwareDetection: true + + # Whether to block all sending to the printer while a G4 (dwell) command is active (true, repetier) + # or not (false) + blockWhileDwelling: false + # Whether to support resends without follow-up ok or not supportResendsWithoutOk: false diff --git a/src/octoprint/server/api/settings.py b/src/octoprint/server/api/settings.py index 3f035f22e..0ea189907 100644 --- a/src/octoprint/server/api/settings.py +++ b/src/octoprint/server/api/settings.py @@ -114,23 +114,13 @@ def getSettings(): "sizeThreshold": s.getInt(["gcodeViewer", "sizeThreshold"]), "mobileSizeThreshold": s.getInt(["gcodeViewer", "mobileSizeThreshold"]), "temperatureGraph": s.getBoolean(["feature", "temperatureGraph"]), - "waitForStart": s.getBoolean(["feature", "waitForStartOnConnect"]), - "alwaysSendChecksum": s.getBoolean(["feature", "alwaysSendChecksum"]), - "neverSendChecksum": s.getBoolean(["feature", "neverSendChecksum"]), "sdSupport": s.getBoolean(["feature", "sdSupport"]), - "sdRelativePath": s.getBoolean(["feature", "sdRelativePath"]), - "sdAlwaysAvailable": s.getBoolean(["feature", "sdAlwaysAvailable"]), - "swallowOkAfterResend": s.getBoolean(["feature", "swallowOkAfterResend"]), - "repetierTargetTemp": s.getBoolean(["feature", "repetierTargetTemp"]), - "externalHeatupDetection": s.getBoolean(["feature", "externalHeatupDetection"]), "keyboardControl": s.getBoolean(["feature", "keyboardControl"]), "pollWatched": s.getBoolean(["feature", "pollWatched"]), - "ignoreIdenticalResends": s.getBoolean(["feature", "ignoreIdenticalResends"]), "modelSizeDetection": s.getBoolean(["feature", "modelSizeDetection"]), - "firmwareDetection": s.getBoolean(["feature", "firmwareDetection"]), "printCancelConfirmation": s.getBoolean(["feature", "printCancelConfirmation"]), - "blockWhileDwelling": s.getBoolean(["feature", "blockWhileDwelling"]), "g90InfluencesExtruder": s.getBoolean(["feature", "g90InfluencesExtruder"]), + "autoUppercaseBlacklist": s.get(["feature", "autoUppercaseBlacklist"]), "legacyPluginAssets": s.getBoolean(["feature", "legacyPluginAssets"]) }, "serial": { @@ -156,10 +146,20 @@ def getSettings(): "ignoreErrorsFromFirmware": s.getBoolean(["serial", "ignoreErrorsFromFirmware"]), "disconnectOnErrors": s.getBoolean(["serial", "disconnectOnErrors"]), "triggerOkForM29": s.getBoolean(["serial", "triggerOkForM29"]), - "autoUppercaseBlacklist": s.get(["serial", "autoUppercaseBlacklist"]), "logPositionOnPause": s.getBoolean(["serial", "logPositionOnPause"]), "logPositionOnCancel": s.getBoolean(["serial", "logPositionOnCancel"]), "supportResendsWithoutOk": s.getBoolean(["serial", "supportResendsWithoutOk"]), + "waitForStart": s.getBoolean(["serial", "waitForStartOnConnect"]), + "alwaysSendChecksum": s.getBoolean(["serial", "alwaysSendChecksum"]), + "neverSendChecksum": s.getBoolean(["serial", "neverSendChecksum"]), + "sdRelativePath": s.getBoolean(["serial", "sdRelativePath"]), + "sdAlwaysAvailable": s.getBoolean(["serial", "sdAlwaysAvailable"]), + "swallowOkAfterResend": s.getBoolean(["serial", "swallowOkAfterResend"]), + "repetierTargetTemp": s.getBoolean(["serial", "repetierTargetTemp"]), + "externalHeatupDetection": s.getBoolean(["serial", "externalHeatupDetection"]), + "ignoreIdenticalResends": s.getBoolean(["serial", "ignoreIdenticalResends"]), + "firmwareDetection": s.getBoolean(["serial", "firmwareDetection"]), + "blockWhileDwelling": s.getBoolean(["serial", "blockWhileDwelling"]), "maxTimeoutsIdle": s.getInt(["serial", "maxCommunicationTimeouts", "idle"]), "maxTimeoutsPrinting": s.getInt(["serial", "maxCommunicationTimeouts", "printing"]), "maxTimeoutsLong": s.getInt(["serial", "maxCommunicationTimeouts", "long"]), @@ -345,24 +345,14 @@ def _saveSettings(data): if "sizeThreshold" in data["feature"]: s.setInt(["gcodeViewer", "sizeThreshold"], data["feature"]["sizeThreshold"]) if "mobileSizeThreshold" in data["feature"]: s.setInt(["gcodeViewer", "mobileSizeThreshold"], data["feature"]["mobileSizeThreshold"]) if "temperatureGraph" in data["feature"]: s.setBoolean(["feature", "temperatureGraph"], data["feature"]["temperatureGraph"]) - if "waitForStart" in data["feature"]: s.setBoolean(["feature", "waitForStartOnConnect"], data["feature"]["waitForStart"]) - if "alwaysSendChecksum" in data["feature"]: s.setBoolean(["feature", "alwaysSendChecksum"], data["feature"]["alwaysSendChecksum"]) - if "neverSendChecksum" in data["feature"]: s.setBoolean(["feature", "neverSendChecksum"], data["feature"]["neverSendChecksum"]) if "sdSupport" in data["feature"]: s.setBoolean(["feature", "sdSupport"], data["feature"]["sdSupport"]) - if "sdRelativePath" in data["feature"]: s.setBoolean(["feature", "sdRelativePath"], data["feature"]["sdRelativePath"]) - if "sdAlwaysAvailable" in data["feature"]: s.setBoolean(["feature", "sdAlwaysAvailable"], data["feature"]["sdAlwaysAvailable"]) - if "swallowOkAfterResend" in data["feature"]: s.setBoolean(["feature", "swallowOkAfterResend"], data["feature"]["swallowOkAfterResend"]) - if "repetierTargetTemp" in data["feature"]: s.setBoolean(["feature", "repetierTargetTemp"], data["feature"]["repetierTargetTemp"]) - if "externalHeatupDetection" in data["feature"]: s.setBoolean(["feature", "externalHeatupDetection"], data["feature"]["externalHeatupDetection"]) if "keyboardControl" in data["feature"]: s.setBoolean(["feature", "keyboardControl"], data["feature"]["keyboardControl"]) if "pollWatched" in data["feature"]: s.setBoolean(["feature", "pollWatched"], data["feature"]["pollWatched"]) - if "ignoreIdenticalResends" in data["feature"]: s.setBoolean(["feature", "ignoreIdenticalResends"], data["feature"]["ignoreIdenticalResends"]) if "modelSizeDetection" in data["feature"]: s.setBoolean(["feature", "modelSizeDetection"], data["feature"]["modelSizeDetection"]) - if "firmwareDetection" in data["feature"]: s.setBoolean(["feature", "firmwareDetection"], data["feature"]["firmwareDetection"]) if "printCancelConfirmation" in data["feature"]: s.setBoolean(["feature", "printCancelConfirmation"], data["feature"]["printCancelConfirmation"]) - if "blockWhileDwelling" in data["feature"]: s.setBoolean(["feature", "blockWhileDwelling"], data["feature"]["blockWhileDwelling"]) if "g90InfluencesExtruder" in data["feature"]: s.setBoolean(["feature", "g90InfluencesExtruder"], data["feature"]["g90InfluencesExtruder"]) if "legacyPluginAssets" in data["feature"]: s.setBoolean(["feature", "legacyPluginAssets"], data["feature"]["legacyPluginAssets"]) + if "autoUppercaseBlacklist" in data["feature"] and isinstance(data["feature"]["autoUppercaseBlacklist"], (list, tuple)): s.set(["feature", "autoUppercaseBlacklist"], data["feature"]["autoUppercaseBlacklist"]) if "serial" in data.keys(): if "autoconnect" in data["serial"]: s.setBoolean(["serial", "autoconnect"], data["serial"]["autoconnect"]) @@ -384,8 +374,18 @@ def _saveSettings(data): if "ignoreErrorsFromFirmware" in data["serial"]: s.setBoolean(["serial", "ignoreErrorsFromFirmware"], data["serial"]["ignoreErrorsFromFirmware"]) if "disconnectOnErrors" in data["serial"]: s.setBoolean(["serial", "disconnectOnErrors"], data["serial"]["disconnectOnErrors"]) if "triggerOkForM29" in data["serial"]: s.setBoolean(["serial", "triggerOkForM29"], data["serial"]["triggerOkForM29"]) - if "autoUppercaseBlacklist" in data["serial"] and isinstance(data["serial"]["autoUppercaseBlacklist"], (list, tuple)): s.set(["serial", "autoUppercaseBlacklist"], data["serial"]["autoUppercaseBlacklist"]) if "supportResendsWithoutOk" in data["serial"]: s.setBoolean(["serial", "supportResendsWithoutOk"], data["serial"]["supportResendsWithoutOk"]) + if "waitForStart" in data["serial"]: s.setBoolean(["serial", "waitForStartOnConnect"], data["serial"]["waitForStart"]) + if "alwaysSendChecksum" in data["serial"]: s.setBoolean(["serial", "alwaysSendChecksum"], data["serial"]["alwaysSendChecksum"]) + if "neverSendChecksum" in data["serial"]: s.setBoolean(["serial", "neverSendChecksum"], data["serial"]["neverSendChecksum"]) + if "sdRelativePath" in data["serial"]: s.setBoolean(["serial", "sdRelativePath"], data["serial"]["sdRelativePath"]) + if "sdAlwaysAvailable" in data["serial"]: s.setBoolean(["serial", "sdAlwaysAvailable"], data["serial"]["sdAlwaysAvailable"]) + if "swallowOkAfterResend" in data["serial"]: s.setBoolean(["serial", "swallowOkAfterResend"], data["serial"]["swallowOkAfterResend"]) + if "repetierTargetTemp" in data["serial"]: s.setBoolean(["serial", "repetierTargetTemp"], data["serial"]["repetierTargetTemp"]) + if "externalHeatupDetection" in data["serial"]: s.setBoolean(["serial", "externalHeatupDetection"], data["serial"]["externalHeatupDetection"]) + if "ignoreIdenticalResends" in data["serial"]: s.setBoolean(["serial", "ignoreIdenticalResends"], data["serial"]["ignoreIdenticalResends"]) + if "firmwareDetection" in data["serial"]: s.setBoolean(["serial", "firmwareDetection"], data["serial"]["firmwareDetection"]) + if "blockWhileDwelling" in data["serial"]: s.setBoolean(["serial", "blockWhileDwelling"], data["serial"]["blockWhileDwelling"]) if "logPositionOnPause" in data["serial"]: s.setBoolean(["serial", "logPositionOnPause"], data["serial"]["logPositionOnPause"]) if "logPositionOnCancel" in data["serial"]: s.setBoolean(["serial", "logPositionOnCancel"], data["serial"]["logPositionOnCancel"]) if "maxTimeoutsIdle" in data["serial"]: s.setInt(["serial", "maxCommunicationTimeouts", "idle"], data["serial"]["maxTimeoutsIdle"]) diff --git a/src/octoprint/settings.py b/src/octoprint/settings.py index 4b9301705..64eb8e829 100644 --- a/src/octoprint/settings.py +++ b/src/octoprint/settings.py @@ -114,10 +114,25 @@ default_settings = { "disconnectOnErrors": True, "ignoreErrorsFromFirmware": False, "logResends": True, - "autoUppercaseBlacklist": ["M117"], "supportResendsWithoutOk": False, "logPositionOnPause": True, "logPositionOnCancel": True, + "waitForStartOnConnect": False, + "alwaysSendChecksum": False, + "neverSendChecksum": False, + "sendChecksumWithUnknownCommands": False, + "unknownCommandsNeedAck": False, + "sdRelativePath": False, + "sdAlwaysAvailable": False, + "swallowOkAfterResend": True, + "repetierTargetTemp": False, + "externalHeatupDetection": True, + "supportWait": True, + "ignoreIdenticalResends": False, + "identicalResendsCountdown": 7, + "supportFAsCommand": False, + "firmwareDetection": True, + "blockWhileDwelling": False, "capabilities": { "autoreport_temp": True, @@ -210,27 +225,12 @@ default_settings = { }, "feature": { "temperatureGraph": True, - "waitForStartOnConnect": False, - "alwaysSendChecksum": False, - "neverSendChecksum": False, - "sendChecksumWithUnknownCommands": False, - "unknownCommandsNeedAck": False, "sdSupport": True, - "sdRelativePath": False, - "sdAlwaysAvailable": False, - "swallowOkAfterResend": True, - "repetierTargetTemp": False, - "externalHeatupDetection": True, - "supportWait": True, "keyboardControl": True, "pollWatched": False, - "ignoreIdenticalResends": False, - "identicalResendsCountdown": 7, - "supportFAsCommand": False, "modelSizeDetection": True, - "firmwareDetection": True, "printCancelConfirmation": True, - "blockWhileDwelling": False, + "autoUppercaseBlacklist": ["M117"], "g90InfluencesExtruder": False, "legacyPluginAssets": False # TODO remove again in 1.3.8 }, @@ -908,7 +908,8 @@ class Settings(object): self._migrate_reverse_proxy_config, self._migrate_printer_parameters, self._migrate_gcode_scripts, - self._migrate_core_system_commands + self._migrate_core_system_commands, + self._migrate_serial_features ) for migrate in migrators: @@ -1172,6 +1173,49 @@ class Settings(object): return changed + def _migrate_serial_features(self, config): + """ + Migrates feature flags identified as serial specific from the feature to the serial config tree and vice versa. + + If a flag already exists in the target tree, only deletes the copy in the source tree. + """ + changed = False + + FEATURE_TO_SERIAL = ("waitForStartOnConnect", "alwaysSendChecksum", "neverSendChecksum", + "sendChecksumWithUnknownCommands", "unknownCommandsNeedAck", "sdRelativePath", + "sdAlwaysAvailable", "swallowOkAfterResend", "repetierTargetTemp", + "externalHeatupDetection", "supportWait", "ignoreIdenticalResends", + "identicalResendsCountdown", "supportFAsCommand", "firmwareDetection", + "blockWhileDwelling") + SERIAL_TO_FEATURE = ("autoUppercaseBlacklist",) + + def migrate_key(key, source, target): + if source in config and key in config[source]: + if config.get(target) is None: + # make sure we have a serial tree + config[target] = dict() + if key not in config[target]: + # only copy over if it's not there yet + config[target][key] = config[source][key] + # delete feature flag + del config[source][key] + return True + return False + + for key in FEATURE_TO_SERIAL: + changed = migrate_key(key, "feature", "serial") or changed + + for key in SERIAL_TO_FEATURE: + changed = migrate_key(key, "serial", "feature") or changed + + if changed: + # let's make a backup of our current config, in case someone wants to roll back to an + # earlier version and needs a backup of their flags + backup_path = self.backup("serial_feature_migration") + self._logger.info("Made a copy of the current config at {} to allow recovery of serial feature flags".format(backup_path)) + + return changed + def backup(self, suffix, path=None): import shutil diff --git a/src/octoprint/static/js/app/viewmodels/settings.js b/src/octoprint/static/js/app/viewmodels/settings.js index 6997b94d1..08e315943 100644 --- a/src/octoprint/static/js/app/viewmodels/settings.js +++ b/src/octoprint/static/js/app/viewmodels/settings.js @@ -134,22 +134,13 @@ $(function() { self.feature_sizeThreshold_str = sizeObservable(self.feature_sizeThreshold); self.feature_mobileSizeThreshold_str = sizeObservable(self.feature_mobileSizeThreshold); self.feature_temperatureGraph = ko.observable(undefined); - self.feature_waitForStart = ko.observable(undefined); - self.feature_sendChecksum = ko.observable("print"); self.feature_sdSupport = ko.observable(undefined); - self.feature_sdRelativePath = ko.observable(undefined); - self.feature_sdAlwaysAvailable = ko.observable(undefined); - self.feature_swallowOkAfterResend = ko.observable(undefined); - self.feature_repetierTargetTemp = ko.observable(undefined); - self.feature_disableExternalHeatupDetection = ko.observable(undefined); self.feature_keyboardControl = ko.observable(undefined); self.feature_pollWatched = ko.observable(undefined); - self.feature_ignoreIdenticalResends = ko.observable(undefined); self.feature_modelSizeDetection = ko.observable(undefined); - self.feature_firmwareDetection = ko.observable(undefined); self.feature_printCancelConfirmation = ko.observable(undefined); - self.feature_blockWhileDwelling = ko.observable(undefined); self.feature_g90InfluencesExtruder = ko.observable(undefined); + self.feature_autoUppercaseBlacklist = ko.observable(undefined); self.feature_legacyPluginAssets = ko.observable(undefined); self.serial_port = ko.observable(); @@ -174,7 +165,16 @@ $(function() { self.serial_ignoreErrorsFromFirmware = ko.observable(undefined); self.serial_disconnectOnErrors = ko.observable(undefined); self.serial_triggerOkForM29 = ko.observable(undefined); - self.serial_autoUppercaseBlacklist = ko.observable(undefined); + self.serial_waitForStart = ko.observable(undefined); + self.serial_sendChecksum = ko.observable("print"); + self.serial_sdRelativePath = ko.observable(undefined); + self.serial_sdAlwaysAvailable = ko.observable(undefined); + self.serial_swallowOkAfterResend = ko.observable(undefined); + self.serial_repetierTargetTemp = ko.observable(undefined); + self.serial_disableExternalHeatupDetection = ko.observable(undefined); + self.serial_ignoreIdenticalResends = ko.observable(undefined); + self.serial_firmwareDetection = ko.observable(undefined); + self.serial_blockWhileDwelling = ko.observable(undefined); self.serial_supportResendsWithoutOk = ko.observable(undefined); self.serial_logPositionOnPause = ko.observable(undefined); self.serial_logPositionOnCancel = ko.observable(undefined); @@ -248,6 +248,25 @@ $(function() { self.server_onlineCheckBroken(false); }; + self.observableCopies = { + "feature_waitForStart": "serial_waitForStart", + "feature_sendChecksum": "serial_sendChecksum", + "feature_sdRelativePath": "serial_sdRelativePath", + "feature_sdAlwaysAvailable": "serial_sdAlwaysAvailable", + "feature_swallowOkAfterResend": "serial_swallowOkAfterResend", + "feature_repetierTargetTemp": "serial_repetierTargetTemp", + "feature_disableExternalHeatupDetection": "serial_disableExternalHeatupDetection", + "feature_ignoreIdenticalResends": "serial_ignoreIdenticalResends", + "feature_firmwareDetection": "serial_firmwareDetection", + "feature_blockWhileDwelling": "serial_blockWhileDwelling", + "serial_": "feature_" + }; + _.each(self.observableCopies, function(value, key) { + if (self.hasOwnProperty(value)) { + self[key] = self[value]; + } + }); + self.addTemperatureProfile = function() { self.temperature_profiles.push({name: "New", extruder:0, bed:0}); }; @@ -667,16 +686,16 @@ $(function() { // some special read functions for various observables var specialMappings = { feature: { - externalHeatupDetection: function() { return !self.feature_disableExternalHeatupDetection()}, - alwaysSendChecksum: function() { return self.feature_sendChecksum() == "always"}, - neverSendChecksum: function() { return self.feature_sendChecksum() == "never"} + autoUppercaseBlacklist: function() { return splitTextToArray(self.feature_autoUppercaseBlacklist(), ",", true) } }, serial: { additionalPorts : function() { return commentableLinesToArray(self.serial_additionalPorts()) }, additionalBaudrates: function() { return _.map(splitTextToArray(self.serial_additionalBaudrates(), ",", true, function(item) { return !isNaN(parseInt(item)); }), function(item) { return parseInt(item); }) }, longRunningCommands: function() { return splitTextToArray(self.serial_longRunningCommands(), ",", true) }, checksumRequiringCommands: function() { return splitTextToArray(self.serial_checksumRequiringCommands(), ",", true) }, - autoUppercaseBlacklist: function() { return splitTextToArray(self.serial_autoUppercaseBlacklist(), ",", true) } + externalHeatupDetection: function() { return !self.serial_disableExternalHeatupDetection()}, + alwaysSendChecksum: function() { return self.serial_sendChecksum() == "always"}, + neverSendChecksum: function() { return self.serial_sendChecksum() == "never"} }, scripts: { gcode: function() { @@ -714,6 +733,11 @@ $(function() { observable = keyPrefix + "_" + observable; } + if (self.observableCopies.hasOwnProperty(observable)) { + // only a copy, skip + return; + } + if (mapping && mapping[key] && _.isFunction(mapping[key])) { result[key] = mapping[key](); flag = true; @@ -779,16 +803,16 @@ $(function() { } }, feature: { - externalHeatupDetection: function(value) { self.feature_disableExternalHeatupDetection(!value) }, - alwaysSendChecksum: function(value) { if (value) { self.feature_sendChecksum("always")}}, - neverSendChecksum: function(value) { if (value) { self.feature_sendChecksum("never")}} + autoUppercaseBlacklist: function(value) { self.feature_autoUppercaseBlacklist(value.join(", "))} }, serial: { additionalPorts : function(value) { self.serial_additionalPorts(value.join("\n"))}, additionalBaudrates: function(value) { self.serial_additionalBaudrates(value.join(", "))}, longRunningCommands: function(value) { self.serial_longRunningCommands(value.join(", "))}, checksumRequiringCommands: function(value) { self.serial_checksumRequiringCommands(value.join(", "))}, - autoUppercaseBlacklist: function(value) { self.serial_autoUppercaseBlacklist(value.join(", "))} + externalHeatupDetection: function(value) { self.serial_disableExternalHeatupDetection(!value) }, + alwaysSendChecksum: function(value) { if (value) { self.serial_sendChecksum("always")}}, + neverSendChecksum: function(value) { if (value) { self.serial_sendChecksum("never")}} }, terminalFilters: function(value) { self.terminalFilters($.extend(true, [], value)) }, temperature: { @@ -808,6 +832,11 @@ $(function() { observable = keyPrefix + "_" + observable; } + if (self.observableCopies.hasOwnProperty(observable)) { + // only a copy, skip + return; + } + var haveLocalVersion = local && local.hasOwnProperty(key); if (mapping && mapping[key] && _.isFunction(mapping[key]) && !haveLocalVersion) { @@ -920,6 +949,11 @@ $(function() { self._resetScrollPosition = function() { $('#settings_dialog_content', self.settingsDialog).scrollTop(0); + + // also reset any contained tabs/pills/lists to first pane + $('#settings_dialog_content ul.nav-pills a[data-toggle="tab"]:first', self.settingsDialog).tab("show"); + $('#settings_dialog_content ul.nav-list a[data-toggle="tab"]:first', self.settingsDialog).tab("show"); + $('#settings_dialog_content ul.nav-tabs a[data-toggle="tab"]:first', self.settingsDialog).tab("show"); }; self.selectTab = function(tab) { @@ -929,7 +963,7 @@ $(function() { } $('ul.nav-list a[href="' + tab + '"]', self.settingsDialog).tab("show"); } else { - $('ul.nav-list a:first', self.settingsDialog).tab("show"); + $('ul.nav-list a[data-toggle="tab"]:first', self.settingsDialog).tab("show"); } }; diff --git a/src/octoprint/static/js/app/viewmodels/terminal.js b/src/octoprint/static/js/app/viewmodels/terminal.js index 6ee6586ce..6d4dd3ea3 100644 --- a/src/octoprint/static/js/app/viewmodels/terminal.js +++ b/src/octoprint/static/js/app/viewmodels/terminal.js @@ -125,7 +125,7 @@ $(function() { }); self.blacklist=[]; - self.settings.serial_autoUppercaseBlacklist.subscribe(function(newValue) { + self.settings.feature_autoUppercaseBlacklist.subscribe(function(newValue) { self.blacklist = splitTextToArray(newValue, ",", true); }); diff --git a/src/octoprint/templates/dialogs/settings/features.jinja2 b/src/octoprint/templates/dialogs/settings/features.jinja2 index f0a2019f5..1bd88c0b2 100644 --- a/src/octoprint/templates/dialogs/settings/features.jinja2 +++ b/src/octoprint/templates/dialogs/settings/features.jinja2 @@ -48,87 +48,19 @@
-
-
- -
-
-
+
+
- -
-
-
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
- -
- - - -
+ + {{ _('Use this to specify the commands that should not have their parameters automatically uppercased in the terminal tab. Just the G or M code, comma separated.') }}
diff --git a/src/octoprint/templates/dialogs/settings/serialconnection.jinja2 b/src/octoprint/templates/dialogs/settings/serialconnection.jinja2 index 626244265..5b40eaab8 100644 --- a/src/octoprint/templates/dialogs/settings/serialconnection.jinja2 +++ b/src/octoprint/templates/dialogs/settings/serialconnection.jinja2 @@ -1,219 +1,341 @@
-
- -
- -
-
-
- -
- -
-
-
-
- -
-
-
- -
-
- - s -
- {{ _('When printing or idle')}} -
-
-
- - s -
- {{ _('When a target temperature is set')}} -
-
-
- -
-
- - s -
- {{ _('Autoreport interval to request from firmware')}} -
-
-
- -
-
- - s -
-
-
-
- -
-
- - s -
- {{ _('busy protocol support not detected')}} -
-
-
- - s -
- {{ _('busy protocol support detected')}} -
-
-
- -
-
- - s -
-
-
-
- -
-
- - s -
-
-
-
-
- -
-
-
- -
- - {{ _('Use this to define additional glob patterns matching serial ports to list for connecting against, e.g. /dev/ttyAMA*. One entry per line.')|format(glob_url="http://docs.python.org/2/library/glob.html") }} -
-
-
- -
- - {{ _('Use this to define additional serial port baud rates to list for connecting with, e.g. 123456. Comma separated.')|format(glob_url="http://docs.python.org/2/library/glob.html") }} -
-
-
-
- -
-
-
-
- -
-
+ -
- -
-
+
+
+
+ {{ _('Connection') }} +
+ +
+ +
+
+
+ +
+ +
+
+
+
+ +
+
+
+ +
+ + {{ _('Use this to define additional glob patterns matching serial ports to list for connecting against, e.g. /dev/ttyAMA*. One entry per line.')|format(glob_url="http://docs.python.org/2/library/glob.html") }} +
+
+
+ +
+ + {{ _('Use this to define additional serial port baud rates to list for connecting with, e.g. 123456. Comma separated.')|format(glob_url="http://docs.python.org/2/library/glob.html") }} +
+
+
+
+ {{ _('Serial logging') }} +
+
+ +
+
+
+
+
+
+ {{ _('Query intervals') }} +
+ +
+
+ + s +
+ {{ _('When printing or idle')}} +
+
+
+ + s +
+ {{ _('When a target temperature is set')}} +
+
+
+ +
+
+ + s +
+ {{ _('Autoreport interval to request from firmware')}} +
+
+
+ +
+
+ + s +
+
+
+
+
+ {{ _('Timeouts') }} +
+ +
+
+ + s +
+ {{ _('busy protocol support not detected')}} +
+
+
+ + s +
+ {{ _('busy protocol support detected')}} +
+
+
+ +
+
+ + s +
+
+
+
+ +
+
+ + s +
+
+
+
+ +
+
+ +
+ + {{ _('Set to 0 to disable consecutive timeout detection and handling.') }} +
+
+
+ +
+ + {{ _('Set to 0 to disable consecutive timeout detection and handling.') }} +
+
+
+ +
+ + {{ _('Set to 0 to disable consecutive timeout detection and handling.') }} +
+
+
+
+
+
+
+
+ {{ _('Firmware specific settings') }} +
+
+ +
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+ +
+ + + +
+
+
+
+ +
+
+
+ +
+
+
+
+ +
+
+
+ +
+
+ +
+
+
+
+
+ {{ _('Protocol fine tuning') }} +
+
+ +
+
+
+ +
+
+ +
+ + {{ _('Use this to specify a different command than the default M110 to send to the printer on initial connection to trigger a communication handshake.') }} +
+
+
+ +
+ + {{ _('Use this to specify the commands known to take a long time to complete without output from your printer and hence might cause timeout issues. Just the G or M code, comma separated.') }} +
+
+
+ +
+ + {{ _('Use this to specify which commands always need to be sent with a checksum. Comma separated list.') }} +
+
+
+
+
+
+
+
+ {{ _('Error handling') }} +
+
+ +
+
+
+
+ +
+
+
+
+ {{ _('Event based position logging') }}
-
-
-
-
- -
- - {{ _('Use this to specify a different command than the default M110 to send to the printer on initial connection to trigger a communication handshake.') }} -
-
-
- -
- - {{ _('Use this to specify the commands known to take a long time to complete without output from your printer and hence might cause timeout issues. Just the G or M code, comma separated.') }} -
-
-
- -
- - {{ _('Use this to specify which commands always need to be sent with a checksum. Comma separated list.') }} -
-
-
- -
- - {{ _('Use this to specify the commands that should not have their parameters automatically uppercased in the terminal tab. Just the G or M code, comma separated.') }} -
-
-
- -
-
- -
-
- -
-
- -
-
- -
- - {{ _('Set to 0 to disable consecutive timeout detection and handling.') }} -
-
-
- -
- - {{ _('Set to 0 to disable consecutive timeout detection and handling.') }} -
-
-
- -
- - {{ _('Set to 0 to disable consecutive timeout detection and handling.') }} -
-
+
- From eadb4a5bb6b6a44d3d08cff86d65bb3eaf387ba7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Thu, 15 Feb 2018 17:10:15 +0100 Subject: [PATCH 30/38] [Docs] document new capabilities config settings --- docs/configuration/config_yaml.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/configuration/config_yaml.rst b/docs/configuration/config_yaml.rst index d3d76de2b..7205ee149 100644 --- a/docs/configuration/config_yaml.rst +++ b/docs/configuration/config_yaml.rst @@ -763,6 +763,10 @@ Use the following settings to configure the serial connection to the printer: # Defaults to 30 sec communication: 30 + # Timeout during serial communication when busy protocol support is detected, in seconds. + # Defaults to 3 sec + communicationBusy: 3 + # Timeout after which to query temperature when no target is set temperature: 5 @@ -892,6 +896,14 @@ Use the following settings to configure the serial connection to the printer: # the responds skips on the ok) triggerOkForM29: true + capabilities: + + # Whether to enable temperature autoreport in the firmware if its support is detected + autoreport_temp: true + + # Whether to shorten the communication timeout if the firmware seems to support the busy protocol + busy_protocol: true + .. _sec-configuration-config_yaml-server: Server From 1587ee64027be418ccfc2f5fc9cc8ec8221121dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Fri, 16 Feb 2018 10:24:13 +0100 Subject: [PATCH 31/38] Forgot to adjust migrated settings locs in comm layer --- src/octoprint/util/comm.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index ae1d8ed21..f1f4844cb 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -403,13 +403,13 @@ class MachineCom(object): self._hello_command = settings().get(["serial", "helloCommand"]) - self._alwaysSendChecksum = settings().getBoolean(["feature", "alwaysSendChecksum"]) - self._neverSendChecksum = settings().getBoolean(["feature", "neverSendChecksum"]) - self._sendChecksumWithUnknownCommands = settings().getBoolean(["feature", "sendChecksumWithUnknownCommands"]) - self._unknownCommandsNeedAck = settings().getBoolean(["feature", "unknownCommandsNeedAck"]) - self._sdAlwaysAvailable = settings().getBoolean(["feature", "sdAlwaysAvailable"]) - self._sdRelativePath = settings().getBoolean(["feature", "sdRelativePath"]) - self._blockWhileDwelling = settings().getBoolean(["feature", "blockWhileDwelling"]) + self._alwaysSendChecksum = settings().getBoolean(["serial", "alwaysSendChecksum"]) + self._neverSendChecksum = settings().getBoolean(["serial", "neverSendChecksum"]) + self._sendChecksumWithUnknownCommands = settings().getBoolean(["serial", "sendChecksumWithUnknownCommands"]) + self._unknownCommandsNeedAck = settings().getBoolean(["serial", "unknownCommandsNeedAck"]) + self._sdAlwaysAvailable = settings().getBoolean(["serial", "sdAlwaysAvailable"]) + self._sdRelativePath = settings().getBoolean(["serial", "sdRelativePath"]) + self._blockWhileDwelling = settings().getBoolean(["serial", "blockWhileDwelling"]) self._currentLine = 1 self._line_mutex = threading.RLock() self._resendDelta = None @@ -423,10 +423,10 @@ class MachineCom(object): self._lastCommError = None self._lastResendNumber = None self._currentResendCount = 0 - self._resendSwallowRepetitions = settings().getBoolean(["feature", "ignoreIdenticalResends"]) + self._resendSwallowRepetitions = settings().getBoolean(["serial", "ignoreIdenticalResends"]) self._resendSwallowRepetitionsCounter = 0 - self._firmware_detection = settings().getBoolean(["feature", "firmwareDetection"]) + self._firmware_detection = settings().getBoolean(["serial", "firmwareDetection"]) self._firmware_info_received = not self._firmware_detection self._firmware_info = dict() self._firmware_capabilities = dict() @@ -1222,7 +1222,7 @@ class MachineCom(object): feedback_errors = [] pause_triggers = convert_pause_triggers(settings().get(["printerParameters", "pauseTriggers"])) - disable_external_heatup_detection = not settings().getBoolean(["feature", "externalHeatupDetection"]) + disable_external_heatup_detection = not settings().getBoolean(["serial", "externalHeatupDetection"]) self._consecutive_timeouts = 0 @@ -1230,7 +1230,7 @@ class MachineCom(object): if not self._openSerial(): return - try_hello = not settings().getBoolean(["feature", "waitForStartOnConnect"]) + try_hello = not settings().getBoolean(["serial", "waitForStartOnConnect"]) self._log("Connected to: %s, starting monitor" % self._serial) if self._baudrate == 0: @@ -1246,8 +1246,8 @@ class MachineCom(object): self._ok_timeout = get_new_timeout("communicationBusy" if self._busy_protocol_detected else "communication", self._timeout_intervals) startSeen = False - supportRepetierTargetTemp = settings().getBoolean(["feature", "repetierTargetTemp"]) - supportWait = settings().getBoolean(["feature", "supportWait"]) + supportRepetierTargetTemp = settings().getBoolean(["serial", "repetierTargetTemp"]) + supportWait = settings().getBoolean(["serial", "supportWait"]) connection_timeout = settings().getFloat(["serial", "timeout", "connection"]) detection_timeout = settings().getFloat(["serial", "timeout", "detection"]) @@ -2256,7 +2256,7 @@ class MachineCom(object): self._resendDelta = resendDelta self._lastResendNumber = lineToResend self._currentResendCount = 0 - self._resendSwallowRepetitionsCounter = settings().getInt(["feature", "identicalResendsCountdown"]) + self._resendSwallowRepetitionsCounter = settings().getInt(["serial", "identicalResendsCountdown"]) if self._resendDelta > len(self._lastLines) or len(self._lastLines) == 0 or self._resendDelta < 0: self._errorValue = "Printer requested line %d but no sufficient history is available, can't resend" % lineToResend @@ -3661,7 +3661,7 @@ def gcode_and_subcode_for_cmd(cmd): gcode = values["codeGM"] elif "codeT" in values and values["codeT"]: gcode = values["codeT"] - elif settings().getBoolean(["feature", "supportFAsCommand"]) and "codeF" in values and values["codeF"]: + elif settings().getBoolean(["serial", "supportFAsCommand"]) and "codeF" in values and values["codeF"]: gcode = values["codeF"] else: # this should never happen From 00e6a3856f0a67e0062a882663134c687b89280a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Fri, 16 Feb 2018 16:30:20 +0100 Subject: [PATCH 32/38] Allow tagging of GCODE commands throughout their lifecycle Commands injected/extended/rewritten through one of the phase hooks or sent by a plugin through self._printer.commands will also be tagged with "plugin:", allowing other code to detect these tags and handle such commands differently. That will be interesting for plugins that need to differentiate between commands originating from the printed file vs the user vs the system vs other plugins. --- docs/plugins/hooks.rst | 41 +++- src/octoprint/printer/__init__.py | 108 ++++---- src/octoprint/printer/standard.py | 139 ++++++----- src/octoprint/server/__init__.py | 31 ++- src/octoprint/server/api/files.py | 4 +- src/octoprint/server/api/job.py | 14 +- src/octoprint/server/api/printer.py | 36 ++- src/octoprint/util/comm.py | 369 +++++++++++++++++++--------- 8 files changed, 491 insertions(+), 251 deletions(-) diff --git a/docs/plugins/hooks.rst b/docs/plugins/hooks.rst index 1a320573d..f9c8d7617 100644 --- a/docs/plugins/hooks.rst +++ b/docs/plugins/hooks.rst @@ -420,7 +420,7 @@ This describes actually four hooks: * ``octoprint.comm.protocol.gcode.sending`` * ``octoprint.comm.protocol.gcode.sent`` -.. py:function:: protocol_gcodephase_hook(comm_instance, phase, cmd, cmd_type, gcode, subcode=None, *args, **kwargs) +.. py:function:: protocol_gcodephase_hook(comm_instance, phase, cmd, cmd_type, gcode, subcode=None, tags=None, *args, **kwargs) Pre- and postprocess commands as they progress through the various phases of being sent to the printer. The phases are the following: @@ -443,7 +443,39 @@ This describes actually four hooks: the communication layer or before they are actually sent over the serial port, or to react to the queuing or sending of commands after the fact. The hook handler will be called with the processing ``phase``, the ``cmd`` to be sent to the printer as well as the ``cmd_type`` parameter used for enqueuing (OctoPrint will make sure that the send queue - will never contain more than one line with the same ``cmd_type``) and the detected gcode command (if it is one). + will never contain more than one line with the same ``cmd_type``) and the detected ``gcode`` command (if it is one) + as well as its ``subcode`` (if it has one). OctoPrint will also provide any ``tags`` attached to the command throughout + its lifecycle. + + Tags are arbitrary strings that can be attached to a command as it moves through the various phases and can be used to e.g. + distinguish between commands that originated in a printed file (``source:file``) vs. a configured GCODE script + (``source:script``) vs. an API call (``source:api``) vs. a plugin (``source:plugin`` or ``source:rewrite`` and + ``plugin:``). If during development you want to get an idea of the various possible tags, set + the logger ``octoprint.util.comm.command_phases`` to ``DEBUG``, connect to a printer (real or virtual) and take a + look at your ``octoprint.log`` during serial traffic: + + .. code-block:: plain + + 2018-02-16 18:20:31,213 - octoprint.util.comm.command_phases - DEBUG - phase: queuing | command: T0 | gcode: T | tags: [ api:printer.command, source:api, trigger:printer.commands ] + 2018-02-16 18:20:31,216 - octoprint.util.comm.command_phases - DEBUG - phase: queued | command: M117 Before T! | gcode: M117 | tags: [ api:printer.command, phase:queuing, plugin:multi_gcode_test, source:api, source:rewrite, trigger:printer.commands ] + 2018-02-16 18:20:31,217 - octoprint.util.comm.command_phases - DEBUG - phase: sending | command: M117 Before T! | gcode: M117 | tags: [ api:printer.command, phase:queuing, plugin:multi_gcode_test, source:api, source:rewrite, trigger:printer.commands ] + 2018-02-16 18:20:31,217 - octoprint.util.comm.command_phases - DEBUG - phase: queued | command: T0 | gcode: T | tags: [ api:printer.command, source:api, trigger:printer.commands ] + 2018-02-16 18:20:31,219 - octoprint.util.comm.command_phases - DEBUG - phase: queued | command: M117 After T! | gcode: M117 | tags: [ api:printer.command, phase:queuing, plugin:multi_gcode_test, source:api, source:rewrite, trigger:printer.commands ] + 2018-02-16 18:20:31,220 - octoprint.util.comm.command_phases - DEBUG - phase: sent | command: M117 Before T! | gcode: M117 | tags: [ api:printer.command, phase:queuing, plugin:multi_gcode_test, source:api, source:rewrite, trigger:printer.commands ] + 2018-02-16 18:20:31,230 - tornado.access - INFO - 204 POST /api/printer/command (127.0.0.1) 23.00ms + 2018-02-16 18:20:31,232 - tornado.access - INFO - 200 POST /api/printer/command (127.0.0.1) 25.00ms + 2018-02-16 18:20:31,232 - octoprint.util.comm.command_phases - DEBUG - phase: sending | command: T0 | gcode: T | tags: [ api:printer.command, source:api, trigger:printer.commands ] + 2018-02-16 18:20:31,234 - octoprint.util.comm.command_phases - DEBUG - phase: sent | command: T0 | gcode: T | tags: [ api:printer.command, source:api, trigger:printer.commands ] + 2018-02-16 18:20:31,242 - octoprint.util.comm.command_phases - DEBUG - phase: sending | command: M117 After T! | gcode: M117 | tags: [ api:printer.command, phase:queuing, plugin:multi_gcode_test, source:api, source:rewrite, trigger:printer.commands ] + 2018-02-16 18:20:31,243 - octoprint.util.comm.command_phases - DEBUG - phase: sent | command: M117 After T! | gcode: M117 | tags: [ api:printer.command, phase:queuing, plugin:multi_gcode_test, source:api, source:rewrite, trigger:printer.commands ] + 2018-02-16 18:20:38,552 - octoprint.util.comm.command_phases - DEBUG - phase: queuing | command: G91 | gcode: G91 | tags: [ api:printer.printhead, source:api, trigger:printer.commands, trigger:printer.jog ] + 2018-02-16 18:20:38,552 - octoprint.util.comm.command_phases - DEBUG - phase: queued | command: G91 | gcode: G91 | tags: [ api:printer.printhead, source:api, trigger:printer.commands, trigger:printer.jog ] + 2018-02-16 18:20:38,553 - octoprint.util.comm.command_phases - DEBUG - phase: sending | command: G91 | gcode: G91 | tags: [ api:printer.printhead, source:api, trigger:printer.commands, trigger:printer.jog ] + 2018-02-16 18:20:38,553 - octoprint.util.comm.command_phases - DEBUG - phase: queuing | command: G1 X10 F6000 | gcode: G1 | tags: [ api:printer.printhead, source:api, trigger:printer.commands, trigger:printer.jog ] + 2018-02-16 18:20:38,555 - octoprint.util.comm.command_phases - DEBUG - phase: queued | command: G1 X10 F6000 | gcode: G1 | tags: [ api:printer.printhead, source:api, trigger:printer.commands, trigger:printer.jog ] + 2018-02-16 18:20:38,556 - octoprint.util.comm.command_phases - DEBUG - phase: sent | command: G91 | gcode: G91 | tags: [ api:printer.printhead, source:api, trigger:printer.commands, trigger:printer.jog ] + 2018-02-16 18:20:38,556 - octoprint.util.comm.command_phases - DEBUG - phase: queuing | command: G90 | gcode: G90 | tags: [ api:printer.printhead, source:api, trigger:printer.commands, trigger:printer.jog ] + 2018-02-16 18:20:38,558 - octoprint.util.comm.command_phases - DEBUG - phase: queued | command: G90 | gcode: G90 | tags: [ api:printer.printhead, source:api, trigger:printer.commands, trigger:printer.jog ] Defining a ``cmd_type`` other than None will make sure OctoPrint takes care of only having one command of that type in its sending queue. Predefined types are ``temperature_poll`` for temperature polling via ``M105`` and @@ -482,6 +514,8 @@ This describes actually four hooks: should use this option. * A 2-tuple consisting of a rewritten version of the ``cmd`` and the ``cmd_type``, e.g. ``return "M105", "temperature_poll"``. Handlers which wish to rewrite both the command and the command type should use this option. + * A 3-tuple consisting of a rewritten version of the ``cmd``, the ``cmd_type`` and any additional ``tags`` you might + want to attach to the lifecycle of the command, e.g. ``return "M105", "temperature_poll", "my_custom_tag" * **"queuing" phase only**: A list of any of the above to allow for expanding one command into many. The following example shows how any queued command could be turned into a sequence of a temperature query, line number reset, display of the ``gcode`` on the printer's display and finally the actual command (this example @@ -489,7 +523,7 @@ This describes actually four hooks: .. code-block:: python - def rewrite_foo(self, comm_instance, phase, cmd, cmd_type, gcode, *args, **kwargs): + def rewrite_foo(self, comm_instance, phase, cmd, cmd_type, gcode, subcode=None, tags=None *args, **kwargs): if gcode or not cmd.startswith("@foo"): return @@ -524,6 +558,7 @@ This describes actually four hooks: :param str gcode: Parsed GCODE command, e.g. ``G0`` or ``M110``, may also be None if no known command could be parsed :param str subcode: Parsed subcode of the GCODE command, e.g. ``1`` for ``M80.1``. Will be None if no subcode was provided or no command could be parsed. + :param set tags: Tags attached to the :return: None, 1-tuple, 2-tuple or string, see the description above for details. .. _sec-plugins-hook-comm-protocol-gcode-received: diff --git a/src/octoprint/printer/__init__.py b/src/octoprint/printer/__init__.py index 11ef17db0..84a892afb 100644 --- a/src/octoprint/printer/__init__.py +++ b/src/octoprint/printer/__init__.py @@ -51,7 +51,7 @@ class PrinterInterface(object): """Regex for valid heater identifiers.""" @classmethod - def get_connection_options(cls): + def get_connection_options(cls, *args, **kwargs): """ Retrieves the available ports, baudrates, preferred port and baudrate for connecting to the printer. @@ -75,7 +75,7 @@ class PrinterInterface(object): "autoconnect": settings().getBoolean(["serial", "autoconnect"]) } - def connect(self, port=None, baudrate=None, profile=None): + def connect(self, port=None, baudrate=None, profile=None, *args, **kwargs): """ Connects to the printer, using the specified serial ``port``, ``baudrate`` and printer ``profile``. If a connection is already established, that connection will be closed prior to connecting anew with the provided @@ -89,13 +89,13 @@ class PrinterInterface(object): """ pass - def disconnect(self): + def disconnect(self, *args, **kwargs): """ Disconnects from the printer. Does nothing if no connection is currently established. """ raise NotImplementedError() - def get_transport(self): + def get_transport(self, *args, **kwargs): """ Returns the communication layer's transport object, if a connection is currently established. @@ -107,7 +107,7 @@ class PrinterInterface(object): """ raise NotImplementedError() - def fake_ack(self): + def fake_ack(self, *args, **kwargs): """ Fakes an acknowledgment for the communication layer. If the communication between OctoPrint and the printer gets stuck due to lost "ok" responses from the server due to communication issues, this can be used to get @@ -115,17 +115,18 @@ class PrinterInterface(object): """ raise NotImplementedError() - def commands(self, commands): + def commands(self, commands, tags=None, *args, **kwargs): """ Sends the provided ``commands`` to the printer. Arguments: commands (str, list): The commands to send. Might be a single command provided just as a string or a list of multiple commands to send in order. + tags (set of str): An optional set of tags to attach to the command(s) throughout their lifecycle """ raise NotImplementedError() - def script(self, name, context=None): + def script(self, name, context=None, tags=None, *args, **kwargs): """ Sends the GCODE script ``name`` to the printer. @@ -137,13 +138,14 @@ class PrinterInterface(object): Arguments: name (str): The name of the GCODE script to render. context (dict): An optional context of additional template variables to provide to the renderer. + tags (set of str): An optional set of tags to attach to the command(s) throughout their lifecycle Raises: UnknownScriptException: There is no GCODE script with name ``name`` """ raise NotImplementedError() - def jog(self, axes, relative=True, speed=None, *args, **kwargs): + def jog(self, axes, relative=True, speed=None, tags=None, *args, **kwargs): """ Jogs the specified printer ``axis`` by the specified ``amount`` in mm. @@ -154,38 +156,42 @@ class PrinterInterface(object): speed (int, bool or None): Speed at which to jog (F parameter). If set to ``False`` no speed will be set specifically. If set to ``None`` (or left out) the minimum of all involved axes speeds from the printer profile will be used. + tags (set of str): An optional set of tags to attach to the command(s) throughout their lifecycle """ raise NotImplementedError() - def home(self, axes): + def home(self, axes, tags=None, *args, **kwargs): """ Homes the specified printer ``axes``. Arguments: axes (str, list): The axis or axes to home, each of which must converted to lower case must match one of "x", "y", "z" and "e" + tags (set of str): An optional set of tags to attach to the command(s) throughout their lifecycle """ raise NotImplementedError() - def extrude(self, amount): + def extrude(self, amount, tags=None, *args, **kwargs): """ Extrude ``amount`` millimeters of material from the tool. Arguments: amount (int, float): The amount of material to extrude in mm + tags (set of str): An optional set of tags to attach to the command(s) throughout their lifecycle """ raise NotImplementedError() - def change_tool(self, tool): + def change_tool(self, tool, tags=None, *args, **kwargs): """ Switch the currently active ``tool`` (for which extrude commands will apply). Arguments: tool (str): The tool to switch to, matching the regex "tool[0-9]+" (e.g. "tool0", "tool1", ...) + tags (set of str): An optional set of tags to attach to the command(s) throughout their lifecycle """ raise NotImplementedError() - def set_temperature(self, heater, value): + def set_temperature(self, heater, value, tags=None, *args, **kwargs): """ Sets the target temperature on the specified ``heater`` to the given ``value`` in celsius. @@ -194,10 +200,11 @@ class PrinterInterface(object): temperature or something matching the regular expression "tool[0-9]+" (e.g. "tool0", "tool1", ...) for the hotends of the printer value (int, float): The temperature in celsius to set the target temperature to. + tags (set of str): An optional set of tags to attach to the command(s) throughout their lifecycle """ raise NotImplementedError() - def set_temperature_offset(self, offsets=None): + def set_temperature_offset(self, offsets=None, tags=None, *args, **kwargs): """ Sets the temperature ``offsets`` to apply to target temperatures read from a GCODE file while printing. @@ -205,30 +212,33 @@ class PrinterInterface(object): offsets (dict): A dictionary specifying the offsets to apply. Keys must match the format for the ``heater`` parameter to :func:`set_temperature`, so "bed" for the offset for the bed target temperature and "tool[0-9]+" for the offsets to the hotend target temperatures. + tags (set of str): An optional set of tags to attach to the command(s) throughout their lifecycle """ raise NotImplementedError() - def feed_rate(self, factor): + def feed_rate(self, factor, tags=None, *args, **kwargs): """ Sets the ``factor`` for the printer's feed rate. Arguments: factor (int, float): The factor for the feed rate to send to the firmware. Percentage expressed as either an int between 0 and 100 or a float between 0 and 1. + tags (set of str): An optional set of tags to attach to the command(s) throughout their lifecycle """ raise NotImplementedError() - def flow_rate(self, factor): + def flow_rate(self, factor, tags=None, *args, **kwargs): """ Sets the ``factor`` for the printer's flow rate. Arguments: factor (int, float): The factor for the flow rate to send to the firmware. Percentage expressed as either an int between 0 and 100 or a float between 0 and 1. + tags (set of str): An optional set of tags to attach to the command(s) throughout their lifecycle """ raise NotImplementedError() - def can_modify_file(self, path, sd): + def can_modify_file(self, path, sd, *args, **kwargs): """ Determines whether the ``path`` (on the printer's SD if ``sd`` is True) may be modified (updated or deleted) or not. @@ -254,7 +264,7 @@ class PrinterInterface(object): """ return not (self.is_current_file(path, sd) and (self.is_printing() or self.is_paused())) - def is_current_file(self, path, sd): + def is_current_file(self, path, sd, *args, **kwargs): """ Returns whether the provided ``path`` (on the printer's SD if ``sd`` is True) is the currently selected file for printing. @@ -286,7 +296,7 @@ class PrinterInterface(object): return False - def select_file(self, path, sd, printAfterSelect=False, pos=None): + def select_file(self, path, sd, printAfterSelect=False, pos=None, tags=None, *args, **kwargs): """ Selects the specified ``path`` for printing, specifying if the file is to be found on the ``sd`` or not. Optionally can also directly start the print after selecting the file. @@ -297,6 +307,7 @@ class PrinterInterface(object): sd (boolean): Indicates whether the file is on the printer's SD card or not. printAfterSelect (boolean): Indicates whether a print should be started after the file is selected. + tags (set of str): An optional set of tags to attach to the command(s) throughout their lifecycle Raises: InvalidFileType: if the file is not a machinecode file and hence cannot be printed @@ -305,53 +316,68 @@ class PrinterInterface(object): """ raise NotImplementedError() - def unselect_file(self): + def unselect_file(self, *args, **kwargs): """ Unselects and currently selected file. """ raise NotImplementedError() - def start_print(self): + def start_print(self, tags=None, *args, **kwargs): """ Starts printing the currently selected file. If no file is currently selected, does nothing. + + Arguments: + tags (set of str): An optional set of tags to attach to the command(s) throughout their lifecycle """ raise NotImplementedError() - def pause_print(self): + def pause_print(self, tags=None, *args, **kwargs): """ Pauses the current print job if it is currently running, does nothing otherwise. + + Arguments: + tags (set of str): An optional set of tags to attach to the command(s) throughout their lifecycle """ raise NotImplementedError() - def resume_print(self): + def resume_print(self, tags=None, *args, **kwargs): """ Resumes the current print job if it is currently paused, does nothing otherwise. + + Arguments: + tags (set of str): An optional set of tags to attach to the command(s) throughout their lifecycle """ raise NotImplementedError() - def toggle_pause_print(self): + def toggle_pause_print(self, tags=None, *args, **kwargs): """ Pauses the current print job if it is currently running or resumes it if it is currently paused. + + Arguments: + tags (set of str): An optional set of tags to attach to the command(s) throughout their lifecycle """ if self.is_printing(): - self.pause_print() + self.pause_print(tags=tags) elif self.is_paused(): - self.resume_print() + self.resume_print(tags=tags) - def cancel_print(self): + def cancel_print(self, tags=None, *args, **kwargs): """ Cancels the current print job. + + Arguments: + tags (set of str): An optional set of tags to attach to the command(s) throughout their lifecycle """ raise NotImplementedError() - def get_state_string(self): + def get_state_string(self, *args, **kwargs): """ Returns: (str) A human readable string corresponding to the current communication state. """ raise NotImplementedError() - def get_state_id(self): + def get_state_id(self, *args, **kwargs): """ Identifier of the current communication state. @@ -376,35 +402,35 @@ class PrinterInterface(object): (str) A unique identifier corresponding to the current communication state. """ - def get_current_data(self): + def get_current_data(self, *args, **kwargs): """ Returns: (dict) The current state data. """ raise NotImplementedError() - def get_current_job(self): + def get_current_job(self, *args, **kwargs): """ Returns: (dict) The data of the current job. """ raise NotImplementedError() - def get_current_temperatures(self): + def get_current_temperatures(self, *args, **kwargs): """ Returns: (dict) The current temperatures. """ raise NotImplementedError() - def get_temperature_history(self): + def get_temperature_history(self, *args, **kwargs): """ Returns: (list) The temperature history. """ raise NotImplementedError() - def get_current_connection(self): + def get_current_connection(self, *args, **kwargs): """ Returns: (tuple) The current connection information as a 4-tuple ``(connection_string, port, baudrate, printer_profile)``. @@ -412,49 +438,49 @@ class PrinterInterface(object): """ raise NotImplementedError() - def is_closed_or_error(self): + def is_closed_or_error(self, *args, **kwargs): """ Returns: (boolean) Whether the printer is currently disconnected and/or in an error state. """ raise NotImplementedError() - def is_operational(self): + def is_operational(self, *args, **kwargs): """ Returns: (boolean) Whether the printer is currently connected and available. """ raise NotImplementedError() - def is_printing(self): + def is_printing(self, *args, **kwargs): """ Returns: (boolean) Whether the printer is currently printing. """ raise NotImplementedError() - def is_paused(self): + def is_paused(self, *args, **kwargs): """ Returns: (boolean) Whether the printer is currently paused. """ raise NotImplementedError() - def is_error(self): + def is_error(self, *args, **kwargs): """ Returns: (boolean) Whether the printer is currently in an error state. """ raise NotImplementedError() - def is_ready(self): + def is_ready(self, *args, **kwargs): """ Returns: (boolean) Whether the printer is currently operational and ready for new print jobs (not printing). """ raise NotImplementedError() - def register_callback(self, callback): + def register_callback(self, callback, *args, **kwargs): """ Registers a :class:`PrinterCallback` with the instance. @@ -463,7 +489,7 @@ class PrinterInterface(object): """ raise NotImplementedError() - def unregister_callback(self, callback): + def unregister_callback(self, callback, *args, **kwargs): """ Unregisters a :class:`PrinterCallback` from the instance. diff --git a/src/octoprint/printer/standard.py b/src/octoprint/printer/standard.py index 81fe12ac8..620fde17e 100644 --- a/src/octoprint/printer/standard.py +++ b/src/octoprint/printer/standard.py @@ -126,14 +126,14 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback): #~~ handling of PrinterCallbacks - def register_callback(self, callback): + def register_callback(self, callback, *args, **kwargs): if not isinstance(callback, PrinterCallback): self._logger.warn("Registering an object as printer callback which doesn't implement the PrinterCallback interface") self._callbacks.append(callback) self._sendInitialStateUpdate(callback) - def unregister_callback(self, callback): + def unregister_callback(self, callback, *args, **kwargs): if callback in self._callbacks: self._callbacks.remove(callback) @@ -196,7 +196,7 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback): #~~ PrinterInterface implementation - def connect(self, port=None, baudrate=None, profile=None): + def connect(self, port=None, baudrate=None, profile=None, *args, **kwargs): """ Connects to the printer. If port and/or baudrate is provided, uses these settings, otherwise autodetection will be attempted. @@ -215,7 +215,7 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback): self._comm = comm.MachineCom(port, baudrate, callbackObject=self, printerProfileManager=self._printerProfileManager) - def disconnect(self): + def disconnect(self, *args, **kwargs): """ Closes the connection to the printer. """ @@ -225,7 +225,7 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback): else: eventManager().fire(Events.DISCONNECTED) - def get_transport(self): + def get_transport(self, *args, **kwargs): if self._comm is None: return None @@ -233,13 +233,13 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback): return self._comm.getTransport() getTransport = util.deprecated("getTransport has been renamed to get_transport", since="1.2.0-dev-590", includedoc="Replaced by :func:`get_transport`") - def fake_ack(self): + def fake_ack(self, *args, **kwargs): if self._comm is None: return self._comm.fakeOk() - def commands(self, commands): + def commands(self, commands, *args, **kwargs): """ Sends one or more gcode commands to the printer. """ @@ -250,16 +250,18 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback): commands = [commands] for command in commands: - self._comm.sendCommand(command) + self._comm.sendCommand(command, tags=kwargs.get("tags", set()) | {"trigger:printer.commands"}) - def script(self, name, context=None, must_be_set=True): + def script(self, name, context=None, must_be_set=True, *args, **kwargs): if self._comm is None: return if name is None or not name: raise ValueError("name must be set") - result = self._comm.sendGcodeScript(name, replacements=context) + result = self._comm.sendGcodeScript(name, + replacements=context, + tags=kwargs.get("tags", set()) | {"trigger:printer.script"}) if not result and must_be_set: raise UnknownScript(name) @@ -298,9 +300,9 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback): else: commands = ["G90", command] - self.commands(commands) + self.commands(commands, tags=kwargs.get("tags", set()) | {"trigger:printer.jog"}) - def home(self, axes): + def home(self, axes, *args, **kwargs): if not isinstance(axes, (list, tuple)): if isinstance(axes, (str, unicode)): axes = [axes] @@ -311,24 +313,26 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback): if len(axes) != len(validated_axes): raise ValueError("axes contains invalid axes: {axes}".format(axes=axes)) - self.commands(["G91", "G28 %s" % " ".join(map(lambda x: "%s0" % x.upper(), validated_axes)), "G90"]) + self.commands(["G91", "G28 %s" % " ".join(map(lambda x: "%s0" % x.upper(), validated_axes)), "G90"], + tags=kwargs.get("tags", set) | {"trigger:printer.home"}) - def extrude(self, amount): + def extrude(self, amount, *args, **kwargs): if not isinstance(amount, (int, long, float)): raise ValueError("amount must be a valid number: {amount}".format(amount=amount)) printer_profile = self._printerProfileManager.get_current_or_default() extrusion_speed = printer_profile["axes"]["e"]["speed"] - self.commands(["G91", "G1 E%s F%d" % (amount, extrusion_speed), "G90"]) + self.commands(["G91", "G1 E%s F%d" % (amount, extrusion_speed), "G90"], + tags=kwargs.get("tags", set()) | {"trigger:printer.extrude"}) - def change_tool(self, tool): + def change_tool(self, tool, *args, **kwargs): if not PrinterInterface.valid_tool_regex.match(tool): raise ValueError("tool must match \"tool[0-9]+\": {tool}".format(tool=tool)) tool_num = int(tool[len("tool"):]) - self.commands("T%d" % tool_num) + self.commands("T%d" % tool_num, tags=kwargs.get("tags", set()) | {"trigger:printer.change_tool"}) - def set_temperature(self, heater, value): + def set_temperature(self, heater, value, *args, **kwargs): if not PrinterInterface.valid_heater_regex.match(heater): raise ValueError("heater must match \"tool[0-9]+\" or \"bed\": {heater}".format(heater=heater)) @@ -341,14 +345,17 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback): shared_nozzle = printer_profile["extruder"]["sharedNozzle"] if extruder_count > 1 and not shared_nozzle: toolNum = int(heater[len("tool"):]) - self.commands("M104 T{} S{}".format(toolNum, value)) + self.commands("M104 T{} S{}".format(toolNum, value), + tags=kwargs.get("tags", set()) | {"trigger:printer.set_temperature"}) else: - self.commands("M104 S{}".format(value)) + self.commands("M104 S{}".format(value), + tags=kwargs.get("tags", set()) | {"trigger:printer.set_temperature"}) elif heater == "bed": - self.commands("M140 S{}".format(value)) + self.commands("M140 S{}".format(value), + tags=kwargs.get("tags", set()) | {"trigger:printer.set_temperature"}) - def set_temperature_offset(self, offsets=None): + def set_temperature_offset(self, offsets=None, *args, **kwargs): if offsets is None: offsets = dict() @@ -381,15 +388,17 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback): return factor - def feed_rate(self, factor): + def feed_rate(self, factor, *args, **kwargs): factor = self._convert_rate_value(factor, min=50, max=200) - self.commands("M220 S%d" % factor) + self.commands("M220 S%d" % factor, + tags=kwargs.get("tags", set()) | {"trigger:printer.feed_rate"}) - def flow_rate(self, factor): + def flow_rate(self, factor, *args, **kwargs): factor = self._convert_rate_value(factor, min=75, max=125) - self.commands("M221 S%d" % factor) + self.commands("M221 S%d" % factor, + tags=kwargs.get("tags", set()) | {"trigger:printer.flow_rate"}) - def select_file(self, path, sd, printAfterSelect=False, pos=None): + def select_file(self, path, sd, printAfterSelect=False, pos=None, *args, **kwargs): if self._comm is None or (self._comm.isBusy() or self._comm.isStreaming()): self._logger.info("Cannot load file: printer not connected or currently busy") return @@ -408,11 +417,12 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback): self._printAfterSelect = printAfterSelect self._posAfterSelect = pos - self._comm.selectFile("/" + path if sd else path, sd) + self._comm.selectFile("/" + path if sd else path, sd, + tags=kwargs.get("tags", set()) | {"trigger:printer.select_file"}) self._updateProgressData() self._setCurrentZ(None) - def unselect_file(self): + def unselect_file(self, *args, **kwargs): if self._comm is not None and (self._comm.isBusy() or self._comm.isStreaming()): return @@ -430,7 +440,7 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback): return self._comm.getFilePosition() - def start_print(self, pos=None): + def start_print(self, pos=None, *args, **kwargs): """ Starts the currently loaded print job. Only starts if the printer is connected and operational, not currently printing and a printjob is loaded @@ -463,9 +473,10 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback): self._lastProgressReport = None self._updateProgressData() self._setCurrentZ(None) - self._comm.startPrint(pos=pos) + self._comm.startPrint(pos=pos, + tags=kwargs.get("tags", set()) | {"trigger:printer.start_print"}) - def pause_print(self): + def pause_print(self, *args, **kwargs): """ Pause the current printjob. """ @@ -475,9 +486,9 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback): if self._comm.isPaused(): return - self._comm.setPause(True) + self._comm.setPause(True, tags=kwargs.get("tags", set()) | {"trigger:printer.pause_print"}) - def resume_print(self): + def resume_print(self, *args, **kwargs): """ Resume the current printjob. """ @@ -487,9 +498,9 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback): if not self._comm.isPaused(): return - self._comm.setPause(False) + self._comm.setPause(False, tags=kwargs.get("tags", set()) | {"trigger:printer.resume_print"}) - def cancel_print(self): + def cancel_print(self, *args, **kwargs): """ Cancel the current printjob. """ @@ -498,28 +509,28 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback): # tell comm layer to cancel - will also trigger our cancelled handler # for further processing - self._comm.cancelPrint() + self._comm.cancelPrint(tags=kwargs.get("tags", set()) | {"trigger:printer.cancel_print"}) - def get_state_string(self, state=None): + def get_state_string(self, state=None, *args, **kwargs): if self._comm is None: return "Offline" else: return self._comm.getStateString(state=state) - def get_state_id(self, state=None): + def get_state_id(self, state=None, *args, **kwargs): if self._comm is None: return "OFFLINE" else: return self._comm.getStateId(state=state) - def get_current_data(self): + def get_current_data(self, *args, **kwargs): return self._stateMonitor.get_current_data() - def get_current_job(self): + def get_current_job(self, *args, **kwargs): currentData = self._stateMonitor.get_current_data() return currentData["job"] - def get_current_temperatures(self): + def get_current_temperatures(self, *args, **kwargs): if self._comm is not None: offsets = self._comm.getOffsets() else: @@ -542,10 +553,10 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback): return result - def get_temperature_history(self): + def get_temperature_history(self, *args, **kwargs): return self._temps - def get_current_connection(self): + def get_current_connection(self, *args, **kwargs): if self._comm is None: return "Closed", None, None, None @@ -553,25 +564,25 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback): printer_profile = self._printerProfileManager.get_current_or_default() return self._comm.getStateString(), port, baudrate, printer_profile - def is_closed_or_error(self): + def is_closed_or_error(self, *args, **kwargs): return self._comm is None or self._comm.isClosedOrError() - def is_operational(self): + def is_operational(self, *args, **kwargs): return self._comm is not None and self._comm.isOperational() - def is_printing(self): + def is_printing(self, *args, **kwargs): return self._comm is not None and self._comm.isPrinting() - def is_paused(self): + def is_paused(self, *args, **kwargs): return self._comm is not None and self._comm.isPaused() - def is_error(self): + def is_error(self, *args, **kwargs): return self._comm is not None and self._comm.isError() - def is_ready(self): + def is_ready(self, *args, **kwargs): return self.is_operational() and not self.is_printing() and not self._comm.isStreaming() - def is_sd_ready(self): + def is_sd_ready(self, *args, **kwargs): if not settings().getBoolean(["feature", "sdSupport"]) or self._comm is None: return False else: @@ -579,12 +590,12 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback): #~~ sd file handling - def get_sd_files(self): + def get_sd_files(self, *args, **kwargs): if self._comm is None or not self._comm.isSdReady(): return [] return map(lambda x: (x[0][1:], x[1]), self._comm.getSdFiles()) - def add_sd_file(self, filename, absolutePath, on_success=None, on_failure=None): + def add_sd_file(self, filename, absolutePath, on_success=None, on_failure=None, *args, **kwargs): if not self._comm or self._comm.isBusy() or not self._comm.isSdReady(): self._logger.error("No connection to printer or printer is busy") return @@ -604,26 +615,28 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback): # probably something else added through a plugin, use it's basename as-is remoteName = os.path.basename(filename) self._timeEstimationData = TimeEstimationHelper() - self._comm.startFileTransfer(absolutePath, filename, "/" + remoteName, special=not valid_file_type(filename, "gcode")) + self._comm.startFileTransfer(absolutePath, filename, "/" + remoteName, + special=not valid_file_type(filename, "gcode"), + tags=kwargs.get("tags", set()) | {"trigger:printer.add_sd_file"}) return remoteName - def delete_sd_file(self, filename): + def delete_sd_file(self, filename, *args, **kwargs): if not self._comm or not self._comm.isSdReady(): return - self._comm.deleteSdFile("/" + filename) + self._comm.deleteSdFile("/" + filename, tags=kwargs.get("tags", set()) | {"trigger:printer.delete_sd_file"}) - def init_sd_card(self): + def init_sd_card(self, *args, **kwargs): if not self._comm or self._comm.isSdReady(): return - self._comm.initSdCard() + self._comm.initSdCard(tags=kwargs.get("tags", set()) | {"trigger:printer.init_sd_card"}) - def release_sd_card(self): + def release_sd_card(self, *args, **kwargs): if not self._comm or not self._comm.isSdReady(): return - self._comm.releaseSdCard() + self._comm.releaseSdCard(tags=kwargs.get("tags", set()) | {"trigger:printer.release_sd_card"}) - def refresh_sd_files(self, blocking=False): + def refresh_sd_files(self, blocking=False, *args, **kwargs): """ Refreshes the list of file stored on the SD card attached to printer (if available and printer communication available). Optional blocking parameter allows making the method block (max 10s) until the file list has been @@ -632,9 +645,9 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback): if not self._comm or not self._comm.isSdReady(): return self._sdFilelistAvailable.clear() - self._comm.refreshSdFiles() + self._comm.refreshSdFiles(tags=kwargs.get("tags", set()) | {"trigger:printer.refresh_sd_files"}) if blocking: - self._sdFilelistAvailable.wait(10000) + self._sdFilelistAvailable.wait(kwargs.get("timeout", 10000)) #~~ state monitoring diff --git a/src/octoprint/server/__init__.py b/src/octoprint/server/__init__.py index 8f90b6ea0..ae624cf33 100644 --- a/src/octoprint/server/__init__.py +++ b/src/octoprint/server/__init__.py @@ -350,8 +350,37 @@ class Server(object): """Factory for injections for all OctoPrintPlugins""" if not isinstance(implementation, octoprint.plugin.OctoPrintPlugin): return None + + components_copy = dict(components) + if "printer" in components: + import wrapt + import functools + + def tagwrap(f): + @functools.wraps(f) + def wrapper(*args, **kwargs): + tags = kwargs.get("tags", set()) | {"source:plugin", + "plugin:{}".format(name)} + kwargs["tags"] = tags + return f(*args, **kwargs) + setattr(wrapper, "__tagwrapped__", True) + return wrapper + + class TaggedFuncsPrinter(wrapt.ObjectProxy): + def __getattribute__(self, attr): + __wrapped__ = super(TaggedFuncsPrinter, self).__getattribute__("__wrapped__") + item = getattr(__wrapped__, attr) + if callable(item) \ + and ("tags" in item.__code__.co_varnames or "kwargs" in item.__code__.co_varnames) \ + and not getattr(item, "__tagwrapped__", False): + return tagwrap(item) + else: + return item + + components_copy["printer"] = TaggedFuncsPrinter(components["printer"]) + props = dict() - props.update(components) + props.update(components_copy) props.update(dict( data_folder=os.path.join(self._settings.getBaseFolder("data"), name) )) diff --git a/src/octoprint/server/api/files.py b/src/octoprint/server/api/files.py index 4ba185f40..00d6b3a67 100644 --- a/src/octoprint/server/api/files.py +++ b/src/octoprint/server/api/files.py @@ -325,7 +325,7 @@ def uploadGcodeFile(target): """ if destination == FileDestinations.SDCARD and octoprint.filemanager.valid_file_type(filename, "machinecode"): - return filename, printer.add_sd_file(filename, absFilename, selectAndOrPrint) + return filename, printer.add_sd_file(filename, absFilename, selectAndOrPrint, tags={"source:api", "api:files.sd"}) else: selectAndOrPrint(filename, absFilename, destination) return filename @@ -743,7 +743,7 @@ def deleteGcodeFile(filename, target): # delete it if target == FileDestinations.SDCARD: - printer.delete_sd_file(filename) + printer.delete_sd_file(filename, tags={"source:api", "api:files.sd"}) else: fileManager.remove_file(target, filename) diff --git a/src/octoprint/server/api/job.py b/src/octoprint/server/api/job.py index 8f9d1a71a..f9adb42f6 100644 --- a/src/octoprint/server/api/job.py +++ b/src/octoprint/server/api/job.py @@ -32,30 +32,32 @@ def controlJob(): activePrintjob = printer.is_printing() or printer.is_paused() + tags = {"source:api", "api:job"} + if command == "start": if activePrintjob: return make_response("Printer already has an active print job, did you mean 'restart'?", 409) - printer.start_print() + printer.start_print(tags=tags) elif command == "restart": if not printer.is_paused(): return make_response("Printer does not have an active print job or is not paused", 409) - printer.start_print() + printer.start_print(tags=tags) elif command == "pause": if not activePrintjob: return make_response("Printer is neither printing nor paused, 'pause' command cannot be performed", 409) action = data.get("action", "toggle") if action == "toggle": - printer.toggle_pause_print() + printer.toggle_pause_print(tags=tags) elif action == "pause": - printer.pause_print() + printer.pause_print(tags=tags) elif action == "resume": - printer.resume_print() + printer.resume_print(tags=tags) else: return make_response("Unknown action '{}', allowed values for action parameter are 'pause', 'resume' and 'toggle'".format(action), 400) elif command == "cancel": if not activePrintjob: return make_response("Printer is neither printing nor paused, 'cancel' command cannot be performed", 409) - printer.cancel_print() + printer.cancel_print(tags=tags) return NO_CONTENT diff --git a/src/octoprint/server/api/printer.py b/src/octoprint/server/api/printer.py index b6e81b220..0452e9e03 100644 --- a/src/octoprint/server/api/printer.py +++ b/src/octoprint/server/api/printer.py @@ -75,6 +75,8 @@ def printerToolCommand(): validation_regex = re.compile("tool\d+") + tags = {"source:api", "api:printer.tool"} + ##~~ tool selection if command == "select": tool = data["tool"] @@ -83,7 +85,7 @@ def printerToolCommand(): if not tool.startswith("tool"): return make_response("Invalid tool for selection: %s" % tool, 400) - printer.change_tool(tool) + printer.change_tool(tool, tags=tags) ##~~ temperature elif command == "target": @@ -100,7 +102,7 @@ def printerToolCommand(): # perform the actual temperature commands for tool in validated_values.keys(): - printer.set_temperature(tool, validated_values[tool]) + printer.set_temperature(tool, validated_values[tool], tags=tags) ##~~ temperature offset elif command == "offset": @@ -129,14 +131,14 @@ def printerToolCommand(): amount = data["amount"] if not isinstance(amount, (int, long, float)): return make_response("Not a number for extrusion amount: %r" % amount, 400) - printer.extrude(amount) + printer.extrude(amount, tags=tags) elif command == "flowrate": factor = data["factor"] if not isinstance(factor, (int, long, float)): return make_response("Not a number for flow rate: %r" % factor, 400) try: - printer.flow_rate(factor) + printer.flow_rate(factor, tags=tags) except ValueError as e: return make_response("Invalid value for flow rate: %s" % str(e), 400) @@ -171,6 +173,8 @@ def printerBedCommand(): if response is not None: return response + tags = {"source:api", "api:printer.bed"} + ##~~ temperature if command == "target": target = data["target"] @@ -180,7 +184,7 @@ def printerBedCommand(): return make_response("Not a number: %r" % target, 400) # perform the actual temperature command - printer.set_temperature("bed", target) + printer.set_temperature("bed", target, tags=tags) ##~~ temperature offset elif command == "offset": @@ -232,6 +236,8 @@ def printerPrintheadCommand(): # do not jog when a print job is running or we don't have a connection return make_response("Printer is not operational or currently printing", 409) + tags = {"source:api", "api:printer.printhead"} + valid_axes = ["x", "y", "z"] ##~~ jog command if command == "jog": @@ -248,7 +254,7 @@ def printerPrintheadCommand(): speed = data.get("speed", None) # execute the jog commands - printer.jog(validated_values, relative=not absolute, speed=speed) + printer.jog(validated_values, relative=not absolute, speed=speed, tags=tags) ##~~ home command elif command == "home": @@ -260,14 +266,14 @@ def printerPrintheadCommand(): validated_values.append(axis) # execute the home command - printer.home(validated_values) + printer.home(validated_values, tags=tags) elif command == "feedrate": factor = data["factor"] if not isinstance(factor, (int, long, float)): return make_response("Not a number for feed rate: %r" % factor, 400) try: - printer.feed_rate(factor) + printer.feed_rate(factor, tags=tags) except ValueError as e: return make_response("Invalid value for feed rate: %s" % str(e), 400) @@ -295,12 +301,14 @@ def printerSdCommand(): if response is not None: return response + tags = {"source:api", "api:printer.sd"} + if command == "init": - printer.init_sd_card() + printer.init_sd_card(tags=tags) elif command == "refresh": - printer.refresh_sd_files() + printer.refresh_sd_files(tags=tags) elif command == "release": - printer.release_sd_card() + printer.release_sd_card(tags=tags) return NO_CONTENT @@ -341,6 +349,8 @@ def printerCommand(): if "parameters" in data: parameters = data["parameters"] + tags = {"source:api", "api:printer.command"} + if "command" in data or "commands" in data: if "command" in data: commands = [data["command"]] @@ -356,7 +366,7 @@ def printerCommand(): commandToSend = command % parameters commandsToSend.append(commandToSend) - printer.commands(commandsToSend) + printer.commands(commandsToSend, tags=tags) elif "script" in data: script_name = data["script"] @@ -365,7 +375,7 @@ def printerCommand(): context["context"] = data["context"] try: - printer.script(script_name, context=context) + printer.script(script_name, context=context, tags=tags) except UnknownScript: return make_response("Unknown script: {script_name}".format(**locals()), 404) diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index f1f4844cb..234efd228 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -342,6 +342,7 @@ class MachineCom(object): def __init__(self, port = None, baudrate=None, callbackObject=None, printerProfileManager=None): self._logger = logging.getLogger(__name__) self._serialLogger = logging.getLogger("SERIAL") + self._phaseLogger = logging.getLogger(__name__ + ".command_phases") if port == None: port = settings().get(["serial", "port"]) @@ -787,7 +788,7 @@ class MachineCom(object): def fakeOk(self): self._handle_ok() - def sendCommand(self, cmd, cmd_type=None, processed=False, force=False, on_sent=None): + def sendCommand(self, cmd, cmd_type=None, processed=False, force=False, on_sent=None, tags=None): cmd = to_unicode(cmd, errors="replace") if not processed: cmd = process_gcode_line(cmd) @@ -796,13 +797,13 @@ class MachineCom(object): if self.isPrinting() and not self.isSdFileSelected(): try: - self._command_queue.put((cmd, cmd_type, on_sent), item_type=cmd_type) + self._command_queue.put((cmd, cmd_type, on_sent, tags), item_type=cmd_type) return True except TypeAlreadyInQueue as e: self._logger.debug("Type already in command queue: " + e.type) return False elif self.isOperational() or force: - return self._sendCommand(cmd, cmd_type=cmd_type, on_sent=on_sent) + return self._sendCommand(cmd, cmd_type=cmd_type, on_sent=on_sent, tags=tags) def _getGcodeScript(self, scriptName, replacements=None): context = dict() @@ -870,13 +871,16 @@ class MachineCom(object): scriptLines)) - def sendGcodeScript(self, scriptName, replacements=None): + def sendGcodeScript(self, scriptName, replacements=None, tags=None): + if tags is None: + tags = set() + scriptLines = self._getGcodeScript(scriptName, replacements=replacements) for line in scriptLines: - self.sendCommand(line) + self.sendCommand(line, tags=tags | {"trigger:comm.send_gcode_script", "source:script", "script:{}".format(scriptName)}) return "\n".join(scriptLines) - def startPrint(self, pos=None): + def startPrint(self, pos=None, tags=None): if not self.isOperational() or self.isPrinting(): return @@ -888,13 +892,16 @@ class MachineCom(object): self._pauseWaitStartTime = 0 self._pauseWaitTimeLost = 0.0 + if tags is None: + tags = set() + try: with self._jobLock: self._currentFile.start() self._changeState(self.STATE_PRINTING) - self.resetLineNumbers() + self.resetLineNumbers(tags={"trigger:comm.start_print"}) self._callback.on_comm_print_job_started() @@ -904,14 +911,15 @@ class MachineCom(object): # make sure to ignore the "file selected" later on, otherwise we'll reset our progress data self._ignore_select = True - self.sendCommand("M23 {filename}".format(filename=self._currentFile.getFilename())) + self.sendCommand("M23 {filename}".format(filename=self._currentFile.getFilename()), + tags=tags | {"trigger:comm.start_print",}) if pos is not None and isinstance(pos, int) and pos > 0: self._currentFile.setFilepos(pos) - self.sendCommand("M26 S{}".format(pos)) + self.sendCommand("M26 S{}".format(pos), tags=tags | {"trigger:comm.start_print",}) else: self._currentFile.setFilepos(0) - self.sendCommand("M24") + self.sendCommand("M24", tags=tags | {"trigger:comm.start_print",}) self._sd_status_timer = RepeatedTimer(self._timeout_intervals.get("sdStatus", 1.0), self._poll_sd_status, run_first=True) self._sd_status_timer.start() @@ -921,7 +929,7 @@ class MachineCom(object): line = self._getNext() if line is not None: - self.sendCommand(line) + self.sendCommand(line, tags={"trigger:comm.start_print", "source:file"}) # now make sure we actually do something, up until now we only filled up the queue self._sendFromQueue() @@ -931,13 +939,16 @@ class MachineCom(object): self._changeState(self.STATE_ERROR) eventManager().fire(Events.ERROR, {"error": self.getErrorString()}) - def startFileTransfer(self, filename, localFilename, remoteFilename, special=False): + def startFileTransfer(self, filename, localFilename, remoteFilename, special=False, tags=None): if not self.isOperational() or self.isBusy(): self._logger.info("Printer is not operational or busy") return + if tags is None: + tags = set() + with self._jobLock: - self.resetLineNumbers() + self.resetLineNumbers(tags={"trigger:comm.start_file_transfer"}) if special: self._currentFile = SpecialStreamingGcodeFileInformation(filename, localFilename, remoteFilename) @@ -945,22 +956,25 @@ class MachineCom(object): self._currentFile = StreamingGcodeFileInformation(filename, localFilename, remoteFilename) self._currentFile.start() - self.sendCommand("M28 %s" % remoteFilename) + self.sendCommand("M28 %s" % remoteFilename, tags=tags | {"trigger:comm.start_file_transfer",}) eventManager().fire(Events.TRANSFER_STARTED, {"local": localFilename, "remote": remoteFilename}) self._callback.on_comm_file_transfer_started(remoteFilename, self._currentFile.getFilesize()) - def cancelFileTransfer(self): + def cancelFileTransfer(self, tags=None): if not self.isOperational() or not self.isStreaming(): self._logger.info("Printer is not operational or not streaming") return - self._finishFileTransfer(failed=True) + self._finishFileTransfer(failed=True, tags=tags) + + def _finishFileTransfer(self, failed=False, tags=None): + if tags is None: + tags = set() - def _finishFileTransfer(self, failed=False): with self._jobLock: remote = self._currentFile.getRemoteFilename() - self._sendCommand("M29") + self._sendCommand("M29", tags=tags | {"trigger:comm.finish_file_transfer",}) if failed: self.deleteSdFile(remote) @@ -980,12 +994,15 @@ class MachineCom(object): self._callback.on_comm_file_transfer_done(remote) eventManager().fire(Events.TRANSFER_DONE, payload) - self.refreshSdFiles() + self.refreshSdFiles(tags={"trigger:comm.finish_file_transfer",}) - def selectFile(self, filename, sd): + def selectFile(self, filename, sd, tags=None): if self.isBusy(): return + if tags is None: + tags = set() + if sd: if not self.isOperational(): # printer is not connected, can't use SD @@ -995,7 +1012,7 @@ class MachineCom(object): filename = filename[1:] self._sdFileToSelect = filename - self.sendCommand("M23 %s" % filename) + self.sendCommand("M23 %s" % filename, tags=tags | {"trigger:comm.select_file",}) else: self._currentFile = PrintingGcodeFileInformation(filename, offsets_callback=self.getOffsets, current_tool_callback=self.getCurrentTool) self._callback.on_comm_file_selected(filename, self._currentFile.getFilesize(), False) @@ -1011,7 +1028,7 @@ class MachineCom(object): self._recordFilePosition() self._callback.on_comm_print_job_cancelled() - def cancelPrint(self, firmware_error=None, disable_log_position=False): + def cancelPrint(self, firmware_error=None, disable_log_position=False, tags=None): if not self.isOperational(): return @@ -1024,20 +1041,23 @@ class MachineCom(object): self.cancelFileTransfer() return + if tags is None: + tags = set() + def _on_M400_sent(): # we don't call on_print_job_cancelled on our callback here # because we do this only after our M114 has been answered # by the firmware self._record_cancel_data = True - self.sendCommand("M114") + self.sendCommand("M114", tags=tags | {"trigger:comm.cancel", "trigger:record_position"}) with self._jobLock: self._changeState(self.STATE_OPERATIONAL) if self.isSdFileSelected(): - self.sendCommand("M25") # pause print - self.sendCommand("M27") # get current byte position in file - self.sendCommand("M26 S0") # reset position in file to byte 0 + self.sendCommand("M25", tags=tags | {"trigger:comm.cancel",}) # pause print + self.sendCommand("M27", tags=tags | {"trigger:comm.cancel",}) # get current byte position in file + self.sendCommand("M26 S0", tags=tags | {"trigger:comm.cancel",}) # reset position in file to byte 0 if self._sd_status_timer is not None: try: self._sd_status_timer.cancel() @@ -1045,20 +1065,23 @@ class MachineCom(object): pass if self._log_position_on_cancel and not disable_log_position: - self.sendCommand("M400", on_sent=_on_M400_sent) + self.sendCommand("M400", on_sent=_on_M400_sent, tags=tags | {"trigger:comm.cancel", "trigger:record_position"}) else: self._cancel_preparation_done() def _pause_preparation_done(self): self._callback.on_comm_print_job_paused() - def setPause(self, pause): + def setPause(self, pause, tags=None): if self.isStreaming(): return if not self._currentFile: return + if tags is None: + tags = set() + with self._jobLock: if not pause and self.isPaused(): if self._pauseWaitStartTime: @@ -1069,12 +1092,17 @@ class MachineCom(object): self._callback.on_comm_print_job_resumed() if self.isSdFileSelected(): - self.sendCommand("M24") - self.sendCommand("M27") + self.sendCommand("M24", tags=tags | {"trigger:comm.set_pause","trigger:resume"}) + self.sendCommand("M27", tags=tags | {"trigger:comm.set_pause", "trigger:resume"}) else: line = self._getNext() if line is not None: - self.sendCommand(line) + if not tags: + tags_to_use = set() + else: + tags_to_use = set(tags) + tags_to_use.add("file") + self.sendCommand(line, tags=tags | {"trigger:comm.set_pause", "trigger:resume", "source:file"}) # now make sure we actually do something, up until now we only filled up the queue self._sendFromQueue() @@ -1085,59 +1113,68 @@ class MachineCom(object): self._changeState(self.STATE_PAUSED) if self.isSdFileSelected(): - self.sendCommand("M25") # pause print + self.sendCommand("M25", tags=tags | {"trigger:comm.set_pause", "trigger:pause"}) # pause print def _on_M400_sent(): # we don't call on_print_job_paused on our callback here # because we do this only after our M114 has been answered # by the firmware self._record_pause_data = True - self.sendCommand("M114") + self.sendCommand("M114", tags=tags | {"trigger:comm.set_pause", "trigger:pause", "trigger:record_position"}) if self._log_position_on_pause: - self.sendCommand("M400", on_sent=_on_M400_sent) + self.sendCommand("M400", on_sent=_on_M400_sent, tags=tags | {"trigger:comm.set_pause", "trigger:pause", "trigger:record_position"}) else: self._pause_preparation_done() def getSdFiles(self): return self._sdFiles - def deleteSdFile(self, filename): + def deleteSdFile(self, filename, tags=None): if not self._sdEnabled: return + if tags is None: + tags = set() + if not self.isOperational() or (self.isBusy() and isinstance(self._currentFile, PrintingSdFileInformation) and self._currentFile.getFilename() == filename): # do not delete a file from sd we are currently printing from return - self.sendCommand("M30 %s" % filename.lower()) + self.sendCommand("M30 %s" % filename.lower(), tags=tags | {"trigger:comm.delete_sd_file",}) self.refreshSdFiles() - def refreshSdFiles(self): + def refreshSdFiles(self, tags=None): if not self._sdEnabled: return if not self.isOperational() or self.isBusy(): return - self.sendCommand("M20") + if tags is None: + tags = set() - def initSdCard(self): + self.sendCommand("M20", tags=tags | {"trigger:comm.refresh_sd_files",}) + + def initSdCard(self, tags=None): if not self._sdEnabled: return if not self.isOperational(): return - self.sendCommand("M21") + if tags is None: + tags = set() + + self.sendCommand("M21", tags=tags | {"trigger:comm.init_sd_card"}) if self._sdAlwaysAvailable: self._sdAvailable = True self.refreshSdFiles() self._callback.on_comm_sd_state_change(self._sdAvailable) - def releaseSdCard(self): + def releaseSdCard(self, tags=None): if not self._sdEnabled: return @@ -1145,22 +1182,31 @@ class MachineCom(object): # do not release the sd card if we are currently printing from it return - self.sendCommand("M22") + if tags is None: + tags = set() + + self.sendCommand("M22", tags=tags | {"trigger:comm.release_sd_card",}) self._sdAvailable = False self._sdFiles = [] self._callback.on_comm_sd_state_change(self._sdAvailable) self._callback.on_comm_sd_files(self._sdFiles) - def sayHello(self): - self.sendCommand(self._hello_command, force=True) + def sayHello(self, tags=None): + if tags is None: + tags = set() + + self.sendCommand(self._hello_command, force=True, tags=tags | {"trigger:comm.say_hello",}) self._clear_to_send.set() - def resetLineNumbers(self, number=0): + def resetLineNumbers(self, number=0, tags=None): if not self.isOperational(): return - self.sendCommand("M110 N%d" % number) + if tags is None: + tags = set() + + self.sendCommand("M110 N%d" % number, tags=tags | {"trigger:comm.reset_line_numbers",}) ##~~ record aborted file positions @@ -1640,7 +1686,7 @@ class MachineCom(object): self._baudrateDetectRetry -= 1 self._serial.write('\n') self._log("Baudrate test retry: %d" % (self._baudrateDetectRetry)) - self.sayHello() + self.sayHello(tags="trigger:baudrate_detection") elif len(self._baudrateDetectList) > 0: baudrate = self._baudrateDetectList.pop(0) try: @@ -1651,7 +1697,7 @@ class MachineCom(object): self._baudrateDetectRetry = 5 self._timeout = get_new_timeout("communicationBusy" if self._busy_protocol_detected else "communication", self._timeout_intervals) self._serial.write('\n') - self.sayHello() + self.sayHello(tags="trigger:baudrate_detection") except: self._log("Unexpected error while setting baudrate {}: {}".format(baudrate, get_exception_string())) self._logger.exception("Unexpceted error while setting baudrate {}".format(baudrate)) @@ -1792,7 +1838,7 @@ class MachineCom(object): message = "Communication timeout while printing, trying to trigger response from printer." self._logger.info(message) self._log(message + " " + general_message) - if self._sendCommand("M105", cmd_type="temperature"): + if self._sendCommand("M105", cmd_type="temperature", tags={"trigger:comm.handle_timeout"}): self._clear_to_send.set() elif self._clear_to_send.blocked(): @@ -1873,7 +1919,7 @@ class MachineCom(object): """ if self.isOperational() and not self._temperature_autoreporting and not self._connection_closing and not self.isStreaming() and not self._long_running_command and not self._heating and not self._dwelling_until and not self._manualStreaming: - self.sendCommand("M105", cmd_type="temperature_poll") + self.sendCommand("M105", cmd_type="temperature_poll", tags={"trigger:comm.poll_temperature"}) def _poll_sd_status(self): """ @@ -1884,7 +1930,7 @@ class MachineCom(object): """ if self.isOperational() and not self._connection_closing and self.isSdPrinting() and not self._long_running_command and not self._dwelling_until and not self._heating: - self.sendCommand("M27", cmd_type="sd_status_poll") + self.sendCommand("M27", cmd_type="sd_status_poll", tags={"trigger:comm.poll_sd_status"}) def _set_autoreport_temperature_interval(self, interval=None): if interval is None: @@ -1892,7 +1938,7 @@ class MachineCom(object): interval = int(self._timeout_intervals.get("temperatureAutoreport", 2)) except: interval = 2 - self.sendCommand("M155 S{}".format(interval)) + self.sendCommand("M155 S{}".format(interval), tags={"trigger:comm.set_autoreport_temperature_interval"}) def _set_busy_protocol_interval(self, interval=None): if interval is None: @@ -1900,7 +1946,7 @@ class MachineCom(object): interval = max(int(self._timeout_intervals.get("communicationBusy", 3)) - 1, 1) except: interval = 2 - self.sendCommand("M113 S{}".format(interval)) + self.sendCommand("M113 S{}".format(interval), tags={"trigger:comm.set_busy_protocol_interval"}) def _onConnected(self): self._serial.timeout = settings().getFloat(["serial", "timeout", "communication"]) @@ -1909,21 +1955,20 @@ class MachineCom(object): self._changeState(self.STATE_OPERATIONAL) - self.resetLineNumbers() - if self._firmware_detection: - self.sendCommand("M115") + self.resetLineNumbers(tags={"trigger:comm.on_connected",}) + self.sendCommand("M115", tags={"trigger:comm.on_connected",}) if self._sdAvailable: - self.refreshSdFiles() + self.refreshSdFiles(tags={"trigger:comm.on_connected",}) else: - self.initSdCard() + self.initSdCard(tags={"trigger:comm.on_connected"}) payload = dict(port=self._port, baudrate=self._baudrate) eventManager().fire(Events.CONNECTED, payload) self.sendGcodeScript("afterPrinterConnected", replacements=dict(event=payload)) def _onExternalReset(self): - self.resetLineNumbers() + self.resetLineNumbers(tags={"trigger:comm.on_external_reset"}) if self._temperature_autoreporting: self._set_autoreport_temperature_interval() @@ -1965,17 +2010,18 @@ class MachineCom(object): try: if isinstance(entry, tuple): - if not len(entry) == 3: + if not len(entry) == 4: # something with that entry is broken, ignore it and fetch # the next one continue - cmd, cmd_type, callback = entry + cmd, cmd_type, callback, tags = entry else: cmd = entry cmd_type = None callback = None + tags = None - if self._sendCommand(cmd, cmd_type=cmd_type, on_sent=callback): + if self._sendCommand(cmd, cmd_type=cmd_type, on_sent=callback, tags=tags): # we actually did add this cmd to the send queue, so let's # return, we are done here return True @@ -2202,7 +2248,7 @@ class MachineCom(object): # end of file, return false return False - result = self._sendCommand(line) + result = self._sendCommand(line, tags={"source:file"}) self._callback.on_comm_progress() if result: # line sent, return true @@ -2327,7 +2373,7 @@ class MachineCom(object): return result - def _sendCommand(self, cmd, cmd_type=None, on_sent=None): + def _sendCommand(self, cmd, cmd_type=None, on_sent=None, tags=None): # Make sure we are only handling one sending job at a time with self._sendingLock: if self._serial is None: @@ -2337,16 +2383,16 @@ class MachineCom(object): if not self.isStreaming(): # trigger the "queuing" phase only if we are not streaming to sd right now - results = self._process_command_phase("queuing", cmd, command_type=cmd_type, gcode=gcode, subcode=subcode) + results = self._process_command_phase("queuing", cmd, command_type=cmd_type, gcode=gcode, subcode=subcode, tags=tags) if not results: # command is no more, return return False else: - results = [(cmd, cmd_type, gcode, subcode)] + results = [(cmd, cmd_type, gcode, subcode, tags)] # process helper - def process(cmd, cmd_type, gcode, subcode, on_sent=None): + def process(cmd, cmd_type, gcode, subcode, on_sent=None, tags=None): if cmd is None: # no command, next entry return False @@ -2356,10 +2402,10 @@ class MachineCom(object): eventManager().fire(gcodeToEvent[gcode]) # actually enqueue the command for sending - if self._enqueue_for_sending(cmd, command_type=cmd_type, on_sent=on_sent): + if self._enqueue_for_sending(cmd, command_type=cmd_type, on_sent=on_sent, tags=tags): if not self.isStreaming(): # trigger the "queued" phase only if we are not streaming to sd right now - self._process_command_phase("queued", cmd, cmd_type, gcode=gcode, subcode=subcode) + self._process_command_phase("queued", cmd, cmd_type, gcode=gcode, subcode=subcode, tags=tags) return True else: return False @@ -2376,18 +2422,18 @@ class MachineCom(object): enqueued_something = False # process all but the last ... - for (cmd, cmd_type, gcode, subcode) in results: - enqueued_something = process(cmd, cmd_type, gcode, subcode) or enqueued_something + for (cmd, cmd_type, gcode, subcode, tags) in results: + enqueued_something = process(cmd, cmd_type, gcode, subcode, tags=tags) or enqueued_something # ... and then process the last one with the on_sent callback attached - cmd, cmd_type, gcode, subcode = last_command - enqueued_something = process(cmd, cmd_type, gcode, subcode, on_sent=on_sent) or enqueued_something + cmd, cmd_type, gcode, subcode, tags = last_command + enqueued_something = process(cmd, cmd_type, gcode, subcode, on_sent=on_sent, tags=tags) or enqueued_something return enqueued_something ##~~ send loop handling - def _enqueue_for_sending(self, command, linenumber=None, command_type=None, on_sent=None, resend=False): + def _enqueue_for_sending(self, command, linenumber=None, command_type=None, on_sent=None, resend=False, tags=None): """ Enqueues a command and optional linenumber to use for it in the send queue. @@ -2398,6 +2444,8 @@ class MachineCom(object): command_type (str): Optional command type, if set and command type is already in the queue the command won't be enqueued on_sent (callable): Optional callable to call after command has been sent to printer. + resend (bool): Whether this is a resent command + tags (set of str or None): Tags to attach to this command """ try: @@ -2405,7 +2453,7 @@ class MachineCom(object): if resend: target = "resend" - self._send_queue.put((command, linenumber, command_type, on_sent, False), item_type=command_type, target=target) + self._send_queue.put((command, linenumber, command_type, on_sent, False, tags), item_type=command_type, target=target) return True except TypeAlreadyInQueue as e: self._logger.debug("Type already in send queue: " + e.type) @@ -2436,7 +2484,7 @@ class MachineCom(object): self._dwelling_until = False # fetch command, command type and optional linenumber and sent callback from queue - command, linenumber, command_type, on_sent, processed = entry + command, linenumber, command_type, on_sent, processed, tags = entry # some firmwares (e.g. Smoothie) might support additional in-band communication that will not # stick to the acknowledgement behaviour of GCODE, so we check here if we have a GCODE command @@ -2451,7 +2499,10 @@ class MachineCom(object): else: if not processed: # trigger "sending" phase if we didn't so far - results = self._process_command_phase("sending", command, command_type, gcode=gcode, subcode=subcode) + results = self._process_command_phase("sending", command, command_type, + gcode=gcode, + subcode=subcode, + tags=tags) if not results: # No, we are not going to send this, that was a last-minute bail. @@ -2471,7 +2522,7 @@ class MachineCom(object): assert len(results) == 1 # we only use the first (and only!) entry here - command, _, gcode, subcode = results[0] + command, _, gcode, subcode, tags = results[0] if command.strip() == "": self._logger.info("Refusing to send an empty line to the printer") @@ -2499,7 +2550,7 @@ class MachineCom(object): if on_sent is not None and callable(on_sent): # we have a sent callback for this specific command, let's execute it now on_sent() - self._process_command_phase("sent", command, command_type, gcode=gcode, subcode=subcode) + self._process_command_phase("sent", command, command_type, gcode=gcode, subcode=subcode, tags=tags) # we only need to use up a clear if the command we just sent was either a gcode command or if we also # require ack's for unknown commands @@ -2527,10 +2578,28 @@ class MachineCom(object): self._logger.exception("Caught an exception in the send loop") self._log("Closing down send loop") - def _process_command_phase(self, phase, command, command_type=None, gcode=None, subcode=None): + def _log_command_phase(self, phase, command, *args, **kwargs): + if self._phaseLogger.isEnabledFor(logging.DEBUG): + output_parts = [u"phase: {}".format(phase), + u"command: {}".format(command)] + + if kwargs.get("command_type"): + output_parts.append(u"command_type: {}".format(kwargs["command_type"])) + if kwargs.get("gcode"): + output_parts.append(u"gcode: {}".format(kwargs["gcode"])) + if kwargs.get("subcode"): + output_parts.append(u"subcode: {}".format(kwargs["subcode"])) + if kwargs.get("tags"): + output_parts.append(u"tags: [ {} ]".format(", ".join(sorted(kwargs["tags"])))) + + self._phaseLogger.debug(" | ".join(output_parts)) + + def _process_command_phase(self, phase, command, command_type=None, gcode=None, subcode=None, tags=None): if gcode is None: gcode, subcode = gcode_and_subcode_for_cmd(command) - results = [(command, command_type, gcode, subcode)] + results = [(command, command_type, gcode, subcode, tags)] + + self._log_command_phase(phase, command, command_type=command_type, gcode=gcode, subcode=subcode, tags=tags) if (self.isStreaming() and self.isPrinting()) or phase not in ("queuing", "queued", "sending", "sent"): return results @@ -2538,18 +2607,22 @@ class MachineCom(object): # send it through the phase specific handlers provided by plugins for name, hook in self._gcode_hooks[phase].items(): new_results = [] - for command, command_type, gcode, subcode in results: + for command, command_type, gcode, subcode, tags in results: try: - hook_results = hook(self, phase, command, command_type, gcode, subcode=subcode) + hook_results = hook(self, phase, command, command_type, gcode, subcode=subcode, tags=tags) except: self._logger.exception("Error while processing hook {name} for phase {phase} and command {command}:".format(**locals())) else: - normalized = _normalize_command_handler_result(command, command_type, gcode, subcode, hook_results) + normalized = _normalize_command_handler_result(command, command_type, gcode, subcode, tags, + hook_results, + tags_to_add={"source:rewrite", + "phase:{}".format(phase), + "plugin:{}".format(name)}) # make sure we don't allow multi entry results in anything but the queuing phase if not phase in ("queuing",) and len(normalized) > 1: self._logger.error("Error while processing hook {name} for phase {phase} and command {command}: Hook returned multi-entry result for phase {phase} and command {command}. That's not supported, if you need to do multi expansion of commands you need to do this in the queuing phase. Ignoring hook result and sending command as-is.".format(**locals())) - new_results.append((command, command_type, gcode, subcode)) + new_results.append((command, command_type, gcode, subcode, tags)) else: new_results += normalized if not new_results: @@ -2560,15 +2633,19 @@ class MachineCom(object): # if it's a gcode command send it through the specific handler if it exists new_results = [] modified = False - for command, command_type, gcode, subcode in results: + for command, command_type, gcode, subcode, tags in results: if gcode is not None: gcode_handler = "_gcode_" + gcode + "_" + phase if hasattr(self, gcode_handler): - handler_results = getattr(self, gcode_handler)(command, cmd_type=command_type, subcode=subcode) - new_results += _normalize_command_handler_result(command, command_type, gcode, subcode, handler_results) + handler_results = getattr(self, gcode_handler)(command, + cmd_type=command_type, + subcode=subcode, + tags=tags) + new_results += _normalize_command_handler_result(command, command_type, gcode, subcode, tags, + handler_results) modified = True else: - new_results.append((command, command_type, gcode, subcode)) + new_results.append((command, command_type, gcode, subcode, tags)) modified = True if modified: if not new_results: @@ -2581,9 +2658,14 @@ class MachineCom(object): command_phase_handler = "_command_phase_" + phase if hasattr(self, command_phase_handler): new_results = [] - for command, command_type, gcode, subcode in results: - handler_results = getattr(self, command_phase_handler)(command, cmd_type=command_type, gcode=gcode, subcode=subcode) - new_results += _normalize_command_handler_result(command, command_type, gcode, subcode, handler_results) + for command, command_type, gcode, subcode, tags in results: + handler_results = getattr(self, command_phase_handler)(command, + cmd_type=command_type, + gcode=gcode, + subcode=subcode, + tags=tags) + new_results += _normalize_command_handler_result(command, command_type, gcode, subcode, tags, + handler_results) results = new_results # finally return whatever we resulted on @@ -3670,7 +3752,7 @@ def gcode_and_subcode_for_cmd(cmd): return gcode, values.get("subcode", None) -def _normalize_command_handler_result(command, command_type, gcode, subcode, handler_results): +def _normalize_command_handler_result(command, command_type, gcode, subcode, tags, handler_results, tags_to_add=None): """ Normalizes a command handler result. @@ -3678,14 +3760,15 @@ def _normalize_command_handler_result(command, command_type, gcode, subcode, han entries. ``None`` results are ignored, the provided ``command``, ``command_type``, - ``gcode`` and ``subcode`` are returned in that case (as single-entry list with - one 4-tuple as entry). + ``gcode``, ``subcode`` and ``tags`` are returned in that case (as single-entry list with + one 5-tuple as entry). Single result entries are either: * a single string defining a replacement ``command`` * a 1-tuple defining a replacement ``command`` * a 2-tuple defining a replacement ``command`` and ``command_type`` + * a 3-tuple defining a replacement ``command`` and ``command_type`` and additional ``tags`` to set A ``command`` that is ``None`` will lead to the entry being ignored for the normalized result. @@ -3696,26 +3779,32 @@ def _normalize_command_handler_result(command, command_type, gcode, subcode, han be empty in which case the command is to be suppressed. Examples: - >>> _normalize_command_handler_result("M105", None, "M105", None, None) - [('M105', None, 'M105', None)] - >>> _normalize_command_handler_result("M105", None, "M105", None, "M110") - [('M110', None, 'M110', None)] - >>> _normalize_command_handler_result("M105", None, "M105", None, ["M110"]) - [('M110', None, 'M110', None)] - >>> _normalize_command_handler_result("M105", None, "M105", None, ["M110", "M117 Foobar"]) - [('M110', None, 'M110', None), ('M117 Foobar', None, 'M117', None)] - >>> _normalize_command_handler_result("M105", None, "M105", None, [("M110",), "M117 Foobar"]) - [('M110', None, 'M110', None), ('M117 Foobar', None, 'M117', None)] - >>> _normalize_command_handler_result("M105", None, "M105", None, [("M110", "lineno_reset"), "M117 Foobar"]) - [('M110', 'lineno_reset', 'M110', None), ('M117 Foobar', None, 'M117', None)] - >>> _normalize_command_handler_result("M105", None, "M105", None, []) + >>> _normalize_command_handler_result("M105", None, "M105", None, None, None) + [('M105', None, 'M105', None, None)] + >>> _normalize_command_handler_result("M105", None, "M105", None, None, "M110") + [('M110', None, 'M110', None, None)] + >>> _normalize_command_handler_result("M105", None, "M105", None, None, ["M110"]) + [('M110', None, 'M110', None, None)] + >>> _normalize_command_handler_result("M105", None, "M105", None, None, ["M110", "M117 Foobar"]) + [('M110', None, 'M110', None, None), ('M117 Foobar', None, 'M117', None, None)] + >>> _normalize_command_handler_result("M105", None, "M105", None, None, [("M110",), "M117 Foobar"]) + [('M110', None, 'M110', None, None), ('M117 Foobar', None, 'M117', None, None)] + >>> _normalize_command_handler_result("M105", None, "M105", None, None, [("M110", "lineno_reset"), "M117 Foobar"]) + [('M110', 'lineno_reset', 'M110', None, None), ('M117 Foobar', None, 'M117', None, None)] + >>> _normalize_command_handler_result("M105", None, "M105", None, None, []) [] - >>> _normalize_command_handler_result("M105", None, "M105", None, ["M110", None]) - [('M110', None, 'M110', None)] - >>> _normalize_command_handler_result("M105", None, "M105", None, [("M110",), (None, "ignored")]) - [('M110', None, 'M110', None)] - >>> _normalize_command_handler_result("M105", None, "M105", None, [("M110",), ("M117 Foobar", "display_message"), ("tuple", "of unexpected", "length"), ("M110", "lineno_reset")]) - [('M110', None, 'M110', None), ('M117 Foobar', 'display_message', 'M117', None), ('M110', 'lineno_reset', 'M110', None)] + >>> _normalize_command_handler_result("M105", None, "M105", None, None, ["M110", None]) + [('M110', None, 'M110', None, None)] + >>> _normalize_command_handler_result("M105", None, "M105", None, None, [("M110",), (None, "ignored")]) + [('M110', None, 'M110', None, None)] + >>> _normalize_command_handler_result("M105", None, "M105", None, None, [("M110",), ("M117 Foobar", "display_message"), ("tuple", "of", "unexpected", "length"), ("M110", "lineno_reset")]) + [('M110', None, 'M110', None, None), ('M117 Foobar', 'display_message', 'M117', None, None), ('M110', 'lineno_reset', 'M110', None, None)] + >>> _normalize_command_handler_result("M105", None, "M105", None, {"tag1", "tag2"}, ["M110", "M117 Foobar"]) + [('M110', None, 'M110', None, set(['tag1', 'tag2'])), ('M117 Foobar', None, 'M117', None, set(['tag1', 'tag2']))] + >>> _normalize_command_handler_result("M105", None, "M105", None, {"tag1", "tag2"}, ["M110", "M105", "M117 Foobar"], tags_to_add={"tag3"}) + [('M110', None, 'M110', None, set(['tag1', 'tag2', 'tag3'])), ('M105', None, 'M105', None, set(['tag1', 'tag2'])), ('M117 Foobar', None, 'M117', None, set(['tag1', 'tag2', 'tag3']))] + >>> _normalize_command_handler_result("M105", None, "M105", None, {"tag1", "tag2"}, ["M110", ("M105", "temperature_poll"), "M117 Foobar"], tags_to_add={"tag3"}) + [('M110', None, 'M110', None, set(['tag1', 'tag2', 'tag3'])), ('M105', 'temperature_poll', 'M105', None, set(['tag1', 'tag2', 'tag3'])), ('M117 Foobar', None, 'M117', None, set(['tag1', 'tag2', 'tag3']))] Arguments: command (str or None): The command for which the handler result was @@ -3726,16 +3815,20 @@ def _normalize_command_handler_result(command, command_type, gcode, subcode, han generated subcode (str or None): The GCODE subcode for which the handler result was generated + tags (set of str or None): The tags associated with the GCODE for which + the handler result was generated handler_results: The handler result(s) to normalized. Can be either a single result entry or a list of result entries. + tags_to_add (set of str or None): List of tags to add to expanded result + entries Returns: (list) - A list of normalized handler result entries, which are - 4-tuples consisting of ``command``, ``command_type``, ``gcode`` - and ``subcode``, the latter three of which may be ``None``. + 5-tuples consisting of ``command``, ``command_type``, ``gcode`` + ``subcode`` and ``tags``, the latter three of which may be ``None``. """ - original = (command, command_type, gcode, subcode) + original = (command, command_type, gcode, subcode, tags) if handler_results is None: # handler didn't return anything, we'll just continue @@ -3753,21 +3846,39 @@ def _normalize_command_handler_result(command, command_type, gcode, subcode, han # entry is None, we'll ignore that entry and continue continue + if tags: + # copy the tags + tags = set(tags) + if isinstance(handler_result, basestring): # entry is just a string, replace command with it command = handler_result - gcode, subcode = gcode_and_subcode_for_cmd(command) - result.append((command, command_type, gcode, subcode)) + + if command != original[0]: + # command changed, re-extract gcode and subcode and add tags if necessary + gcode, subcode = gcode_and_subcode_for_cmd(command) + + if tags_to_add and isinstance(tags_to_add, set) and command != original[0]: + if tags is None: + tags = set() + tags |= tags_to_add + + result.append((command, command_type, gcode, subcode, tags)) elif isinstance(handler_result, tuple): # entry is a tuple, extract command and command_type hook_result_length = len(handler_result) + handler_tags = None + if hook_result_length == 1: # handler returned just the command command, = handler_result elif hook_result_length == 2: # handler returned command and command_type command, command_type = handler_result + elif hook_result_length == 3: + # handler returned command, command type and additional tags + command, command_type, handler_tags = handler_result else: # handler returned a tuple of an unexpected length, ignore # and continue @@ -3777,11 +3888,25 @@ def _normalize_command_handler_result(command, command_type, gcode, subcode, han # command is None, ignore it and continue continue - gcode, subcode = gcode_and_subcode_for_cmd(command) - result.append((command, command_type, gcode, subcode)) + if command != original[0] or command_type != original[2]: + # command or command_type changed, re-extract gcode and subcode and add tags if necessary + gcode, subcode = gcode_and_subcode_for_cmd(command) + + if tags_to_add and isinstance(tags_to_add, set): + if tags is None: + tags = set() + tags |= tags_to_add + + if handler_tags and isinstance(handler_tags, set): + # handler provided additional tags, add them + if tags is None: + tags = set() + tags |= handler_tags + + result.append((command, command_type, gcode, subcode, tags)) # reset to original - command, command_type, gcode, subcode = original + command, command_type, gcode, subcode, tags = original return result From d166bafa8df4defd4f6da3f172a0aa5a1137dc9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Fri, 16 Feb 2018 22:03:45 +0100 Subject: [PATCH 33/38] New context "job_on_hold" on printer object Can be used to do some stuff while printing while ensuring that the file won't continue to be streamed. Should be used sparingly and only for very limited reasons since it can severely affect print results. --- src/octoprint/printer/__init__.py | 27 +++++++++++++++++++++++++++ src/octoprint/printer/standard.py | 5 +++++ src/octoprint/util/comm.py | 23 +++++++++++++++++++++-- 3 files changed, 53 insertions(+), 2 deletions(-) diff --git a/src/octoprint/printer/__init__.py b/src/octoprint/printer/__init__.py index 84a892afb..038aa1547 100644 --- a/src/octoprint/printer/__init__.py +++ b/src/octoprint/printer/__init__.py @@ -107,6 +107,33 @@ class PrinterInterface(object): """ raise NotImplementedError() + def job_on_hold(self, blocking=True, *args, **kwargs): + """ + Contextmanager that allows executing code while printing while making sure that no commands from the file + being printed are continued to be sent to the printer. Note that this will only work for local files, + NOT SD files. + + Example: + + .. code-block:: python + + with printer.job_on_hold(): + park_printhead() + take_snapshot() + send_printhead_back() + + It should be used sparingly and only for very specific situations (such as parking the print head somewhere, + taking a snapshot from the webcam, then continuing). If you abuse this, you WILL cause print quality issues! + + A lock is in place that ensures that the context can only actually be held by one thread at a time. If you + don't want to block on acquire, be sure to set ``blocking`` to ``False`` and catch the ``RuntimeException`` thrown + if the lock can't be acquired. + + Args: + blocking (bool): Whether to block while attempting to acquire the lock (default) or not + """ + raise NotImplementedError() + def fake_ack(self, *args, **kwargs): """ Fakes an acknowledgment for the communication layer. If the communication between OctoPrint and the printer diff --git a/src/octoprint/printer/standard.py b/src/octoprint/printer/standard.py index 620fde17e..1284ac2be 100644 --- a/src/octoprint/printer/standard.py +++ b/src/octoprint/printer/standard.py @@ -233,6 +233,11 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback): return self._comm.getTransport() getTransport = util.deprecated("getTransport has been renamed to get_transport", since="1.2.0-dev-590", includedoc="Replaced by :func:`get_transport`") + def job_on_hold(self, blocking=None, *args, **kwargs): + if self._comm is None: + raise RuntimeError("No connection to the printer") + return self._comm.job_on_hold(blocking=blocking) + def fake_ack(self, *args, **kwargs): if self._comm is None: return diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index 234efd228..372ed7fac 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -10,6 +10,7 @@ import glob import time import re import threading +import contextlib try: import queue @@ -502,6 +503,8 @@ class MachineCom(object): # print job self._currentFile = None + self._job_on_hold = False + self._job_on_hold_mutex = threading.RLock() # multithreading locks self._jobLock = threading.RLock() @@ -696,6 +699,19 @@ class MachineCom(object): ##~~ external interface + @contextlib.contextmanager + def job_on_hold(self, blocking=True): + if not self._job_on_hold_mutex.acquire(blocking=blocking): + raise RuntimeError("Could not acquire job_on_hold lock") + + self._job_on_hold = True + try: + yield + finally: + self._job_on_hold = False + self._job_on_hold_mutex.release() + self._continue_sending() + def close(self, is_error=False, wait=True, timeout=10.0, *args, **kwargs): """ Closes the connection to the printer. @@ -795,7 +811,7 @@ class MachineCom(object): if not cmd: return False - if self.isPrinting() and not self.isSdFileSelected(): + if self.isPrinting() and not self.isSdFileSelected() and not self._job_on_hold: try: self._command_queue.put((cmd, cmd_type, on_sent, tags), item_type=cmd_type) return True @@ -1421,7 +1437,7 @@ class MachineCom(object): handled = True # process timeouts - elif ((line == "" and now > self._timeout) or (self.isPrinting() and now > self._ok_timeout)) \ + elif ((line == "" and now > self._timeout) or (self.isPrinting() and not self._job_on_hold and now > self._ok_timeout)) \ and (not self._blockWhileDwelling or not self._dwelling_until or now > self._dwelling_until): # We have two timeout variants: # @@ -1869,6 +1885,9 @@ class MachineCom(object): # we found something in the queue to send return True + elif self._job_on_hold: + return False + elif self._sendNext(): # we sent the next line from the file return True From 55f5c472a013f5b7fab81b37a814a5dcc80c6938 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Fri, 16 Feb 2018 22:03:54 +0100 Subject: [PATCH 34/38] [Docs] Some fixes --- docs/bundledplugins/logging.rst | 4 ++-- docs/plugins/hooks.rst | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/bundledplugins/logging.rst b/docs/bundledplugins/logging.rst index 0fccc9e1a..67e0a923e 100644 --- a/docs/bundledplugins/logging.rst +++ b/docs/bundledplugins/logging.rst @@ -8,7 +8,7 @@ The OctoPrint Logging plugin comes bundled with OctoPrint starting with version It implements the log management functionality that was formerly part of the core application and adds features to configure logging levels for sub modules through the included settings dialog. -.. _fig-bundledplugins-pluginmanager-mainscreen: +.. _fig-bundledplugins-logging-settings: .. figure:: ../images/bundledplugins-logging-settings.png :align: center :alt: Logging plugin @@ -34,7 +34,7 @@ Retrieve a list of available log files Retrieve information regarding all log files currently available and regarding the disk space still available in the system on the location the log files are being stored. - Returns a :ref:`Logfile Retrieve response `. + Returns a :ref:`Logfile Retrieve response `. **Example** diff --git a/docs/plugins/hooks.rst b/docs/plugins/hooks.rst index f9c8d7617..6a397fe31 100644 --- a/docs/plugins/hooks.rst +++ b/docs/plugins/hooks.rst @@ -454,7 +454,7 @@ This describes actually four hooks: the logger ``octoprint.util.comm.command_phases`` to ``DEBUG``, connect to a printer (real or virtual) and take a look at your ``octoprint.log`` during serial traffic: - .. code-block:: plain + .. code-block:: none 2018-02-16 18:20:31,213 - octoprint.util.comm.command_phases - DEBUG - phase: queuing | command: T0 | gcode: T | tags: [ api:printer.command, source:api, trigger:printer.commands ] 2018-02-16 18:20:31,216 - octoprint.util.comm.command_phases - DEBUG - phase: queued | command: M117 Before T! | gcode: M117 | tags: [ api:printer.command, phase:queuing, plugin:multi_gcode_test, source:api, source:rewrite, trigger:printer.commands ] @@ -515,7 +515,7 @@ This describes actually four hooks: * A 2-tuple consisting of a rewritten version of the ``cmd`` and the ``cmd_type``, e.g. ``return "M105", "temperature_poll"``. Handlers which wish to rewrite both the command and the command type should use this option. * A 3-tuple consisting of a rewritten version of the ``cmd``, the ``cmd_type`` and any additional ``tags`` you might - want to attach to the lifecycle of the command, e.g. ``return "M105", "temperature_poll", "my_custom_tag" + want to attach to the lifecycle of the command in a set, e.g. ``return "M105", "temperature_poll", {"my_custom_tag"}`` * **"queuing" phase only**: A list of any of the above to allow for expanding one command into many. The following example shows how any queued command could be turned into a sequence of a temperature query, line number reset, display of the ``gcode`` on the printer's display and finally the actual command (this example @@ -558,7 +558,7 @@ This describes actually four hooks: :param str gcode: Parsed GCODE command, e.g. ``G0`` or ``M110``, may also be None if no known command could be parsed :param str subcode: Parsed subcode of the GCODE command, e.g. ``1`` for ``M80.1``. Will be None if no subcode was provided or no command could be parsed. - :param set tags: Tags attached to the + :param set tags: Tags attached to the command :return: None, 1-tuple, 2-tuple or string, see the description above for details. .. _sec-plugins-hook-comm-protocol-gcode-received: From 33147b03059cc06f426423b75b3a4fb141232a3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 19 Feb 2018 11:27:19 +0100 Subject: [PATCH 35/38] Make terminal logging to log unicode safe Closes #2426 --- src/octoprint/util/comm.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index 372ed7fac..52c3b5773 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -561,9 +561,9 @@ class MachineCom(object): self._serialLogger.debug(message) def _to_logfile_with_terminal(self, message=None, level=logging.INFO): - log = "Last lines in terminal:\n" + "\n".join(map(lambda x: "| " + x, list(self._terminal_log))) + log = u"Last lines in terminal:\n" + u"\n".join(map(lambda x: u"| {}".format(x), list(self._terminal_log))) if message is not None: - log = message + "\n| " + log + log = message + u"\n| " + log self._logger.log(level, log) def _addToLastLines(self, cmd): @@ -2188,7 +2188,7 @@ class MachineCom(object): elif not self.isError(): # handle everything else error_text = line[6:] if lower_line.startswith("error:") else line[2:] - self._to_logfile_with_terminal("Received an error from the printer's firmware: {}".format(error_text), + self._to_logfile_with_terminal(u"Received an error from the printer's firmware: {}".format(error_text), level=logging.WARN) if not self._ignore_errors: @@ -2348,7 +2348,8 @@ class MachineCom(object): self._log_resends_rate_start = now self._log_resends_rate_count = 0 - self._to_logfile_with_terminal("Got a resend request from the printer: requested line = {}, current line = {}".format(lineToResend, self._currentLine)) + self._to_logfile_with_terminal(u"Got a resend request from the printer: requested line = {}, " + u"current line = {}".format(lineToResend, self._currentLine)) self._log_resends_rate_count += 1 self._send_queue.resend_active = True From 541844ce3c69164a74671a1970f77c89fcbaad8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 19 Feb 2018 11:37:57 +0100 Subject: [PATCH 36/38] Add action:cancel Closes #2367 --- docs/features/action_commands.rst | 10 +++++++--- src/octoprint/util/comm.py | 5 ++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/features/action_commands.rst b/docs/features/action_commands.rst index 82591cf9e..502f068b8 100644 --- a/docs/features/action_commands.rst +++ b/docs/features/action_commands.rst @@ -21,16 +21,20 @@ Action commands are a feature defined for the GCODE based RepRap communication p OctoPrint out of the box supports handling of the above mentioned commands: +cancel + When this command is received from the printer, OctoPrint will cancel a current print job like if the + "Cancel" button had been clicked. + pause - When this command is received from the printer, OctoPrint will pause streaming of a current print job just like if the + When this command is received from the printer, OctoPrint will pause a current print job just like if the "Pause" button had been clicked. resume - When this command is received from the printer, OctoPrint will resume streaming of a current print job just like if + When this command is received from the printer, OctoPrint will resume a current print job just like if the "Resume" button had been clicked. disconnect - When this command is Received from the printer, OctoPrint will immediately disconnect from it. + When this command is received from the printer, OctoPrint will immediately disconnect from it. Support for additional commands may be added by plugins by implementing a handler for the :ref:`octoprint.comm.protocol.action ` hook. diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index 52c3b5773..05babc295 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -1361,7 +1361,10 @@ class MachineCom(object): if debugging_output.startswith("action:"): action_command = debugging_output[len("action:"):].strip() - if action_command == "pause": + if action_command == "cancel": + self._log("Cancelling on request of the printer...") + self.cancelPrint() + elif action_command == "pause": self._log("Pausing on request of the printer...") self.setPause(True) elif action_command == "resume": From 40082456c1a9bad8a52b393313af3d1469cf45b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Fri, 23 Feb 2018 16:57:46 +0100 Subject: [PATCH 37/38] Don't even import disabled plugins We want to avoid disabled plugins interfering with our application in any way at all. Hence disabled plugins are now treated the same way as blacklisted ones. The system will only create a dummy entry for them and not import them at all. As a consequence, a restart of the platform will be necessary for disabling plugins that were disabled. The Plugin Manager has been adjusted accordingly. Note that by no longer even importing the base file, plugin name, version, description and other such metadata defined through control properties won't be accessible. Closes #2442 --- src/octoprint/__init__.py | 7 +- src/octoprint/plugin/core.py | 69 +++++++++++-------- .../plugins/pluginmanager/__init__.py | 21 +++--- .../pluginmanager/static/js/pluginmanager.js | 9 +-- 4 files changed, 60 insertions(+), 46 deletions(-) diff --git a/src/octoprint/__init__.py b/src/octoprint/__init__.py index f04a963f1..c67c05280 100644 --- a/src/octoprint/__init__.py +++ b/src/octoprint/__init__.py @@ -322,12 +322,9 @@ def init_pluginsystem(settings, safe_mode=False, ignore_blacklist=True, connecti plugin_validators = [] if safe_mode: def validator(phase, plugin_info): - if phase == "after_load": + if phase in ("before_import", "before_load", "before_enable"): setattr(plugin_info, "safe_mode_victim", not plugin_info.bundled) - setattr(plugin_info, "safe_mode_enabled", False) - elif phase == "before_enable": if not plugin_info.bundled: - setattr(plugin_info, "safe_mode_enabled", True) return False return True plugin_validators.append(validator) @@ -440,7 +437,7 @@ def get_plugin_blacklist(settings, connectivity_checker=None): result.append((entry["plugin"], version)) else: logger.debug("Blacklisted plugin: {}".format(entry["plugin"])) - result.append(entry["key"]) + result.append(entry["plugin"]) return result diff --git a/src/octoprint/plugin/core.py b/src/octoprint/plugin/core.py index 2cce7fe1a..1ceffcc36 100644 --- a/src/octoprint/plugin/core.py +++ b/src/octoprint/plugin/core.py @@ -144,6 +144,7 @@ class PluginInfo(object): self.origin = None self.enabled = True self.blacklisted = False + self.forced_disabled = False self.bundled = False self.loaded = False self.managable = True @@ -159,7 +160,10 @@ class PluginInfo(object): def validate(self, phase, additional_validators=None): result = True - if phase == "before_load": + if phase == "before_import": + result = not self.forced_disabled and not self.blacklisted and result + + elif phase == "before_load": # if the plugin still uses __plugin_init__, log a deprecation warning and move it to __plugin_load__ if hasattr(self.instance, self.__class__.attr_init): if not hasattr(self.instance, self.__class__.attr_load): @@ -193,7 +197,7 @@ class PluginInfo(object): if additional_validators is not None: for validator in additional_validators: - result = result and validator(phase, self) + result = validator(phase, self) and result return result @@ -602,14 +606,13 @@ class PluginManager(object): # plugin is already defined, ignore it continue - plugin = self._import_plugin_from_module(key, folder=folder) + bundled = flagged_readonly + + plugin = self._import_plugin_from_module(key, folder=folder, bundled=bundled) if plugin: plugin.origin = FolderOrigin("folder", folder) plugin.managable = not flagged_readonly and not actual_readonly - plugin.bundled = flagged_readonly - plugin.enabled = False - result[key] = plugin except: self.logger.exception("Error processing folder entry {!r} from folder {}".format(entry, folder)) @@ -676,6 +679,7 @@ class PluginManager(object): plugin = self._import_plugin_from_module(key, **kwargs) if plugin: plugin.origin = EntryPointOrigin("entry_point", group, module_name, package_name, version) + plugin.enabled = False # plugin is manageable if its location is writable and OctoPrint # is either not running from a virtual env or the plugin is @@ -685,19 +689,19 @@ class PluginManager(object): plugin.managable = os.access(plugin.location, os.W_OK) \ and (not self._python_virtual_env or is_sub_path_of(plugin.location, self._python_prefix) - or is_editable_install(self._python_install_dir, - package_name, - module_name, - plugin.location)) + or is_editable_install(self._python_install_dir, + package_name, + module_name, + plugin.location)) - plugin.enabled = False result[key] = plugin except: self.logger.exception("Error processing entry point {!r} for group {}".format(entry_point, group)) return result - def _import_plugin_from_module(self, key, folder=None, module_name=None, name=None, version=None, summary=None, author=None, url=None, license=None): + def _import_plugin_from_module(self, key, folder=None, module_name=None, name=None, version=None, summary=None, + author=None, url=None, license=None, bundled=False): # TODO error handling try: if folder: @@ -710,14 +714,34 @@ class PluginManager(object): self.logger.warn("Could not locate plugin {key}".format(key=key)) return None + # Create a simple dummy entry first ... + plugin = PluginInfo(key, module[1], None, name=name, version=version, description=summary, author=author, + url=url, license=license) + plugin.bundled = bundled + + if self._is_plugin_disabled(key): + self.logger.info("Plugin {} is disabled.".format(plugin)) + plugin.forced_disabled = True + if self._is_plugin_blacklisted(key) or (version is not None and self._is_plugin_version_blacklisted(key, version)): - plugin = PluginInfo(key, module[1], None, name=name, version=version, description=summary, author=author, url=url, license=license) + self.logger.warn("Plugin {} is blacklisted.".format(plugin)) plugin.blacklisted = True - self.logger.warn("Plugin {} is blacklisted. Not importing it, only registering a dummy entry.".format(plugin)) + + if not plugin.validate("before_import", additional_validators=self.plugin_validators): return plugin - plugin = self._import_plugin(key, *module, name=name, version=version, summary=summary, author=author, url=url, license=license) - if plugin is None: + # ... then create and return the real one + return self._import_plugin(key, *module, + name=name, version=version, summary=summary, author=author, url=url, + license=license, bundled=bundled) + + def _import_plugin(self, key, f, filename, description, name=None, version=None, summary=None, author=None, url=None, license=None, bundled=False): + try: + instance = imp.load_module(key, f, filename, description) + plugin = PluginInfo(key, filename, instance, name=name, version=version, description=summary, author=author, url=url, license=license) + plugin.bundled = bundled + except: + self.logger.exception("Error loading plugin {key}".format(key=key)) return None if plugin.check(): @@ -726,15 +750,6 @@ class PluginManager(object): self.logger.warn("Plugin \"{plugin}\" did not pass check".format(plugin=str(plugin))) return None - - def _import_plugin(self, key, f, filename, description, name=None, version=None, summary=None, author=None, url=None, license=None): - try: - instance = imp.load_module(key, f, filename, description) - return PluginInfo(key, filename, instance, name=name, version=version, description=summary, author=author, url=url, license=license) - except: - self.logger.exception("Error loading plugin {key}".format(key=key)) - return None - def _is_plugin_disabled(self, key): return key in self.plugin_disabled_list or key.endswith('disabled') @@ -765,7 +780,7 @@ class PluginManager(object): # 1st pass: loading the plugins for name, plugin in plugins.items(): try: - if not plugin.blacklisted: + if not plugin.blacklisted and not plugin.forced_disabled: self.load_plugin(name, plugin, startup=startup, initialize_implementation=initialize_implementations) except PluginNeedsRestart: pass @@ -779,7 +794,7 @@ class PluginManager(object): # 2nd pass: enabling those plugins that need enabling for name, plugin in plugins.items(): try: - if plugin.loaded and not self._is_plugin_disabled(name): + if plugin.loaded and not plugin.forced_disabled: if plugin.blacklisted: self.logger.warn("Plugin {} is blacklisted. Not enabling it.".format(plugin)) continue diff --git a/src/octoprint/plugins/pluginmanager/__init__.py b/src/octoprint/plugins/pluginmanager/__init__.py index 2ee271bb4..e15c987f9 100644 --- a/src/octoprint/plugins/pluginmanager/__init__.py +++ b/src/octoprint/plugins/pluginmanager/__init__.py @@ -561,13 +561,14 @@ class PluginManagerPlugin(octoprint.plugin.SimpleApiPlugin, if plugin.key == "pluginmanager": return make_response("Can't enable/disable Plugin Manager", 400) + pending = ((command == "disable" and plugin.key in self._pending_enable) or (command == "enable" and plugin.key in self._pending_disable)) + safe_mode_victim = getattr(plugin, "safe_mode_victim", False) + needs_restart = self._plugin_manager.is_restart_needing_plugin(plugin) needs_refresh = plugin.implementation and isinstance(plugin.implementation, octoprint.plugin.ReloadNeedingPlugin) needs_reconnect = self._plugin_manager.has_any_of_hooks(plugin, self._reconnect_hooks) and self._printer.is_operational() - pending = ((command == "disable" and plugin.key in self._pending_enable) or (command == "enable" and plugin.key in self._pending_disable)) - safe_mode_victim = getattr(plugin, "safe_mode_victim", False) - needs_restart_api = (needs_restart or safe_mode_victim) and not pending + needs_restart_api = (needs_restart or safe_mode_victim or plugin.forced_disabled) and not pending needs_refresh_api = needs_refresh and not pending needs_reconnect_api = needs_reconnect and not pending @@ -677,12 +678,12 @@ class PluginManagerPlugin(octoprint.plugin.SimpleApiPlugin, self._settings.global_set(["plugins", "_disabled"], disabled_list) self._settings.save(force=True) - if not needs_restart and not getattr(plugin, "safe_mode_victim", False): + if not needs_restart and not plugin.forced_disabled and not getattr(plugin, "safe_mode_victim", False): self._plugin_manager.enable_plugin(plugin.key) else: if plugin.key in self._pending_disable: self._pending_disable.remove(plugin.key) - elif (not plugin.enabled and not getattr(plugin, "safe_mode_enabled", False)) and plugin.key not in self._pending_enable: + elif not plugin.enabled and plugin.key not in self._pending_enable: self._pending_enable.add(plugin.key) def _mark_plugin_disabled(self, plugin, needs_restart=False): @@ -692,12 +693,12 @@ class PluginManagerPlugin(octoprint.plugin.SimpleApiPlugin, self._settings.global_set(["plugins", "_disabled"], disabled_list) self._settings.save(force=True) - if not needs_restart and not getattr(plugin, "safe_mode_victim", False): + if not needs_restart and not plugin.forced_disabled and not getattr(plugin, "safe_mode_victim", False): self._plugin_manager.disable_plugin(plugin.key) else: if plugin.key in self._pending_enable: self._pending_enable.remove(plugin.key) - elif (plugin.enabled or getattr(plugin, "safe_mode_enabled", False)) and plugin.key not in self._pending_disable: + elif (plugin.enabled or plugin.forced_disabled or getattr(plugin, "safe_mode_victim", False)) and plugin.key not in self._pending_disable: self._pending_disable.add(plugin.key) def _fetch_all_data(self, async=False): @@ -920,10 +921,10 @@ class PluginManagerPlugin(octoprint.plugin.SimpleApiPlugin, managable=plugin.managable, enabled=plugin.enabled, blacklisted=plugin.blacklisted, + forced_disabled=plugin.forced_disabled, safe_mode_victim=getattr(plugin, "safe_mode_victim", False), - safe_mode_enabled=getattr(plugin, "safe_mode_enabled", False), - pending_enable=(not plugin.enabled and not getattr(plugin, "safe_mode_enabled", False) and plugin.key in self._pending_enable), - pending_disable=((plugin.enabled or getattr(plugin, "safe_mode_enabled", False)) and plugin.key in self._pending_disable), + pending_enable=(not plugin.enabled and not getattr(plugin, "safe_mode_victim", False) and plugin.key in self._pending_enable), + pending_disable=((plugin.enabled or getattr(plugin, "safe_mode_victim", False)) and plugin.key in self._pending_disable), pending_install=(self._plugin_manager.is_plugin_marked(plugin.key, "installed")), pending_uninstall=(self._plugin_manager.is_plugin_marked(plugin.key, "uninstalled")), origin=plugin.origin.type, diff --git a/src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js b/src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js index d658aa1d0..19842dcb6 100644 --- a/src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js +++ b/src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js @@ -222,7 +222,7 @@ $(function() { self.enableToggle = function(data) { var command = self._getToggleCommand(data); - var not_safemode_victim = !data.safe_mode_victim || data.safe_mode_enabled; + var not_safemode_victim = !data.safe_mode_victim; var not_blacklisted = !data.blacklisted; return self.enableManagement() && (command == "disable" || (not_safemode_victim && not_blacklisted)) && data.key != 'pluginmanager'; }; @@ -462,7 +462,7 @@ $(function() { }; if (self._getToggleCommand(data) == "enable") { - if (data.safe_mode_victim && !data.safe_mode_enabled) return; + if (data.safe_mode_victim) return; OctoPrint.plugins.pluginmanager.enable(data.key) .done(onSuccess) .fail(onError); @@ -857,7 +857,8 @@ $(function() { }; self._getToggleCommand = function(data) { - var disable = (data.enabled || data.pending_enable || (data.safe_mode_victim && data.safe_mode_enabled)) && !data.pending_disable; + var disable = (data.enabled || (data.safe_mode_victim && !data.forced_disabled) || data.pending_enable) + && !data.pending_disable; return disable ? "disable" : "enable"; }; @@ -873,7 +874,7 @@ $(function() { if (command == "enable") { if (data.blacklisted) { return gettext("Blacklisted"); - } else if (data.safe_mode_victim && !data.safe_mode_enabled) { + } else if (data.safe_mode_victim) { return gettext("Disabled due to active safe mode"); } else { return gettext("Enable Plugin"); From b108fc939cf56cead2d4e358e66fe6738d2dca27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Fri, 23 Feb 2018 17:02:52 +0100 Subject: [PATCH 38/38] Extract control property values from disabled plugins By parsing the main plugin file into a Python AST we can still extract the control property values (as long as they are simple string assignments or calls to gettext with a string argument) without having to execute them in any way. --- src/octoprint/plugin/core.py | 84 ++++++++++++++++++++++++++++++++---- 1 file changed, 76 insertions(+), 8 deletions(-) diff --git a/src/octoprint/plugin/core.py b/src/octoprint/plugin/core.py index 1ceffcc36..a6f26661c 100644 --- a/src/octoprint/plugin/core.py +++ b/src/octoprint/plugin/core.py @@ -157,6 +157,8 @@ class PluginInfo(object): self._url = url self._license = license + self._cached_parsed_metadata = None + def validate(self, phase, additional_validators=None): result = True @@ -292,7 +294,9 @@ class PluginInfo(object): Returns: str: Name of the plugin, fallback is the plugin's identifier. """ - return self._get_instance_attribute(self.__class__.attr_name, defaults=(self._name, self.key)) + return self._get_instance_attribute(self.__class__.attr_name, + defaults=(self._name, self.key), + incl_metadata=True) @property def description(self): @@ -304,7 +308,9 @@ class PluginInfo(object): Returns: str or None: Description of the plugin. """ - return self._get_instance_attribute(self.__class__.attr_description, default=self._description) + return self._get_instance_attribute(self.__class__.attr_description, + default=self._description, + incl_metadata=True) @property def disabling_discouraged(self): @@ -328,7 +334,9 @@ class PluginInfo(object): Returns: str or None: Version of the plugin. """ - return self._version if self._version is not None else self._get_instance_attribute(self.__class__.attr_version, default=self._version) + return self._version if self._version is not None else self._get_instance_attribute(self.__class__.attr_version, + default=self._version, + incl_metadata=True) @property def author(self): @@ -339,7 +347,9 @@ class PluginInfo(object): Returns: str or None: Author of the plugin. """ - return self._get_instance_attribute(self.__class__.attr_author, default=self._author) + return self._get_instance_attribute(self.__class__.attr_author, + default=self._author, + incl_metadata=True) @property def url(self): @@ -350,7 +360,9 @@ class PluginInfo(object): Returns: str or None: Website URL for the plugin. """ - return self._get_instance_attribute(self.__class__.attr_url, default=self._url) + return self._get_instance_attribute(self.__class__.attr_url, + default=self._url, + incl_metadata=True) @property def license(self): @@ -361,7 +373,9 @@ class PluginInfo(object): Returns: str or None: License of the plugin. """ - return self._get_instance_attribute(self.__class__.attr_license, default=self._license) + return self._get_instance_attribute(self.__class__.attr_license, + default=self._license, + incl_metadata=True) @property def hooks(self): @@ -452,15 +466,69 @@ class PluginInfo(object): """ return self._get_instance_attribute(self.__class__.attr_disable, default=lambda: True) - def _get_instance_attribute(self, attr, default=None, defaults=None): + def _get_instance_attribute(self, attr, default=None, defaults=None, incl_metadata=False): if self.instance is None or not hasattr(self.instance, attr): - if defaults is not None: + if incl_metadata and attr in self._parsed_metadata: + return self._parsed_metadata[attr] + + elif defaults is not None: for value in defaults: + if callable(value): + value = value() if value is not None: return value + return default + return getattr(self.instance, attr) + @property + def _parsed_metadata(self): + if self._cached_parsed_metadata is None: + self._cached_parsed_metadata = self._parse_metadata() + return self._cached_parsed_metadata + + def _parse_metadata(self): + result = dict() + try: + import ast + + path = self.location + if os.path.isdir(path): + path = os.path.join(self.location, "__init__.py") + + if not os.path.isfile(path): + return result + + with open(path, "rb") as f: + root = ast.parse(f.read()) + + assignments = filter(lambda x: isinstance(x, ast.Assign) and x.targets, + root.body) + + def extract_target_ids(node): + return map(lambda x: x.id, + filter(lambda x: isinstance(x, ast.Name), node.targets)) + + for key in (self.__class__.attr_name, self.__class__.attr_version, self.__class__.attr_author, + self.__class__.attr_description, self.__class__.attr_url, self.__class__.attr_license): + for a in reversed(assignments): + targets = extract_target_ids(a) + if key in targets: + if isinstance(a.value, ast.Str): + result[key] = a.value.s + + elif isinstance(a.value, ast.Call) and hasattr(a.value, "func") \ + and a.value.func.id == "gettext" and a.value.args \ + and isinstance(a.value.args[0], ast.Str): + result[key] = a.value.args[0].s + + break + except: + pass + + return result + class PluginManager(object): """