Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d7db470999 | ||
|
|
992ef83795 | ||
|
|
5860942967 | ||
|
|
93504d983c | ||
|
|
2efc3b841e | ||
|
|
44a009fd6f | ||
|
|
cacc329a61 | ||
|
|
954205d2a6 | ||
|
|
fad6ee2904 | ||
|
|
e23d3b88f9 | ||
|
|
19f774429f | ||
|
|
29acb4cacc | ||
|
|
013a5aace8 | ||
|
|
9d3437bd37 | ||
|
|
6698bbf68f | ||
|
|
cd424779cb | ||
|
|
f757035d32 | ||
|
|
a1dde3ab51 | ||
|
|
221ecad5c8 | ||
|
|
04c8d7a888 | ||
|
|
5a86da1090 | ||
|
|
789c7a5e75 | ||
|
|
f0ecc04648 | ||
|
|
cd1d72b267 | ||
|
|
5687da064c | ||
|
|
bf8ff63585 | ||
|
|
223064ce46 | ||
|
|
58911009c4 | ||
|
|
f8458520f5 | ||
|
|
d42c703e6e | ||
|
|
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
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
approve_label: approved
|
||||||
|
problem_label: incomplete
|
||||||
|
ignored_labels:
|
||||||
|
- approved
|
||||||
|
- bug
|
||||||
|
- request
|
||||||
|
- improvement
|
||||||
|
- brainstorming
|
||||||
|
- task
|
||||||
|
- rc feedback
|
||||||
|
- awaiting information
|
||||||
|
- not octoprint
|
||||||
|
- done
|
||||||
|
ignored_authors:
|
||||||
|
- "@OctoPrint"
|
||||||
|
- "sentry-io"
|
||||||
|
- "FormerLurker"
|
||||||
|
- "bzed"
|
||||||
|
|
||||||
|
validation_comment: >
|
||||||
|
Hi @@@AUTHOR@@,
|
||||||
|
|
||||||
|
|
||||||
|
it looks like there is some **information missing** from your bug report that will
|
||||||
|
be needed in order to solve the problem. Read the [Contribution Guidelines](https://github.com/OctoPrint/OctoPrint/blob/master/CONTRIBUTING.md)
|
||||||
|
which will provide you with a template to *fully fill out* here so that your bug report
|
||||||
|
is ready to be investigated (I promise I'll go away then too!).
|
||||||
|
|
||||||
|
|
||||||
|
If you did not intend to report a bug but wanted to **request a feature or brain
|
||||||
|
storm** about some kind of development, please take special note of the title format
|
||||||
|
to use as described in the [Contribution Guidelines](https://github.com/OctoPrint/OctoPrint/blob/master/CONTRIBUTING.md).
|
||||||
|
|
||||||
|
|
||||||
|
**Please do not abuse the bug tracker as a support forum** - that can be found at
|
||||||
|
[community.octoprint.org](https://community.octoprint.org). Go there for any kind
|
||||||
|
of issues with network connectivity, webcam functionality, printer detection or
|
||||||
|
any other kind of such support requests or general questions.
|
||||||
|
|
||||||
|
|
||||||
|
Also **make sure you are at the right place** - this is the bug tracker of the official
|
||||||
|
version of OctoPrint, not the Raspberry Pi image OctoPi nor any unbundled third
|
||||||
|
party OctoPrint plugins or unofficial versions. Make sure too that you have **read
|
||||||
|
through the [Frequently Asked Questions](http://faq.octoprint.org)** and searched
|
||||||
|
the [**existing tickets**](https://github.com/OctoPrint/OctoPrint/issues)
|
||||||
|
for your problem - try multiple search terms please.
|
||||||
|
|
||||||
|
|
||||||
|
I'm marking this one now as needing some more information. Please understand that
|
||||||
|
if you do not provide that information within the next two weeks
|
||||||
|
I'll close this ticket so it doesn't clutter the bug tracker. This is nothing
|
||||||
|
personal, it's needed to keep this project manageable. Please just be considerate
|
||||||
|
and help the maintainers solve this problem
|
||||||
|
quickly by following the guidelines linked above. Remember, the less time the devs
|
||||||
|
have to spend running after information on tickets, the more time they have to actually
|
||||||
|
solve problems and add awesome new features. Thank you!
|
||||||
|
|
||||||
|
|
||||||
|
*I'm just a bot 🤖, not a human being, so don't expect any replies
|
||||||
|
from me :) Your ticket is read by humans too, I'm just not one of them.*
|
||||||
|
|
||||||
|
keyphrase: I have read the FAQ
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
docs:
|
||||||
|
- "docs/*"
|
||||||
|
- "docs/**/*"
|
||||||
|
- "README.md"
|
||||||
|
|
||||||
|
meta:
|
||||||
|
- "CODE_OF_CONDUCT.md"
|
||||||
|
- "CONTRIBUTING.md"
|
||||||
|
- "SECURITY.md"
|
||||||
|
- ".github/CODEOWNERS"
|
||||||
|
- ".github/FUNDING.yml"
|
||||||
|
- ".github/ISSUE_TEMPLATE/*"
|
||||||
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
||||||
|
|
||||||
|
ci/cd:
|
||||||
|
- ".github/fixtures/**/*"
|
||||||
|
- ".github/workflows/*"
|
||||||
|
- ".github/labeler.yml"
|
||||||
|
|
||||||
|
docker:
|
||||||
|
- ".github/workflows/trigger_docker.yml"
|
||||||
|
|
||||||
|
tests:
|
||||||
|
- "tests/*"
|
||||||
|
- "tests/**/*"
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
approve_label: "approved"
|
||||||
|
problem_label: "needs some work"
|
||||||
|
|
||||||
|
allowed_targets: ["maintenance", "devel", "staging/maintenance", "staging/devel"]
|
||||||
|
forbidden_sources:
|
||||||
|
["master", "maintenance", "devel", "staging/maintenance", "staging/devel"]
|
||||||
|
|
||||||
|
labels:
|
||||||
|
docs:
|
||||||
|
additional_allowed_targets: ["master"]
|
||||||
|
meta:
|
||||||
|
additional_allowed_targets: ["master"]
|
||||||
|
ci/cd:
|
||||||
|
additional_allowed_targets: ["master"]
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
name: "Cleanup issues & PRs"
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 0 * * *"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lock:
|
||||||
|
name: 🔒 Lock issues & PRs closed over a year
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: dessant/lock-threads@v2
|
||||||
|
with:
|
||||||
|
github-token: ${{ github.token }}
|
||||||
|
issue-lock-comment: ""
|
||||||
|
pr-lock-comment: ""
|
||||||
|
|
||||||
|
cleanup:
|
||||||
|
name: 🧹 Close issues marked as incomplete & older than 14 days
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- id: date
|
||||||
|
run: |
|
||||||
|
echo "::set-output name=CUTOFF::`date --date='14 days ago' +'%Y-%m-%d'`"
|
||||||
|
- uses: OctoPrint/actions/close-by-query@main
|
||||||
|
with:
|
||||||
|
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
query: "is:issue is:open label:incomplete created:<${{ steps.date.outputs.CUTOFF }}"
|
||||||
|
comment: >
|
||||||
|
Since apparently some of the required information is still missing, this will be
|
||||||
|
closed now, sorry. Feel free to request a reopen of this or create a new issue
|
||||||
|
once you can provide **all**
|
||||||
|
[required information](https://github.com/OctoPrint/OctoPrint/blob/master/CONTRIBUTING.md#how-to-file-a-bug-report).
|
||||||
|
|
||||||
|
|
||||||
|
This is nothing personal. Thank you for your collaboration.
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
name: "Issue Labeler"
|
name: "Issue Automation"
|
||||||
on:
|
on:
|
||||||
issues:
|
issues:
|
||||||
types: [opened, edited, closed, reopened]
|
types: [opened, edited, closed, reopened]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
label-opened-and-edited:
|
issue-automation:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/github-script@v2
|
- uses: actions/github-script@v2
|
||||||
@@ -62,3 +62,8 @@ jobs:
|
|||||||
labels: labels
|
labels: labels
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- uses: OctoPrint/actions/issue-validation@main
|
||||||
|
if: github.event_name == 'issues' && (github.event.action == 'opened' || github.event.action == 'edited')
|
||||||
|
with:
|
||||||
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
name: "Lock outdated issues & PRs"
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: "0 0 * * *"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lock:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: 🔒 Lock issues & PRs closed over a year
|
|
||||||
uses: dessant/lock-threads@v2
|
|
||||||
with:
|
|
||||||
github-token: ${{ github.token }}
|
|
||||||
issue-lock-comment: ""
|
|
||||||
pr-lock-comment: ""
|
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
name: "Pull Request Automation"
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
types: ["opened", "synchronize", "reopened", "edited", "labeled", "unlabeled"]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
pr-automation:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/labeler@v3
|
||||||
|
with:
|
||||||
|
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
|
||||||
|
- uses: OctoPrint/actions/pr-validation@main
|
||||||
|
with:
|
||||||
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -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.action }}
|
||||||
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": "maintenance"}'
|
||||||
|
|
||||||
|
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": "devel"}'
|
||||||
+4
-2
@@ -24,8 +24,10 @@ 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/bugfix is the branch for preparation of the 1.5.3 hotfix release
|
||||||
staging/hotfix 1.4.2 3ab84ed7e4c3aaaf71fe0f184b465f25d689f929 pep440-dev
|
# so are any bug/... branches
|
||||||
|
staging/bugfix 1.5.3 e46e8fa17a1553cd0c228a4fa4cfd93e2a9bce7b pep440-dev
|
||||||
|
bug/.* 1.5.3 e46e8fa17a1553cd0c228a4fa4cfd93e2a9bce7b 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/...
|
||||||
|
|||||||
@@ -130,6 +130,7 @@ date of first contribution):
|
|||||||
* [Sophist](https://github.com/Sophist-UK)
|
* [Sophist](https://github.com/Sophist-UK)
|
||||||
* [Manuel McLure](https://github.com/ManuelMcLure)
|
* [Manuel McLure](https://github.com/ManuelMcLure)
|
||||||
* ["j7126"](https://github.com/j7126)
|
* ["j7126"](https://github.com/j7126)
|
||||||
|
* ["coliss86"](https://github.com/coliss86)
|
||||||
|
|
||||||
OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by
|
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
|
[Daid Braam](https://github.com/daid). Parts of its communication layer and
|
||||||
|
|||||||
+7
-4
@@ -6,18 +6,22 @@ thanks to everyone who contributed!
|
|||||||
|
|
||||||
## Patrons & Sponsors
|
## Patrons & Sponsors
|
||||||
|
|
||||||
|
* 3DPrinterOS
|
||||||
* Andrew Moorby
|
* Andrew Moorby
|
||||||
* Arnljot Arntsen
|
* Arnljot Arntsen
|
||||||
* Ash King
|
* Ash King
|
||||||
* BigTreeTech
|
* BigTreeTech
|
||||||
* Boris Hussein
|
* Boris Hussein
|
||||||
* Brad Jackson
|
* Brad Jackson
|
||||||
|
* BRANDON ROBERTSON
|
||||||
* BuildBee
|
* BuildBee
|
||||||
* Christian Petropolis
|
* Christian Petropolis
|
||||||
* Christian Wolf
|
* Christian Wolf
|
||||||
|
* Creality3D
|
||||||
* D Brian Kimmel
|
* D Brian Kimmel
|
||||||
* DeltaMaker 3D Printers
|
* DeltaMaker 3D Printers
|
||||||
* Dennis Breining
|
* Dennis Breining
|
||||||
|
* Diana C Rodriguez
|
||||||
* Eric Betts
|
* Eric Betts
|
||||||
* Ernesto Martinez
|
* Ernesto Martinez
|
||||||
* Franziska Kunsmann
|
* Franziska Kunsmann
|
||||||
@@ -25,12 +29,10 @@ thanks to everyone who contributed!
|
|||||||
* Greg Holloway
|
* Greg Holloway
|
||||||
* Hog Duske
|
* Hog Duske
|
||||||
* Hopewell Medical Acupuncture Center
|
* Hopewell Medical Acupuncture Center
|
||||||
* Hugh Blemings
|
|
||||||
* jean-claude migneault
|
* jean-claude migneault
|
||||||
* Jefferson Hunt
|
* Jefferson Hunt
|
||||||
* Jeremy Cole
|
* Jeremy Cole
|
||||||
* Joe Pasqua
|
* Joe Pasqua
|
||||||
* John Gregory Robinson
|
|
||||||
* Joshua Wills
|
* Joshua Wills
|
||||||
* Justin Kaufman
|
* Justin Kaufman
|
||||||
* Kaile Riser
|
* Kaile Riser
|
||||||
@@ -51,13 +53,14 @@ thanks to everyone who contributed!
|
|||||||
* Mosaic Manufacturing
|
* Mosaic Manufacturing
|
||||||
* Neil R. Goldberg
|
* Neil R. Goldberg
|
||||||
* Patrick Glyré
|
* Patrick Glyré
|
||||||
* Patrick McGinnis
|
* Pete Barnwell
|
||||||
* Prof Yuh Wen Chen
|
* Prof Yuh Wen Chen
|
||||||
* Raise3D
|
* Raise3D
|
||||||
* Randy C. Will
|
* Randy C. Will
|
||||||
* Ranjib Dey
|
* Ranjib Dey
|
||||||
* Richard McGuire
|
* Richard McGuire
|
||||||
* Richard Michaud
|
* Richard Michaud
|
||||||
|
* Richard Stocks
|
||||||
* Rigid3D
|
* Rigid3D
|
||||||
* Robert Gusek
|
* Robert Gusek
|
||||||
* Ronald Griehsler
|
* Ronald Griehsler
|
||||||
@@ -68,4 +71,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 2225 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": {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ The OctoPrint Action Command Notification Support Plugin comes bundled with Octo
|
|||||||
It allows firmware to trigger notifications users with the ``PLUGIN_ACTION_COMMAND_NOTIFICATION_SHOW`` permission
|
It allows firmware to trigger notifications users with the ``PLUGIN_ACTION_COMMAND_NOTIFICATION_SHOW`` permission
|
||||||
using :ref:`action commands <sec-features-action_commands>` about relevant events. These notifications will be shown
|
using :ref:`action commands <sec-features-action_commands>` about relevant events. These notifications will be shown
|
||||||
in the sidebar and if configured also as popup messages. The notifications in the sidebar panel can also be cleared
|
in the sidebar and if configured also as popup messages. The notifications in the sidebar panel can also be cleared
|
||||||
by users with the ``PLUGIN_ACTION_COMMAND_NOTIFICATION_CLEAR` permission.
|
by users with the ``PLUGIN_ACTION_COMMAND_NOTIFICATION_CLEAR`` permission.
|
||||||
|
|
||||||
.. _fig-bundledplugins-action_command_notification-example:
|
.. _fig-bundledplugins-action_command_notification-example:
|
||||||
.. figure:: ../images/bundledplugins-action_command_notification-example.png
|
.. figure:: ../images/bundledplugins-action_command_notification-example.png
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ Use the following settings to enable access control:
|
|||||||
userManager: octoprint.access.users.FilebasedUserManager
|
userManager: octoprint.access.users.FilebasedUserManager
|
||||||
|
|
||||||
# The YAML user file to use. If left out defaults to users.yaml in the default configuration folder.
|
# The YAML user file to use. If left out defaults to users.yaml in the default configuration folder.
|
||||||
userFile: /path/to/users.yaml
|
userfile: /path/to/users.yaml
|
||||||
|
|
||||||
# If set to true, will automatically log on clients originating from any of the networks defined in
|
# 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.
|
# "localNetworks" as the user defined in "autologinAs". Defaults to false.
|
||||||
|
|||||||
@@ -30,8 +30,8 @@ There are three main branches in OctoPrint:
|
|||||||
|
|
||||||
There are couple more RC and staging branches that see regular use:
|
There are couple more RC and staging branches that see regular use:
|
||||||
|
|
||||||
``staging/hotfix``
|
``staging/bugfix``
|
||||||
Any preparation for potential hotfix releases takes place here.
|
Any preparation for potential bugfix releases takes place here.
|
||||||
Version number follows the scheme ``<x>.<y>.<z+1>`` (e.g. ``1.5.1``) for a current release
|
Version number follows the scheme ``<x>.<y>.<z+1>`` (e.g. ``1.5.1``) for a current release
|
||||||
of ``<x>.<y>.<z>``.
|
of ``<x>.<y>.<z>``.
|
||||||
``rc/maintenance``
|
``rc/maintenance``
|
||||||
@@ -56,8 +56,8 @@ There are couple more RC and staging branches that see regular use:
|
|||||||
Additionally, from time to time you might see other branches pop up in the repository.
|
Additionally, from time to time you might see other branches pop up in the repository.
|
||||||
Those usually have one of the following prefixes:
|
Those usually have one of the following prefixes:
|
||||||
|
|
||||||
``hotfix/...``
|
``bug/...``
|
||||||
Hotfixes under development that are to be merged into the ``staging/hotfix``
|
Fixes under development that are to be merged into the ``staging/bugfix``
|
||||||
and later the ``master`` branch.
|
and later the ``master`` branch.
|
||||||
``fix/...``
|
``fix/...``
|
||||||
Fixes under development that are to be merged into the ``maintenance``
|
Fixes under development that are to be merged into the ``maintenance``
|
||||||
|
|||||||
@@ -201,6 +201,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:
|
||||||
|
|
||||||
Log file
|
Log file
|
||||||
|
|||||||
+193
-53
@@ -3,7 +3,7 @@
|
|||||||
Access Control
|
Access Control
|
||||||
==============
|
==============
|
||||||
|
|
||||||
.. versionchanged:: 1.4.0
|
.. versionchanged:: 1.5.0
|
||||||
|
|
||||||
OctoPrint's bundled access control feature allows granular permission control
|
OctoPrint's bundled access control feature allows granular permission control
|
||||||
over which users or user groups are allowed to access which parts of OctoPrint.
|
over which users or user groups are allowed to access which parts of OctoPrint.
|
||||||
@@ -17,8 +17,17 @@ users out of the box.
|
|||||||
thus also cannot limit access to it. If an anonymous user correctly guesses the
|
thus also cannot limit access to it. If an anonymous user correctly guesses the
|
||||||
webcam URL, they will thus be able to see it.
|
webcam URL, they will thus be able to see it.
|
||||||
|
|
||||||
If read-only access for anonymous users is enabled, anonymous users will have
|
Upon first start a configuration wizard is provided which allows configuration
|
||||||
read-only access to the following parts of the UI:
|
of the first administrator account to be used for OctoPrint. After initial setup,
|
||||||
|
you can then create more users and groups under Settings > Access Control for
|
||||||
|
customisation of the granular permission system.
|
||||||
|
|
||||||
|
The predefined "Guests" group can be used to configure default permissions of anonymous
|
||||||
|
users, that is those who have not logged in. By default, no permissions are granted to
|
||||||
|
these users.
|
||||||
|
|
||||||
|
A predefined "Read-only Access" group with no users is configured which by default grants
|
||||||
|
read-only access to the following parts of the UI to any users assigned to this group:
|
||||||
|
|
||||||
* printer state
|
* printer state
|
||||||
* available gcode files and stats (upload is disabled)
|
* available gcode files and stats (upload is disabled)
|
||||||
@@ -30,29 +39,195 @@ read-only access to the following parts of the UI:
|
|||||||
* any components provided through plugins which are enabled for anonymous
|
* any components provided through plugins which are enabled for anonymous
|
||||||
users
|
users
|
||||||
|
|
||||||
Logged in users without admin flag will be allowed to access everything besides the
|
Another predefined "Operator" group is the default group for newly created users and
|
||||||
Settings and System Commands, which are admin-only.
|
by default gives access to all aspects of OctoPrint that involve regular printer
|
||||||
|
operation. It matches the old "user" role from OctoPrint prior to 1.4.0.
|
||||||
|
|
||||||
If Access Control is disabled, everything is directly accessible. **That also
|
Finally, the predefined "Admins" group gives full admin access to the platform. You should
|
||||||
includes all administrative functionality as well as full control over the
|
be careful of who you put into that. It matches the old "admin" role from OctoPrint prior
|
||||||
printer**, and without the need for an :ref:`API key <sec-api-general-authorization>`!
|
to 1.4.0.
|
||||||
|
|
||||||
Upon first start a configuration wizard is provided which allows configuration
|
|
||||||
of the first administrator account or alternatively disabling Access Control
|
|
||||||
(which is **NOT** recommended for systems that are directly accessible via the
|
|
||||||
internet or other untrusted networks!).
|
|
||||||
|
|
||||||
.. hint::
|
.. hint::
|
||||||
|
|
||||||
If you plan to have your OctoPrint instance accessible over the internet,
|
If you plan to have your OctoPrint instance accessible over the internet,
|
||||||
**always enable Access Control** and ideally **don't make it accessible to
|
**please use additional security measures** and ideally **don't make it accessible to
|
||||||
everyone over the internet but instead use a VPN** or at the very least
|
everyone over the internet but instead use a VPN** or at the very least
|
||||||
HTTP basic authentication on a layer above OctoPrint.
|
HTTP basic authentication on a layer above OctoPrint. Unless you are using a VPN
|
||||||
|
**please do not** enable any permissions for the Guest group or the auto-login feature
|
||||||
|
described below.
|
||||||
|
|
||||||
A physical device that includes heaters and stepper motors really should not be
|
A physical device that includes heaters and stepper motors really should not be
|
||||||
publicly reachable by everyone with an internet connection, even with access
|
publicly reachable by everyone with an internet connection, even with access
|
||||||
control enabled.
|
control enabled.
|
||||||
|
|
||||||
|
.. _sec-features-access_control-autologin:
|
||||||
|
|
||||||
|
Autologin
|
||||||
|
---------
|
||||||
|
|
||||||
|
While access control cannot be disabled as of OctoPrint 1.5+, the Autologin feature can
|
||||||
|
be used to bypass authentication for hosts on the network(s) that you trust.
|
||||||
|
|
||||||
|
Starting with OctoPrint 1.5.0, OctoPrint makes enabled access control mandatory. This
|
||||||
|
might be an inconvience for some who run OctoPrint in an isolated setup where a login is
|
||||||
|
not required to ensure security, at a benefit for a huge number of users out there who
|
||||||
|
continue to underestimate or simply ignore the risk of keeping their OctoPrint instance
|
||||||
|
unsecured and then happily exposing it on the public internet.
|
||||||
|
|
||||||
|
That being said, even as far back as OctoPrint 1.0.0 (released in 2013) there has existed
|
||||||
|
a way to have OctoPrint automatically log you in, if you connect from a trusted local
|
||||||
|
network address. This functionality has not been exposed on the UI, and for now also won't
|
||||||
|
be (to make it a bit harder to once again create an insecure setup for those who simply
|
||||||
|
won't listen to common sense), but it's easy to set up with a bit of configuration
|
||||||
|
editing.
|
||||||
|
|
||||||
|
When set up properly, it will make sure to automatically log you in as a configured user
|
||||||
|
whenever you connect from a device on your local network. To get back pretty much the same
|
||||||
|
behaviour as with disabled access control, you'll only need to create a single (admin)
|
||||||
|
account and then set up autologin for it.
|
||||||
|
|
||||||
|
|
||||||
|
.. warning::
|
||||||
|
|
||||||
|
**Do not do this if you cannot trust EVERYONE on your local network.** And that really
|
||||||
|
means mean everyone. If you ignore this and then someone takes over your OctoPrint
|
||||||
|
instance, installs malware on it and makes your printer print an endless stream of
|
||||||
|
benchies, that's on you.
|
||||||
|
|
||||||
|
.. _sec-features-access_control-autologin-gather_config_info:
|
||||||
|
|
||||||
|
Gather configuration information
|
||||||
|
................................
|
||||||
|
|
||||||
|
You can configure Autologin via a plugin (the easy way), or manually (the hard way), but
|
||||||
|
in either case you will need to specify which user should be automatically logged in, and
|
||||||
|
which hosts are permitted access this way.
|
||||||
|
|
||||||
|
**Improperly setting this subnet option can lead to the compromise of your system, or even
|
||||||
|
your entire network. Proceed with extreme caution.**
|
||||||
|
|
||||||
|
The subnet to use is usually the IP address range of your LAN, which sounds scary but
|
||||||
|
actually isn't. Just `figure out your PC's IP address and subnet mask <https://lifehacker.com/how-to-find-your-local-and-external-ip-address-5833108>`_
|
||||||
|
and then combine both with a / in between.
|
||||||
|
|
||||||
|
On OctoPi (or another Linux distribution) you can use the follwing command:
|
||||||
|
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
ip route | grep -P 'eth0|wlan0' | awk '{print $1}'
|
||||||
|
|
||||||
|
Or, for IPv6, use this:
|
||||||
|
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
ip -6 route | grep -P 'eth0|wlan0' | awk '{print $1}'
|
||||||
|
|
||||||
|
This will be what you set as the subnet in the plugin, or where it says
|
||||||
|
``<yourAddressRange>`` below on the manual configuration instructions.
|
||||||
|
|
||||||
|
Example: Your PC has an IP address of ``192.168.23.42`` and a subnet mask of
|
||||||
|
``255.255.255.0``. Your address range is ``192.168.23.42/255.255.255.0``.
|
||||||
|
|
||||||
|
.. _sec-features-access_control-autologin-plugin:
|
||||||
|
|
||||||
|
The easy way: Using the OctoPrint-AutoLoginConfig plugin
|
||||||
|
........................................................
|
||||||
|
|
||||||
|
The easist way to configure AutoLogin is to install the
|
||||||
|
`OctoPrint-AutoLoginConfig plugin <https://plugins.octoprint.org/plugins/autologin_config/>`_
|
||||||
|
via the plugin manager.
|
||||||
|
|
||||||
|
Open its settings and follow the instructions on the screen.
|
||||||
|
|
||||||
|
.. _sec-features-access_control-autologin-manual:
|
||||||
|
|
||||||
|
The hard way: Manual editing of config.yaml
|
||||||
|
...........................................
|
||||||
|
|
||||||
|
Preparation
|
||||||
|
***********
|
||||||
|
|
||||||
|
First of all, read :ref:`the YAML primer <sec-configuration-yaml>`. You
|
||||||
|
will have to edit OctoPrint's main configuration file, and thus should make sure
|
||||||
|
you understand at least roughly how things work and that you should keep your
|
||||||
|
hands off the Tab key. If you don't, you might break your config file, and
|
||||||
|
while the steps include making a backup, this still can be easily avoided by
|
||||||
|
learning about the DOs and DONTs first.
|
||||||
|
|
||||||
|
Then, take a look at :ref:`the docs on config.yaml <sec-configuration-config_yaml>`
|
||||||
|
on where to find that central configuration file of OctoPrint.
|
||||||
|
|
||||||
|
Configuration
|
||||||
|
*************
|
||||||
|
|
||||||
|
Ready? Let's do some editing then. I'll outline what to do and where first, and then
|
||||||
|
further down there's also a dedicated list of steps for OctoPi specifically.
|
||||||
|
|
||||||
|
1. Shutdown OctoPrint
|
||||||
|
2. Make a backup of your config.yaml
|
||||||
|
3. Open it in a text editor (e.g. nano). Right at the very top it'll say something like
|
||||||
|
this:
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
accessControl:
|
||||||
|
salt: aabbccddee1234523452345
|
||||||
|
|
||||||
|
Edit this, adding lines so it looks like this (making absolutely sure not to touch the
|
||||||
|
salt line):
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
accessControl:
|
||||||
|
salt: aabbccddee1234523452345
|
||||||
|
autologinLocal: true
|
||||||
|
autologinAs: "<yourUsername>"
|
||||||
|
localNetworks:
|
||||||
|
- "127.0.0.0/8"
|
||||||
|
- "<yourAddressRange>"
|
||||||
|
|
||||||
|
4. Restart OctoPrint, check that everything works.
|
||||||
|
|
||||||
|
This will automatically log you in as the user you specified whenver you connect to
|
||||||
|
OctoPrint from an address in the address range (e.g. a device on your local network).
|
||||||
|
|
||||||
|
OctoPi specific steps
|
||||||
|
*********************
|
||||||
|
|
||||||
|
If you are running OctoPi you will have to SSH into your Raspberry Pi. Then issue
|
||||||
|
the following commands:
|
||||||
|
|
||||||
|
1. ``sudo service octoprint stop``
|
||||||
|
2. ``cp ~/.octoprint/config.yaml ~/.octoprint/config.yaml.back``
|
||||||
|
3. ``nano ~/.octoprint/config.yaml, make the edits as described above``
|
||||||
|
4. ``sudo service octoprint start``
|
||||||
|
|
||||||
|
If something went wrong, you can restore the config backup with
|
||||||
|
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
cp ~/.octoprint/config.yaml.back ~/.octoprint/config.yaml
|
||||||
|
|
||||||
|
|
||||||
|
If you are using a VPN and your setup ABSOLUTELY REQUIRES disabling internal OctoPrint access controls
|
||||||
|
......................................................................................................
|
||||||
|
|
||||||
|
.. warning::
|
||||||
|
|
||||||
|
You probably shouldn't do this, EVER. There are usually other options. Don't even
|
||||||
|
THINK about it, unless you have a VPN layer for security. Only consider proceeding
|
||||||
|
with this configuration after exhausting ALL other possibilities, and even then, you
|
||||||
|
should think long and hard about whether this is a good idea. You almost certainly
|
||||||
|
don't need or want to do this.
|
||||||
|
|
||||||
|
While access controls can no longer be disabled in OctoPrint 1.5+, this can be
|
||||||
|
approximated by an Autologin configuration that automatically logs in all users, that is
|
||||||
|
by using subnets that match all possible IP addresses. By specifying the ``0.0.0.0/0``
|
||||||
|
subnet (for IPv4) and ``::/0`` for IPv6 in the AutoLogin configuration, you can achieve
|
||||||
|
this. This configuration is permitted, but highly, highly discouraged.
|
||||||
|
|
||||||
|
Please don't do this. You will almost certainly regret it. You alone are responsible for
|
||||||
|
your actions.
|
||||||
|
|
||||||
.. _sec-features-access_control-hooks:
|
.. _sec-features-access_control-hooks:
|
||||||
|
|
||||||
Available Extension Hooks
|
Available Extension Hooks
|
||||||
@@ -71,42 +246,7 @@ See :ref:`here <sec-plugins-hook-permissions>`.
|
|||||||
|
|
||||||
.. _sec-features-access_control-hooks-loginui:
|
.. _sec-features-access_control-hooks-loginui:
|
||||||
|
|
||||||
octoprint.plugin.loginui.theming
|
octoprint.theming.login
|
||||||
................................
|
.......................
|
||||||
|
|
||||||
See :ref:`here <sec-bundledplugins-loginui-hooks-theming>`.
|
See :ref:`here <sec-plugins-hook-theming-dialog>`.
|
||||||
|
|
||||||
.. _sec-features-access_control-rerunning_wizard:
|
|
||||||
|
|
||||||
Rerunning the wizard
|
|
||||||
--------------------
|
|
||||||
|
|
||||||
In case Access Control was disabled in the configuration wizard, it is
|
|
||||||
possible to re-run it by editing ``config.yaml`` [#f1]_ and setting ``firstRun``
|
|
||||||
in the ``server`` section and ``enabled`` in the ``accessControl`` section to
|
|
||||||
``true``:
|
|
||||||
|
|
||||||
.. code-block-ext:: yaml
|
|
||||||
|
|
||||||
accessControl:
|
|
||||||
enabled: true
|
|
||||||
# ...
|
|
||||||
server:
|
|
||||||
firstRun: true
|
|
||||||
|
|
||||||
Then restart the server and connect to the web interface - the wizard should
|
|
||||||
be shown again.
|
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
If user accounts were created prior to disabling Access Control and those
|
|
||||||
user accounts are not to be used any more, remove ``.octoprint/users.yaml``.
|
|
||||||
If you don't remove this file, the above changes won't lead to the
|
|
||||||
configuration being shown again, instead Access Control will just be
|
|
||||||
enabled using the already existing login data. This is to prevent you from
|
|
||||||
resetting access control by accident.
|
|
||||||
|
|
||||||
.. rubric:: Footnotes
|
|
||||||
|
|
||||||
.. [#f1] For Linux that will be ``~/.octoprint/config.yaml``, for Windows it will be ``%APPDATA%/OctoPrint/config.yaml`` and for
|
|
||||||
Mac ``~/Library/Application Support/OctoPrint/config.yaml``
|
|
||||||
@@ -60,3 +60,22 @@ that in the `Plugin Repository's help pages <http://plugins.octoprint.org/help/r
|
|||||||
If you used the `OctoPrint Plugin Cookiecutter Template <https://github.com/OctoPrint/cookiecutter-octoprint-plugin>`_
|
If you used the `OctoPrint Plugin Cookiecutter Template <https://github.com/OctoPrint/cookiecutter-octoprint-plugin>`_
|
||||||
when creating your plugin, you can find a prepared registration entry ``.md`` file in the ``extras`` folder of your
|
when creating your plugin, you can find a prepared registration entry ``.md`` file in the ``extras`` folder of your
|
||||||
plugin.
|
plugin.
|
||||||
|
|
||||||
|
Version management after the official plugin repository release
|
||||||
|
---------------------------------------------------------------
|
||||||
|
|
||||||
|
Once your plugin is available in the official plugin repository, you probably want to create and distribute new versions.
|
||||||
|
For "beta" users you can use the manual file distribution method, or a more elegant release channels (see below).
|
||||||
|
After you finalized a new plugin version, don't forget to actually update the version in the ``setup.py``,
|
||||||
|
and `submit a new release on github <https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/managing-releases-in-a-repository#creating-a-release>`_.
|
||||||
|
|
||||||
|
After you published the new release, you can verify it on your installed octoprint,
|
||||||
|
with force checking the updates under the advanced options (in the software updates menu in the settings).
|
||||||
|
The new versions will appear to the plugin users in the next 24 hours (it depends on their cache refreshes).
|
||||||
|
|
||||||
|
The `Software Update Plugin <https://docs.octoprint.org/en/master/bundledplugins/softwareupdate.html#>`_ has options to define multiple release channels,
|
||||||
|
and you can let the users decide if they want to test your pre-releases or not.
|
||||||
|
This can be achieved with defining ``stable_branch`` and ``prerelease_branches`` in the ``get_update_information`` function,
|
||||||
|
and creating github releases to the newly configured branches too.
|
||||||
|
For more information you can check the `Software Update Plugin documentation <https://docs.octoprint.org/en/master/bundledplugins/softwareupdate.html#version-checks>`_
|
||||||
|
or read a more step-by-step writeup `here <https://github.com/cp2004/OctoPrint-Knowledge/blob/main/release-channels.md>`_.
|
||||||
@@ -1173,15 +1173,6 @@ octoprint.plugin.backup.additional_excludes
|
|||||||
|
|
||||||
See :ref:`here <sec-bundledplugins-backup-hooks-excludes>`.
|
See :ref:`here <sec-bundledplugins-backup-hooks-excludes>`.
|
||||||
|
|
||||||
.. _sec-plugins-hook-plugin-loginui-theming:
|
|
||||||
|
|
||||||
octoprint.plugin.loginui.theming
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
.. versionadded:: 1.4.0
|
|
||||||
|
|
||||||
See :ref:`here <sec-bundledplugins-loginui-hooks-theming>`.
|
|
||||||
|
|
||||||
.. _sec-plugins-hook-plugin-pluginmanager-reconnect:
|
.. _sec-plugins-hook-plugin-pluginmanager-reconnect:
|
||||||
|
|
||||||
octoprint.plugin.pluginmanager.reconnect_hooks
|
octoprint.plugin.pluginmanager.reconnect_hooks
|
||||||
|
|||||||
@@ -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://c11d13d9e92046bca4691ad1658dc543@o118517.ingest.sentry.io/1373987"
|
||||||
)
|
)
|
||||||
SENTRY_URL_COREUI = (
|
SENTRY_URL_COREUI = (
|
||||||
"https://993cc8f6848b4ccca8c66be5769ccb50@o118517.ingest.sentry.io/1374096"
|
"https://a987a79a328e405a9545b8a036b420ee@o118517.ingest.sentry.io/1374096"
|
||||||
)
|
)
|
||||||
|
|
||||||
SETTINGS_DEFAULTS = {
|
SETTINGS_DEFAULTS = {
|
||||||
|
|||||||
@@ -47,6 +47,8 @@ from octoprint.util.version import (
|
|||||||
is_python_compatible,
|
is_python_compatible,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
from . import exceptions
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from os import scandir
|
from os import scandir
|
||||||
except ImportError:
|
except ImportError:
|
||||||
@@ -633,21 +635,32 @@ class PluginManagerPlugin(
|
|||||||
)
|
)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
self._logger.error(
|
raise exceptions.InvalidPackageFormat()
|
||||||
"{} is neither an archive nor a python file, can't install that.".format(
|
except requests.exceptions.HTTPError as e:
|
||||||
source
|
self._logger.error("Could not fetch plugin from server, got {}".format(e))
|
||||||
)
|
result = {
|
||||||
|
"result": False,
|
||||||
|
"source": source,
|
||||||
|
"source_type": source_type,
|
||||||
|
"reason": "Could not fetch plugin from server, got {}".format(e),
|
||||||
|
}
|
||||||
|
self._send_result_notification("install", result)
|
||||||
|
return result
|
||||||
|
except exceptions.InvalidPackageFormat:
|
||||||
|
self._logger.error(
|
||||||
|
"{} is neither an archive nor a python file, can't install that.".format(
|
||||||
|
source
|
||||||
)
|
)
|
||||||
result = {
|
)
|
||||||
"result": False,
|
result = {
|
||||||
"source": source,
|
"result": False,
|
||||||
"source_type": source_type,
|
"source": source,
|
||||||
"reason": "Could not install plugin from {}, was neither "
|
"source_type": source_type,
|
||||||
"a plugin archive nor a single file plugin".format(source),
|
"reason": "Could not install plugin from {}, was neither "
|
||||||
}
|
"a plugin archive nor a single file plugin".format(source),
|
||||||
self._send_result_notification("install", result)
|
}
|
||||||
return result
|
self._send_result_notification("install", result)
|
||||||
|
return result
|
||||||
finally:
|
finally:
|
||||||
if folder is not None:
|
if folder is not None:
|
||||||
folder.cleanup()
|
folder.cleanup()
|
||||||
@@ -671,11 +684,19 @@ class PluginManagerPlugin(
|
|||||||
and not self._settings.get_boolean(["ignore_throttled"])
|
and not self._settings.get_boolean(["ignore_throttled"])
|
||||||
):
|
):
|
||||||
# currently throttled, we refuse to run
|
# currently throttled, we refuse to run
|
||||||
return make_response(
|
error_msg = (
|
||||||
"System is currently throttled, refusing to install "
|
"System is currently throttled, refusing to install anything"
|
||||||
"anything due to possible stability issues",
|
" due to possible stability isssues"
|
||||||
409,
|
|
||||||
)
|
)
|
||||||
|
self._logger.error(error_msg)
|
||||||
|
result = {
|
||||||
|
"result": False,
|
||||||
|
"source": source,
|
||||||
|
"source_type": source_type,
|
||||||
|
"reason": error_msg,
|
||||||
|
}
|
||||||
|
self._send_result_notification("install", result)
|
||||||
|
return result
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Py3
|
# Py3
|
||||||
@@ -745,11 +766,20 @@ class PluginManagerPlugin(
|
|||||||
"Looks like the plugin was already installed. Forcing a reinstall."
|
"Looks like the plugin was already installed. Forcing a reinstall."
|
||||||
)
|
)
|
||||||
force = True
|
force = True
|
||||||
except Exception:
|
except Exception as e:
|
||||||
self._logger.exception("Could not install plugin from %s" % source)
|
self._logger.exception("Could not install plugin from {}".format(source))
|
||||||
return make_response(
|
self._logger.exception("Reason: {}".format(repr(e)))
|
||||||
"Could not install plugin from URL, see the log for more details", 500
|
result = {
|
||||||
)
|
"result": False,
|
||||||
|
"source": source,
|
||||||
|
"source_type": source_type,
|
||||||
|
"reason": "Could not install plugin from {}, see the log for more details".format(
|
||||||
|
source
|
||||||
|
),
|
||||||
|
}
|
||||||
|
self._send_result_notification("install", result)
|
||||||
|
return result
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if force:
|
if force:
|
||||||
# We don't use --upgrade here because that will also happily update all our dependencies - we'd rather
|
# We don't use --upgrade here because that will also happily update all our dependencies - we'd rather
|
||||||
@@ -757,16 +787,21 @@ class PluginManagerPlugin(
|
|||||||
pip_args += ["--ignore-installed", "--force-reinstall", "--no-deps"]
|
pip_args += ["--ignore-installed", "--force-reinstall", "--no-deps"]
|
||||||
try:
|
try:
|
||||||
returncode, stdout, stderr = self._call_pip(pip_args)
|
returncode, stdout, stderr = self._call_pip(pip_args)
|
||||||
except Exception:
|
except Exception as e:
|
||||||
self._logger.exception(
|
self._logger.exception(
|
||||||
"Could not install plugin from {}".format(source)
|
"Could not install plugin from {}".format(source)
|
||||||
)
|
)
|
||||||
return make_response(
|
self._logger.exception("Reason: {}".format(repr(e)))
|
||||||
"Could not install plugin from source {}, see the log for more details".format(
|
result = {
|
||||||
|
"result": False,
|
||||||
|
"source": source,
|
||||||
|
"source_type": source_type,
|
||||||
|
"reason": "Could not install plugin from source {}, see the log for more details".format(
|
||||||
source
|
source
|
||||||
),
|
),
|
||||||
500,
|
}
|
||||||
)
|
self._send_result_notification("install", result)
|
||||||
|
return result
|
||||||
|
|
||||||
try:
|
try:
|
||||||
result_line = list(
|
result_line = list(
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||||
|
|
||||||
|
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
|
||||||
|
__copyright__ = "Copyright (C) 2020 The OctoPrint Project - Released under terms of the AGPLv3 License"
|
||||||
|
|
||||||
|
|
||||||
|
class InvalidPackageFormat(Exception):
|
||||||
|
pass
|
||||||
@@ -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"]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Generated
+261
-254
File diff suppressed because it is too large.
Load diff
@@ -22,6 +22,7 @@
|
|||||||
"cypress-file-upload": "^4.0.7",
|
"cypress-file-upload": "^4.0.7",
|
||||||
"cypress-plugin-retries": "^1.5.2",
|
"cypress-plugin-retries": "^1.5.2",
|
||||||
"cypress-terminal-report": "^1.4.1",
|
"cypress-terminal-report": "^1.4.1",
|
||||||
"cypress-wait-until": "^1.7.1"
|
"cypress-wait-until": "^1.7.1",
|
||||||
|
"ini": "^2.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user