diff --git a/netbox/netbox/views/generic/feature_views.py b/netbox/netbox/views/generic/feature_views.py index 28d4893df..efa45541f 100644 --- a/netbox/netbox/views/generic/feature_views.py +++ b/netbox/netbox/views/generic/feature_views.py @@ -102,7 +102,7 @@ class ObjectImageAttachmentsView(ConditionalLoginRequiredMixin, View): base_template = None tab = ViewTab( label=_('Images'), - # badge=lambda obj: obj.imageattachments.count(), + badge=lambda obj: obj.images.count(), permission='extras.view_imageattachment', weight=6000 ) diff --git a/netbox/project-static/dist/netbox.css b/netbox/project-static/dist/netbox.css index 4ceb4e524..91d3ea25c 100644 Binary files a/netbox/project-static/dist/netbox.css and b/netbox/project-static/dist/netbox.css differ diff --git a/netbox/project-static/styles/custom/_misc.scss b/netbox/project-static/styles/custom/_misc.scss index 2ba3262f6..5233616ac 100644 --- a/netbox/project-static/styles/custom/_misc.scss +++ b/netbox/project-static/styles/custom/_misc.scss @@ -81,6 +81,14 @@ img.plugin-icon { height: auto; } +// Image attachment thumbnails +.thumbnail { + max-width: 200px; + img { + border: 1px solid #606060; + } +} + body[data-bs-theme=dark] { // Assuming icon is black/white line art, invert it and tone down brightness img.plugin-icon { diff --git a/netbox/templates/extras/imageattachment.html b/netbox/templates/extras/imageattachment.html index 9d0a4e479..4f267cf23 100644 --- a/netbox/templates/extras/imageattachment.html +++ b/netbox/templates/extras/imageattachment.html @@ -56,8 +56,13 @@
diff --git a/netbox/templates/extras/object_imageattachments.html b/netbox/templates/extras/object_imageattachments.html index 010ce236d..9b5c9c1f0 100644 --- a/netbox/templates/extras/object_imageattachments.html +++ b/netbox/templates/extras/object_imageattachments.html @@ -3,24 +3,24 @@ {% load thumbnail %} {% block content %} -