@@ -16,13 +16,13 @@ jobs:
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.9"
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Install tools
|
||||
run: pip install .[tools]
|
||||
|
||||
- name: Run ruff
|
||||
run: ruff netbox_slm
|
||||
- name: Run ruff lint
|
||||
run: ruff check netbox_slm
|
||||
|
||||
- name: Run black
|
||||
run: black netbox_slm
|
||||
- name: Run ruff format
|
||||
run: ruff format netbox_slm
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
ARG PYTHON_VERSION=3.10
|
||||
ARG PYTHON_VERSION=3.11
|
||||
FROM python:${PYTHON_VERSION}-alpine AS compile-image
|
||||
|
||||
WORKDIR /build
|
||||
@@ -11,7 +11,7 @@ RUN pip install -U .[build]
|
||||
RUN python -m build
|
||||
RUN pip install --no-index /build
|
||||
|
||||
FROM netboxcommunity/netbox:v3.7.2
|
||||
FROM netboxcommunity/netbox:v4.0.6
|
||||
|
||||
ARG PYTHON_VERSION=3.10
|
||||
ARG PYTHON_VERSION=3.11
|
||||
COPY --from=compile-image /opt/netbox/venv/lib/python${PYTHON_VERSION}/site-packages/netbox_slm /opt/netbox/venv/lib/python${PYTHON_VERSION}/site-packages/netbox_slm
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
FROM netboxcommunity/netbox:v3.7.2
|
||||
FROM netboxcommunity/netbox:v4.0.6
|
||||
|
||||
RUN mkdir /ci && chmod go+w /ci
|
||||
COPY ../ci/requirements_ci.txt /ci/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
version: '3.7'
|
||||
---
|
||||
services:
|
||||
netbox:
|
||||
ports:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
version: '3.7'
|
||||
---
|
||||
services:
|
||||
netbox: &netbox
|
||||
image: netboxcommunity/netbox:${VERSION-v3.7.2}
|
||||
image: netboxcommunity/netbox:${VERSION-v4.0.6}
|
||||
depends_on:
|
||||
- postgres
|
||||
- redis
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
coverage==7.2.2
|
||||
coverage==7.5.4
|
||||
unittest-xml-reporting==3.2.0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from extras.plugins import PluginConfig
|
||||
from netbox.plugins import PluginConfig
|
||||
|
||||
__version__ = "1.6.0"
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ class SoftwareLicenseSerializer(NetBoxModelSerializer):
|
||||
|
||||
class Meta:
|
||||
model = SoftwareLicense
|
||||
fields = [
|
||||
fields = (
|
||||
"id",
|
||||
"display",
|
||||
"url",
|
||||
@@ -31,7 +31,8 @@ class SoftwareLicenseSerializer(NetBoxModelSerializer):
|
||||
"custom_field_data",
|
||||
"created",
|
||||
"last_updated",
|
||||
]
|
||||
)
|
||||
brief_fields = ("id", "display", "url", "name", "description")
|
||||
|
||||
def get_display(self, obj):
|
||||
return f"{obj}"
|
||||
@@ -43,7 +44,7 @@ class SoftwareProductSerializer(NetBoxModelSerializer):
|
||||
|
||||
class Meta:
|
||||
model = SoftwareProduct
|
||||
fields = [
|
||||
fields = (
|
||||
"id",
|
||||
"display",
|
||||
"url",
|
||||
@@ -55,7 +56,8 @@ class SoftwareProductSerializer(NetBoxModelSerializer):
|
||||
"custom_field_data",
|
||||
"created",
|
||||
"last_updated",
|
||||
]
|
||||
)
|
||||
brief_fields = ("id", "display", "url", "name", "description")
|
||||
|
||||
def get_display(self, obj):
|
||||
return f"{obj.manufacturer} - {obj}"
|
||||
@@ -69,7 +71,7 @@ class SoftwareProductInstallationSerializer(NetBoxModelSerializer):
|
||||
|
||||
class Meta:
|
||||
model = SoftwareProductInstallation
|
||||
fields = [
|
||||
fields = (
|
||||
"id",
|
||||
"display",
|
||||
"url",
|
||||
@@ -83,7 +85,8 @@ class SoftwareProductInstallationSerializer(NetBoxModelSerializer):
|
||||
"custom_field_data",
|
||||
"created",
|
||||
"last_updated",
|
||||
]
|
||||
)
|
||||
brief_fields = ("id", "display", "url", "name")
|
||||
|
||||
def get_display(self, obj):
|
||||
return f"{obj}"
|
||||
@@ -95,7 +98,7 @@ class SoftwareProductVersionSerializer(NetBoxModelSerializer):
|
||||
|
||||
class Meta:
|
||||
model = SoftwareProductVersion
|
||||
fields = [
|
||||
fields = (
|
||||
"id",
|
||||
"display",
|
||||
"url",
|
||||
@@ -113,7 +116,8 @@ class SoftwareProductVersionSerializer(NetBoxModelSerializer):
|
||||
"custom_field_data",
|
||||
"created",
|
||||
"last_updated",
|
||||
]
|
||||
)
|
||||
brief_fields = ("id", "display", "url", "name")
|
||||
|
||||
def get_display(self, obj):
|
||||
return f"{obj}"
|
||||
|
||||
@@ -4,6 +4,7 @@ from django.urls import reverse_lazy
|
||||
from netbox.forms import NetBoxModelForm, NetBoxModelImportForm, NetBoxModelBulkEditForm, NetBoxModelFilterSetForm
|
||||
from netbox_slm.models import SoftwareProduct, SoftwareProductVersion, SoftwareProductInstallation, SoftwareLicense
|
||||
from utilities.forms.fields import CommentField, DynamicModelChoiceField, TagFilterField, LaxURLField
|
||||
from utilities.forms.rendering import FieldSet
|
||||
from utilities.forms.widgets import APISelect, DatePicker
|
||||
|
||||
|
||||
@@ -62,7 +63,7 @@ class SoftwareLicenseForm(NetBoxModelForm):
|
||||
|
||||
class SoftwareLicenseFilterForm(NetBoxModelFilterSetForm):
|
||||
model = SoftwareLicense
|
||||
fieldsets = ((None, ("q", "tag")),)
|
||||
fieldsets = (FieldSet(None, ("q", "tag")),)
|
||||
tag = TagFilterField(model)
|
||||
|
||||
|
||||
@@ -85,13 +86,4 @@ class SoftwareLicenseBulkEditForm(NetBoxModelBulkEditForm):
|
||||
version = DynamicModelChoiceField(queryset=SoftwareProductVersion.objects.all(), required=False)
|
||||
installation = DynamicModelChoiceField(queryset=SoftwareProductInstallation.objects.all(), required=False)
|
||||
model = SoftwareLicense
|
||||
fieldsets = (
|
||||
(
|
||||
None,
|
||||
(
|
||||
"software_product",
|
||||
"version",
|
||||
"installation",
|
||||
),
|
||||
),
|
||||
)
|
||||
fieldsets = (FieldSet(None, ("software_product", "version", "installation")),)
|
||||
|
||||
@@ -4,6 +4,7 @@ from dcim.models import Manufacturer
|
||||
from netbox.forms import NetBoxModelForm, NetBoxModelImportForm, NetBoxModelBulkEditForm, NetBoxModelFilterSetForm
|
||||
from netbox_slm.models import SoftwareProduct
|
||||
from utilities.forms.fields import CommentField, DynamicModelChoiceField, TagFilterField
|
||||
from utilities.forms.rendering import FieldSet
|
||||
|
||||
|
||||
class SoftwareProductForm(NetBoxModelForm):
|
||||
@@ -29,7 +30,7 @@ class SoftwareProductForm(NetBoxModelForm):
|
||||
|
||||
class SoftwareProductFilterForm(NetBoxModelFilterSetForm):
|
||||
model = SoftwareProduct
|
||||
fieldsets = ((None, ("q", "tag")),)
|
||||
fieldsets = (FieldSet(None, ("q", "tag")),)
|
||||
tag = TagFilterField(model)
|
||||
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ from dcim.models import Device
|
||||
from netbox.forms import NetBoxModelForm, NetBoxModelImportForm, NetBoxModelBulkEditForm, NetBoxModelFilterSetForm
|
||||
from netbox_slm.models import SoftwareProductInstallation, SoftwareProduct, SoftwareProductVersion
|
||||
from utilities.forms.fields import CommentField, DynamicModelChoiceField, TagFilterField
|
||||
from utilities.forms.rendering import FieldSet
|
||||
from utilities.forms.widgets import APISelect
|
||||
from virtualization.models import VirtualMachine, Cluster
|
||||
|
||||
@@ -56,7 +57,7 @@ class SoftwareProductInstallationForm(NetBoxModelForm):
|
||||
|
||||
class SoftwareProductInstallationFilterForm(NetBoxModelFilterSetForm):
|
||||
model = SoftwareProductInstallation
|
||||
fieldsets = ((None, ("q", "tag")),)
|
||||
fieldsets = (FieldSet(None, ("q", "tag")),)
|
||||
tag = TagFilterField(model)
|
||||
|
||||
|
||||
@@ -70,12 +71,4 @@ class SoftwareProductInstallationBulkEditForm(NetBoxModelBulkEditForm):
|
||||
software_product = DynamicModelChoiceField(queryset=SoftwareProduct.objects.all(), required=False)
|
||||
version = DynamicModelChoiceField(queryset=SoftwareProductVersion.objects.all(), required=False)
|
||||
model = SoftwareProductInstallation
|
||||
fieldsets = (
|
||||
(
|
||||
None,
|
||||
(
|
||||
"software_product",
|
||||
"version",
|
||||
),
|
||||
),
|
||||
)
|
||||
fieldsets = (FieldSet(None, ("software_product", "version")),)
|
||||
|
||||
@@ -4,6 +4,7 @@ from django.urls import reverse_lazy
|
||||
from netbox.forms import NetBoxModelForm, NetBoxModelImportForm, NetBoxModelBulkEditForm, NetBoxModelFilterSetForm
|
||||
from netbox_slm.models import SoftwareProduct, SoftwareProductVersion
|
||||
from utilities.forms.fields import CommentField, DynamicModelChoiceField, TagFilterField
|
||||
from utilities.forms.rendering import FieldSet
|
||||
from utilities.forms.widgets import APISelect, DatePicker
|
||||
|
||||
|
||||
@@ -39,7 +40,7 @@ class SoftwareProductVersionForm(NetBoxModelForm):
|
||||
|
||||
class SoftwareProductVersionFilterForm(NetBoxModelFilterSetForm):
|
||||
model = SoftwareProductVersion
|
||||
fieldsets = ((None, ("q", "tag")),)
|
||||
fieldsets = (FieldSet(None, ("q", "tag")),)
|
||||
tag = TagFilterField(model)
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from extras.plugins import PluginMenuButton, PluginMenuItem
|
||||
from utilities.choices import ButtonColorChoices
|
||||
from netbox.plugins import PluginMenuButton, PluginMenuItem
|
||||
|
||||
menu_items = (
|
||||
PluginMenuItem(
|
||||
@@ -10,14 +9,12 @@ menu_items = (
|
||||
"plugins:netbox_slm:softwareproduct_add",
|
||||
"Add",
|
||||
"mdi mdi-plus-thick",
|
||||
ButtonColorChoices.GREEN,
|
||||
permissions=["netbox_slm.add_softwareproduct"],
|
||||
),
|
||||
PluginMenuButton(
|
||||
"plugins:netbox_slm:softwareproduct_import",
|
||||
"Import",
|
||||
"mdi mdi-upload",
|
||||
ButtonColorChoices.CYAN,
|
||||
permissions=["netbox_slm.add_softwareproduct"],
|
||||
),
|
||||
),
|
||||
@@ -30,14 +27,12 @@ menu_items = (
|
||||
"plugins:netbox_slm:softwareproductversion_add",
|
||||
"Add",
|
||||
"mdi mdi-plus-thick",
|
||||
ButtonColorChoices.GREEN,
|
||||
permissions=["netbox_slm.add_softwareproductversion"],
|
||||
),
|
||||
PluginMenuButton(
|
||||
"plugins:netbox_slm:softwareproductversion_import",
|
||||
"Import",
|
||||
"mdi mdi-upload",
|
||||
ButtonColorChoices.CYAN,
|
||||
permissions=["netbox_slm.add_softwareproductversion"],
|
||||
),
|
||||
),
|
||||
@@ -50,14 +45,12 @@ menu_items = (
|
||||
"plugins:netbox_slm:softwareproductinstallation_add",
|
||||
"Add",
|
||||
"mdi mdi-plus-thick",
|
||||
ButtonColorChoices.GREEN,
|
||||
permissions=["netbox_slm.add_softwareproductinstallation"],
|
||||
),
|
||||
PluginMenuButton(
|
||||
"plugins:netbox_slm:softwareproductinstallation_import",
|
||||
"Import",
|
||||
"mdi mdi-upload",
|
||||
ButtonColorChoices.CYAN,
|
||||
permissions=["netbox_slm.add_softwareproductinstallation"],
|
||||
),
|
||||
),
|
||||
@@ -70,14 +63,12 @@ menu_items = (
|
||||
"plugins:netbox_slm:softwarelicense_add",
|
||||
"Add",
|
||||
"mdi mdi-plus-thick",
|
||||
ButtonColorChoices.GREEN,
|
||||
permissions=["netbox_slm.add_softwarelicense"],
|
||||
),
|
||||
PluginMenuButton(
|
||||
"plugins:netbox_slm:softwarelicense_import",
|
||||
"Import",
|
||||
"mdi mdi-upload",
|
||||
ButtonColorChoices.CYAN,
|
||||
permissions=["netbox_slm.add_softwarelicense"],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -11,58 +11,56 @@
|
||||
<h5 class="card-header">
|
||||
Software License
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
<table class="table table-hover attr-table">
|
||||
<tr>
|
||||
<th scope="row">Name</th>
|
||||
<td>{{ object.name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Description</th>
|
||||
<td>{{ object.description }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Type</th>
|
||||
<td>{{ object.type }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Stored location</th>
|
||||
<table class="table table-hover attr-table">
|
||||
<tr>
|
||||
<th scope="row">Name</th>
|
||||
<td>{{ object.name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Description</th>
|
||||
<td>{{ object.description }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Type</th>
|
||||
<td>{{ object.type }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Stored location</th>
|
||||
{% if object.stored_location_url %}
|
||||
<td><a href="{{ object.stored_location_url }}">{{ object.stored_location_txt }}</a></td>
|
||||
<td><a href="{{ object.stored_location_url }}">{{ object.stored_location_txt }}</a></td>
|
||||
{% else %}
|
||||
<td>{{ object.stored_location_txt }}</td>
|
||||
<td>{{ object.stored_location_txt }}</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Start date</th>
|
||||
<td>{{ object.start_date }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Expiration date</th>
|
||||
<td>{{ object.expiration_date }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Software Product</th>
|
||||
<td>{{ object.software_product }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Version</th>
|
||||
<td>{{ object.version }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Support</th>
|
||||
<td>{{ object.support }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">License amount</th>
|
||||
<td>{{ object.license_amount }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Installation</th>
|
||||
<td>{{ object.installation }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Start date</th>
|
||||
<td>{{ object.start_date }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Expiration date</th>
|
||||
<td>{{ object.expiration_date }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Software Product</th>
|
||||
<td>{{ object.software_product }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Version</th>
|
||||
<td>{{ object.version }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Support</th>
|
||||
<td>{{ object.support }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">License amount</th>
|
||||
<td>{{ object.license_amount }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Installation</th>
|
||||
<td>{{ object.installation }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% include 'inc/panels/custom_fields.html' %}
|
||||
{% include 'inc/panels/tags.html' %}
|
||||
|
||||
@@ -11,34 +11,32 @@
|
||||
<h5 class="card-header">
|
||||
Software Product
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
<table class="table table-hover attr-table">
|
||||
<tr>
|
||||
<th scope="row">Name</th>
|
||||
<td>{{ object.name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Description</th>
|
||||
<td>{{ object.description }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Manufacturer</th>
|
||||
<td>{{ object.manufacturer }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Versions</th>
|
||||
<td>
|
||||
{% for version in object.softwareproduct_versions.all %}
|
||||
<a href="{% url 'plugins:netbox_slm:softwareproductversion' pk=version.pk %}">
|
||||
<span class="badge" style="color: #ffffff; background-color: #9e9e9e">{{ version }}</span>
|
||||
</a>
|
||||
{% empty %}
|
||||
n/a
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<table class="table table-hover attr-table">
|
||||
<tr>
|
||||
<th scope="row">Name</th>
|
||||
<td>{{ object.name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Description</th>
|
||||
<td>{{ object.description }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Manufacturer</th>
|
||||
<td>{{ object.manufacturer }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Versions</th>
|
||||
<td>
|
||||
{% for version in object.softwareproduct_versions.all %}
|
||||
<a href="{% url 'plugins:netbox_slm:softwareproductversion' pk=version.pk %}">
|
||||
<span class="badge" style="color: #ffffff; background-color: #9e9e9e">{{ version }}</span>
|
||||
</a>
|
||||
{% empty %}
|
||||
n/a
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% include 'inc/panels/custom_fields.html' %}
|
||||
{% include 'inc/panels/tags.html' %}
|
||||
|
||||
@@ -11,34 +11,32 @@
|
||||
<h5 class="card-header">
|
||||
Software Product Installation
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
<table class="table table-hover attr-table">
|
||||
<table class="table table-hover attr-table">
|
||||
{% if object.device %}
|
||||
<tr>
|
||||
<th scope="row">Device</th>
|
||||
<td>{{ object.device }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Device</th>
|
||||
<td>{{ object.device }}</td>
|
||||
</tr>
|
||||
{% elif object.virtualmachine %}
|
||||
<tr>
|
||||
<th scope="row">Virtualmachine</th>
|
||||
<td>{{ object.virtualmachine }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Virtualmachine</th>
|
||||
<td>{{ object.virtualmachine }}</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<th scope="row">Cluster</th>
|
||||
<td>{{ object.cluster }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Cluster</th>
|
||||
<td>{{ object.cluster }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<th scope="row">Software Product</th>
|
||||
<td>{{ object.software_product }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Version</th>
|
||||
<td>{{ object.version }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<tr>
|
||||
<th scope="row">Software Product</th>
|
||||
<td>{{ object.software_product }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Version</th>
|
||||
<td>{{ object.version }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% include 'inc/panels/custom_fields.html' %}
|
||||
{% include 'inc/panels/tags.html' %}
|
||||
|
||||
@@ -11,50 +11,48 @@
|
||||
<h5 class="card-header">
|
||||
Software Product Version
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
<table class="table table-hover attr-table">
|
||||
<tr>
|
||||
<th scope="row">Name</th>
|
||||
<td>{{ object.name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Release date</th>
|
||||
<td>{{ object.release_date }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Documentation url</th>
|
||||
<table class="table table-hover attr-table">
|
||||
<tr>
|
||||
<th scope="row">Name</th>
|
||||
<td>{{ object.name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Release date</th>
|
||||
<td>{{ object.release_date }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Documentation url</th>
|
||||
{% if object.documentation_url %}
|
||||
<td><a href="{{ object.documentation_url }}">{{ object.documentation_url }}</a></td>
|
||||
<td><a href="{{ object.documentation_url }}">{{ object.documentation_url }}</a></td>
|
||||
{% else %}
|
||||
<td>{{ object.documentation_url }}</td>
|
||||
<td>{{ object.documentation_url }}</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">End of support</th>
|
||||
<td>{{ object.end_of_support }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Filename</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">End of support</th>
|
||||
<td>{{ object.end_of_support }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Filename</th>
|
||||
{% if object.file_link %}
|
||||
<td><a href="{{ object.file_link }}">{{ object.filename }}</a></td>
|
||||
<td><a href="{{ object.file_link }}">{{ object.filename }}</a></td>
|
||||
{% else %}
|
||||
<td>{{ object.filename }}</td>
|
||||
<td>{{ object.filename }}</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">File checksum</th>
|
||||
<td>{{ object.file_checksum }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Release type</th>
|
||||
<td>{{ object.get_release_type_display }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Installations</th>
|
||||
<td>{{ object.get_installation_count }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">File checksum</th>
|
||||
<td>{{ object.file_checksum }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Release type</th>
|
||||
<td>{{ object.get_release_type_display }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Installations</th>
|
||||
<td>{{ object.get_installation_count }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% include 'inc/panels/custom_fields.html' %}
|
||||
{% include 'inc/panels/tags.html' %}
|
||||
|
||||
+11
-22
@@ -7,7 +7,7 @@ name = "netbox-slm"
|
||||
dynamic = ["version"]
|
||||
description = "Software Lifecycle Management Netbox Plugin"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.9"
|
||||
requires-python = ">=3.11"
|
||||
license = { text = "Apache-2.0" }
|
||||
authors = [
|
||||
{name = "ICTU", email = "open-source-projects@ictu.nl"},
|
||||
@@ -21,9 +21,8 @@ classifiers = [
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3 :: Only",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Topic :: Internet :: WWW/HTTP",
|
||||
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
|
||||
]
|
||||
@@ -31,13 +30,12 @@ dependencies = []
|
||||
|
||||
[project.optional-dependencies]
|
||||
build = [
|
||||
"build == 1.0.3",
|
||||
"setuptools == 68.2.0",
|
||||
"twine == 3.7.1",
|
||||
"build == 1.2.1",
|
||||
"setuptools == 70.3.0",
|
||||
"twine == 5.1.1",
|
||||
]
|
||||
tools = [
|
||||
"black == 23.3.0",
|
||||
"ruff == 0.0.275",
|
||||
"ruff == 0.5.1",
|
||||
]
|
||||
|
||||
[tool.setuptools.dynamic]
|
||||
@@ -46,24 +44,12 @@ version = {attr = "netbox_slm.__version__"}
|
||||
[tool.setuptools.packages.find]
|
||||
include = ["netbox_slm"]
|
||||
|
||||
[tool.black]
|
||||
line-length = 120
|
||||
target-version = ["py39"]
|
||||
color = true
|
||||
check = true
|
||||
diff = true
|
||||
fast = true
|
||||
extend-exclude = '''
|
||||
netbox_slm/migrations/.*.py
|
||||
'''
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 120
|
||||
target-version = "py39"
|
||||
format = "github"
|
||||
target-version = "py311"
|
||||
src = ["netbox_slm"]
|
||||
|
||||
[tool.ruff.per-file-ignores]
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
"__init__.py" = [
|
||||
"D104", # https://beta.ruff.rs/docs/rules/#pydocstyle-d - don't require doc strings in __init__.py files
|
||||
"F401", # https://beta.ruff.rs/docs/rules/#pyflakes-f - don't complain about unused imports in __init__.py files
|
||||
@@ -71,3 +57,6 @@ src = ["netbox_slm"]
|
||||
"netbox_slm/migrations/*.py" = [
|
||||
"E501", # https://beta.ruff.rs/docs/rules/line-too-long/ - don't check on Django generated migration files
|
||||
]
|
||||
|
||||
[tool.ruff.format]
|
||||
exclude = ["netbox_slm/migrations/*.py"]
|
||||
|
||||
Reference in New Issue
Block a user