Merge branch 'maintenance' into devel
This commit is contained in:
commit
5b7bc6cb91
11 files changed
+112
-39
No files matched your search
@@ -1,9 +1,9 @@
|
||||
name: Bug report
|
||||
about: Create a report to help improve OctoPrint
|
||||
name: 🐛 Report a bug
|
||||
about: Create a bug report to help improve OctoPrint
|
||||
title: ""
|
||||
issue_body: true
|
||||
inputs:
|
||||
- type: description
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: >
|
||||
**Thank you for wanting to report a bug in OctoPrint!**
|
||||
@@ -35,7 +35,6 @@ inputs:
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: The problem
|
||||
required: true
|
||||
description: >-
|
||||
Describe the issue you are experiencing here. Tell us what you were trying to do
|
||||
step by step, and what happened that you did not expect.
|
||||
@@ -46,6 +45,8 @@ inputs:
|
||||
1. ...
|
||||
2. ...
|
||||
3. ...
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Did the issue persist even in safe mode?
|
||||
@@ -53,10 +54,11 @@ inputs:
|
||||
Testing in safe mode is required to make sure the issue you are reporting is not
|
||||
caused by a third party plugin. Please see [here](https://docs.octoprint.org/en/master/features/safemode.html)
|
||||
on how to run OctoPrint in safe mode.
|
||||
choices:
|
||||
options:
|
||||
- Yes, it did persist
|
||||
- No, it did not persist (it's an issue with one of your installed plugins, don't report here)
|
||||
- I cannot test this issue in safe mode (state why below)
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
attributes:
|
||||
@@ -69,7 +71,7 @@ inputs:
|
||||
enable it" as you can find info on that [here](https://docs.octoprint.org/en/master/features/safemode.html).
|
||||
|
||||
If you really *cannot* test in safe mode, leave a short explanation as to why.
|
||||
- type: description
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
## Environment
|
||||
@@ -77,6 +79,7 @@ inputs:
|
||||
attributes:
|
||||
label: Version of OctoPrint
|
||||
description: Can be found in the lower left corner of the web interface.
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
attributes:
|
||||
@@ -85,6 +88,7 @@ inputs:
|
||||
OctoPi, Linux, Windows, MacOS, something else? With version please? OctoPi's
|
||||
version can be found in `/etc/octopi_version` or in the lower left corner of the
|
||||
web interface.
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
attributes:
|
||||
@@ -94,11 +98,11 @@ inputs:
|
||||
attributes:
|
||||
label: Browser and version of browser, operating system running browser
|
||||
description: If applicable, always include if unsure
|
||||
- type: description
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
## Logs and other files needed for analysis
|
||||
- type: description
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: >-
|
||||
Please also be sure to upload the following files below:
|
||||
@@ -119,14 +123,14 @@ inputs:
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Checklist of files to include below
|
||||
choices:
|
||||
options:
|
||||
- label: octoprint.log
|
||||
required: true
|
||||
- label: serial.log or contents of your terminal tab (always include in cases of issues with printer communication)
|
||||
- label: Contents of the JavaScript browser console (always include in cases of issues with the user interface)
|
||||
- label: Screenshots and/or videos showing the problem (always include in case of issues with the user interface)
|
||||
- label: GCODE file with which to reproduce (always include in case of issues with GCODE analysis or printing behaviour)
|
||||
- type: description
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
## Additional information & file uploads
|
||||
@@ -1,4 +1,7 @@
|
||||
contact_links:
|
||||
- name: Have questions or need support?
|
||||
- name: 🤔 Have questions or need support?
|
||||
url: https://community.octoprint.org
|
||||
about: Please get in touch on the OctoPrint Community Forum!
|
||||
about: Please get in touch on the OctoPrint Community Forums!
|
||||
- name: 💸 Want to donate?
|
||||
url: https://support.octoprint.org
|
||||
about: Please take a look at the various options to support OctoPrint's development financially!
|
||||
@@ -1,22 +0,0 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: '[Request]'
|
||||
|
||||
---
|
||||
|
||||
<!--
|
||||
Please make sure to add [Request] to your issue's title. Thank you!
|
||||
-->
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
@@ -0,0 +1,37 @@
|
||||
name: ✨ Request a feature
|
||||
about: Request a new feature to implement in OctoPrint
|
||||
title: "[Request]"
|
||||
issue_body: true
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: >
|
||||
**Thank you for wanting to request a feature in OctoPrint!**
|
||||
|
||||
|
||||
Before you go ahead with your request, please first consider if it wouldn't be
|
||||
better suited for a plugin. As a general rule of thumb, any feature that is only
|
||||
of interest to a small sub group should be moved into a plugin. Only such features
|
||||
that are of interest to a majority of OctoPrint's users will be implemented as
|
||||
part of the core itself.
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Is your feature request related to a problem? Please describe.
|
||||
description: A clear and concise description of what the problem is. Eg, "I'm always frustrated when [...]".
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe the solution you'd like
|
||||
description: A clear and concise description of what you want to happen. Explain why it needs to be included in OctoPrint's core and can't become a plugin.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe alternatives you've considered
|
||||
description: A clear and concise description of any alternative solutions or features you've considered.
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: >
|
||||
**Additional context**
|
||||
|
||||
Add any other context or screenshots about the feature request here.
|
||||
@@ -27,6 +27,7 @@ The plugin supports the following configuration keys:
|
||||
* ``mobileSizeThreshold``: Whether to also enable tracking on unreleased OctoPrint versions (anything not stable releases
|
||||
or release candidates). Defaults to ``false``.
|
||||
* ``sizeThreshold``: Unique instance identifier, auto generated on first activation
|
||||
* ``skipUntilThis``: If this string is provided the GCode Viewer will search for this string, and if found, skip all gcode up until this string. This can be used to skip prime nozzle gcode in the preview
|
||||
|
||||
.. _sec-bundledplugins-gcodeviewer-sourcecode:
|
||||
|
||||
|
||||
@@ -45,8 +45,9 @@ class GcodeviewerPlugin(
|
||||
def get_settings_defaults(self):
|
||||
return {
|
||||
"mobileSizeThreshold": 2 * 1024 * 1024, # 2MB
|
||||
"sizeThreshold": 20 * 1024 * 1024,
|
||||
} # 20MB
|
||||
"sizeThreshold": 20 * 1024 * 1024, # 20MB
|
||||
"skipUntilThis": None,
|
||||
}
|
||||
|
||||
def get_settings_version(self):
|
||||
return 1
|
||||
|
||||
@@ -475,6 +475,20 @@ $(function () {
|
||||
};
|
||||
|
||||
self.showGCodeViewer = function (response, rstatus) {
|
||||
// Slice of the gcode
|
||||
var findThis = self.settings.settings.plugins.gcodeviewer.skipUntilThis();
|
||||
if (findThis && findThis !== "") {
|
||||
var indexPos = response.indexOf("\n" + findThis);
|
||||
// Try windows newlines if not found
|
||||
if (indexPos === -1) {
|
||||
indexPos = response.indexOf("\r" + findThis);
|
||||
}
|
||||
if (indexPos !== -1) {
|
||||
// Slice and make sure we comment out any string left back after slicing - so if a user configures something like "G1" we dont end up with a snippet of gcode commands
|
||||
// Yes it would be prettier to parse it line by line and remove the entire line, that is very slow and uses mem - this way we find the string, and remove it
|
||||
response = ";" + response.slice(indexPos + findThis.length + 1);
|
||||
}
|
||||
}
|
||||
var par = {
|
||||
target: {
|
||||
result: response
|
||||
|
||||
@@ -19,4 +19,15 @@
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group" title="{{ _('Skip/Hide gcode until this string')}}">
|
||||
<label class="control-label" for="settings-skipUntilThis">{{ _('Skip to this') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: settings.settings.plugins.gcodeviewer.skipUntilThis" id="settings-skipUntilThis" placeholder="; layer 1">
|
||||
</div>
|
||||
<div class="controls">
|
||||
<span class="help-inline">
|
||||
{% trans %}If provided, the GCode Viewer will search for a line beginning with this string. If found, all GCode up to that point will be skipped. This can be used to skip "purge/nozzle wipe" GCode in the viewer. Note the search is case sensitive. Example: <code>; layer 1</code>{% endtrans %}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -169,7 +169,7 @@ Groups will be as follows:
|
||||
* ``value``: reported position value
|
||||
"""
|
||||
|
||||
regex_firmware_splitter = re.compile(r"\s*([A-Z0-9_]+):\s*")
|
||||
regex_firmware_splitter = re.compile(r"(^|\s+)([A-Z][A-Z0-9_]*):")
|
||||
"""Regex to use for splitting M115 responses."""
|
||||
|
||||
regex_resend_linenumber = re.compile(r"(N|N:)?(?P<n>%s)" % regex_int_pattern)
|
||||
@@ -6074,6 +6074,10 @@ def parse_firmware_line(line):
|
||||
The result will be a dictionary mapping from the contained keys to the contained
|
||||
values.
|
||||
|
||||
Valid keys must only contain A-Z, 0-9 and _ and must start with a letter. See the
|
||||
unit tests for valid and invalid examples. There sadly is no existing specification
|
||||
of the key format, but this is the format extracted from real life logs.
|
||||
|
||||
Arguments:
|
||||
line (str): the line to parse
|
||||
|
||||
@@ -6091,7 +6095,7 @@ def parse_firmware_line(line):
|
||||
split_line = regex_firmware_splitter.split(line.strip())[
|
||||
1:
|
||||
] # first entry is empty start of trimmed string
|
||||
for key, value in chunks(split_line, 2):
|
||||
for _, key, value in chunks(split_line, 3):
|
||||
result[key] = value.strip()
|
||||
return result
|
||||
|
||||
|
||||
@@ -607,6 +607,9 @@ class TestSettings(unittest.TestCase):
|
||||
basedir, configfile = paths
|
||||
settings = octoprint.settings.Settings()
|
||||
|
||||
# Make sure the config files last modified time changes
|
||||
time.sleep(1.0)
|
||||
|
||||
self.assertEqual("0.0.0.0", settings.get(["server", "host"]))
|
||||
|
||||
# modify yaml file externally
|
||||
|
||||
@@ -373,6 +373,23 @@ class TestCommHelpers(unittest.TestCase):
|
||||
"UUID": "00000000-0000-0000-0000-000000000000",
|
||||
},
|
||||
),
|
||||
# Test firmware name with time created
|
||||
(
|
||||
"FIRMWARE_NAME:Marlin 2.0.7.2 (Nov 27 2020 14:30:11) SOURCE_CODE_URL:https://github.com/MarlinFirmware/Marlin PROTOCOL_VERSION:1.0 MACHINE_TYPE:Ender 5 Pro EXTRUDER_COUNT:1 UUID:cede2a2f-41a2-4748-9b12-c55c62f367ff",
|
||||
{
|
||||
"FIRMWARE_NAME": "Marlin 2.0.7.2 (Nov 27 2020 14:30:11)",
|
||||
"SOURCE_CODE_URL": "https://github.com/MarlinFirmware/Marlin",
|
||||
"PROTOCOL_VERSION": "1.0",
|
||||
"MACHINE_TYPE": "Ender 5 Pro",
|
||||
"EXTRUDER_COUNT": "1",
|
||||
"UUID": "cede2a2f-41a2-4748-9b12-c55c62f367ff",
|
||||
},
|
||||
),
|
||||
# Test that keys beginning with _ or number are ignored
|
||||
(
|
||||
"KEY1:VALUE1 _KEY2:INVALID 123:INVALID 1KEY:INVALID KEY2:VALUE2",
|
||||
{"KEY1": "VALUE1 _KEY2:INVALID 123:INVALID 1KEY:INVALID", "KEY2": "VALUE2"},
|
||||
),
|
||||
)
|
||||
@unpack
|
||||
def test_parse_firmware_line(self, line, expected):
|
||||
|
||||
Reference in new issue
Block a user