Merge branch 'maintenance' into devel

This commit is contained in:
GitHub Nightly Merge Action committed 2023-03-07 00:14:22 +00:00
commit 650d2b5489
8 files changed
+31 -29

No files matched your search

+4 -11
View File
@@ -1,11 +1,4 @@
parserOptions:
ecmaVersion: 2018
overrides:
- files:
- "src/octoprint/static/js/**.js"
- "src/octoprint/plugins/**.js"
env:
browser: true
jquery: true
es6: true
env:
browser: true
jquery: true
es2018: true
+1 -3
View File
@@ -61,11 +61,9 @@ repos:
hooks:
- id: prettier
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.34.0
rev: v8.35.0
hooks:
- id: eslint
additional_dependencies:
- eslint@7.19.0
files: \.js$
exclude: ^(src/octoprint/vendor/|tests/static/js/lib|tests/util/_files|docs/|scripts/|translations/)
- repo: https://github.com/codespell-project/codespell
+2 -2
View File
@@ -48,7 +48,7 @@ Issue a command for an unrendered timelapse
Current only supports to render the unrendered timelapse ``name`` via the
``render`` command.
Requires the ``TIMELAPSE_ADMIN`` permission.
Requires the ``TIMELAPSE_MANAGE_UNRENDERED`` permission.
:json command: The command to issue, currently only ``render`` is supported
@@ -64,7 +64,7 @@ Delete an unrendered timelapse
Returns a :ref:`timelapse list <sec-api-timelapse-datamodel-list>` in the
response body.
Requires the ``TIMELAPSE_DELETE`` permission.
Requires the ``TIMELAPSE_MANAGE_UNRENDERED`` permission.
:param unrendered: If provided and true, also include unrendered timelapses in the response
+2
View File
@@ -61,6 +61,8 @@ When the virtual environment is activated you can then:
* build the documentation running ``sphinx-build -b html . _build`` in the ``docs``
folder -- the documentation will be available in the newly created ``_build``
directory. You can simply browse it locally by opening ``index.html``
* check whether there are newer versions of OctoPrint's dependencies available via
``python setup.py scan_deps``
.. _sec-development-environment-source-linux:
+8 -7
View File
@@ -40,6 +40,7 @@ bundled_plugins = [
]
core_deps = [
"argon2_cffi>=21.3.0,<22",
"Babel>=2.12.1,<2.13", # breaking changes can happen on minor version increases
"cachelib>=0.10.2,<0.11",
"Click>=8.1.3,<9",
"colorlog>=6.7.0,<7",
@@ -69,7 +70,7 @@ core_deps = [
"semantic_version>=2.10.0,<3",
"sentry-sdk>=1.16.0,<2",
"tornado>=6.2,<7",
"watchdog>=2.3.0,<3",
"watchdog>=2.3.1,<3",
"websocket-client>=1.5.1,<2",
"werkzeug>=2.2.3,<2.3", # breaking changes can happen on minor version increases
"wrapt>=1.15,<1.16",
@@ -101,7 +102,7 @@ EXTRA_REQUIRES = {
"ddt",
"mock>=5.0.1,<6",
"pytest-doctest-custom>=1.0.0,<2",
"pytest>=7.2.1,<8",
"pytest>=7.2.2,<8",
# pre-commit
"pre-commit",
# profiler
@@ -111,11 +112,11 @@ EXTRA_REQUIRES = {
"plugins": ["cookiecutter>=2.1.1,<3"],
# Dependencies for building the documentation
"docs": [
"readthedocs-sphinx-ext>=2.2.0,<3",
"sphinx_rtd_theme>=1.2.0,<2",
"sphinx>=6.1.3,<7",
"sphinxcontrib-httpdomain>=1.8.1,<2",
"sphinxcontrib-mermaid>=0.8.1,<0.9",
"sphinx",
"sphinxcontrib-httpdomain",
"sphinxcontrib-mermaid",
"sphinx_rtd_theme",
"readthedocs-sphinx-ext",
],
}
+1 -1
View File
@@ -414,7 +414,7 @@ class Permissions(metaclass=PermissionsMetaClass):
)
TIMELAPSE_DELETE = OctoPrintPermission(
"Timelapse Delete",
gettext("Allows to delete timelapse videos and unrendered timelapses"),
gettext("Allows to delete timelapse videos"),
RoleNeed("timelapse_delete"),
default_groups=[USER_GROUP],
)
@@ -443,7 +443,11 @@ $(function () {
};
self.removeUnrendered = function (name) {
if (!self.loginState.hasPermission(self.access.permissions.TIMELAPSE_DELETE))
if (
!self.loginState.hasPermission(
self.access.permissions.TIMELAPSE_MANAGE_UNRENDERED
)
)
return;
var perform = function () {
@@ -463,7 +467,11 @@ $(function () {
};
self.removeMarkedUnrendered = function () {
if (!self.loginState.hasPermission(self.access.permissions.TIMELAPSE_DELETE))
if (
!self.loginState.hasPermission(
self.access.permissions.TIMELAPSE_MANAGE_UNRENDERED
)
)
return;
var perform = function () {
@@ -194,7 +194,7 @@
<div data-bind="visible: unrenderedListHelper.allSize">
<div><small><a href="javascript:void(0)" class="muted" onclick="$(this).children().toggleClass('fa-caret-right fa-caret-down').parent().parent().parent().next().slideToggle('fast')"><i class="fas fa-caret-right"></i> {{ _('Unrendered Timelapses') }}</a></small></div>
<div class="hide">
<div class="pull-left" data-bind="visible: $root.loginState.hasPermissionKo($root.access.permissions.TIMELAPSE_DELETE)">
<div class="pull-left" data-bind="visible: $root.loginState.hasPermissionKo($root.access.permissions.TIMELAPSE_MANAGE_UNRENDERED)">
<div class="btn-group">
<button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="fas fa-square"></i> <span class="caret"></span></button>
<ul class="dropdown-menu">
@@ -218,13 +218,13 @@
</thead>
<tbody data-bind="foreach: unrenderedListHelper.paginatedItems">
<tr data-bind="attr: {title: name}">
<td class="timelapse_unrendered_checkbox"><input type="checkbox" data-bind="value: name, checked: $root.markedForUnrenderedDeletion, invisible: !$root.loginState.hasPermissionKo($root.access.permissions.TIMELAPSE_DELETE)()"></td>
<td class="timelapse_unrendered_checkbox"><input type="checkbox" data-bind="value: name, checked: $root.markedForUnrenderedDeletion, invisible: !$root.loginState.hasPermissionKo($root.access.permissions.TIMELAPSTIMELAPSE_MANAGE_UNRENDEREDE_DELETE)()"></td>
<td class="timelapse_unrendered_name" data-bind="text: name"></td>
<td class="timelapse_unrendered_count" data-bind="text: count"></td>
<td class="timelapse_unrendered_size" data-bind="text: size"></td>
<td class="timelapse_unrendered_action">
<span data-bind="visible: processing"><i class="fas fa-sync fa-spin"></i></span>
<span data-bind="visible: !processing"><a href="javascript:void(0)" title="{{ _('Delete unrendered timelapse')|edq }}" class="far fa-trash-alt" data-bind="click: function() { $parent.removeUnrendered($data.name); }, css: {disabled: !$root.loginState.hasPermissionKo($root.access.permissions.TIMELAPSE_DELETE)()}"></a>&nbsp;|&nbsp;<a href="javascript:void(0)" title="{{ _('Render timelapse')|edq }}" class="fas fa-video" data-bind="click: function() { if (!$root.isBusy()) { $parent.renderUnrendered($data.name); } else { return; } }, css: {disabled: $root.isBusy() || !$root.loginState.hasPermissionKo($root.access.permissions.TIMELAPSE_ADMIN)()}"></a></span>
<span data-bind="visible: !processing"><a href="javascript:void(0)" title="{{ _('Delete unrendered timelapse')|edq }}" class="far fa-trash-alt" data-bind="click: function() { $parent.removeUnrendered($data.name); }, css: {disabled: !$root.loginState.hasPermissionKo($root.access.permissions.TIMELAPSE_MANAGE_UNRENDERED)()}"></a>&nbsp;|&nbsp;<a href="javascript:void(0)" title="{{ _('Render timelapse')|edq }}" class="fas fa-video" data-bind="click: function() { if (!$root.isBusy()) { $parent.renderUnrendered($data.name); } else { return; } }, css: {disabled: $root.isBusy() || !$root.loginState.hasPermissionKo($root.access.permissions.TIMELAPSE_ADMIN)()}"></a></span>
</td>
</tr>
</tbody>