From d2c49bafeb722e83d1974c1a64752f22d006eda9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Falconnier?= Date: Tue, 10 Dec 2024 15:02:47 +0100 Subject: [PATCH 1/4] Fix archived at formatting --- server/templates/_created_updated_at.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/templates/_created_updated_at.html b/server/templates/_created_updated_at.html index 1a9feaf8dc..24a6d075ac 100644 --- a/server/templates/_created_updated_at.html +++ b/server/templates/_created_updated_at.html @@ -24,7 +24,7 @@ {% if object.archived_at %} Archived at - {{ object.archived_at|default:"-" }} + {{ object.archived_at|date:'r' }} {% endif %} From 49603f39841ecc6aa8bf8245ca6af172096b8f46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Falconnier?= Date: Tue, 10 Dec 2024 15:03:26 +0100 Subject: [PATCH 2/4] Fix pkginfo list & detail edit & delete buttons --- .../templates/monolith/pkg_info_name.html | 14 ++++++-------- .../monolith/templates/monolith/pkginfo_list.html | 15 ++++++--------- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/zentral/contrib/monolith/templates/monolith/pkg_info_name.html b/zentral/contrib/monolith/templates/monolith/pkg_info_name.html index 160557ba75..ac615008a8 100644 --- a/zentral/contrib/monolith/templates/monolith/pkg_info_name.html +++ b/zentral/contrib/monolith/templates/monolith/pkg_info_name.html @@ -128,19 +128,17 @@

Version{{ pkg_infos|length|pluralize }} ({{ pkg_infos|length }})

{% if pkg_info.local %} {% if perms.monolith.change_pkginfo %} - - - + {% url 'monolith:update_package' pkg_info.pk as url %} + {% button 'UPDATE' url "Edit PkgInfo" %} {% endif %} {% if perms.monolith.delete_pkginfo %} - {% url 'monolith:delete_pkg_info' pkg_info.pk as url %} - {% button 'DELETE' url "Delete Package Info" %} + {% url 'monolith:delete_pkg_info' pkg_info.pk as url %} + {% button 'DELETE' url "Delete Package Info" %} {% endif %} {% else %} {% if perms.monolith.change_pkginfo and pkg_info.local %} - - - + {% url 'monolith:update_pkg_info_catalog' pkg_info.pk as url %} + {% button 'UPDATE' url "Change PkgInfo catalogs" %} {% endif %} {% endif %} diff --git a/zentral/contrib/monolith/templates/monolith/pkginfo_list.html b/zentral/contrib/monolith/templates/monolith/pkginfo_list.html index 2dfdfe2a84..e425d7c1e2 100644 --- a/zentral/contrib/monolith/templates/monolith/pkginfo_list.html +++ b/zentral/contrib/monolith/templates/monolith/pkginfo_list.html @@ -107,20 +107,17 @@

