Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e46e8fa17a | ||
|
|
12d6de51da | ||
|
|
424dc0a13d | ||
|
|
d9fef47e78 | ||
|
|
222b9997a1 | ||
|
|
3124c08927 | ||
|
|
2697bd7a42 | ||
|
|
a2d4fc08a5 | ||
|
|
bdeb765f75 | ||
|
|
84b61e01f4 | ||
|
|
38256815ef | ||
|
|
c111054fd6 | ||
|
|
82dd94d51b | ||
|
|
1536ed6da3 | ||
|
|
9f9d0fc788 | ||
|
|
a23daa7c81 | ||
|
|
82d308c9ac | ||
|
|
fe7437388a | ||
|
|
28a1c8bb4f | ||
|
|
a74309d650 | ||
|
|
220979bf68 | ||
|
|
49cd9d3283 |
No files matched your search
@@ -0,0 +1,3 @@
|
|||||||
|
# someone from the docker-maintainers team will be requested for review
|
||||||
|
# whenever the trigger_docker workflow is changed in a Pull Request
|
||||||
|
.github/workflows/trigger_docker.yml @OctoPrint/docker-maintainers
|
||||||
@@ -4,15 +4,44 @@ on:
|
|||||||
types:
|
types:
|
||||||
- released
|
- released
|
||||||
- prereleased
|
- prereleased
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- maintenance
|
||||||
|
- devel
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
trigger:
|
dispatch_releases:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: github.event_name != 'push'
|
||||||
steps:
|
steps:
|
||||||
- name: 🚀 Repository Dispatch
|
- name: 🚀 Repository Dispatch
|
||||||
uses: peter-evans/repository-dispatch@v1
|
uses: peter-evans/repository-dispatch@v1
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.DOCKER_ACCESS_TOKEN }}
|
token: ${{ secrets.DOCKER_ACCESS_TOKEN }}
|
||||||
repository: ${{ github.repository_owner }}/octoprint-docker
|
repository: ${{ github.repository_owner }}/octoprint-docker
|
||||||
event-type: "release"
|
event-type: ${{ github.event_name }}
|
||||||
client-payload: '{"tag_name": "${{ github.event.release.tag_name }}"}'
|
client-payload: '{"tag_name": "${{ github.event.release.tag_name }}"}'
|
||||||
|
|
||||||
|
dispatch_canary:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: github.event_name == 'push' && github.ref == 'refs/heads/maintenance'
|
||||||
|
steps:
|
||||||
|
- name: 🚀 Repository Dispatch
|
||||||
|
uses: peter-evans/repository-dispatch@v1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.DOCKER_ACCESS_TOKEN }}
|
||||||
|
repository: ${{ github.repository_owner }}/octoprint-docker
|
||||||
|
event-type: "canary"
|
||||||
|
client-payload: '{"tag_name": "${{ github.sha }}"}'
|
||||||
|
|
||||||
|
dispatch_bleeding:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: github.event_name == 'push' && github.ref == 'refs/heads/devel'
|
||||||
|
steps:
|
||||||
|
- name: 🚀 Repository Dispatch
|
||||||
|
uses: peter-evans/repository-dispatch@v1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.DOCKER_ACCESS_TOKEN }}
|
||||||
|
repository: ${{ github.repository_owner }}/octoprint-docker
|
||||||
|
event-type: "bleeding"
|
||||||
|
client-payload: '{"tag_name": "${{ github.sha }}"}'
|
||||||
+2
-2
@@ -24,8 +24,8 @@ maintenance 1.5.0 42769dad7dda3bc0c6c94e0e8ce832af9b14a565 pep440-dev
|
|||||||
fix/.* 1.5.0 42769dad7dda3bc0c6c94e0e8ce832af9b14a565 pep440-dev
|
fix/.* 1.5.0 42769dad7dda3bc0c6c94e0e8ce832af9b14a565 pep440-dev
|
||||||
improve/.* 1.5.0 42769dad7dda3bc0c6c94e0e8ce832af9b14a565 pep440-dev
|
improve/.* 1.5.0 42769dad7dda3bc0c6c94e0e8ce832af9b14a565 pep440-dev
|
||||||
|
|
||||||
# staging/hotfix is the branch for preparation of the 1.4.2 hotfix release
|
# staging/hotfix is the branch for preparation of the 1.5.2 hotfix release
|
||||||
staging/hotfix 1.4.2 3ab84ed7e4c3aaaf71fe0f184b465f25d689f929 pep440-dev
|
staging/hotfix 1.5.2 38256815ef6d6dd602e0fac949a17fbf8f30f838 pep440-dev
|
||||||
|
|
||||||
# staging/maintenance is currently the branch for preparation of 1.5.0rc4
|
# staging/maintenance is currently the branch for preparation of 1.5.0rc4
|
||||||
# so is regressionfix/...
|
# so is regressionfix/...
|
||||||
|
|||||||
+2
-1
@@ -18,6 +18,7 @@ thanks to everyone who contributed!
|
|||||||
* D Brian Kimmel
|
* D Brian Kimmel
|
||||||
* DeltaMaker 3D Printers
|
* DeltaMaker 3D Printers
|
||||||
* Dennis Breining
|
* Dennis Breining
|
||||||
|
* Eric Berry
|
||||||
* Eric Betts
|
* Eric Betts
|
||||||
* Ernesto Martinez
|
* Ernesto Martinez
|
||||||
* Franziska Kunsmann
|
* Franziska Kunsmann
|
||||||
@@ -68,4 +69,4 @@ thanks to everyone who contributed!
|
|||||||
* Sven Mueller
|
* Sven Mueller
|
||||||
* Ulrich Kempken
|
* Ulrich Kempken
|
||||||
|
|
||||||
and 2116 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel) or via [Github Sponsors](https://github.com/users/foosel/sponsorship)!
|
and 2147 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel) or via [Github Sponsors](https://github.com/users/foosel/sponsorship)!
|
||||||
+4
-2
@@ -205,8 +205,10 @@ Retrieve information about the current job
|
|||||||
},
|
},
|
||||||
"estimatedPrintTime": 8811,
|
"estimatedPrintTime": 8811,
|
||||||
"filament": {
|
"filament": {
|
||||||
"length": 810,
|
"tool0": {
|
||||||
"volume": 5.36
|
"length": 810,
|
||||||
|
"volume": 5.36
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"progress": {
|
"progress": {
|
||||||
|
|||||||
@@ -200,6 +200,31 @@ There many configuration options via ``config.yaml`` for the virtual printer tha
|
|||||||
|
|
||||||
# Simulated ambient temperature in °C
|
# Simulated ambient temperature in °C
|
||||||
ambientTemperature: 21.3
|
ambientTemperature: 21.3
|
||||||
|
|
||||||
|
# Response to M105 when there is a target
|
||||||
|
# Placeholders:
|
||||||
|
# - heater: The heater id (eg. T0, T1, B)
|
||||||
|
# - actual: The actual temperature of the heater
|
||||||
|
# - target: The target temperature of heater
|
||||||
|
m105TargetFormatString: {heater}:{actual:.2f}/ {target:.2f}
|
||||||
|
|
||||||
|
# Response to M105 when there is no target
|
||||||
|
# Placeholders:
|
||||||
|
# - heater: The heater id (eg. T0, T1, B)
|
||||||
|
# - actual: The actual temperature of the heater
|
||||||
|
m105NoTargetFormatString: {heater}:{actual:.2f}
|
||||||
|
|
||||||
|
# Enable virtual EEPROM
|
||||||
|
# If enabled, a file `eeprom.json` will be created in the plugin data folder
|
||||||
|
# to enable settings persistence across connections. Enables M500/1/2/4 commmands
|
||||||
|
# And a selection of other settings commands. Responses modeled on Marlin 2.0
|
||||||
|
enable_eeprom: true
|
||||||
|
|
||||||
|
# Support M503
|
||||||
|
support_m503: true
|
||||||
|
|
||||||
|
# Resend ratio to simulate noise on the line
|
||||||
|
resend_ratio: 0
|
||||||
|
|
||||||
.. _sec-development-virtual-printer-log:
|
.. _sec-development-virtual-printer-log:
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ INSTALL_REQUIRES = [
|
|||||||
"PyYAML>=5.3.1,<6",
|
"PyYAML>=5.3.1,<6",
|
||||||
"pyserial>=3.4,<4",
|
"pyserial>=3.4,<4",
|
||||||
"netaddr>=0.7.19,<1",
|
"netaddr>=0.7.19,<1",
|
||||||
"watchdog>=0.10.2,<1",
|
"watchdog==0.10.4", # watchdog dropped Py>3.6 on 0.10.5 point release...
|
||||||
"sarge==0.1.5post0",
|
"sarge==0.1.5post0",
|
||||||
"netifaces>=0.10.9,<1",
|
"netifaces>=0.10.9,<1",
|
||||||
"pylru>=1.2,<2",
|
"pylru>=1.2,<2",
|
||||||
|
|||||||
@@ -675,6 +675,7 @@ class FileManager(object):
|
|||||||
path=None,
|
path=None,
|
||||||
filter=None,
|
filter=None,
|
||||||
recursive=None,
|
recursive=None,
|
||||||
|
level=0,
|
||||||
force_refresh=False,
|
force_refresh=False,
|
||||||
):
|
):
|
||||||
if not destinations:
|
if not destinations:
|
||||||
@@ -685,7 +686,11 @@ class FileManager(object):
|
|||||||
result = {}
|
result = {}
|
||||||
for dst in destinations:
|
for dst in destinations:
|
||||||
result[dst] = self._storage_managers[dst].list_files(
|
result[dst] = self._storage_managers[dst].list_files(
|
||||||
path=path, filter=filter, recursive=recursive, force_refresh=force_refresh
|
path=path,
|
||||||
|
filter=filter,
|
||||||
|
recursive=recursive,
|
||||||
|
level=level,
|
||||||
|
force_refresh=force_refresh,
|
||||||
)
|
)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|||||||
@@ -92,7 +92,9 @@ class StorageInterface(object):
|
|||||||
"""
|
"""
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
def list_files(self, path=None, filter=None, recursive=True, force_refresh=False):
|
def list_files(
|
||||||
|
self, path=None, filter=None, recursive=True, level=0, force_refresh=False
|
||||||
|
):
|
||||||
"""
|
"""
|
||||||
List all files in storage starting at ``path``. If ``recursive`` is set to True (the default), also dives into
|
List all files in storage starting at ``path``. If ``recursive`` is set to True (the default), also dives into
|
||||||
subfolders.
|
subfolders.
|
||||||
@@ -628,7 +630,9 @@ class LocalFileStorage(StorageInterface):
|
|||||||
folder_path = os.path.join(path, name)
|
folder_path = os.path.join(path, name)
|
||||||
return os.path.exists(folder_path) and os.path.isdir(folder_path)
|
return os.path.exists(folder_path) and os.path.isdir(folder_path)
|
||||||
|
|
||||||
def list_files(self, path=None, filter=None, recursive=True, force_refresh=False):
|
def list_files(
|
||||||
|
self, path=None, filter=None, recursive=True, level=0, force_refresh=False
|
||||||
|
):
|
||||||
if path:
|
if path:
|
||||||
path = self.sanitize_path(to_unicode(path))
|
path = self.sanitize_path(to_unicode(path))
|
||||||
base = self.path_in_storage(path)
|
base = self.path_in_storage(path)
|
||||||
@@ -647,6 +651,15 @@ class LocalFileStorage(StorageInterface):
|
|||||||
result[key] = node
|
result[key] = node
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
def strip_grandchildren(nodes):
|
||||||
|
result = {}
|
||||||
|
for key, node in nodes.items():
|
||||||
|
if node["type"] == "folder":
|
||||||
|
node = copy.copy(node)
|
||||||
|
node["children"] = strip_children(node["children"])
|
||||||
|
result[key] = node
|
||||||
|
return result
|
||||||
|
|
||||||
def apply_filter(nodes, filter_func):
|
def apply_filter(nodes, filter_func):
|
||||||
result = {}
|
result = {}
|
||||||
for key, node in nodes.items():
|
for key, node in nodes.items():
|
||||||
@@ -654,14 +667,17 @@ class LocalFileStorage(StorageInterface):
|
|||||||
if node["type"] == "folder":
|
if node["type"] == "folder":
|
||||||
node = copy.copy(node)
|
node = copy.copy(node)
|
||||||
node["children"] = apply_filter(
|
node["children"] = apply_filter(
|
||||||
node.get("children", []), filter_func
|
node.get("children", {}), filter_func
|
||||||
)
|
)
|
||||||
result[key] = node
|
result[key] = node
|
||||||
return result
|
return result
|
||||||
|
|
||||||
result = self._list_folder(path, base=base, force_refresh=force_refresh)
|
result = self._list_folder(path, base=base, force_refresh=force_refresh)
|
||||||
if not recursive:
|
if not recursive:
|
||||||
result = strip_children(result)
|
if level > 0:
|
||||||
|
result = strip_grandchildren(result)
|
||||||
|
else:
|
||||||
|
result = strip_children(result)
|
||||||
if callable(filter):
|
if callable(filter):
|
||||||
result = apply_filter(result, filter)
|
result = apply_filter(result, filter)
|
||||||
return result
|
return result
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ from octoprint.util.version import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
SENTRY_URL_SERVER = (
|
SENTRY_URL_SERVER = (
|
||||||
"https://53f015cb6c3046088019baed6ff5b653@o118517.ingest.sentry.io/1373987"
|
"https://1e1cfca4b230430b82ce56b1fe802437@o118517.ingest.sentry.io/1373987"
|
||||||
)
|
)
|
||||||
SENTRY_URL_COREUI = (
|
SENTRY_URL_COREUI = (
|
||||||
"https://993cc8f6848b4ccca8c66be5769ccb50@o118517.ingest.sentry.io/1374096"
|
"https://1c5aadba206f46cea250f3ef5066e253@o118517.ingest.sentry.io/1374096"
|
||||||
)
|
)
|
||||||
|
|
||||||
SETTINGS_DEFAULTS = {
|
SETTINGS_DEFAULTS = {
|
||||||
|
|||||||
@@ -231,7 +231,7 @@ def readGcodeFile(target, filename):
|
|||||||
|
|
||||||
def _getFileDetails(origin, path, recursive=True):
|
def _getFileDetails(origin, path, recursive=True):
|
||||||
parent, path = os.path.split(path)
|
parent, path = os.path.split(path)
|
||||||
files = _getFileList(origin, path=parent, recursive=recursive)
|
files = _getFileList(origin, path=parent, recursive=recursive, level=1)
|
||||||
|
|
||||||
for f in files:
|
for f in files:
|
||||||
if f["name"] == path:
|
if f["name"] == path:
|
||||||
@@ -245,7 +245,9 @@ def _getFileDetails(origin, path, recursive=True):
|
|||||||
message="{func}({func_args},{func_kwargs}) took {timing:.2f}ms",
|
message="{func}({func_args},{func_kwargs}) took {timing:.2f}ms",
|
||||||
incl_func_args=True,
|
incl_func_args=True,
|
||||||
)
|
)
|
||||||
def _getFileList(origin, path=None, filter=None, recursive=False, allow_from_cache=True):
|
def _getFileList(
|
||||||
|
origin, path=None, filter=None, recursive=False, level=0, allow_from_cache=True
|
||||||
|
):
|
||||||
if origin == FileDestinations.SDCARD:
|
if origin == FileDestinations.SDCARD:
|
||||||
sdFileList = printer.get_sd_files()
|
sdFileList = printer.get_sd_files()
|
||||||
|
|
||||||
@@ -301,6 +303,7 @@ def _getFileList(origin, path=None, filter=None, recursive=False, allow_from_cac
|
|||||||
path=path,
|
path=path,
|
||||||
filter=filter_func,
|
filter=filter_func,
|
||||||
recursive=recursive,
|
recursive=recursive,
|
||||||
|
level=level,
|
||||||
force_refresh=not allow_from_cache,
|
force_refresh=not allow_from_cache,
|
||||||
)[origin].values()
|
)[origin].values()
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1592,3 +1592,27 @@ var loadFromLocalStorage = function (key) {
|
|||||||
}
|
}
|
||||||
return current;
|
return current;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var deepMerge = function (target, source) {
|
||||||
|
/**
|
||||||
|
* Implements an object deep merge, which contrary to _.merge doesn't try to
|
||||||
|
* merge arrays.
|
||||||
|
*/
|
||||||
|
if (!_.isObject(target)) {
|
||||||
|
return target;
|
||||||
|
}
|
||||||
|
|
||||||
|
_.forOwn(source, function (value, key) {
|
||||||
|
if (
|
||||||
|
target.hasOwnProperty(key) &&
|
||||||
|
_.isPlainObject(target[key]) &&
|
||||||
|
_.isPlainObject(value)
|
||||||
|
) {
|
||||||
|
target[key] = deepMerge(target[key], value);
|
||||||
|
} else {
|
||||||
|
target[key] = value;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return target;
|
||||||
|
};
|
||||||
@@ -1142,7 +1142,7 @@ $(function () {
|
|||||||
// process all key-value-pairs here
|
// process all key-value-pairs here
|
||||||
_.forOwn(data, function (value, key) {
|
_.forOwn(data, function (value, key) {
|
||||||
var observable = key;
|
var observable = key;
|
||||||
if (keyPrefix != undefined) {
|
if (keyPrefix !== undefined) {
|
||||||
observable = keyPrefix + "_" + observable;
|
observable = keyPrefix + "_" + observable;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1161,7 +1161,7 @@ $(function () {
|
|||||||
mapping && mapping[key] ? mapping[key] : undefined,
|
mapping && mapping[key] ? mapping[key] : undefined,
|
||||||
observable
|
observable
|
||||||
);
|
);
|
||||||
if (subresult != undefined) {
|
if (subresult !== undefined) {
|
||||||
// we only set something on our result if we got something back
|
// we only set something on our result if we got something back
|
||||||
result[key] = subresult;
|
result[key] = subresult;
|
||||||
flag = true;
|
flag = true;
|
||||||
@@ -1179,7 +1179,7 @@ $(function () {
|
|||||||
// map local observables based on our existing data
|
// map local observables based on our existing data
|
||||||
var dataFromObservables = mapFromObservables(data, specialMappings);
|
var dataFromObservables = mapFromObservables(data, specialMappings);
|
||||||
|
|
||||||
data = _.merge(data, dataFromObservables);
|
data = deepMerge(data, dataFromObservables);
|
||||||
return data;
|
return data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -184,7 +184,8 @@ def interface_addresses(family=None, interfaces=None):
|
|||||||
continue
|
continue
|
||||||
if family in ifaddresses:
|
if family in ifaddresses:
|
||||||
for ifaddress in ifaddresses[family]:
|
for ifaddress in ifaddresses[family]:
|
||||||
if not ifaddress["addr"].startswith("169.254."):
|
address = netaddr.IPAddress(ifaddress["addr"])
|
||||||
|
if not address.is_link_local() and not address.is_loopback():
|
||||||
yield ifaddress["addr"]
|
yield ifaddress["addr"]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user