nautobot 2.4.10__py3-none-any.whl → 2.4.11__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of nautobot might be problematic. Click here for more details.
- nautobot/cloud/tests/test_views.py +13 -1
- nautobot/cloud/views.py +39 -9
- nautobot/core/celery/__init__.py +21 -0
- nautobot/core/celery/encoders.py +3 -0
- nautobot/core/forms/forms.py +4 -1
- nautobot/core/jobs/bulk_actions.py +8 -8
- nautobot/core/jobs/cleanup.py +11 -0
- nautobot/core/management/commands/generate_test_data.py +2 -1
- nautobot/core/templates/generic/object_retrieve.html +1 -1
- nautobot/core/testing/mixins.py +19 -1
- nautobot/core/testing/views.py +104 -8
- nautobot/core/tests/test_jobs.py +20 -4
- nautobot/core/tests/test_utils.py +193 -0
- nautobot/core/tests/test_views_utils.py +53 -2
- nautobot/core/ui/object_detail.py +4 -0
- nautobot/core/utils/lookup.py +4 -2
- nautobot/core/utils/module_loading.py +86 -58
- nautobot/core/views/generic.py +2 -12
- nautobot/core/views/mixins.py +19 -1
- nautobot/core/views/renderers.py +4 -13
- nautobot/core/views/utils.py +16 -0
- nautobot/dcim/api/serializers.py +13 -0
- nautobot/dcim/api/urls.py +1 -0
- nautobot/dcim/api/views.py +20 -0
- nautobot/dcim/apps.py +1 -0
- nautobot/dcim/factory.py +11 -0
- nautobot/dcim/filters/__init__.py +110 -0
- nautobot/dcim/forms.py +205 -19
- nautobot/dcim/migrations/0070_modulefamily_models.py +92 -0
- nautobot/dcim/models/__init__.py +2 -0
- nautobot/dcim/models/device_component_templates.py +14 -0
- nautobot/dcim/models/device_components.py +13 -1
- nautobot/dcim/models/devices.py +62 -0
- nautobot/dcim/navigation.py +16 -0
- nautobot/dcim/tables/__init__.py +2 -0
- nautobot/dcim/tables/devices.py +48 -0
- nautobot/dcim/tables/devicetypes.py +35 -1
- nautobot/dcim/tables/template_code.py +2 -0
- nautobot/dcim/templates/dcim/controllermanageddevicegroup_retrieve.html +1 -90
- nautobot/dcim/templates/dcim/inc/cable_toggle_buttons.html +1 -1
- nautobot/dcim/templates/dcim/interfaceredundancygroup_retrieve.html +1 -63
- nautobot/dcim/templates/dcim/location.html +2 -249
- nautobot/dcim/templates/dcim/location_edit.html +2 -38
- nautobot/dcim/templates/dcim/location_retrieve.html +249 -0
- nautobot/dcim/templates/dcim/location_update.html +38 -0
- nautobot/dcim/templates/dcim/module_update.html +1 -0
- nautobot/dcim/templates/dcim/modulebay_retrieve.html +93 -1
- nautobot/dcim/templates/dcim/modulefamily_retrieve.html +31 -0
- nautobot/dcim/templates/dcim/moduletype_retrieve.html +6 -0
- nautobot/dcim/templates/dcim/powerfeed_retrieve.html +1 -160
- nautobot/dcim/tests/test_api.py +35 -0
- nautobot/dcim/tests/test_filters.py +102 -3
- nautobot/dcim/tests/test_models.py +146 -0
- nautobot/dcim/tests/test_views.py +70 -97
- nautobot/dcim/urls.py +4 -22
- nautobot/dcim/views.py +439 -153
- nautobot/extras/api/views.py +9 -2
- nautobot/extras/datasources/git.py +11 -3
- nautobot/extras/forms/forms.py +9 -5
- nautobot/extras/jobs.py +4 -2
- nautobot/extras/models/datasources.py +5 -8
- nautobot/extras/models/jobs.py +5 -0
- nautobot/extras/plugins/__init__.py +3 -0
- nautobot/extras/tables.py +40 -3
- nautobot/extras/templates/extras/configcontext.html +2 -220
- nautobot/extras/templates/extras/configcontext_edit.html +2 -50
- nautobot/extras/templates/extras/configcontext_retrieve.html +2 -0
- nautobot/extras/templates/extras/configcontext_update.html +50 -0
- nautobot/extras/templates/extras/configcontextschema.html +2 -48
- nautobot/extras/templates/extras/configcontextschema_edit.html +2 -19
- nautobot/extras/templates/extras/configcontextschema_retrieve.html +48 -0
- nautobot/extras/templates/extras/configcontextschema_update.html +19 -0
- nautobot/extras/templates/extras/inc/configcontext_data.html +1 -0
- nautobot/extras/templates/extras/inc/json_data.html +1 -1
- nautobot/extras/templates/extras/inc/json_format.html +2 -2
- nautobot/extras/templates/extras/job_edit.html +12 -6
- nautobot/extras/templates/extras/tag.html +2 -52
- nautobot/extras/templates/extras/tag_edit.html +2 -15
- nautobot/extras/templates/extras/tag_retrieve.html +52 -0
- nautobot/extras/templates/extras/tag_update.html +15 -0
- nautobot/extras/templates/extras/team_retrieve.html +2 -2
- nautobot/extras/tests/test_api.py +15 -15
- nautobot/extras/tests/test_filters.py +4 -4
- nautobot/extras/tests/test_jobs.py +23 -10
- nautobot/extras/tests/test_models.py +19 -8
- nautobot/extras/tests/test_plugins.py +6 -3
- nautobot/extras/tests/test_views.py +66 -11
- nautobot/extras/urls.py +4 -134
- nautobot/extras/views.py +113 -158
- nautobot/ipam/models.py +19 -4
- nautobot/ipam/tables.py +19 -0
- nautobot/ipam/templates/ipam/vlan.html +2 -84
- nautobot/ipam/templates/ipam/vlan_edit.html +2 -24
- nautobot/ipam/templates/ipam/vlan_retrieve.html +84 -0
- nautobot/ipam/templates/ipam/vlan_update.html +24 -0
- nautobot/ipam/tests/test_views.py +5 -0
- nautobot/ipam/urls.py +1 -21
- nautobot/ipam/views.py +45 -70
- nautobot/project-static/docs/404.html +31 -8
- nautobot/project-static/docs/apps/index.html +31 -8
- nautobot/project-static/docs/apps/nautobot-apps.html +31 -8
- nautobot/project-static/docs/code-reference/nautobot/apps/__init__.html +31 -8
- nautobot/project-static/docs/code-reference/nautobot/apps/admin.html +31 -8
- nautobot/project-static/docs/code-reference/nautobot/apps/api.html +31 -8
- nautobot/project-static/docs/code-reference/nautobot/apps/change_logging.html +31 -8
- nautobot/project-static/docs/code-reference/nautobot/apps/choices.html +31 -8
- nautobot/project-static/docs/code-reference/nautobot/apps/config.html +31 -8
- nautobot/project-static/docs/code-reference/nautobot/apps/constants.html +31 -8
- nautobot/project-static/docs/code-reference/nautobot/apps/datasources.html +31 -8
- nautobot/project-static/docs/code-reference/nautobot/apps/events.html +31 -8
- nautobot/project-static/docs/code-reference/nautobot/apps/exceptions.html +31 -8
- nautobot/project-static/docs/code-reference/nautobot/apps/factory.html +31 -8
- nautobot/project-static/docs/code-reference/nautobot/apps/filters.html +31 -8
- nautobot/project-static/docs/code-reference/nautobot/apps/forms.html +31 -8
- nautobot/project-static/docs/code-reference/nautobot/apps/graphql.html +31 -8
- nautobot/project-static/docs/code-reference/nautobot/apps/jobs.html +31 -8
- nautobot/project-static/docs/code-reference/nautobot/apps/models.html +31 -8
- nautobot/project-static/docs/code-reference/nautobot/apps/querysets.html +31 -8
- nautobot/project-static/docs/code-reference/nautobot/apps/secrets.html +31 -8
- nautobot/project-static/docs/code-reference/nautobot/apps/tables.html +31 -8
- nautobot/project-static/docs/code-reference/nautobot/apps/testing.html +120 -8
- nautobot/project-static/docs/code-reference/nautobot/apps/ui.html +31 -8
- nautobot/project-static/docs/code-reference/nautobot/apps/urls.html +31 -8
- nautobot/project-static/docs/code-reference/nautobot/apps/utils.html +31 -8
- nautobot/project-static/docs/code-reference/nautobot/apps/views.html +31 -8
- nautobot/project-static/docs/development/apps/api/configuration-view.html +31 -8
- nautobot/project-static/docs/development/apps/api/database-backend-config.html +31 -8
- nautobot/project-static/docs/development/apps/api/models/django-admin.html +31 -8
- nautobot/project-static/docs/development/apps/api/models/global-search.html +31 -8
- nautobot/project-static/docs/development/apps/api/models/graphql.html +31 -8
- nautobot/project-static/docs/development/apps/api/models/index.html +31 -8
- nautobot/project-static/docs/development/apps/api/nautobot-app-config.html +40 -8
- nautobot/project-static/docs/development/apps/api/platform-features/custom-validators.html +31 -8
- nautobot/project-static/docs/development/apps/api/platform-features/filter-extensions.html +31 -8
- nautobot/project-static/docs/development/apps/api/platform-features/git-repository-content.html +31 -8
- nautobot/project-static/docs/development/apps/api/platform-features/index.html +31 -8
- nautobot/project-static/docs/development/apps/api/platform-features/jinja2-filters.html +31 -8
- nautobot/project-static/docs/development/apps/api/platform-features/jobs.html +31 -8
- nautobot/project-static/docs/development/apps/api/platform-features/populating-extensibility-features.html +31 -8
- nautobot/project-static/docs/development/apps/api/platform-features/secrets-providers.html +32 -9
- nautobot/project-static/docs/development/apps/api/platform-features/table-extensions.html +31 -8
- nautobot/project-static/docs/development/apps/api/platform-features/uniquely-identify-objects.html +31 -8
- nautobot/project-static/docs/development/apps/api/prometheus.html +31 -8
- nautobot/project-static/docs/development/apps/api/setup.html +31 -8
- nautobot/project-static/docs/development/apps/api/testing.html +31 -8
- nautobot/project-static/docs/development/apps/api/ui-extensions/banners.html +31 -8
- nautobot/project-static/docs/development/apps/api/ui-extensions/home-page.html +31 -8
- nautobot/project-static/docs/development/apps/api/ui-extensions/index.html +31 -8
- nautobot/project-static/docs/development/apps/api/ui-extensions/navigation.html +31 -8
- nautobot/project-static/docs/development/apps/api/ui-extensions/object-views.html +31 -8
- nautobot/project-static/docs/development/apps/api/views/base-template.html +31 -8
- nautobot/project-static/docs/development/apps/api/views/core-view-overrides.html +31 -8
- nautobot/project-static/docs/development/apps/api/views/django-generic-views.html +31 -8
- nautobot/project-static/docs/development/apps/api/views/help-documentation.html +31 -8
- nautobot/project-static/docs/development/apps/api/views/index.html +31 -8
- nautobot/project-static/docs/development/apps/api/views/nautobot-generic-views.html +31 -8
- nautobot/project-static/docs/development/apps/api/views/nautobotuiviewset.html +31 -8
- nautobot/project-static/docs/development/apps/api/views/nautobotuiviewsetrouter.html +31 -8
- nautobot/project-static/docs/development/apps/api/views/notes.html +31 -8
- nautobot/project-static/docs/development/apps/api/views/rest-api.html +31 -8
- nautobot/project-static/docs/development/apps/api/views/urls.html +31 -8
- nautobot/project-static/docs/development/apps/index.html +31 -8
- nautobot/project-static/docs/development/apps/migration/code-updates.html +31 -8
- nautobot/project-static/docs/development/apps/migration/dependency-updates.html +31 -8
- nautobot/project-static/docs/development/apps/migration/from-v1.html +31 -8
- nautobot/project-static/docs/development/apps/migration/model-updates/dcim.html +31 -8
- nautobot/project-static/docs/development/apps/migration/model-updates/extras.html +31 -8
- nautobot/project-static/docs/development/apps/migration/model-updates/global.html +31 -8
- nautobot/project-static/docs/development/apps/migration/model-updates/ipam.html +31 -8
- nautobot/project-static/docs/development/apps/migration/ui-component-framework/best-practices.html +31 -8
- nautobot/project-static/docs/development/apps/migration/ui-component-framework/custom-content.html +31 -8
- nautobot/project-static/docs/development/apps/migration/ui-component-framework/index.html +31 -8
- nautobot/project-static/docs/development/apps/migration/ui-component-framework/migration-steps.html +31 -8
- nautobot/project-static/docs/development/apps/porting-from-netbox.html +31 -8
- nautobot/project-static/docs/development/core/application-registry.html +31 -8
- nautobot/project-static/docs/development/core/best-practices.html +31 -8
- nautobot/project-static/docs/development/core/bootstrap-ui.html +31 -8
- nautobot/project-static/docs/development/core/caching.html +31 -8
- nautobot/project-static/docs/development/core/controllers.html +31 -8
- nautobot/project-static/docs/development/core/docker-compose-advanced-use-cases.html +31 -8
- nautobot/project-static/docs/development/core/generic-views.html +31 -8
- nautobot/project-static/docs/development/core/getting-started.html +31 -8
- nautobot/project-static/docs/development/core/homepage.html +31 -8
- nautobot/project-static/docs/development/core/index.html +31 -8
- nautobot/project-static/docs/development/core/minikube-dev-environment-for-k8s-jobs.html +31 -8
- nautobot/project-static/docs/development/core/model-checklist.html +31 -8
- nautobot/project-static/docs/development/core/model-features.html +31 -8
- nautobot/project-static/docs/development/core/natural-keys.html +31 -8
- nautobot/project-static/docs/development/core/navigation-menu.html +31 -8
- nautobot/project-static/docs/development/core/release-checklist.html +31 -8
- nautobot/project-static/docs/development/core/role-internals.html +31 -8
- nautobot/project-static/docs/development/core/settings.html +31 -8
- nautobot/project-static/docs/development/core/style-guide.html +31 -8
- nautobot/project-static/docs/development/core/templates.html +31 -8
- nautobot/project-static/docs/development/core/testing.html +31 -8
- nautobot/project-static/docs/development/core/ui-component-framework.html +31 -8
- nautobot/project-static/docs/development/core/user-preferences.html +31 -8
- nautobot/project-static/docs/development/index.html +31 -8
- nautobot/project-static/docs/development/jobs/getting-started.html +35 -8
- nautobot/project-static/docs/development/jobs/index.html +31 -8
- nautobot/project-static/docs/development/jobs/installation.html +31 -8
- nautobot/project-static/docs/development/jobs/job-extensions.html +31 -8
- nautobot/project-static/docs/development/jobs/job-logging.html +31 -8
- nautobot/project-static/docs/development/jobs/job-patterns.html +31 -8
- nautobot/project-static/docs/development/jobs/job-structure.html +31 -8
- nautobot/project-static/docs/development/jobs/migration/from-v1.html +31 -8
- nautobot/project-static/docs/development/jobs/testing.html +31 -8
- nautobot/project-static/docs/index.html +31 -8
- nautobot/project-static/docs/insert-analytics.sh +36 -0
- nautobot/project-static/docs/objects.inv +0 -0
- nautobot/project-static/docs/overview/application_stack.html +31 -8
- nautobot/project-static/docs/overview/design_philosophy.html +31 -8
- nautobot/project-static/docs/release-notes/index.html +31 -8
- nautobot/project-static/docs/release-notes/version-1.0.html +31 -8
- nautobot/project-static/docs/release-notes/version-1.1.html +31 -8
- nautobot/project-static/docs/release-notes/version-1.2.html +31 -8
- nautobot/project-static/docs/release-notes/version-1.3.html +31 -8
- nautobot/project-static/docs/release-notes/version-1.4.html +31 -8
- nautobot/project-static/docs/release-notes/version-1.5.html +31 -8
- nautobot/project-static/docs/release-notes/version-1.6.html +31 -8
- nautobot/project-static/docs/release-notes/version-2.0.html +31 -8
- nautobot/project-static/docs/release-notes/version-2.1.html +31 -8
- nautobot/project-static/docs/release-notes/version-2.2.html +31 -8
- nautobot/project-static/docs/release-notes/version-2.3.html +31 -8
- nautobot/project-static/docs/release-notes/version-2.4.html +252 -8
- nautobot/project-static/docs/search/search_index.json +1 -1
- nautobot/project-static/docs/sitemap.xml +302 -298
- nautobot/project-static/docs/sitemap.xml.gz +0 -0
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/ldap.html +31 -8
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/remote.html +31 -8
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/sso.html +31 -8
- nautobot/project-static/docs/user-guide/administration/configuration/index.html +31 -8
- nautobot/project-static/docs/user-guide/administration/configuration/redis.html +31 -8
- nautobot/project-static/docs/user-guide/administration/configuration/settings.html +31 -8
- nautobot/project-static/docs/user-guide/administration/configuration/time-zones.html +31 -8
- nautobot/project-static/docs/user-guide/administration/guides/celery-queues.html +31 -8
- nautobot/project-static/docs/user-guide/administration/guides/docker.html +31 -8
- nautobot/project-static/docs/user-guide/administration/guides/health-checks.html +31 -8
- nautobot/project-static/docs/user-guide/administration/guides/permissions.html +31 -8
- nautobot/project-static/docs/user-guide/administration/guides/prometheus-metrics.html +31 -8
- nautobot/project-static/docs/user-guide/administration/guides/replicating-nautobot.html +31 -8
- nautobot/project-static/docs/user-guide/administration/guides/request-profiling.html +31 -8
- nautobot/project-static/docs/user-guide/administration/guides/s3-django-storage.html +31 -8
- nautobot/project-static/docs/user-guide/administration/guides/selinux-troubleshooting.html +31 -8
- nautobot/project-static/docs/user-guide/administration/installation/app-install.html +31 -8
- nautobot/project-static/docs/user-guide/administration/installation/external-authentication.html +31 -8
- nautobot/project-static/docs/user-guide/administration/installation/http-server.html +31 -8
- nautobot/project-static/docs/user-guide/administration/installation/index.html +31 -8
- nautobot/project-static/docs/user-guide/administration/installation/install_system.html +31 -8
- nautobot/project-static/docs/user-guide/administration/installation/nautobot.html +31 -8
- nautobot/project-static/docs/user-guide/administration/installation/services.html +31 -8
- nautobot/project-static/docs/user-guide/administration/migration/migrating-from-netbox.html +31 -8
- nautobot/project-static/docs/user-guide/administration/migration/migrating-from-postgresql.html +31 -8
- nautobot/project-static/docs/user-guide/administration/security/index.html +31 -8
- nautobot/project-static/docs/user-guide/administration/security/notices.html +31 -8
- nautobot/project-static/docs/user-guide/administration/tools/nautobot-server.html +31 -8
- nautobot/project-static/docs/user-guide/administration/tools/nautobot-shell.html +31 -8
- nautobot/project-static/docs/user-guide/administration/upgrading/database-backup.html +31 -8
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/after-you-upgrade.html +31 -8
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/before-you-upgrade.html +31 -8
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/for-developers.html +31 -8
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/index.html +31 -8
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/whats-changed.html +31 -8
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/region-and-site-data-migration-guide.html +31 -8
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/upgrading-from-nautobot-v1.html +31 -8
- nautobot/project-static/docs/user-guide/administration/upgrading/upgrading.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuit.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuittermination.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuittype.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/circuits/provider.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/circuits/providernetwork.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloud.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudaccount.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudnetwork.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudnetworkprefixassignment.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudresourcetype.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudservice.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudservicenetworkassignment.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/cable.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleport.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleporttemplate.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverport.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverporttemplate.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/controller.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/controllermanageddevicegroup.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/device.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebay.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebaytemplate.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicefamily.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/deviceredundancygroup.html +43 -20
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicetype.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/frontport.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/frontporttemplate.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interface.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interfaceredundancygroup.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interfacetemplate.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/inventoryitem.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/location.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/locationtype.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/manufacturer.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/module.html +35 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/modulebay.html +35 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/modulebaytemplate.html +35 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/modulefamily.html +10261 -0
- nautobot/project-static/docs/user-guide/core-data-model/dcim/moduletype.html +34 -11
- nautobot/project-static/docs/user-guide/core-data-model/dcim/platform.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerfeed.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlet.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlettemplate.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerpanel.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerport.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerporttemplate.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rack.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rackgroup.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rackreservation.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rearport.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rearporttemplate.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/softwareimagefile.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/softwareversion.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/virtualchassis.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/dcim/virtualdevicecontext.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/extras/configcontext.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/extras/configcontextschema.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/extras/contact.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/extras/team.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/ipam/ipaddress.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/ipam/namespace.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/ipam/prefix.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/ipam/rir.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/ipam/routetarget.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/ipam/service.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vlan.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vlangroup.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vrf.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/overview/introduction.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/tenancy/tenant.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/tenancy/tenantgroup.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/cluster.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/clustergroup.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/clustertype.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/virtualmachine.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/vminterface.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/wireless/index.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/wireless/radioprofile.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/wireless/supporteddatarate.html +31 -8
- nautobot/project-static/docs/user-guide/core-data-model/wireless/wirelessnetwork.html +31 -8
- nautobot/project-static/docs/user-guide/feature-guides/contacts-and-teams.html +31 -8
- nautobot/project-static/docs/user-guide/feature-guides/custom-fields.html +31 -8
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/creating-devices.html +31 -8
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/creating-location-types-and-locations.html +31 -8
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/index.html +31 -8
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/interfaces.html +31 -8
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/ipam.html +31 -8
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/platforms.html +31 -8
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/search-bar.html +31 -8
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/tenants.html +31 -8
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/vlans-and-vlan-groups.html +31 -8
- nautobot/project-static/docs/user-guide/feature-guides/git-data-source.html +41 -15
- nautobot/project-static/docs/user-guide/feature-guides/graphql.html +31 -8
- nautobot/project-static/docs/user-guide/feature-guides/ip-address-merge-tool.html +31 -8
- nautobot/project-static/docs/user-guide/feature-guides/relationships.html +31 -8
- nautobot/project-static/docs/user-guide/feature-guides/software-image-files-and-versions.html +31 -8
- nautobot/project-static/docs/user-guide/feature-guides/wireless-networks-and-controllers.html +31 -8
- nautobot/project-static/docs/user-guide/index.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/change-logging.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/computedfield.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/customfield.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/customlink.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/dynamicgroup.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/events.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/exporttemplate.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/externalintegration.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/gitrepository.html +37 -9
- nautobot/project-static/docs/user-guide/platform-functionality/graphql.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/graphqlquery.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/imageattachment.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/index.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/job-scheduling-and-approvals.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobbutton.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobhook.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobqueue.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/kubernetes-job-support.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/managing-jobs.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/models.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/napalm.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/note.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/objectmetadata.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/relationship.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/rendering-jinja-templates.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/authentication.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/filtering.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/overview.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/ui-related-endpoints.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/role.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/savedview.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/secret.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/staticgroupassociation.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/status.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/tag.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/template-filters.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/users/objectpermission.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/users/token.html +31 -8
- nautobot/project-static/docs/user-guide/platform-functionality/webhook.html +31 -8
- nautobot/tenancy/tables.py +2 -0
- nautobot/virtualization/tests/test_views.py +1 -1
- nautobot/wireless/forms.py +0 -1
- nautobot/wireless/models.py +1 -1
- nautobot/wireless/tables.py +7 -0
- {nautobot-2.4.10.dist-info → nautobot-2.4.11.dist-info}/METADATA +4 -4
- {nautobot-2.4.10.dist-info → nautobot-2.4.11.dist-info}/RECORD +416 -401
- /nautobot/dcim/templates/dcim/{platform_edit.html → platform_create.html} +0 -0
- /nautobot/extras/test_jobs/{pass.py → pass_job.py} +0 -0
- {nautobot-2.4.10.dist-info → nautobot-2.4.11.dist-info}/LICENSE.txt +0 -0
- {nautobot-2.4.10.dist-info → nautobot-2.4.11.dist-info}/NOTICE +0 -0
- {nautobot-2.4.10.dist-info → nautobot-2.4.11.dist-info}/WHEEL +0 -0
- {nautobot-2.4.10.dist-info → nautobot-2.4.11.dist-info}/entry_points.txt +0 -0
nautobot/extras/api/views.py
CHANGED
|
@@ -512,12 +512,19 @@ class JobViewSetBase(
|
|
|
512
512
|
serializer_class = serializers.JobSerializer
|
|
513
513
|
filterset_class = filters.JobFilterSet
|
|
514
514
|
|
|
515
|
+
def get_object(self):
|
|
516
|
+
"""Get the Job instance and reload the job class to ensure we have the latest version of the job code."""
|
|
517
|
+
obj = super().get_object()
|
|
518
|
+
get_job(obj.class_path, reload=True)
|
|
519
|
+
|
|
520
|
+
return obj
|
|
521
|
+
|
|
515
522
|
@extend_schema(responses={"200": serializers.JobVariableSerializer(many=True)})
|
|
516
523
|
@action(detail=True, filterset_class=None)
|
|
517
524
|
def variables(self, request, *args, **kwargs):
|
|
518
525
|
"""Get details of the input variables that may/must be specified to run a particular Job."""
|
|
519
526
|
job_model = self.get_object()
|
|
520
|
-
job_class =
|
|
527
|
+
job_class = job_model.job_class
|
|
521
528
|
if job_class is None:
|
|
522
529
|
raise Http404
|
|
523
530
|
variables_dict = job_class._get_vars()
|
|
@@ -599,7 +606,7 @@ class JobViewSetBase(
|
|
|
599
606
|
"One of these two flags must be removed before this job can be scheduled or run."
|
|
600
607
|
)
|
|
601
608
|
|
|
602
|
-
job_class =
|
|
609
|
+
job_class = job_model.job_class
|
|
603
610
|
if job_class is None:
|
|
604
611
|
raise MethodNotAllowed(
|
|
605
612
|
request.method, detail="This job's source code could not be located and cannot be run"
|
|
@@ -17,7 +17,7 @@ from git import InvalidGitRepositoryError, Repo
|
|
|
17
17
|
import yaml
|
|
18
18
|
|
|
19
19
|
from nautobot.core.utils.git import GitRepo
|
|
20
|
-
from nautobot.core.utils.module_loading import import_modules_privately
|
|
20
|
+
from nautobot.core.utils.module_loading import check_name_safe_to_import_privately, import_modules_privately
|
|
21
21
|
from nautobot.dcim.models import Device, DeviceRedundancyGroup, DeviceType, Location, Platform
|
|
22
22
|
from nautobot.extras.choices import (
|
|
23
23
|
LogLevelChoices,
|
|
@@ -720,11 +720,19 @@ def refresh_job_code_from_repository(repository_slug, skip_reimport=False, ignor
|
|
|
720
720
|
After cloning/updating/deleting a GitRepository on disk, call this function to reload and reregister its Python.
|
|
721
721
|
|
|
722
722
|
Args:
|
|
723
|
-
repository_slug (str): Repository directory in GIT_ROOT that was updated or deleted.
|
|
724
|
-
skip_reimport (bool): If True, unload existing
|
|
723
|
+
repository_slug (str): Repository slug (directory in GIT_ROOT) that was populated, updated, or deleted.
|
|
724
|
+
skip_reimport (bool): If True, unload existing jobs from this repository but do not re-import them.
|
|
725
725
|
ignore_import_errors (bool): If True, any exceptions raised in the import will be caught and logged.
|
|
726
726
|
If False, exceptions will be re-raised after logging.
|
|
727
727
|
"""
|
|
728
|
+
# Enforced during GitRepository.clean() but just in case someone created a bad record without cleaning:
|
|
729
|
+
permitted, reason = check_name_safe_to_import_privately(repository_slug)
|
|
730
|
+
if not permitted:
|
|
731
|
+
logger.error("The repository_slug %r is invalid as it is %s", repository_slug, reason)
|
|
732
|
+
if ignore_import_errors:
|
|
733
|
+
return
|
|
734
|
+
raise ValueError(f"The repository_slug {repository_slug!r} is invalid as it is {reason}")
|
|
735
|
+
|
|
728
736
|
# Unload any previous version of this module and its submodules if present
|
|
729
737
|
for job_class_path in list(registry["jobs"]):
|
|
730
738
|
if job_class_path.startswith(f"{repository_slug}."):
|
nautobot/extras/forms/forms.py
CHANGED
|
@@ -914,13 +914,13 @@ class ExternalIntegrationBulkEditForm(NautobotBulkEditForm):
|
|
|
914
914
|
secrets_group = DynamicModelChoiceField(required=False, queryset=SecretsGroup.objects.all())
|
|
915
915
|
verify_ssl = forms.NullBooleanField(required=False, label="Verify SSL", widget=BulkEditNullBooleanSelect)
|
|
916
916
|
timeout = forms.IntegerField(required=False, min_value=0)
|
|
917
|
-
extra_config =
|
|
917
|
+
extra_config = JSONField(required=False, widget=forms.Textarea, help_text="JSON data")
|
|
918
918
|
http_method = forms.ChoiceField(
|
|
919
919
|
required=False,
|
|
920
920
|
label="HTTP Method",
|
|
921
921
|
choices=add_blank_choice(WebhookHttpMethodChoices),
|
|
922
922
|
)
|
|
923
|
-
headers =
|
|
923
|
+
headers = JSONField(required=False, widget=forms.Textarea, help_text="Headers for the HTTP request")
|
|
924
924
|
|
|
925
925
|
class Meta:
|
|
926
926
|
model = ExternalIntegration
|
|
@@ -1487,7 +1487,6 @@ class JobQueueBulkEditForm(TagsBulkEditFormMixin, NautobotBulkEditForm):
|
|
|
1487
1487
|
class Meta:
|
|
1488
1488
|
model = JobQueue
|
|
1489
1489
|
nullable_fields = [
|
|
1490
|
-
"secrets_group",
|
|
1491
1490
|
"description",
|
|
1492
1491
|
"tenant",
|
|
1493
1492
|
]
|
|
@@ -1910,8 +1909,8 @@ class RelationshipBulkEditForm(BootstrapMixin, CustomFieldModelBulkEditFormMixin
|
|
|
1910
1909
|
)
|
|
1911
1910
|
source_hidden = forms.NullBooleanField(required=False, widget=BulkEditNullBooleanSelect)
|
|
1912
1911
|
destination_hidden = forms.NullBooleanField(required=False, widget=BulkEditNullBooleanSelect)
|
|
1913
|
-
source_filter =
|
|
1914
|
-
destination_filter =
|
|
1912
|
+
source_filter = JSONField(required=False, widget=forms.Textarea, help_text="Filter for the source")
|
|
1913
|
+
destination_filter = JSONField(required=False, widget=forms.Textarea, help_text="Filter for the destination")
|
|
1915
1914
|
source_type = CSVContentTypeField(
|
|
1916
1915
|
queryset=ContentType.objects.filter(FeatureQuery("relationships").get_query()), required=False
|
|
1917
1916
|
)
|
|
@@ -2256,6 +2255,8 @@ class WebhookBulkEditForm(BootstrapMixin, NoteModelBulkEditFormMixin):
|
|
|
2256
2255
|
secret = forms.CharField(required=False, max_length=CHARFIELD_MAX_LENGTH)
|
|
2257
2256
|
ca_file_path = forms.CharField(required=False, max_length=4096)
|
|
2258
2257
|
http_content_type = forms.CharField(required=False, max_length=CHARFIELD_MAX_LENGTH)
|
|
2258
|
+
additional_headers = forms.CharField(required=False, widget=forms.Textarea)
|
|
2259
|
+
body_template = forms.CharField(required=False, widget=forms.Textarea)
|
|
2259
2260
|
|
|
2260
2261
|
# Choice field
|
|
2261
2262
|
http_method = forms.ChoiceField(
|
|
@@ -2279,6 +2280,8 @@ class WebhookBulkEditForm(BootstrapMixin, NoteModelBulkEditFormMixin):
|
|
|
2279
2280
|
"type_delete",
|
|
2280
2281
|
"http_method",
|
|
2281
2282
|
"http_content_type",
|
|
2283
|
+
"additional_headers",
|
|
2284
|
+
"body_template",
|
|
2282
2285
|
"ssl_verification",
|
|
2283
2286
|
"ca_file_path",
|
|
2284
2287
|
"payload_url",
|
|
@@ -2286,6 +2289,7 @@ class WebhookBulkEditForm(BootstrapMixin, NoteModelBulkEditFormMixin):
|
|
|
2286
2289
|
"add_content_types",
|
|
2287
2290
|
"remove_content_types",
|
|
2288
2291
|
)
|
|
2292
|
+
nullable_fields = ("additional_headers",)
|
|
2289
2293
|
|
|
2290
2294
|
|
|
2291
2295
|
class WebhookForm(BootstrapMixin, forms.ModelForm):
|
nautobot/extras/jobs.py
CHANGED
|
@@ -17,6 +17,7 @@ from celery.exceptions import Ignore, Reject
|
|
|
17
17
|
from celery.utils.log import get_task_logger
|
|
18
18
|
from db_file_storage.form_widgets import DBClearableFileInput
|
|
19
19
|
from django import forms
|
|
20
|
+
from django.apps import apps
|
|
20
21
|
from django.conf import settings
|
|
21
22
|
from django.contrib.auth import get_user_model
|
|
22
23
|
from django.core.cache import cache
|
|
@@ -1142,8 +1143,9 @@ def get_job(class_path, reload=False):
|
|
|
1142
1143
|
# System job - not reloadable
|
|
1143
1144
|
reload = False
|
|
1144
1145
|
if any(class_path.startswith(f"{app_name}.") for app_name in settings.PLUGINS):
|
|
1145
|
-
# App provided job -
|
|
1146
|
-
|
|
1146
|
+
# App provided job - only reload if the app provides dynamic jobs
|
|
1147
|
+
app_config = apps.get_app_config(class_path.split(".")[0])
|
|
1148
|
+
reload = getattr(app_config, "provides_dynamic_jobs", False)
|
|
1147
1149
|
jobs = get_jobs(reload=reload)
|
|
1148
1150
|
return jobs.get(class_path, None)
|
|
1149
1151
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"""Models for representing external data sources."""
|
|
2
2
|
|
|
3
3
|
from contextlib import contextmanager
|
|
4
|
-
from importlib.util import find_spec
|
|
5
4
|
import logging
|
|
6
5
|
import os
|
|
7
6
|
import shutil
|
|
@@ -17,7 +16,8 @@ from nautobot.core.models.fields import AutoSlugField, LaxURLField, slugify_dash
|
|
|
17
16
|
from nautobot.core.models.generics import PrimaryModel
|
|
18
17
|
from nautobot.core.models.validators import EnhancedURLValidator
|
|
19
18
|
from nautobot.core.utils.git import GitRepo
|
|
20
|
-
from nautobot.
|
|
19
|
+
from nautobot.core.utils.module_loading import check_name_safe_to_import_privately
|
|
20
|
+
from nautobot.extras.utils import extras_features
|
|
21
21
|
|
|
22
22
|
logger = logging.getLogger(__name__)
|
|
23
23
|
|
|
@@ -105,12 +105,9 @@ class GitRepository(PrimaryModel):
|
|
|
105
105
|
)
|
|
106
106
|
|
|
107
107
|
if not self.present_in_database:
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
raise ValidationError(
|
|
112
|
-
f'Please choose a different slug, as "{self.slug}" is an installed Python package or module.'
|
|
113
|
-
)
|
|
108
|
+
permitted, reason = check_name_safe_to_import_privately(self.slug)
|
|
109
|
+
if not permitted:
|
|
110
|
+
raise ValidationError({"slug": f"Please choose a different slug; {self.slug!r} is {reason}"})
|
|
114
111
|
|
|
115
112
|
if self.provided_contents:
|
|
116
113
|
q = models.Q()
|
nautobot/extras/models/jobs.py
CHANGED
|
@@ -1383,6 +1383,11 @@ class ScheduledJob(BaseModel):
|
|
|
1383
1383
|
if job_model.time_limit > 0:
|
|
1384
1384
|
celery_kwargs["time_limit"] = job_model.time_limit
|
|
1385
1385
|
|
|
1386
|
+
# We do this because when a job creates an approval workflow, a scheduled job is also created.
|
|
1387
|
+
# If the scheduled job has an "immediate" interval, the scheduler will not send this task.
|
|
1388
|
+
# since TYPE_IMMEDIATELY is not a valid value in JobExecutionType.SCHEDULE_CHOICES
|
|
1389
|
+
if interval == JobExecutionType.TYPE_IMMEDIATELY:
|
|
1390
|
+
interval = JobExecutionType.TYPE_FUTURE
|
|
1386
1391
|
# 2.0 TODO: To revisit this as part of a larger Jobs cleanup in 2.0.
|
|
1387
1392
|
#
|
|
1388
1393
|
# We pass in task and job_model here partly for forward/backward compatibility logic, and
|
|
@@ -81,6 +81,9 @@ class NautobotAppConfig(NautobotConfig):
|
|
|
81
81
|
config_view_name = None
|
|
82
82
|
docs_view_name = None
|
|
83
83
|
|
|
84
|
+
# Dynamic jobs. Set to True if the app's job code should be reloaded at runtime
|
|
85
|
+
provides_dynamic_jobs = False
|
|
86
|
+
|
|
84
87
|
# Default integration paths. Plugin authors can override these to customize the paths to
|
|
85
88
|
# integrated components.
|
|
86
89
|
banner_function = "banner.banner"
|
nautobot/extras/tables.py
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
from django.conf import settings
|
|
2
|
+
from django.db.models import QuerySet
|
|
2
3
|
from django.utils.html import format_html, format_html_join
|
|
3
4
|
import django_tables2 as tables
|
|
5
|
+
from django_tables2.data import TableData
|
|
6
|
+
from django_tables2.rows import BoundRows
|
|
4
7
|
from django_tables2.utils import Accessor
|
|
5
8
|
from jsonschema.exceptions import ValidationError as JSONSchemaValidationError
|
|
6
9
|
|
|
10
|
+
from nautobot.core.models.querysets import count_related
|
|
7
11
|
from nautobot.core.tables import (
|
|
8
12
|
BaseTable,
|
|
9
13
|
BooleanColumn,
|
|
@@ -19,7 +23,7 @@ from nautobot.core.tables import (
|
|
|
19
23
|
from nautobot.core.templatetags.helpers import render_boolean, render_json, render_markdown
|
|
20
24
|
from nautobot.tenancy.tables import TenantColumn
|
|
21
25
|
|
|
22
|
-
from .choices import MetadataTypeDataTypeChoices
|
|
26
|
+
from .choices import LogLevelChoices, MetadataTypeDataTypeChoices
|
|
23
27
|
from .models import (
|
|
24
28
|
ComputedField,
|
|
25
29
|
ConfigContext,
|
|
@@ -891,7 +895,7 @@ class JobResultTable(BaseTable):
|
|
|
891
895
|
)
|
|
892
896
|
summary = tables.Column(
|
|
893
897
|
empty_values=(),
|
|
894
|
-
verbose_name="
|
|
898
|
+
verbose_name="Summary",
|
|
895
899
|
orderable=False,
|
|
896
900
|
attrs={"td": {"class": "text-nowrap report-stats"}},
|
|
897
901
|
)
|
|
@@ -901,6 +905,40 @@ class JobResultTable(BaseTable):
|
|
|
901
905
|
)
|
|
902
906
|
actions = ButtonsColumn(JobResult, buttons=("delete",), prepend_template=JOB_RESULT_BUTTONS)
|
|
903
907
|
|
|
908
|
+
def __init__(self, *args, **kwargs):
|
|
909
|
+
super().__init__(*args, **kwargs)
|
|
910
|
+
# Only calculate log counts for "summary" column if it's actually visible.
|
|
911
|
+
if self.columns["summary"].visible and isinstance(self.data.data, QuerySet):
|
|
912
|
+
self.data = TableData.from_data(
|
|
913
|
+
self.data.data.annotate(
|
|
914
|
+
debug_log_count=count_related(
|
|
915
|
+
JobLogEntry, "job_result", filter_dict={"log_level": LogLevelChoices.LOG_DEBUG}
|
|
916
|
+
),
|
|
917
|
+
success_log_count=count_related(
|
|
918
|
+
JobLogEntry, "job_result", filter_dict={"log_level": LogLevelChoices.LOG_SUCCESS}
|
|
919
|
+
),
|
|
920
|
+
info_log_count=count_related(
|
|
921
|
+
JobLogEntry, "job_result", filter_dict={"log_level": LogLevelChoices.LOG_INFO}
|
|
922
|
+
),
|
|
923
|
+
warning_log_count=count_related(
|
|
924
|
+
JobLogEntry, "job_result", filter_dict={"log_level": LogLevelChoices.LOG_WARNING}
|
|
925
|
+
),
|
|
926
|
+
error_log_count=count_related(
|
|
927
|
+
JobLogEntry,
|
|
928
|
+
"job_result",
|
|
929
|
+
filter_dict={
|
|
930
|
+
"log_level__in": [
|
|
931
|
+
LogLevelChoices.LOG_FAILURE,
|
|
932
|
+
LogLevelChoices.LOG_ERROR,
|
|
933
|
+
LogLevelChoices.LOG_CRITICAL,
|
|
934
|
+
],
|
|
935
|
+
},
|
|
936
|
+
),
|
|
937
|
+
)
|
|
938
|
+
)
|
|
939
|
+
self.data.set_table(self)
|
|
940
|
+
self.rows = BoundRows(data=self.data, table=self, pinned_data=self.pinned_data)
|
|
941
|
+
|
|
904
942
|
def render_summary(self, record):
|
|
905
943
|
"""
|
|
906
944
|
Define custom rendering for the summary column.
|
|
@@ -940,7 +978,6 @@ class JobResultTable(BaseTable):
|
|
|
940
978
|
"job_model",
|
|
941
979
|
"user",
|
|
942
980
|
"status",
|
|
943
|
-
"summary",
|
|
944
981
|
"actions",
|
|
945
982
|
)
|
|
946
983
|
|
|
@@ -1,220 +1,2 @@
|
|
|
1
|
-
{% extends '
|
|
2
|
-
{%
|
|
3
|
-
|
|
4
|
-
{% block content_left_page %}
|
|
5
|
-
<div class="panel panel-default">
|
|
6
|
-
<div class="panel-heading">
|
|
7
|
-
<strong>Config Context</strong>
|
|
8
|
-
</div>
|
|
9
|
-
<table class="table table-hover panel-body attr-table">
|
|
10
|
-
<tr>
|
|
11
|
-
<td>Name</td>
|
|
12
|
-
<td>
|
|
13
|
-
{{ object.name }}
|
|
14
|
-
</td>
|
|
15
|
-
</tr>
|
|
16
|
-
{% if object.owner %}
|
|
17
|
-
<tr>
|
|
18
|
-
<td>Owner</td>
|
|
19
|
-
<td>{{ object.owner|hyperlinked_object }}</td>
|
|
20
|
-
</tr>
|
|
21
|
-
{% endif %}
|
|
22
|
-
<tr>
|
|
23
|
-
<td>Weight</td>
|
|
24
|
-
<td>
|
|
25
|
-
{{ object.weight }}
|
|
26
|
-
</td>
|
|
27
|
-
</tr>
|
|
28
|
-
<tr>
|
|
29
|
-
<td>Description</td>
|
|
30
|
-
<td>{{ object.description|placeholder }}</td>
|
|
31
|
-
</tr>
|
|
32
|
-
<tr>
|
|
33
|
-
<td>Schema</td>
|
|
34
|
-
<td>{{ object.schema|hyperlinked_object }}</td>
|
|
35
|
-
</tr>
|
|
36
|
-
<tr>
|
|
37
|
-
<td>Active</td>
|
|
38
|
-
<td>{{ object.is_active | render_boolean }}</td>
|
|
39
|
-
</tr>
|
|
40
|
-
</table>
|
|
41
|
-
</div>
|
|
42
|
-
{% endblock content_left_page %}
|
|
43
|
-
|
|
44
|
-
{% block content_right_page %}
|
|
45
|
-
<div class="panel panel-default">
|
|
46
|
-
<div class="panel-heading">
|
|
47
|
-
<strong>Assignment</strong>
|
|
48
|
-
</div>
|
|
49
|
-
<table class="table table-hover panel-body attr-table">
|
|
50
|
-
<tr>
|
|
51
|
-
<td>Locations</td>
|
|
52
|
-
<td>
|
|
53
|
-
{% if object.locations.all %}
|
|
54
|
-
<ul>
|
|
55
|
-
{% for location in object.locations.all %}
|
|
56
|
-
<li>{{ location|hyperlinked_object }}</li>
|
|
57
|
-
{% endfor %}
|
|
58
|
-
</ul>
|
|
59
|
-
{% else %}
|
|
60
|
-
<span class="text-muted">None</span>
|
|
61
|
-
{% endif %}
|
|
62
|
-
</td>
|
|
63
|
-
</tr>
|
|
64
|
-
<tr>
|
|
65
|
-
<td>Roles</td>
|
|
66
|
-
<td>
|
|
67
|
-
{% if object.roles.all %}
|
|
68
|
-
<ul>
|
|
69
|
-
{% for role in object.roles.all %}
|
|
70
|
-
<li><a href="{% url 'dcim:device_list' %}?role={{ role.name }}">{{ role }}</a></li>
|
|
71
|
-
{% endfor %}
|
|
72
|
-
</ul>
|
|
73
|
-
{% else %}
|
|
74
|
-
<span class="text-muted">None</span>
|
|
75
|
-
{% endif %}
|
|
76
|
-
</td>
|
|
77
|
-
</tr>
|
|
78
|
-
<tr>
|
|
79
|
-
<td>Device Types</td>
|
|
80
|
-
<td>
|
|
81
|
-
{% if object.device_types.all %}
|
|
82
|
-
<ul>
|
|
83
|
-
{% for device_type in object.device_types.all %}
|
|
84
|
-
<li>{{ device_type|hyperlinked_object }}</li>
|
|
85
|
-
{% endfor %}
|
|
86
|
-
</ul>
|
|
87
|
-
{% else %}
|
|
88
|
-
<span class="text-muted">None</span>
|
|
89
|
-
{% endif %}
|
|
90
|
-
</td>
|
|
91
|
-
</tr>
|
|
92
|
-
<tr>
|
|
93
|
-
<td>Platforms</td>
|
|
94
|
-
<td>
|
|
95
|
-
{% if object.platforms.all %}
|
|
96
|
-
<ul>
|
|
97
|
-
{% for platform in object.platforms.all %}
|
|
98
|
-
<li>{{ platform|hyperlinked_object }}</li>
|
|
99
|
-
{% endfor %}
|
|
100
|
-
</ul>
|
|
101
|
-
{% else %}
|
|
102
|
-
<span class="text-muted">None</span>
|
|
103
|
-
{% endif %}
|
|
104
|
-
</td>
|
|
105
|
-
</tr>
|
|
106
|
-
<tr>
|
|
107
|
-
<td>Cluster Groups</td>
|
|
108
|
-
<td>
|
|
109
|
-
{% if object.cluster_groups.all %}
|
|
110
|
-
<ul>
|
|
111
|
-
{% for cluster_group in object.cluster_groups.all %}
|
|
112
|
-
<li>{{ cluster_group|hyperlinked_object }}</li>
|
|
113
|
-
{% endfor %}
|
|
114
|
-
</ul>
|
|
115
|
-
{% else %}
|
|
116
|
-
<span class="text-muted">None</span>
|
|
117
|
-
{% endif %}
|
|
118
|
-
</td>
|
|
119
|
-
</tr>
|
|
120
|
-
<tr>
|
|
121
|
-
<td>Clusters</td>
|
|
122
|
-
<td>
|
|
123
|
-
{% if object.clusters.all %}
|
|
124
|
-
<ul>
|
|
125
|
-
{% for cluster in object.clusters.all %}
|
|
126
|
-
<li>{{ cluster|hyperlinked_object }}</li>
|
|
127
|
-
{% endfor %}
|
|
128
|
-
</ul>
|
|
129
|
-
{% else %}
|
|
130
|
-
<span class="text-muted">None</span>
|
|
131
|
-
{% endif %}
|
|
132
|
-
</td>
|
|
133
|
-
</tr>
|
|
134
|
-
<tr>
|
|
135
|
-
<td>Tenant Groups</td>
|
|
136
|
-
<td>
|
|
137
|
-
{% if object.tenant_groups.all %}
|
|
138
|
-
<ul>
|
|
139
|
-
{% for tenant_group in object.tenant_groups.all %}
|
|
140
|
-
<li>{{ tenant_group|hyperlinked_object }}</li>
|
|
141
|
-
{% endfor %}
|
|
142
|
-
</ul>
|
|
143
|
-
{% else %}
|
|
144
|
-
<span class="text-muted">None</span>
|
|
145
|
-
{% endif %}
|
|
146
|
-
</td>
|
|
147
|
-
</tr>
|
|
148
|
-
<tr>
|
|
149
|
-
<td>Tenants</td>
|
|
150
|
-
<td>
|
|
151
|
-
{% if object.tenants.all %}
|
|
152
|
-
<ul>
|
|
153
|
-
{% for tenant in object.tenants.all %}
|
|
154
|
-
<li>{{ tenant|hyperlinked_object }}</li>
|
|
155
|
-
{% endfor %}
|
|
156
|
-
</ul>
|
|
157
|
-
{% else %}
|
|
158
|
-
<span class="text-muted">None</span>
|
|
159
|
-
{% endif %}
|
|
160
|
-
</td>
|
|
161
|
-
</tr>
|
|
162
|
-
<tr>
|
|
163
|
-
<td>Device Redundancy Groups</td>
|
|
164
|
-
<td>
|
|
165
|
-
{% if object.device_redundancy_groups.all %}
|
|
166
|
-
<ul>
|
|
167
|
-
{% for device_redundancy_group in object.device_redundancy_groups.all %}
|
|
168
|
-
<li>{{ device_redundancy_group|hyperlinked_object }}</li>
|
|
169
|
-
{% endfor %}
|
|
170
|
-
</ul>
|
|
171
|
-
{% else %}
|
|
172
|
-
<span class="text-muted">None</span>
|
|
173
|
-
{% endif %}
|
|
174
|
-
</td>
|
|
175
|
-
</tr>
|
|
176
|
-
<tr>
|
|
177
|
-
<td>Tags</td>
|
|
178
|
-
<td>
|
|
179
|
-
{% if object.tags.all %}
|
|
180
|
-
<ul>
|
|
181
|
-
{% for tag in object.tags.all %}
|
|
182
|
-
<li>{{ tag|hyperlinked_object }}</li>
|
|
183
|
-
{% endfor %}
|
|
184
|
-
</ul>
|
|
185
|
-
{% else %}
|
|
186
|
-
<span class="text-muted">None</span>
|
|
187
|
-
{% endif %}
|
|
188
|
-
</td>
|
|
189
|
-
</tr>
|
|
190
|
-
{% if settings.CONFIG_CONTEXT_DYNAMIC_GROUPS_ENABLED %}
|
|
191
|
-
<tr>
|
|
192
|
-
<td>Dynamic Groups</td>
|
|
193
|
-
<td>
|
|
194
|
-
{% if object.dynamic_groups.all %}
|
|
195
|
-
<ul>
|
|
196
|
-
{% for dynamic_group in object.dynamic_groups.all %}
|
|
197
|
-
<li>{{ dynamic_group|hyperlinked_object }}</li>
|
|
198
|
-
{% endfor %}
|
|
199
|
-
</ul>
|
|
200
|
-
{% else %}
|
|
201
|
-
<span class="text-muted">None</span>
|
|
202
|
-
{% endif %}
|
|
203
|
-
</td>
|
|
204
|
-
</tr>
|
|
205
|
-
{% endif %}
|
|
206
|
-
</table>
|
|
207
|
-
</div>
|
|
208
|
-
{% endblock content_right_page %}
|
|
209
|
-
|
|
210
|
-
{% block content_full_width_page %}
|
|
211
|
-
<div class="panel panel-default">
|
|
212
|
-
<div class="panel-heading">
|
|
213
|
-
<strong>Data</strong>
|
|
214
|
-
{% include 'extras/inc/json_format.html' %}
|
|
215
|
-
</div>
|
|
216
|
-
<div class="panel-body">
|
|
217
|
-
{% include 'extras/inc/json_data.html' with data=object.data format=format %}
|
|
218
|
-
</div>
|
|
219
|
-
</div>
|
|
220
|
-
{% endblock content_full_width_page %}
|
|
1
|
+
{% extends 'extras/configcontext_retrieve.html' %}
|
|
2
|
+
{% comment %}3.0 TODO: remove this template, which only exists for backward compatibility with 2.4 and earlier{% endcomment %}
|
|
@@ -1,50 +1,2 @@
|
|
|
1
|
-
{% extends '
|
|
2
|
-
{%
|
|
3
|
-
|
|
4
|
-
{% block form %}
|
|
5
|
-
<div class="panel panel-default">
|
|
6
|
-
<div class="panel-heading"><strong>Config Context</strong></div>
|
|
7
|
-
<div class="panel-body">
|
|
8
|
-
{% render_field form.name %}
|
|
9
|
-
{% render_field form.weight %}
|
|
10
|
-
{% render_field form.description %}
|
|
11
|
-
{% render_field form.config_context_schema %}
|
|
12
|
-
{% render_field form.is_active %}
|
|
13
|
-
</div>
|
|
14
|
-
</div>
|
|
15
|
-
<div class="panel panel-default">
|
|
16
|
-
<div class="panel-heading"><strong>Assignment</strong></div>
|
|
17
|
-
<div class="panel-body">
|
|
18
|
-
{% render_field form.locations %}
|
|
19
|
-
{% render_field form.roles %}
|
|
20
|
-
{% render_field form.device_types %}
|
|
21
|
-
{% render_field form.platforms %}
|
|
22
|
-
{% render_field form.cluster_groups %}
|
|
23
|
-
{% render_field form.clusters %}
|
|
24
|
-
{% render_field form.tenant_groups %}
|
|
25
|
-
{% render_field form.tenants %}
|
|
26
|
-
{% render_field form.device_redundancy_groups %}
|
|
27
|
-
{% render_field form.tags %}
|
|
28
|
-
{% if settings.CONFIG_CONTEXT_DYNAMIC_GROUPS_ENABLED %}
|
|
29
|
-
{% render_field form.dynamic_groups %}
|
|
30
|
-
{% endif %}
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
<div class="panel panel-default">
|
|
34
|
-
<div class="panel-heading"><strong>Data</strong></div>
|
|
35
|
-
<div class="panel-body">
|
|
36
|
-
{% render_field form.data %}
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
39
|
-
{% comment %}
|
|
40
|
-
We don't use 'inc/extras_features_edit_form_fields.html' because it would add a second,
|
|
41
|
-
and incorrect, "Tags" field to the form. Currently config-contexts don't support custom-fields or relationships,
|
|
42
|
-
but they do support notes.
|
|
43
|
-
{% endcomment %}
|
|
44
|
-
<div class="panel panel-default">
|
|
45
|
-
<div class="panel-heading"><strong>Notes</strong></div>
|
|
46
|
-
<div class="panel-body">
|
|
47
|
-
{% render_field form.object_note %}
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
{% endblock %}
|
|
1
|
+
{% extends 'extras/configcontext_update.html' %}
|
|
2
|
+
{% comment %}3.0 TODO: remove this template, which only exists for backward compatibility with 2.4 and earlier{% endcomment %}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{% extends 'generic/object_create.html' %}
|
|
2
|
+
{% load form_helpers %}
|
|
3
|
+
|
|
4
|
+
{% block form %}
|
|
5
|
+
<div class="panel panel-default">
|
|
6
|
+
<div class="panel-heading"><strong>Config Context</strong></div>
|
|
7
|
+
<div class="panel-body">
|
|
8
|
+
{% render_field form.name %}
|
|
9
|
+
{% render_field form.weight %}
|
|
10
|
+
{% render_field form.description %}
|
|
11
|
+
{% render_field form.config_context_schema %}
|
|
12
|
+
{% render_field form.is_active %}
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="panel panel-default">
|
|
16
|
+
<div class="panel-heading"><strong>Assignment</strong></div>
|
|
17
|
+
<div class="panel-body">
|
|
18
|
+
{% render_field form.locations %}
|
|
19
|
+
{% render_field form.roles %}
|
|
20
|
+
{% render_field form.device_types %}
|
|
21
|
+
{% render_field form.platforms %}
|
|
22
|
+
{% render_field form.cluster_groups %}
|
|
23
|
+
{% render_field form.clusters %}
|
|
24
|
+
{% render_field form.tenant_groups %}
|
|
25
|
+
{% render_field form.tenants %}
|
|
26
|
+
{% render_field form.device_redundancy_groups %}
|
|
27
|
+
{% render_field form.tags %}
|
|
28
|
+
{% if settings.CONFIG_CONTEXT_DYNAMIC_GROUPS_ENABLED %}
|
|
29
|
+
{% render_field form.dynamic_groups %}
|
|
30
|
+
{% endif %}
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="panel panel-default">
|
|
34
|
+
<div class="panel-heading"><strong>Data</strong></div>
|
|
35
|
+
<div class="panel-body">
|
|
36
|
+
{% render_field form.data %}
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
{% comment %}
|
|
40
|
+
We don't use 'inc/extras_features_edit_form_fields.html' because it would add a second,
|
|
41
|
+
and incorrect, "Tags" field to the form. Currently config-contexts don't support custom-fields or relationships,
|
|
42
|
+
but they do support notes.
|
|
43
|
+
{% endcomment %}
|
|
44
|
+
<div class="panel panel-default">
|
|
45
|
+
<div class="panel-heading"><strong>Notes</strong></div>
|
|
46
|
+
<div class="panel-body">
|
|
47
|
+
{% render_field form.object_note %}
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
{% endblock %}
|
|
@@ -1,48 +1,2 @@
|
|
|
1
|
-
{% extends '
|
|
2
|
-
{%
|
|
3
|
-
{% load plugins %}
|
|
4
|
-
{% load helpers %}
|
|
5
|
-
|
|
6
|
-
{% block extra_nav_tabs %}
|
|
7
|
-
<li role="presentation"{% if active_tab == 'validation' %} class="active"{% endif %}>
|
|
8
|
-
<a href="{% url 'extras:configcontextschema_object_validation' pk=object.pk %}">Validation</a>
|
|
9
|
-
</li>
|
|
10
|
-
{% endblock extra_nav_tabs %}
|
|
11
|
-
|
|
12
|
-
{% block content_left_page %}
|
|
13
|
-
<div class="panel panel-default">
|
|
14
|
-
<div class="panel-heading">
|
|
15
|
-
<strong>Config Context Schema</strong>
|
|
16
|
-
</div>
|
|
17
|
-
<table class="table table-hover panel-body attr-table">
|
|
18
|
-
<tr>
|
|
19
|
-
<td>Name</td>
|
|
20
|
-
<td>
|
|
21
|
-
{{ object.name }}
|
|
22
|
-
</td>
|
|
23
|
-
</tr>
|
|
24
|
-
{% if object.owner %}
|
|
25
|
-
<tr>
|
|
26
|
-
<td>Owner</td>
|
|
27
|
-
<td>{{ object.owner|hyperlinked_object }}</td>
|
|
28
|
-
</tr>
|
|
29
|
-
{% endif %}
|
|
30
|
-
<tr>
|
|
31
|
-
<td>Description</td>
|
|
32
|
-
<td>{{ object.description|placeholder }}</td>
|
|
33
|
-
</tr>
|
|
34
|
-
</table>
|
|
35
|
-
</div>
|
|
36
|
-
{% endblock content_left_page %}
|
|
37
|
-
|
|
38
|
-
{% block content_right_page %}
|
|
39
|
-
<div class="panel panel-default">
|
|
40
|
-
<div class="panel-heading">
|
|
41
|
-
<strong>Data Schema</strong>
|
|
42
|
-
{% include 'extras/inc/json_format.html' %}
|
|
43
|
-
</div>
|
|
44
|
-
<div class="panel-body">
|
|
45
|
-
{% include 'extras/inc/json_data.html' with data=object.data_schema format=format %}
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
{% endblock content_right_page %}
|
|
1
|
+
{% extends 'extras/configcontextschema_retrieve.html' %}
|
|
2
|
+
{% comment %}3.0 TODO: remove this template, which only exists for backward compatibility with 2.4 and earlier{% endcomment %}
|