Implement bulk imports and edits for SLM models (#46)
Partially implements #4 Based on @erichester76's https://github.com/ICTU/netbox_slm/pull/44 Signed-off-by: wkoot <3715211+wkoot@users.noreply.github.com> Co-authored-by: Eric Hester <eric.hester@umbrella.tech>
This commit is contained in:
@@ -4,6 +4,7 @@ from .software_license import (
|
||||
SoftwareLicenseEditView,
|
||||
SoftwareLicenseDeleteView,
|
||||
SoftwareLicenseBulkDeleteView,
|
||||
SoftwareLicenseBulkImportView,
|
||||
)
|
||||
from .software_product import (
|
||||
SoftwareProductListView,
|
||||
@@ -11,6 +12,7 @@ from .software_product import (
|
||||
SoftwareProductEditView,
|
||||
SoftwareProductDeleteView,
|
||||
SoftwareProductBulkDeleteView,
|
||||
SoftwareProductBulkImportView,
|
||||
)
|
||||
from .software_product_installation import (
|
||||
SoftwareProductInstallationListView,
|
||||
@@ -18,6 +20,7 @@ from .software_product_installation import (
|
||||
SoftwareProductInstallationEditView,
|
||||
SoftwareProductInstallationDeleteView,
|
||||
SoftwareProductInstallationBulkDeleteView,
|
||||
SoftwareProductInstallationBulkImportView,
|
||||
)
|
||||
from .software_product_version import (
|
||||
SoftwareProductVersionListView,
|
||||
@@ -25,4 +28,5 @@ from .software_product_version import (
|
||||
SoftwareProductVersionEditView,
|
||||
SoftwareProductVersionDeleteView,
|
||||
SoftwareProductVersionBulkDeleteView,
|
||||
SoftwareProductVersionBulkImportView,
|
||||
)
|
||||
|
||||
@@ -34,3 +34,9 @@ class SoftwareLicenseDeleteView(generic.ObjectDeleteView):
|
||||
class SoftwareLicenseBulkDeleteView(generic.BulkDeleteView):
|
||||
queryset = SoftwareLicense.objects.all()
|
||||
table = tables.SoftwareLicenseTable
|
||||
|
||||
|
||||
class SoftwareLicenseBulkImportView(generic.BulkImportView):
|
||||
queryset = SoftwareLicense.objects.all()
|
||||
table = tables.SoftwareLicenseTable
|
||||
model_form = forms.SoftwareLicenseBulkImportForm
|
||||
|
||||
@@ -38,3 +38,9 @@ class SoftwareProductDeleteView(generic.ObjectDeleteView):
|
||||
class SoftwareProductBulkDeleteView(generic.BulkDeleteView):
|
||||
queryset = SoftwareProduct.objects.all()
|
||||
table = tables.SoftwareProductTable
|
||||
|
||||
|
||||
class SoftwareProductBulkImportView(generic.BulkImportView):
|
||||
queryset = SoftwareProduct.objects.all()
|
||||
table = tables.SoftwareProductTable
|
||||
model_form = forms.SoftwareProductBulkImportForm
|
||||
|
||||
@@ -34,3 +34,9 @@ class SoftwareProductInstallationDeleteView(generic.ObjectDeleteView):
|
||||
class SoftwareProductInstallationBulkDeleteView(generic.BulkDeleteView):
|
||||
queryset = SoftwareProductInstallation.objects.all()
|
||||
table = tables.SoftwareProductInstallationTable
|
||||
|
||||
|
||||
class SoftwareProductInstallationBulkImportView(generic.BulkImportView):
|
||||
queryset = SoftwareProductInstallation.objects.all()
|
||||
table = tables.SoftwareProductInstallationTable
|
||||
model_form = forms.SoftwareProductInstallationBulkImportForm
|
||||
|
||||
@@ -38,3 +38,9 @@ class SoftwareProductVersionDeleteView(generic.ObjectDeleteView):
|
||||
class SoftwareProductVersionBulkDeleteView(generic.BulkDeleteView):
|
||||
queryset = SoftwareProductVersion.objects.all()
|
||||
table = tables.SoftwareProductVersionTable
|
||||
|
||||
|
||||
class SoftwareProductVersionBulkImportView(generic.BulkImportView):
|
||||
queryset = SoftwareProductVersion.objects.all()
|
||||
table = tables.SoftwareProductVersionTable
|
||||
model_form = forms.SoftwareProductVersionBulkImportForm
|
||||
|
||||
Reference in New Issue
Block a user