Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7ce718ff9d | ||
|
|
9e87afcde7 | ||
|
|
e03195c9b1 | ||
|
|
59730a5184 | ||
|
|
69594bc33a | ||
|
|
766ecfc25e | ||
|
|
d773a407a2 |
@@ -35,7 +35,6 @@ jobs:
|
||||
|
||||
- name: Sonar scan
|
||||
if: env.SONAR_TOKEN != null
|
||||
uses: SonarSource/sonarqube-scan-action@v4
|
||||
uses: SonarSource/sonarqube-scan-action@v6
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
|
||||
@@ -2,6 +2,24 @@
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [1.8.3](https://github.com/ICTU/netbox_slm/releases/tag/1.8.3) - 2025-12-18
|
||||
|
||||
### Fixed
|
||||
|
||||
* Filters with default order by ID (#75)
|
||||
|
||||
## [1.8.2](https://github.com/ICTU/netbox_slm/releases/tag/1.8.2) - 2025-06-02
|
||||
|
||||
### Fixed
|
||||
|
||||
* Permission check for adding software product installations (#70)
|
||||
|
||||
## [1.8.1](https://github.com/ICTU/netbox_slm/releases/tag/1.8.1) - 2025-04-11
|
||||
|
||||
### Fixed
|
||||
|
||||
* Filtering on foreign objects (#65)
|
||||
|
||||
## [1.8.0](https://github.com/ICTU/netbox_slm/releases/tag/1.8.0) - 2025-02-25
|
||||
|
||||
### Added
|
||||
|
||||
@@ -7,3 +7,6 @@ Packages = proselint
|
||||
|
||||
[*.md]
|
||||
BasedOnStyles = Vale, proselint
|
||||
|
||||
[ci/styles/**]
|
||||
BasedOnStyles =
|
||||
|
||||
@@ -64,5 +64,3 @@ NetBox
|
||||
NetBox SLM
|
||||
Mart
|
||||
Visser
|
||||
Suchow
|
||||
Redistributions
|
||||
|
||||
@@ -16,7 +16,7 @@ limitations under the License.
|
||||
|
||||
from netbox.plugins import PluginConfig
|
||||
|
||||
__version__ = "1.8.0"
|
||||
__version__ = "1.8.3"
|
||||
|
||||
|
||||
class SLMConfig(PluginConfig):
|
||||
|
||||
@@ -27,24 +27,24 @@ class NetboxSLMRootView(APIRootView):
|
||||
|
||||
|
||||
class SoftwareProductViewSet(NetBoxModelViewSet):
|
||||
queryset = SoftwareProduct.objects.all()
|
||||
queryset = SoftwareProduct.objects.all().order_by("id")
|
||||
serializer_class = SoftwareProductSerializer
|
||||
filterset_class = SoftwareProductFilterSet
|
||||
|
||||
|
||||
class SoftwareProductVersionViewSet(NetBoxModelViewSet):
|
||||
queryset = SoftwareProductVersion.objects.all()
|
||||
queryset = SoftwareProductVersion.objects.all().order_by("id")
|
||||
serializer_class = SoftwareProductVersionSerializer
|
||||
filterset_class = SoftwareProductVersionFilterSet
|
||||
|
||||
|
||||
class SoftwareProductInstallationViewSet(NetBoxModelViewSet):
|
||||
queryset = SoftwareProductInstallation.objects.all()
|
||||
queryset = SoftwareProductInstallation.objects.all().order_by("id")
|
||||
serializer_class = SoftwareProductInstallationSerializer
|
||||
filterset_class = SoftwareProductInstallationFilterSet
|
||||
|
||||
|
||||
class SoftwareLicenseViewSet(NetBoxModelViewSet):
|
||||
queryset = SoftwareLicense.objects.all()
|
||||
queryset = SoftwareLicense.objects.all().order_by("id")
|
||||
serializer_class = SoftwareLicenseSerializer
|
||||
filterset_class = SoftwareLicenseFilterSet
|
||||
|
||||
+11
-11
@@ -19,7 +19,7 @@ class SoftwareProductFilterSet(NetBoxModelFilterSet):
|
||||
name = CharFilter(lookup_expr="icontains")
|
||||
description = CharFilter(lookup_expr="icontains")
|
||||
|
||||
manufacturer = ModelMultipleChoiceFilter(queryset=Manufacturer.objects.all())
|
||||
manufacturer_id = ModelMultipleChoiceFilter(queryset=Manufacturer.objects.all())
|
||||
|
||||
class Meta:
|
||||
model = SoftwareProduct
|
||||
@@ -47,12 +47,12 @@ class SoftwareProductVersionFilterSet(NetBoxModelFilterSet):
|
||||
|
||||
release_type = MultipleChoiceFilter(choices=SoftwareReleaseTypes.choices)
|
||||
|
||||
manufacturer = ModelMultipleChoiceFilter(
|
||||
manufacturer_id = ModelMultipleChoiceFilter(
|
||||
field_name="software_product__manufacturer",
|
||||
queryset=Manufacturer.objects.all(),
|
||||
)
|
||||
|
||||
software_product = ModelMultipleChoiceFilter(
|
||||
software_product_id = ModelMultipleChoiceFilter(
|
||||
queryset=SoftwareProduct.objects.all(),
|
||||
label="Software Product",
|
||||
)
|
||||
@@ -78,17 +78,17 @@ class SoftwareProductVersionFilterSet(NetBoxModelFilterSet):
|
||||
class SoftwareProductInstallationFilterSet(NetBoxModelFilterSet):
|
||||
"""Filter capabilities for SoftwareProductInstallation instances."""
|
||||
|
||||
device = ModelMultipleChoiceFilter(queryset=Device.objects.all())
|
||||
virtualmachine = ModelMultipleChoiceFilter(
|
||||
device_id = ModelMultipleChoiceFilter(queryset=Device.objects.all())
|
||||
virtualmachine_id = ModelMultipleChoiceFilter(
|
||||
queryset=VirtualMachine.objects.all(),
|
||||
label="Virtual Machine",
|
||||
)
|
||||
cluster = ModelMultipleChoiceFilter(queryset=Cluster.objects.all())
|
||||
software_product = ModelMultipleChoiceFilter(
|
||||
cluster_id = ModelMultipleChoiceFilter(queryset=Cluster.objects.all())
|
||||
software_product_id = ModelMultipleChoiceFilter(
|
||||
queryset=SoftwareProduct.objects.all(),
|
||||
label="Software Product",
|
||||
)
|
||||
version = ModelMultipleChoiceFilter(queryset=SoftwareProductVersion.objects.all())
|
||||
version_id = ModelMultipleChoiceFilter(queryset=SoftwareProductVersion.objects.all())
|
||||
|
||||
class Meta:
|
||||
model = SoftwareProductInstallation
|
||||
@@ -116,12 +116,12 @@ class SoftwareLicenseFilterSet(NetBoxModelFilterSet):
|
||||
spdx_expression = CharFilter(lookup_expr="icontains", label="SPDX expression")
|
||||
stored_location = CharFilter(lookup_expr="icontains")
|
||||
|
||||
software_product = ModelMultipleChoiceFilter(
|
||||
software_product_id = ModelMultipleChoiceFilter(
|
||||
queryset=SoftwareProduct.objects.all(),
|
||||
label="Software Product",
|
||||
)
|
||||
version = ModelMultipleChoiceFilter(queryset=SoftwareProductVersion.objects.all())
|
||||
installation = ModelMultipleChoiceFilter(queryset=SoftwareProductInstallation.objects.all())
|
||||
version_id = ModelMultipleChoiceFilter(queryset=SoftwareProductVersion.objects.all())
|
||||
installation_id = ModelMultipleChoiceFilter(queryset=SoftwareProductInstallation.objects.all())
|
||||
|
||||
class Meta:
|
||||
model = SoftwareLicense
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="card">
|
||||
<h2 class="card-header">
|
||||
Installations
|
||||
{% if perms.netbox_slm.add_installation %}
|
||||
{% if perms.netbox_slm.add_softwareproductinstallation %}
|
||||
<div class="card-actions">
|
||||
<a href="{% url 'plugins:netbox_slm:softwareproductinstallation_add' %}?{{ search_obj }}={{ object.pk }}" class="btn btn-ghost-primary btn-sm">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add an installation
|
||||
@@ -12,10 +12,10 @@
|
||||
{% endif %}
|
||||
</h2>
|
||||
{% if search_obj == "cluster" %}
|
||||
{% htmx_table "plugins:netbox_slm:softwareproductinstallation_list" cluster=object.pk %}
|
||||
{% htmx_table "plugins:netbox_slm:softwareproductinstallation_list" cluster_id=object.pk %}
|
||||
{% elif search_obj == "device" %}
|
||||
{% htmx_table "plugins:netbox_slm:softwareproductinstallation_list" device=object.pk %}
|
||||
{% htmx_table "plugins:netbox_slm:softwareproductinstallation_list" device_id=object.pk %}
|
||||
{% elif search_obj == "virtualmachine" %}
|
||||
{% htmx_table "plugins:netbox_slm:softwareproductinstallation_list" virtualmachine=object.pk %}
|
||||
{% htmx_table "plugins:netbox_slm:softwareproductinstallation_list" virtualmachine_id=object.pk %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -2,10 +2,12 @@
|
||||
sonar.organization=ictu
|
||||
sonar.projectKey=ICTU_netbox_slm
|
||||
sonar.projectName=netbox-slm
|
||||
sonar.projectVersion=1.8.0
|
||||
sonar.projectVersion=1.8.3
|
||||
|
||||
# Path is relative to the sonar-project.properties file
|
||||
sonar.sources=netbox_slm
|
||||
sonar.exclusions=netbox_slm/tests/**
|
||||
sonar.tests=netbox_slm/tests
|
||||
sonar.python.version=3.11, 3.12, 3.13
|
||||
|
||||
# Python test reports
|
||||
|
||||
Reference in New Issue
Block a user