Package name{{ name_number|pluralize }} ({{ name_number }}) / Package{{ in {% if pkg_info.local %} {% if perms.monolith.change_pkginfo %} - - - + {% url 'monolith:update_package' pkg_info.pk as url %} + {% button 'UPDATE' url "Edit PkgInfo" %} {% endif %} {% if perms.monolith.delete_pkginfo %} - - - + {% url 'monolith:delete_pkg_info' pkg_info.pk as url %} + {% button 'DELETE' url "Delete PkgInfo" %} {% endif %} {% else %} {% if perms.monolith.change_pkginfo and pkg_info.local %} - - - + {% url 'monolith:update_pkg_info_catalog' pkg_info.pk as url %} + {% button 'UPDATE' url "Change PkgInfo catalogs" %} {% endif %} {% endif %} From 427c16ba69b55ef00ff77f612d573f9e46c4d652 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Falconnier?= Date: Tue, 10 Dec 2024 15:03:55 +0100 Subject: [PATCH 3/4] Fix monolith catalogs archiving --- zentral/contrib/monolith/repository_backends/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zentral/contrib/monolith/repository_backends/base.py b/zentral/contrib/monolith/repository_backends/base.py index 806e43bb91..e57b9b9686 100644 --- a/zentral/contrib/monolith/repository_backends/base.py +++ b/zentral/contrib/monolith/repository_backends/base.py @@ -257,7 +257,7 @@ def sync_catalogs(self, event_request=None): # archive old catalogs for c in (Catalog.objects.annotate(pkginfo_count=Count("pkginfo", filter=Q(pkginfo__archived_at__isnull=True))) - .filter(archived_at__isnull=True, pkginfo_count=0) + .filter(repository=self.repository, archived_at__isnull=True, pkginfo_count=0) .exclude(pk__in=found_catalog_pks)): self._archive_catalog(c, audit_callback) # update repository From da05947ff9d78b347981bde50dbf7b53e94c1722 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Falconnier?= Date: Tue, 10 Dec 2024 15:09:20 +0100 Subject: [PATCH 4/4] Update npm dependencies --- package-lock.json | 86 +++++++++++++++++++++++------------------------ 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7c1b681e81..20f09bc323 100644 --- a/package-lock.json +++ b/package-lock.json @@ -114,9 +114,9 @@ } }, "node_modules/@kurkle/color": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@kurkle/color/-/color-0.3.2.tgz", - "integrity": "sha512-fuscdXJ9G1qb7W8VdHi+IwRqij3lBkosAm4ydQtEmbY58OzHXqQhvlxqEkoz0yssNVn38bcpRWgA9PP+OGoisw==" + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/@kurkle/color/-/color-0.3.4.tgz", + "integrity": "sha512-M5UknZPHRu3DEDWoipU6sE8PdkZ6Z/S+v4dD+Ke8IaNlpdSQah50lz1KtcFBa2vsdOnwbbnxJwVM4wty6udA5w==" }, "node_modules/@parcel/watcher": { "version": "2.5.0", @@ -456,12 +456,12 @@ "dev": true }, "node_modules/@types/node": { - "version": "22.9.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.0.tgz", - "integrity": "sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==", + "version": "22.10.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.1.tgz", + "integrity": "sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==", "dev": true, "dependencies": { - "undici-types": "~6.19.8" + "undici-types": "~6.20.0" } }, "node_modules/@webassemblyjs/ast": { @@ -860,9 +860,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001680", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001680.tgz", - "integrity": "sha512-rPQy70G6AGUMnbwS1z6Xg+RkHYPAi18ihs47GH0jcxIG7wArmPgY3XbS2sRdBbxJljp3thdT8BIqv9ccCypiPA==", + "version": "1.0.30001687", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001687.tgz", + "integrity": "sha512-0S/FDhf4ZiqrTUiQ39dKeUjYRjkv7lOZU1Dgif2rIqrTzX/1wV2hfKu9TOm1IHkdSijfLswxTFzl/cvir+SLSQ==", "dev": true, "funding": [ { @@ -880,9 +880,9 @@ ] }, "node_modules/chart.js": { - "version": "4.4.6", - "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.6.tgz", - "integrity": "sha512-8Y406zevUPbbIBA/HRk33khEmQPk5+cxeflWE/2rx1NJsjVWMPw/9mSP9rxHP5eqi6LNoPBVMfZHxbwLSgldYA==", + "version": "4.4.7", + "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.7.tgz", + "integrity": "sha512-pwkcKfdzTMAU/+jNosKhNL2bHtJc/sSmYgVbuGTEDhzkrhmyihmP7vUc/5ZK9WopidMDHNe3Wm7jOd/WhuHWuw==", "dependencies": { "@kurkle/color": "^0.3.0" }, @@ -967,9 +967,9 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.5.tgz", - "integrity": "sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "dependencies": { "path-key": "^3.1.0", @@ -1041,9 +1041,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.62", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.62.tgz", - "integrity": "sha512-t8c+zLmJHa9dJy96yBZRXGQYoiCEnHYgFwn1asvSPZSUdVxnB62A4RASd7k41ytG3ErFBA0TpHlKg9D9SQBmLg==", + "version": "1.5.72", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.72.tgz", + "integrity": "sha512-ZpSAUOZ2Izby7qnZluSrAlGgGQzucmFbN0n64dYzocYxnxV5ufurpj3VgEe4cUp7ir9LmeLxNYo8bVnlM8bQHw==", "dev": true }, "node_modules/enhanced-resolve": { @@ -1277,9 +1277,9 @@ } }, "node_modules/immutable": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.0.2.tgz", - "integrity": "sha512-1NU7hWZDkV7hJ4PJ9dur9gTNQ4ePNPN4k9/0YhwjzykTi/+3Q5pF93YU5QoVj8BuOnhLgaY8gs0U2pj4kSYVcw==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.0.3.tgz", + "integrity": "sha512-P8IdPQHq3lA1xVeBRi5VPqUm5HDgKnx0Ru51wZz5mjxHr5n3RWhjIpOFU7ybkUxfB+5IToy+OLaHYDBIWsv+uw==", "dev": true }, "node_modules/import-fresh": { @@ -1558,9 +1558,9 @@ } }, "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", "dev": true, "funding": [ { @@ -1589,9 +1589,9 @@ "optional": true }, "node_modules/node-releases": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", - "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", + "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", "dev": true }, "node_modules/normalize-range": { @@ -1981,9 +1981,9 @@ ] }, "node_modules/sass": { - "version": "1.81.0", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.81.0.tgz", - "integrity": "sha512-Q4fOxRfhmv3sqCLoGfvrC9pRV8btc0UtqL9mN6Yrv6Qi9ScL55CVH1vlPP863ISLEEMNLLuu9P+enCeGHlnzhA==", + "version": "1.82.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.82.0.tgz", + "integrity": "sha512-j4GMCTa8elGyN9A7x7bEglx0VgSpNUG4W4wNedQ33wSMdnkqQCT8HTwOaVSV4e6yQovcu/3Oc4coJP/l0xhL2Q==", "dev": true, "dependencies": { "chokidar": "^4.0.0", @@ -2175,9 +2175,9 @@ } }, "node_modules/terser": { - "version": "5.36.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.36.0.tgz", - "integrity": "sha512-IYV9eNMuFAV4THUspIRXkLakHnV6XO7FEdtKjf/mDyrnqUg9LnlOn6/RwRvM9SZjR4GUq8Nk8zj67FzVARr74w==", + "version": "5.37.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.37.0.tgz", + "integrity": "sha512-B8wRRkmre4ERucLM/uXx4MOV5cbnOlVAqUst+1+iLKPI0dOgFO28f84ptoQt9HEI537PMzfYa/d+GEPKTRXmYA==", "dev": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", @@ -2289,9 +2289,9 @@ } }, "node_modules/undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", "dev": true }, "node_modules/update-browserslist-db": { @@ -2353,16 +2353,16 @@ } }, "node_modules/webpack": { - "version": "5.96.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.96.1.tgz", - "integrity": "sha512-l2LlBSvVZGhL4ZrPwyr8+37AunkcYj5qh8o6u2/2rzoPc8gxFJkLj1WxNgooi9pnoc06jh0BjuXnamM4qlujZA==", + "version": "5.97.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.97.1.tgz", + "integrity": "sha512-EksG6gFY3L1eFMROS/7Wzgrii5mBAFe4rIr3r2BTfo7bcc+DWwFZ4OJ/miOuHJO/A85HwyI4eQ0F6IKXesO7Fg==", "dev": true, "dependencies": { "@types/eslint-scope": "^3.7.7", "@types/estree": "^1.0.6", - "@webassemblyjs/ast": "^1.12.1", - "@webassemblyjs/wasm-edit": "^1.12.1", - "@webassemblyjs/wasm-parser": "^1.12.1", + "@webassemblyjs/ast": "^1.14.1", + "@webassemblyjs/wasm-edit": "^1.14.1", + "@webassemblyjs/wasm-parser": "^1.14.1", "acorn": "^8.14.0", "browserslist": "^4.24.0", "chrome-trace-event": "^1.0.2",