Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

20241210 monolith fixes #1094

Merged
merged 4 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 43 additions & 43 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion server/templates/_created_updated_at.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
{% if object.archived_at %}
<tr>
<th class="border-0 p-0 pe-3 text-secondary">Archived at</th>
<td class="border-0 p-0 text-secondary">{{ object.archived_at|default:"-" }}</td>
<td class="border-0 p-0 text-secondary">{{ object.archived_at|date:'r' }}</td>
</tr>
{% endif %}
</tbody></table>
Expand Down
2 changes: 1 addition & 1 deletion zentral/contrib/monolith/repository_backends/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 6 additions & 8 deletions zentral/contrib/monolith/templates/monolith/pkg_info_name.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,19 +128,17 @@ <h4>Version{{ pkg_infos|length|pluralize }} ({{ pkg_infos|length }})</h4>
<td>
{% if pkg_info.local %}
{% if perms.monolith.change_pkginfo %}
<a class="btn btn-outline-secondary" href="{% url 'monolith:update_package' pkg_info.pk %}">
<span class="bi bi-square-edit" aria-hidden="true"></span>
</a>
{% 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 %}
<a class="btn btn-outline-secondary" href="{% url 'monolith:update_pkg_info_catalog' pkg_info.pk %}">
<span class="bi bi-edit" aria-hidden="true"></span>
</a>
{% url 'monolith:update_pkg_info_catalog' pkg_info.pk as url %}
{% button 'UPDATE' url "Change PkgInfo catalogs" %}
{% endif %}
{% endif %}
</td>
Expand Down
15 changes: 6 additions & 9 deletions zentral/contrib/monolith/templates/monolith/pkginfo_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,20 +107,17 @@ <h2>Package name{{ name_number|pluralize }} ({{ name_number }}) / Package{{ in
<td>
{% if pkg_info.local %}
{% if perms.monolith.change_pkginfo %}
<a class="btn btn-outline-secondary" href="{% url 'monolith:update_package' pkg_info.pk %}">
<span class="glyphicon glyphicon-edit" aria-hidden="true"></span>
</a>
{% url 'monolith:update_package' pkg_info.pk as url %}
{% button 'UPDATE' url "Edit PkgInfo" %}
{% endif %}
{% if perms.monolith.delete_pkginfo %}
<a class="btn btn-danger" href="{% url 'monolith:delete_pkg_info' pkg_info.pk %}">
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
</a>
{% 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 %}
<a class="btn btn-outline-secondary" href="{% url 'monolith:update_pkg_info_catalog' pkg_info.pk %}">
<span class="glyphicon glyphicon-edit" aria-hidden="true"></span>
</a>
{% url 'monolith:update_pkg_info_catalog' pkg_info.pk as url %}
{% button 'UPDATE' url "Change PkgInfo catalogs" %}
{% endif %}
{% endif %}
</td>
Expand Down
Loading