Merge branch 'maintenance' into devel
This commit is contained in:
commit
fc1c4da261
27 files changed
+980
-664
No files matched your search
@@ -18,10 +18,10 @@ from octoprint.util.version import (
|
||||
)
|
||||
|
||||
SENTRY_URL_SERVER = (
|
||||
"https://87d311e64fdc40f096a1049d99307bf5@o118517.ingest.sentry.io/1373987"
|
||||
"https://a12e10f3ca4b418dba3ed99c1d220d14@o118517.ingest.sentry.io/1373987"
|
||||
)
|
||||
SENTRY_URL_COREUI = (
|
||||
"https://91516ad9a76c47409b02734cbe8492c5@o118517.ingest.sentry.io/1374096"
|
||||
"https://988f6e4854ee49188df51642ab576346@o118517.ingest.sentry.io/1374096"
|
||||
)
|
||||
|
||||
SETTINGS_DEFAULTS = {
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
/*! @sentry/browser 5.18.1 (b1261aab) | https://github.com/getsentry/sentry-javascript */
|
||||
var Sentry=function(t){var n=function(t,r){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(t,r)};function r(t,r){function e(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(e.prototype=r.prototype,new e)}var e=function(){return(e=Object.assign||function(t){for(var n,r=1,e=arguments.length;r<e;r++)for(var i in n=arguments[r])Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t}).apply(this,arguments)};function i(t){var n="function"==typeof Symbol&&t[Symbol.iterator],r=0;return n?n.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}}function o(t,n){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var e,i,o=r.call(t),u=[];try{for(;(void 0===n||n-- >0)&&!(e=o.next()).done;)u.push(e.value)}catch(t){i={error:t}}finally{try{e&&!e.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u}function u(){for(var t=[],n=0;n<arguments.length;n++)t=t.concat(o(arguments[n]));return t}var c,a,s;!function(t){t[t.None=0]="None",t[t.Error=1]="Error",t[t.Debug=2]="Debug",t[t.Verbose=3]="Verbose"}(c||(c={})),(a=t.Severity||(t.Severity={})).Fatal="fatal",a.Error="error",a.Warning="warning",a.Log="log",a.Info="info",a.Debug="debug",a.Critical="critical",function(t){t.fromString=function(n){switch(n){case"debug":return t.Debug;case"info":return t.Info;case"warn":case"warning":return t.Warning;case"error":return t.Error;case"fatal":return t.Fatal;case"critical":return t.Critical;case"log":default:return t.Log}}}(t.Severity||(t.Severity={})),(s=t.Status||(t.Status={})).Unknown="unknown",s.Skipped="skipped",s.Success="success",s.RateLimit="rate_limit",s.Invalid="invalid",s.Failed="failed",function(t){t.fromHttpCode=function(n){return n>=200&&n<300?t.Success:429===n?t.RateLimit:n>=400&&n<500?t.Invalid:n>=500?t.Failed:t.Unknown}}(t.Status||(t.Status={}));var f=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,n){return t.__proto__=n,t}:function(t,n){for(var r in n)t.hasOwnProperty(r)||(t[r]=n[r]);return t});var h=function(t){function n(n){var r=this.constructor,e=t.call(this,n)||this;return e.message=n,e.name=r.prototype.constructor.name,f(e,r.prototype),e}return r(n,t),n}(Error);function v(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return E(t,Error)}}function l(t){return"[object ErrorEvent]"===Object.prototype.toString.call(t)}function d(t){return"[object DOMError]"===Object.prototype.toString.call(t)}function p(t){return"[object String]"===Object.prototype.toString.call(t)}function y(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function m(t){return"[object Object]"===Object.prototype.toString.call(t)}function b(t){return"undefined"!=typeof Event&&E(t,Event)}function w(t){return"undefined"!=typeof Element&&E(t,Element)}function g(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function E(t,n){try{return t instanceof n}catch(t){return!1}}function x(t,n){return void 0===n&&(n=0),"string"!=typeof t||0===n?t:t.length<=n?t:t.substr(0,n)+"..."}function j(t,n){if(!Array.isArray(t))return"";for(var r=[],e=0;e<t.length;e++){var i=t[e];try{r.push(String(i))}catch(t){r.push("[value cannot be serialized]")}}return r.join(n)}function k(t,n){return!!p(t)&&(r=n,"[object RegExp]"===Object.prototype.toString.call(r)?n.test(t):"string"==typeof n&&-1!==t.indexOf(n));var r}function S(){return"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}var T={};function O(){return S()?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:T}function _(){var t=O(),n=t.crypto||t.msCrypto;if(void 0!==n&&n.getRandomValues){var r=new Uint16Array(8);n.getRandomValues(r),r[3]=4095&r[3]|16384,r[4]=16383&r[4]|32768;var e=function(t){for(var n=t.toString(16);n.length<4;)n="0"+n;return n};return e(r[0])+e(r[1])+e(r[2])+e(r[3])+e(r[4])+e(r[5])+e(r[6])+e(r[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=16*Math.random()|0;return("x"===t?n:3&n|8).toString(16)})}function D(t){if(!t)return{};var n=t.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!n)return{};var r=n[6]||"",e=n[8]||"";return{host:n[4],path:n[5],protocol:n[2],relative:n[5]+r+e}}function R(t){if(t.message)return t.message;if(t.exception&&t.exception.values&&t.exception.values[0]){var n=t.exception.values[0];return n.type&&n.value?n.type+": "+n.value:n.type||n.value||t.event_id||"<unknown>"}return t.event_id||"<unknown>"}function I(t){var n=O();if(!("console"in n))return t();var r=n.console,e={};["debug","info","warn","error","log","assert"].forEach(function(t){t in n.console&&r[t].__sentry_original__&&(e[t]=r[t],r[t]=r[t].__sentry_original__)});var i=t();return Object.keys(e).forEach(function(t){r[t]=e[t]}),i}function N(t,n,r){t.exception=t.exception||{},t.exception.values=t.exLine truncated
|
||||
/*! @sentry/browser 6.18.2 (22f518e) | https://github.com/getsentry/sentry-javascript */
|
||||
var Sentry=function(t){var n=function(t,r){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])},n(t,r)};function r(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}var i,e=function(){return e=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++)for(var e in n=arguments[r])Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e]);return t},e.apply(this,arguments)};function o(t){var n="function"==typeof Symbol&&Symbol.iterator,r=n&&t[n],i=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function u(t,n){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var i,e,o=r.call(t),u=[];try{for(;(void 0===n||n-- >0)&&!(i=o.next()).done;)u.push(i.value)}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return u}function a(){for(var t=[],n=0;n<arguments.length;n++)t=t.concat(u(arguments[n]));return t}t.Severity=void 0,(i=t.Severity||(t.Severity={})).Fatal="fatal",i.Error="error",i.Warning="warning",i.Log="log",i.Info="info",i.Debug="debug",i.Critical="critical";var c={};function s(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:c}var f=Object.prototype.toString;function h(t){switch(f.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return x(t,Error)}}function v(t,n){return f.call(t)==="[object "+n+"]"}function d(t){return v(t,"ErrorEvent")}function l(t){return v(t,"DOMError")}function p(t){return v(t,"String")}function y(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function m(t){return v(t,"Object")}function b(t){return"undefined"!=typeof Event&&x(t,Event)}function w(t){return"undefined"!=typeof Element&&x(t,Element)}function g(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function x(t,n){try{return t instanceof n}catch(t){return!1}}function E(t,n){try{for(var r=t,i=[],e=0,o=0,u=" > ".length,a=void 0;r&&e++<5&&!("html"===(a=_(r,n))||e>1&&o+i.length*u+a.length>=80);)i.push(a),o+=a.length,r=r.parentNode;return i.reverse().join(" > ")}catch(t){return"<unknown>"}}function _(t,n){var r,i,e,o,u,a=t,c=[];if(!a||!a.tagName)return"";c.push(a.tagName.toLowerCase());var s=n&&n.length?n.filter((function(t){return a.getAttribute(t)})).map((function(t){return[t,a.getAttribute(t)]})):null;if(s&&s.length)s.forEach((function(t){c.push("["+t[0]+'="'+t[1]+'"]')}));else if(a.id&&c.push("#"+a.id),(r=a.className)&&p(r))for(i=r.split(/\s+/),u=0;u<i.length;u++)c.push("."+i[u]);var f=["type","name","title","alt"];for(u=0;u<f.length;u++)e=f[u],(o=a.getAttribute(e))&&c.push("["+e+'="'+o+'"]');return c.join("")}var j=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,n){return t.__proto__=n,t}:function(t,n){for(var r in n)Object.prototype.hasOwnProperty.call(t,r)||(t[r]=n[r]);return t});var k=function(t){function n(n){var r=this.constructor,i=t.call(this,n)||this;return i.message=n,i.name=r.prototype.constructor.name,j(i,r.prototype),i}return r(n,t),n}(Error),S=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;function O(t,n){void 0===n&&(n=!1);var r=t.host,i=t.path,e=t.pass,o=t.port,u=t.projectId;return t.protocol+"://"+t.publicKey+(n&&e?":"+e:"")+"@"+r+(o?":"+o:"")+"/"+(i?i+"/":i)+u}function T(t){return"user"in t&&!("publicKey"in t)&&(t.publicKey=t.user),{user:t.publicKey||"",protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function D(t){var n="string"==typeof t?function(t){var n=S.exec(t);if(!n)throw new k("Invalid Sentry Dsn: "+t);var r=u(n.slice(1),6),i=r[0],e=r[1],o=r[2],a=void 0===o?"":o,c=r[3],s=r[4],f=void 0===s?"":s,h="",v=r[5],d=v.split("/");if(d.length>1&&(h=d.slice(0,-1).join("/"),v=d.pop()),v){var l=v.match(/^\d+/);l&&(v=l[0])}return T({host:c,pass:a,path:h,projectId:v,port:f,protocol:i,publicKey:e})}(t):T(t);return n}var R=["fatal","error","warning","log","info","debug","critical"],N=s(),I="Sentry Logger ";function M(t){var n=s();if(!("console"in n))return t();var r=n.console,i={};["debug","info","warn","error","log","assert"].forEach((function(t){t in n.console&&r[t].__sentry_original__&&(i[t]=r[t],r[t]=r[t].__sentry_original__)}));var e=t();return Object.keys(i).forEach((function(t){r[t]=i[t]})),e}var q=function(){function t(){this.t=!1}return t.prototype.disable=function(){this.t=!1},t.prototype.enable=function(){this.t=!0},t.prototype.log=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.t&&M((function(){var n;(n=N.console).log.apply(n,a([I+"[Log]:Line truncated
|
||||
//# sourceMappingURL=bundle.min.js.map
|
||||
@@ -138,28 +138,31 @@ GCODE.gCodeReader = (function () {
|
||||
|
||||
var rebuildLayerPercentageLookup = function (m) {
|
||||
var result = [];
|
||||
for (var i = 0; i < m.length - 1; i++) {
|
||||
// start is first command of current layer
|
||||
var start = m[i].length ? m[i][0].percentage : -1;
|
||||
|
||||
var end = -1;
|
||||
for (var j = i + 1; j < m.length; j++) {
|
||||
// end is percentage of first command that follows our start, might
|
||||
// be later layers if the next layer is empty!
|
||||
if (m[j].length) {
|
||||
end = m[j][0].percentage;
|
||||
break;
|
||||
if (m && m.length > 0) {
|
||||
for (var i = 0; i < m.length - 1; i++) {
|
||||
// start is first command of current layer
|
||||
var start = m[i].length ? m[i][0].percentage : -1;
|
||||
|
||||
var end = -1;
|
||||
for (var j = i + 1; j < m.length; j++) {
|
||||
// end is percentage of first command that follows our start, might
|
||||
// be later layers if the next layer is empty!
|
||||
if (m[j].length) {
|
||||
end = m[j][0].percentage;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
result[i] = [start, end];
|
||||
}
|
||||
|
||||
result[i] = [start, end];
|
||||
// final start-end-pair is start percentage of last layer and 100%
|
||||
result[m.length - 1] = m[m.length - 1].length
|
||||
? [m[m.length - 1][0].percentage, 100]
|
||||
: [-1, -1];
|
||||
}
|
||||
|
||||
// final start-end-pair is start percentage of last layer and 100%
|
||||
result[m.length - 1] = m[m.length - 1].length
|
||||
? [m[m.length - 1][0].percentage, 100]
|
||||
: [-1, -1];
|
||||
|
||||
layerPercentageLookup = result;
|
||||
};
|
||||
|
||||
|
||||
@@ -303,6 +303,7 @@ var analyzeModel = function () {
|
||||
|
||||
var doParse = function () {
|
||||
var argChar, numSlice;
|
||||
var activeLayer = undefined;
|
||||
var sendLayer = undefined;
|
||||
var sendMultiLayer = [];
|
||||
var lastSend = 0;
|
||||
@@ -599,7 +600,6 @@ var doParse = function () {
|
||||
}
|
||||
|
||||
layer = model.length;
|
||||
sendLayer = layer;
|
||||
prevZ = z;
|
||||
}
|
||||
|
||||
@@ -634,49 +634,62 @@ var doParse = function () {
|
||||
};
|
||||
|
||||
if (zLift) {
|
||||
// Insert zLift moves for later processing
|
||||
// Insert zLift moves for later processing - they might be part of
|
||||
// the active layer still
|
||||
zLiftMoves.push({
|
||||
command: command,
|
||||
layer: layer
|
||||
});
|
||||
} else if (zLiftMoves.length > 0) {
|
||||
// there's something to be checked in the Z-lift cache
|
||||
if (prevZ < maxLiftZ) {
|
||||
zLiftMoves.forEach(function (zLiftMove) {
|
||||
// move command from move layer...
|
||||
model[zLiftMove.layer].splice(
|
||||
model[layer].indexOf(zLiftMove.command),
|
||||
1
|
||||
);
|
||||
// ... to z-lift layer
|
||||
model[zLiftLayer].push(zLiftMove.command);
|
||||
});
|
||||
} else {
|
||||
if (zLiftMoves.length > 0) {
|
||||
// there's something to be checked in the Z-lift cache
|
||||
if (prevZ < maxLiftZ) {
|
||||
zLiftMoves.forEach(function (zLiftMove) {
|
||||
// move command from move layer...
|
||||
model[zLiftMove.layer].splice(
|
||||
model[layer].indexOf(zLiftMove.command),
|
||||
1
|
||||
);
|
||||
// ... to z-lift layer
|
||||
model[zLiftLayer].push(zLiftMove.command);
|
||||
});
|
||||
|
||||
// clean up empty layers at the end of the model
|
||||
var spliceFrom = undefined;
|
||||
for (var l = model.length - 1; l > 0; l--) {
|
||||
if (model[l].length > 0) break;
|
||||
spliceFrom = l;
|
||||
}
|
||||
if (spliceFrom !== undefined) {
|
||||
model.splice(spliceFrom, model.length - spliceFrom);
|
||||
// clean up empty layers at the end of the model
|
||||
var spliceFrom = undefined;
|
||||
for (var l = model.length - 1; l > 0; l--) {
|
||||
if (model[l].length > 0) break;
|
||||
spliceFrom = l;
|
||||
}
|
||||
if (spliceFrom !== undefined) {
|
||||
model.splice(spliceFrom, model.length - spliceFrom);
|
||||
}
|
||||
|
||||
// finally determine the new active layer
|
||||
if (prevZ === zLiftZ) {
|
||||
// initial lifted on layer if we are back at a prior height
|
||||
layer = zLiftLayer;
|
||||
} else {
|
||||
// new layer if this a new z, just lower than max z-lift
|
||||
model[model.length] = [];
|
||||
layer = model.length - 1;
|
||||
}
|
||||
}
|
||||
|
||||
// finally determine the new active layer
|
||||
if (prevZ === zLiftZ) {
|
||||
// initial lifted on layer if we are back at a prior height
|
||||
layer = zLiftLayer;
|
||||
} else {
|
||||
// new layer if this a new z, just lower than max z-lift
|
||||
model[model.length] = [];
|
||||
layer = model.length - 1;
|
||||
}
|
||||
// clear up cached Z-lift moves
|
||||
zLiftMoves = [];
|
||||
zLiftZ = undefined;
|
||||
maxLiftZ = undefined;
|
||||
zLiftLayer = undefined;
|
||||
}
|
||||
|
||||
// have we progressed a layer?
|
||||
if (activeLayer === undefined || layer > activeLayer) {
|
||||
// the formerly active layer is now done and can be sent
|
||||
sendLayer = activeLayer;
|
||||
|
||||
// the current layer is the new active layer
|
||||
activeLayer = layer;
|
||||
}
|
||||
// clear up cached Z-lift moves
|
||||
zLiftMoves = [];
|
||||
zLiftZ = undefined;
|
||||
maxLiftZ = undefined;
|
||||
zLiftLayer = undefined;
|
||||
}
|
||||
|
||||
model[layer].push(command);
|
||||
@@ -694,7 +707,11 @@ var doParse = function () {
|
||||
sendMultiLayer = [];
|
||||
sendMultiLayerZ = [];
|
||||
}
|
||||
sendMultiLayer[sendMultiLayer.length] = sendLayer;
|
||||
|
||||
if (sendMultiLayer.indexOf(sendLayer) === -1) {
|
||||
sendMultiLayer[sendMultiLayer.length] = sendLayer;
|
||||
}
|
||||
|
||||
sendLayer = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1223,9 +1223,17 @@ def fetch_template_data(refresh=False):
|
||||
for var_name, var_value in vars.items():
|
||||
plugin_vars["plugin_" + name + "_" + var_name] = var_value
|
||||
|
||||
includes = _process_template_configs(
|
||||
name, implementation, configs, template_rules
|
||||
)
|
||||
try:
|
||||
includes = _process_template_configs(
|
||||
name, implementation, configs, template_rules
|
||||
)
|
||||
except Exception:
|
||||
_logger.exception(
|
||||
"Error while processing template configs for plugin {}, ignoring it".format(
|
||||
name
|
||||
),
|
||||
extra={"plugin": name},
|
||||
)
|
||||
|
||||
if not wizard_required or wizard_ignored:
|
||||
includes["wizard"] = list()
|
||||
@@ -1483,11 +1491,14 @@ def _process_template_config(name, implementation, rule, config=None, counter=1)
|
||||
)
|
||||
return None
|
||||
|
||||
if "template" not in data:
|
||||
data["template"] = rule["template"](name)
|
||||
data["template"] = implementation.template_folder_key + "/" + data["template"]
|
||||
if data.get("template"):
|
||||
data["template"] = implementation.template_folder_key + "/" + data["template"]
|
||||
else:
|
||||
data["template"] = (
|
||||
implementation.template_folder_key + "/" + rule["template"](name)
|
||||
)
|
||||
|
||||
if "template_header" in data:
|
||||
if data.get("template_header"):
|
||||
data["template_header"] = (
|
||||
implementation.template_folder_key + "/" + data["template_header"]
|
||||
)
|
||||
|
||||
@@ -562,7 +562,7 @@ class HierarchicalChainMap:
|
||||
|
||||
items = []
|
||||
for k, v in d.items():
|
||||
new_key = parent_key + _CHAINMAP_SEP + k if parent_key else k
|
||||
new_key = parent_key + _CHAINMAP_SEP + str(k) if parent_key else str(k)
|
||||
if v and isinstance(v, dict):
|
||||
items.extend(HierarchicalChainMap._flatten(v, new_key).items())
|
||||
else:
|
||||
@@ -630,27 +630,26 @@ class HierarchicalChainMap:
|
||||
current = self._chainmap
|
||||
|
||||
key = self._path_to_key(path)
|
||||
prefix = key + _CHAINMAP_SEP
|
||||
|
||||
if key in current:
|
||||
if key in current and not any(k.startswith(prefix) for k in current.keys()):
|
||||
# found it, return
|
||||
return current[key]
|
||||
|
||||
# if we arrived here we might be trying to grab a dict, look for children
|
||||
|
||||
key = key + _CHAINMAP_SEP
|
||||
|
||||
# TODO 2.0.0 remove this & make 'merged' the default
|
||||
if not merged and hasattr(current, "maps"):
|
||||
# we do something a bit odd here: if merged is not true, we don't include the
|
||||
# full contents of the key. Instead, we only include the contents of the key
|
||||
# on the first level where we find the value.
|
||||
for layer in current.maps:
|
||||
if any(k.startswith(key) for k in layer):
|
||||
if any(k.startswith(prefix) for k in layer):
|
||||
current = layer
|
||||
break
|
||||
|
||||
result = self._unflatten(
|
||||
{k: v for k, v in current.items() if k.startswith(key)}, prefix=key
|
||||
{k: v for k, v in current.items() if k.startswith(prefix)}, prefix=prefix
|
||||
)
|
||||
if not result:
|
||||
raise KeyError("Could not find entry for " + str(path))
|
||||
|
||||
@@ -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,0.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;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);*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:hover,.btn:focus,.btn:active,.btn.active,.btn.disabled,.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:hover,.btn:focus{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:thin dotted #333;outline:5px auto -webkit-focus-ring-color;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 / 100;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.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255,255,255,0.75)}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,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;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);*background-color:#04c;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.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,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;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);*background-color:#f89406;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)Line truncated
|
||||
.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,0.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;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);*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:hover,.btn:focus,.btn:active,.btn.active,.btn.disabled,.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:hover,.btn:focus{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:thin dotted #333;outline:5px auto -webkit-focus-ring-color;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.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255,255,255,0.75)}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,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;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);*background-color:#04c;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.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,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;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);*background-color:#f89406;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.btnLine truncated
|
||||
@@ -250,6 +250,7 @@ $(function () {
|
||||
self.serial_ackMax = ko.observable(undefined);
|
||||
self.serial_resendRatioThreshold = ko.observable(100);
|
||||
self.serial_resendRatioStart = ko.observable(100);
|
||||
self.serial_ignoreEmptyPorts = ko.observable(undefined);
|
||||
self.serial_enableShutdownActionCommand = ko.observable(undefined);
|
||||
|
||||
self.folder_uploads = ko.observable(undefined);
|
||||
|
||||
+2
-2
@@ -21,8 +21,8 @@
|
||||
// Optional: Group multiple button groups together for a toolbar
|
||||
.btn-toolbar {
|
||||
font-size: 0; // Hack to remove whitespace that results from using inline-block
|
||||
margin-top: @baseLineHeight / 2;
|
||||
margin-bottom: @baseLineHeight / 2;
|
||||
margin-top: (@baseLineHeight / 2);
|
||||
margin-bottom: (@baseLineHeight / 2);
|
||||
> .btn + .btn,
|
||||
> .btn-group + .btn,
|
||||
> .btn + .btn-group {
|
||||
|
||||
+2
-2
@@ -24,8 +24,8 @@ code {
|
||||
// Blocks of code
|
||||
pre {
|
||||
display: block;
|
||||
padding: (@baseLineHeight - 1) / 2;
|
||||
margin: 0 0 @baseLineHeight / 2;
|
||||
padding: ((@baseLineHeight - 1) / 2);
|
||||
margin: 0 0 (@baseLineHeight / 2);
|
||||
font-size: @baseFontSize - 1; // 14px to 13px
|
||||
line-height: @baseLineHeight;
|
||||
word-break: break-all;
|
||||
|
||||
+5
-5
@@ -81,7 +81,7 @@ input[type="color"],
|
||||
display: inline-block;
|
||||
height: @baseLineHeight;
|
||||
padding: 4px 6px;
|
||||
margin-bottom: @baseLineHeight / 2;
|
||||
margin-bottom: (@baseLineHeight / 2);
|
||||
font-size: @baseFontSize;
|
||||
line-height: @baseLineHeight;
|
||||
color: @gray;
|
||||
@@ -399,7 +399,7 @@ select:focus:invalid {
|
||||
|
||||
.help-block {
|
||||
display: block; // account for any element using help-block
|
||||
margin-bottom: @baseLineHeight / 2;
|
||||
margin-bottom: (@baseLineHeight / 2);
|
||||
}
|
||||
|
||||
.help-inline {
|
||||
@@ -416,7 +416,7 @@ select:focus:invalid {
|
||||
.input-append,
|
||||
.input-prepend {
|
||||
display: inline-block;
|
||||
margin-bottom: @baseLineHeight / 2;
|
||||
margin-bottom: (@baseLineHeight / 2);
|
||||
vertical-align: middle;
|
||||
font-size: 0; // white space collapse hack
|
||||
white-space: nowrap; // Prevent span and input from separating
|
||||
@@ -617,7 +617,7 @@ input.search-query {
|
||||
|
||||
// Margin to space out fieldsets
|
||||
.control-group {
|
||||
margin-bottom: @baseLineHeight / 2;
|
||||
margin-bottom: (@baseLineHeight / 2);
|
||||
}
|
||||
|
||||
// Legend collapses margin, so next element is responsible for spacing
|
||||
@@ -666,7 +666,7 @@ legend + .control-group {
|
||||
.input-prepend,
|
||||
.input-append {
|
||||
+ .help-block {
|
||||
margin-top: @baseLineHeight / 2;
|
||||
margin-top: (@baseLineHeight / 2);
|
||||
}
|
||||
}
|
||||
// Move over buttons in .form-actions to align with .controls
|
||||
|
||||
+2
-2
@@ -376,7 +376,7 @@
|
||||
|
||||
// Opacity
|
||||
.opacity(@opacity) {
|
||||
opacity: @opacity / 100;
|
||||
opacity: (@opacity / 100);
|
||||
filter: ~"alpha(opacity=@{opacity})";
|
||||
}
|
||||
|
||||
@@ -679,7 +679,7 @@
|
||||
// Vertically center elements in the navbar.
|
||||
// Example: an element has a height of 30px, so write out `.navbarVerticalAlign(30px);` to calculate the appropriate top margin.
|
||||
.navbarVerticalAlign(@elementHeight) {
|
||||
margin-top: (@navbarHeight - @elementHeight) / 2;
|
||||
margin-top: ((@navbarHeight - @elementHeight) / 2);
|
||||
}
|
||||
|
||||
// Grid System
|
||||
|
||||
+3
-3
@@ -6,7 +6,7 @@
|
||||
// -------------------------
|
||||
|
||||
p {
|
||||
margin: 0 0 @baseLineHeight / 2;
|
||||
margin: 0 0 (@baseLineHeight / 2);
|
||||
}
|
||||
.lead {
|
||||
margin-bottom: @baseLineHeight;
|
||||
@@ -160,7 +160,7 @@ h4 small {
|
||||
ul,
|
||||
ol {
|
||||
padding: 0;
|
||||
margin: 0 0 @baseLineHeight / 2 25px;
|
||||
margin: 0 0 (@baseLineHeight / 2) 25px;
|
||||
}
|
||||
ul ul,
|
||||
ul ol,
|
||||
@@ -204,7 +204,7 @@ dt {
|
||||
font-weight: bold;
|
||||
}
|
||||
dd {
|
||||
margin-left: @baseLineHeight / 2;
|
||||
margin-left: (@baseLineHeight / 2);
|
||||
}
|
||||
// Horizontal layout (like forms)
|
||||
.dl-horizontal {
|
||||
|
||||
@@ -92,6 +92,19 @@
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div><small><a href="#" class="muted" data-bind="toggleContent: { class: 'fa-caret-right fa-caret-down', container: '#settings_serial_general_connection .hide' }"><i class="fas fa-caret-right"></i> {{ _('Advanced options') }}</a></small></div>
|
||||
<div class="hide">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: serial_ignoreEmptyPorts" id="settings-serialIgnoreEmptyPorts"> {{ _('Ignore empty ports') }}
|
||||
<span class="help-block">{{ _('By checking this you\'ll disable OctoPrint warning you if no serial ports to connect to were found.') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset id="settings_serial_general_logging">
|
||||
<legend>{{ _('Serial logging') }}</legend>
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large.
Load diff
@@ -110,7 +110,7 @@ Groups will be as follows:
|
||||
"""
|
||||
|
||||
regex_temp = re.compile(
|
||||
r"(?P<sensor>B|C|T(?P<toolnum>\d*)|([\w]+)):\s*(?P<actual>%s)(\s*\/?\s*(?P<target>%s))?"
|
||||
r"(^|\s)(?P<sensor>B|C|T(?P<toolnum>\d*)|([\w]+)):\s*(?P<actual>%s)(\s*\/?\s*(?P<target>%s))?"
|
||||
% (regex_float_pattern, regex_float_pattern)
|
||||
)
|
||||
"""Regex matching temperature entries in line.
|
||||
@@ -338,7 +338,7 @@ class PositionRecord:
|
||||
|
||||
|
||||
class TemperatureRecord:
|
||||
RESERVED_IDENTIFIER_REGEX = re.compile("[0-9]+|[bc]")
|
||||
RESERVED_IDENTIFIER_REGEX = re.compile(r"B|C|T\d*")
|
||||
|
||||
def __init__(self):
|
||||
self._tools = {}
|
||||
@@ -363,7 +363,7 @@ class TemperatureRecord:
|
||||
self._chamber = self._to_new_tuple(current, actual, target)
|
||||
|
||||
def set_custom(self, identifier, actual=None, target=None):
|
||||
if self.RESERVED_IDENTIFIER_REGEX.match(identifier):
|
||||
if self.RESERVED_IDENTIFIER_REGEX.fullmatch(identifier):
|
||||
raise ValueError(f"{identifier} is a reserved identifier")
|
||||
current = self._custom.get(identifier, (None, None))
|
||||
self._custom[identifier] = self._to_new_tuple(current, actual, target)
|
||||
@@ -2100,7 +2100,7 @@ class MachineCom:
|
||||
|
||||
def _processTemperatures(self, line):
|
||||
current_tool = self._currentTool if self._currentTool is not None else 0
|
||||
current_tool_key = "T%d" % current_tool
|
||||
current_tool_key = f"T{current_tool}"
|
||||
maxToolNum, parsedTemps = parse_temperature_line(line, current_tool)
|
||||
|
||||
maxToolNum = max(
|
||||
@@ -2156,10 +2156,15 @@ class MachineCom:
|
||||
del parsedTemps["C"]
|
||||
self.last_temperature.set_chamber(actual=actual, target=target)
|
||||
|
||||
# all other injected temperatures
|
||||
for key in parsedTemps.keys():
|
||||
actual, target = parsedTemps[key]
|
||||
self.last_temperature.set_custom(key, actual=actual, target=target)
|
||||
# all other injected temperatures or temperature-like entries
|
||||
for key, data in parsedTemps.items():
|
||||
try:
|
||||
actual, target = data
|
||||
self.last_temperature.set_custom(key, actual=actual, target=target)
|
||||
except Exception as ex:
|
||||
self._logger.warning(
|
||||
f"Could not add custom temperature record {key}: {ex}"
|
||||
)
|
||||
|
||||
##~~ Serial monitor processing received messages
|
||||
|
||||
|
||||
Reference in new issue
Block a user