@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user