nautobot 2.1.0__py3-none-any.whl → 2.1.1__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.
- nautobot/__init__.py +1 -3
- nautobot/apps/__init__.py +1 -2
- nautobot/apps/admin.py +0 -1
- nautobot/apps/api.py +0 -1
- nautobot/apps/change_logging.py +0 -1
- nautobot/apps/choices.py +0 -1
- nautobot/apps/datasources.py +0 -1
- nautobot/apps/exceptions.py +0 -1
- nautobot/apps/factory.py +0 -1
- nautobot/apps/filters.py +6 -9
- nautobot/apps/forms.py +1 -2
- nautobot/apps/graphql.py +0 -1
- nautobot/apps/jobs.py +0 -1
- nautobot/apps/models.py +1 -2
- nautobot/apps/querysets.py +0 -1
- nautobot/apps/secrets.py +0 -1
- nautobot/apps/tables.py +0 -1
- nautobot/apps/testing.py +0 -1
- nautobot/apps/ui.py +1 -3
- nautobot/apps/urls.py +0 -1
- nautobot/apps/utils.py +0 -1
- nautobot/apps/views.py +0 -1
- nautobot/circuits/api/serializers.py +1 -1
- nautobot/circuits/api/urls.py +1 -1
- nautobot/circuits/api/views.py +2 -1
- nautobot/circuits/apps.py +1 -1
- nautobot/circuits/choices.py +0 -1
- nautobot/circuits/factory.py +1 -1
- nautobot/circuits/filters.py +2 -1
- nautobot/circuits/forms.py +2 -2
- nautobot/circuits/homepage.py +0 -1
- nautobot/circuits/migrations/0001_initial_part_1.py +3 -1
- nautobot/circuits/migrations/0002_initial_part_2.py +2 -1
- nautobot/circuits/migrations/0003_auto_slug.py +1 -0
- nautobot/circuits/migrations/0005_providernetwork.py +4 -2
- nautobot/circuits/migrations/0013_alter_circuittermination__path.py +1 -0
- nautobot/circuits/migrations/0014_related_name_changes.py +1 -0
- nautobot/circuits/migrations/0016_tagsfield.py +1 -0
- nautobot/circuits/migrations/0018_status_nonnullable.py +1 -0
- nautobot/circuits/models.py +2 -2
- nautobot/circuits/navigation.py +0 -1
- nautobot/circuits/signals.py +3 -2
- nautobot/circuits/tables.py +1 -0
- nautobot/circuits/tests/integration/test_relationships.py +1 -1
- nautobot/circuits/tests/test_api.py +1 -1
- nautobot/circuits/tests/test_urls.py +1 -1
- nautobot/circuits/tests/test_views.py +1 -0
- nautobot/circuits/urls.py +1 -1
- nautobot/circuits/views.py +0 -2
- nautobot/core/__init__.py +0 -1
- nautobot/core/admin.py +3 -5
- nautobot/core/api/__init__.py +0 -1
- nautobot/core/api/metadata.py +4 -6
- nautobot/core/api/pagination.py +2 -2
- nautobot/core/api/parsers.py +1 -3
- nautobot/core/api/renderers.py +0 -1
- nautobot/core/api/schema.py +2 -3
- nautobot/core/api/serializers.py +9 -7
- nautobot/core/api/urls.py +1 -5
- nautobot/core/api/utils.py +4 -6
- nautobot/core/api/versioning.py +1 -1
- nautobot/core/api/views.py +22 -91
- nautobot/core/apps/__init__.py +5 -7
- nautobot/core/authentication.py +1 -1
- nautobot/core/celery/__init__.py +1 -2
- nautobot/core/celery/control.py +0 -2
- nautobot/core/celery/encoders.py +0 -1
- nautobot/core/celery/schedulers.py +1 -2
- nautobot/core/celery/task.py +1 -1
- nautobot/core/checks.py +1 -2
- nautobot/core/choices.py +2 -2
- nautobot/core/cli/__init__.py +2 -3
- nautobot/core/context_processors.py +1 -5
- nautobot/core/factory.py +2 -2
- nautobot/core/filters.py +1 -1
- nautobot/core/forms/fields.py +2 -4
- nautobot/core/forms/forms.py +1 -1
- nautobot/core/forms/search.py +1 -1
- nautobot/core/forms/utils.py +1 -1
- nautobot/core/graphql/__init__.py +2 -3
- nautobot/core/graphql/generators.py +1 -1
- nautobot/core/graphql/schema.py +6 -7
- nautobot/core/graphql/schema_init.py +0 -1
- nautobot/core/graphql/utils.py +1 -2
- nautobot/core/management/commands/generate_test_data.py +4 -6
- nautobot/core/management/commands/makemigrations.py +1 -1
- nautobot/core/management/commands/migrate.py +1 -1
- nautobot/core/management/commands/post_upgrade.py +0 -15
- nautobot/core/management/commands/refresh_content_type_cache.py +1 -2
- nautobot/core/management/commands/send_installation_metrics.py +2 -3
- nautobot/core/management/commands/validate_models.py +1 -1
- nautobot/core/middleware.py +2 -2
- nautobot/core/models/__init__.py +12 -12
- nautobot/core/models/fields.py +1 -1
- nautobot/core/models/generics.py +2 -3
- nautobot/core/models/managers.py +0 -1
- nautobot/core/models/name_color_content_types.py +2 -2
- nautobot/core/models/tree_queries.py +2 -4
- nautobot/core/models/validators.py +1 -1
- nautobot/core/releases.py +1 -1
- nautobot/core/runner/importer.py +2 -25
- nautobot/core/runner/runner.py +2 -2
- nautobot/core/runner/settings.py +1 -1
- nautobot/core/settings.py +9 -22
- nautobot/core/settings_funcs.py +1 -2
- nautobot/core/signals.py +0 -1
- nautobot/core/tables.py +1 -1
- nautobot/core/templates/graphene/graphiql.html +7 -1
- nautobot/core/templates/inc/footer.html +0 -7
- nautobot/core/templates/nautobot_config.py.j2 +0 -4
- nautobot/core/templatetags/bootstrapped_goodies_tags.py +6 -3
- nautobot/core/templatetags/buttons.py +1 -1
- nautobot/core/templatetags/helpers.py +5 -16
- nautobot/core/testing/__init__.py +1 -2
- nautobot/core/testing/api.py +2 -4
- nautobot/core/testing/filters.py +1 -1
- nautobot/core/testing/integration.py +2 -2
- nautobot/core/testing/migrations.py +1 -0
- nautobot/core/testing/mixins.py +1 -2
- nautobot/core/testing/schema.py +1 -1
- nautobot/core/testing/utils.py +3 -3
- nautobot/core/testing/views.py +4 -7
- nautobot/core/tests/integration/test_plugin_home.py +2 -1
- nautobot/core/tests/integration/test_plugin_navbar.py +1 -1
- nautobot/core/tests/nautobot_config.py +3 -3
- nautobot/core/tests/runner.py +3 -4
- nautobot/core/tests/test_api.py +6 -51
- nautobot/core/tests/test_authentication.py +2 -3
- nautobot/core/tests/test_checks.py +1 -2
- nautobot/core/tests/test_config.py +1 -1
- nautobot/core/tests/test_csv.py +3 -3
- nautobot/core/tests/test_factory.py +1 -3
- nautobot/core/tests/test_filters.py +3 -7
- nautobot/core/tests/test_forms.py +3 -6
- nautobot/core/tests/test_graphql.py +13 -14
- nautobot/core/tests/test_jinja_filters.py +4 -4
- nautobot/core/tests/test_jobs.py +1 -1
- nautobot/core/tests/test_models.py +1 -2
- nautobot/core/tests/test_navigations.py +2 -1
- nautobot/core/tests/test_openapi.py +0 -1
- nautobot/core/tests/test_paginator.py +2 -2
- nautobot/core/tests/test_releases.py +2 -2
- nautobot/core/tests/test_tables.py +1 -1
- nautobot/core/tests/test_templatetags_helpers.py +3 -2
- nautobot/core/tests/test_templatetags_netutils.py +1 -2
- nautobot/core/tests/test_utils.py +4 -8
- nautobot/core/tests/test_views.py +5 -2
- nautobot/core/tests/test_views_utils.py +0 -1
- nautobot/core/urls.py +4 -4
- nautobot/core/utils/color.py +1 -1
- nautobot/core/utils/data.py +1 -2
- nautobot/core/utils/filtering.py +4 -5
- nautobot/core/utils/git.py +3 -2
- nautobot/core/utils/logging.py +2 -1
- nautobot/core/utils/migrations.py +1 -0
- nautobot/core/utils/permissions.py +2 -4
- nautobot/core/views/__init__.py +5 -5
- nautobot/core/views/generic.py +4 -4
- nautobot/core/views/mixins.py +11 -12
- nautobot/core/views/renderers.py +1 -1
- nautobot/core/views/utils.py +2 -1
- nautobot/dcim/api/urls.py +1 -1
- nautobot/dcim/api/views.py +6 -5
- nautobot/dcim/apps.py +1 -1
- nautobot/dcim/choices.py +0 -1
- nautobot/dcim/constants.py +0 -1
- nautobot/dcim/elevations.py +1 -2
- nautobot/dcim/factory.py +10 -13
- nautobot/dcim/fields.py +1 -0
- nautobot/dcim/filters/__init__.py +2 -3
- nautobot/dcim/filters/mixins.py +1 -1
- nautobot/dcim/forms.py +10 -12
- nautobot/dcim/graphql/types.py +16 -17
- nautobot/dcim/migrations/0001_initial_part_1.py +4 -2
- nautobot/dcim/migrations/0002_initial_part_2.py +2 -1
- nautobot/dcim/migrations/0003_initial_part_3.py +2 -1
- nautobot/dcim/migrations/0004_initial_part_4.py +2 -1
- nautobot/dcim/migrations/0006_auto_slug.py +1 -0
- nautobot/dcim/migrations/0009_add_natural_indexing.py +1 -0
- nautobot/dcim/migrations/0010_interface_status.py +1 -0
- nautobot/dcim/migrations/0011_interface_status_data_migration.py +1 -0
- nautobot/dcim/migrations/0013_location_location_type.py +4 -2
- nautobot/dcim/migrations/0014_location_status_data_migration.py +1 -0
- nautobot/dcim/migrations/0016_device_components__timestamp_data_migration.py +0 -1
- nautobot/dcim/migrations/0018_device_redundancy_group.py +4 -2
- nautobot/dcim/migrations/0019_device_redundancy_group_data_migration.py +1 -0
- nautobot/dcim/migrations/0022_interface_redundancy_group.py +3 -1
- nautobot/dcim/migrations/0023_interface_redundancy_group_data_migration.py +1 -0
- nautobot/dcim/migrations/0024_move_site_fields_to_location_model.py +2 -1
- nautobot/dcim/migrations/0027_alter_interface_mac_address.py +1 -0
- nautobot/dcim/migrations/0028_alter_device_and_rack_role_add_new_role.py +1 -0
- nautobot/dcim/migrations/0029_device_and_rack_roles_data_migrations.py +1 -0
- nautobot/dcim/migrations/0033_add_tree_managers_and_foreign_keys_pre_data_migration.py +1 -0
- nautobot/dcim/migrations/0034_migrate_region_and_site_data_to_locations.py +1 -2
- nautobot/dcim/migrations/0038_fixup_fks_and_related_names.py +1 -0
- nautobot/dcim/migrations/0039_related_name_changes.py +1 -0
- nautobot/dcim/migrations/0042_alter_location_managers.py +1 -0
- nautobot/dcim/migrations/0044_tagsfield.py +1 -0
- nautobot/dcim/migrations/0047_status_nonnullable.py +1 -0
- nautobot/dcim/migrations/0051_interface_redundancy_group_nullable_status.py +1 -0
- nautobot/dcim/models/cables.py +3 -3
- nautobot/dcim/models/device_component_templates.py +6 -6
- nautobot/dcim/models/devices.py +9 -4
- nautobot/dcim/models/locations.py +6 -1
- nautobot/dcim/models/power.py +1 -1
- nautobot/dcim/models/racks.py +5 -4
- nautobot/dcim/navigation.py +0 -1
- nautobot/dcim/signals.py +3 -2
- nautobot/dcim/tables/__init__.py +5 -4
- nautobot/dcim/tables/cables.py +1 -0
- nautobot/dcim/tables/devices.py +1 -0
- nautobot/dcim/tables/power.py +1 -0
- nautobot/dcim/tables/racks.py +2 -1
- nautobot/dcim/tests/test_api.py +5 -7
- nautobot/dcim/tests/test_cablepaths.py +0 -1
- nautobot/dcim/tests/test_filters.py +14 -12
- nautobot/dcim/tests/test_forms.py +2 -3
- nautobot/dcim/tests/test_migrations.py +2 -2
- nautobot/dcim/tests/test_models.py +2 -2
- nautobot/dcim/tests/test_views.py +7 -8
- nautobot/dcim/urls.py +3 -2
- nautobot/dcim/utils.py +1 -1
- nautobot/dcim/views.py +4 -3
- nautobot/extras/admin.py +2 -1
- nautobot/extras/api/customfields.py +0 -2
- nautobot/extras/api/mixins.py +0 -1
- nautobot/extras/api/serializers.py +4 -4
- nautobot/extras/api/urls.py +1 -1
- nautobot/extras/api/views.py +1 -1
- nautobot/extras/apps.py +3 -4
- nautobot/extras/choices.py +3 -4
- nautobot/extras/context_managers.py +1 -1
- nautobot/extras/datasources/__init__.py +1 -1
- nautobot/extras/datasources/git.py +6 -6
- nautobot/extras/datasources/utils.py +0 -1
- nautobot/extras/factory.py +1 -1
- nautobot/extras/filters/__init__.py +2 -3
- nautobot/extras/filters/customfields.py +0 -1
- nautobot/extras/filters/mixins.py +1 -1
- nautobot/extras/forms/__init__.py +3 -4
- nautobot/extras/forms/base.py +1 -1
- nautobot/extras/forms/forms.py +3 -3
- nautobot/extras/forms/mixins.py +1 -1
- nautobot/extras/graphql/types.py +2 -2
- nautobot/extras/health_checks.py +1 -1
- nautobot/extras/jobs.py +1 -2
- nautobot/extras/management/__init__.py +0 -1
- nautobot/extras/management/commands/refresh_dynamic_group_member_caches.py +1 -1
- nautobot/extras/management/commands/runjob.py +3 -3
- nautobot/extras/management/commands/webhook_receiver.py +1 -2
- nautobot/extras/migrations/0001_initial_part_1.py +2 -1
- nautobot/extras/migrations/0002_initial_part_2.py +2 -1
- nautobot/extras/migrations/0003_initial_part_3.py +1 -0
- nautobot/extras/migrations/0006_graphqlquery.py +2 -1
- nautobot/extras/migrations/0007_configcontextschema.py +3 -1
- nautobot/extras/migrations/0009_computedfield.py +3 -1
- nautobot/extras/migrations/0011_fileattachment_fileproxy.py +3 -1
- nautobot/extras/migrations/0012_healthchecktestmodel.py +2 -1
- nautobot/extras/migrations/0014_auto_slug.py +1 -0
- nautobot/extras/migrations/0015_scheduled_job.py +3 -1
- nautobot/extras/migrations/0016_secret.py +4 -2
- nautobot/extras/migrations/0017_joblogentry.py +2 -1
- nautobot/extras/migrations/0018_joblog_data_migration.py +2 -1
- nautobot/extras/migrations/0021_customfield_changelog_data.py +3 -2
- nautobot/extras/migrations/0022_objectchange_object_datav2.py +1 -0
- nautobot/extras/migrations/0023_job_model.py +4 -2
- nautobot/extras/migrations/0026_job_add_gitrepository_fk.py +1 -0
- nautobot/extras/migrations/0029_dynamicgroup.py +3 -1
- nautobot/extras/migrations/0031_tag_content_types.py +1 -0
- nautobot/extras/migrations/0032_tag_content_types_data_migration.py +1 -0
- nautobot/extras/migrations/0040_dynamicgroup__dynamicgroupmembership.py +2 -1
- nautobot/extras/migrations/0041_jobresult_job_kwargs.py +1 -0
- nautobot/extras/migrations/0043_note.py +3 -1
- nautobot/extras/migrations/0044_add_job_hook.py +3 -1
- nautobot/extras/migrations/0046_populate_custom_field_slug_label.py +1 -0
- nautobot/extras/migrations/0047_enforce_custom_field_slug.py +1 -0
- nautobot/extras/migrations/0051_add_job_task_queues.py +1 -0
- nautobot/extras/migrations/0055_configcontext_dynamic_groups.py +1 -0
- nautobot/extras/migrations/0057_jobbutton.py +3 -1
- nautobot/extras/migrations/0065_configcontext_data_migrations.py +1 -0
- nautobot/extras/migrations/0067_migrate_job_result_status.py +0 -1
- nautobot/extras/migrations/0068_jobresult__add_celery_fields.py +1 -0
- nautobot/extras/migrations/0071_replace_related_names.py +1 -0
- nautobot/extras/migrations/0077_migrate_custom_field_data.py +1 -0
- nautobot/extras/migrations/0078_remove_name_field_and_make_label_field_non_nullable.py +1 -0
- nautobot/extras/migrations/0080_tagsfield.py +1 -0
- nautobot/extras/migrations/0082_rename_relationship_name_to_label.py +1 -0
- nautobot/extras/migrations/0083_ensure_relationship_keys_are_unique.py +1 -0
- nautobot/extras/migrations/0090_joblogentry__log_level_data_migration.py +0 -1
- nautobot/extras/migrations/0095_ensure_note_timestamps_are_unique.py +4 -5
- nautobot/extras/migrations/0097_alter_job_result_remove_result.py +1 -0
- nautobot/extras/migrations/0100_fileproxy_job_result.py +1 -0
- nautobot/extras/migrations/0101_externalintegration.py +3 -1
- nautobot/extras/models/__init__.py +2 -3
- nautobot/extras/models/change_logging.py +0 -1
- nautobot/extras/models/customfields.py +4 -4
- nautobot/extras/models/datasources.py +2 -2
- nautobot/extras/models/groups.py +3 -4
- nautobot/extras/models/jobs.py +12 -6
- nautobot/extras/models/models.py +2 -2
- nautobot/extras/models/relationships.py +3 -4
- nautobot/extras/models/roles.py +1 -1
- nautobot/extras/models/secrets.py +1 -3
- nautobot/extras/models/tags.py +0 -1
- nautobot/extras/navigation.py +0 -1
- nautobot/extras/plugins/__init__.py +6 -7
- nautobot/extras/plugins/tables.py +0 -1
- nautobot/extras/plugins/utils.py +1 -1
- nautobot/extras/plugins/views.py +1 -2
- nautobot/extras/querysets.py +3 -3
- nautobot/extras/signals.py +6 -7
- nautobot/extras/tables.py +4 -4
- nautobot/extras/tasks.py +1 -2
- nautobot/extras/templates/extras/configcontext_edit.html +1 -1
- nautobot/extras/templates/extras/graphqlquery.html +4 -2
- nautobot/extras/templates/extras/secretsgroup_edit.html +40 -45
- nautobot/extras/templatetags/custom_links.py +2 -3
- nautobot/extras/templatetags/job_buttons.py +2 -3
- nautobot/extras/templatetags/log_levels.py +0 -1
- nautobot/extras/templatetags/plugins.py +1 -1
- nautobot/extras/test_jobs/api_test_job.py +1 -2
- nautobot/extras/test_jobs/atomic_transaction.py +1 -2
- nautobot/extras/test_jobs/dry_run.py +1 -2
- nautobot/extras/test_jobs/fail.py +1 -2
- nautobot/extras/test_jobs/field_order.py +1 -1
- nautobot/extras/test_jobs/file_upload_fail.py +1 -2
- nautobot/extras/test_jobs/file_upload_pass.py +1 -2
- nautobot/extras/test_jobs/has_sensitive_variables.py +1 -2
- nautobot/extras/test_jobs/ipaddress_vars.py +1 -4
- nautobot/extras/test_jobs/job_button_receiver.py +1 -2
- nautobot/extras/test_jobs/job_hook_receiver.py +1 -2
- nautobot/extras/test_jobs/job_variables.py +1 -2
- nautobot/extras/test_jobs/location_with_custom_field.py +1 -2
- nautobot/extras/test_jobs/log_redaction.py +1 -2
- nautobot/extras/test_jobs/log_skip_db_logging.py +1 -2
- nautobot/extras/test_jobs/modify_db.py +1 -2
- nautobot/extras/test_jobs/object_var_optional.py +1 -2
- nautobot/extras/test_jobs/object_var_required.py +1 -2
- nautobot/extras/test_jobs/object_vars.py +1 -2
- nautobot/extras/test_jobs/pass.py +1 -2
- nautobot/extras/test_jobs/profiling.py +1 -2
- nautobot/extras/tests/integration/__init__.py +1 -1
- nautobot/extras/tests/integration/test_plugins.py +5 -4
- nautobot/extras/tests/integration/test_tagfilter.py +1 -1
- nautobot/extras/tests/test_api.py +7 -9
- nautobot/extras/tests/test_changelog.py +3 -2
- nautobot/extras/tests/test_context_managers.py +6 -3
- nautobot/extras/tests/test_customfields.py +2 -2
- nautobot/extras/tests/test_datasources.py +1 -1
- nautobot/extras/tests/test_dynamicgroups.py +2 -3
- nautobot/extras/tests/test_filters.py +2 -2
- nautobot/extras/tests/test_forms.py +5 -6
- nautobot/extras/tests/test_git.py +1 -1
- nautobot/extras/tests/test_job_variables.py +0 -1
- nautobot/extras/tests/test_jobs.py +5 -5
- nautobot/extras/tests/test_models.py +2 -2
- nautobot/extras/tests/test_notes.py +0 -1
- nautobot/extras/tests/test_plugins.py +8 -9
- nautobot/extras/tests/test_relationships.py +3 -3
- nautobot/extras/tests/test_tags.py +1 -1
- nautobot/extras/tests/test_views.py +8 -9
- nautobot/extras/tests/test_webhooks.py +4 -5
- nautobot/extras/utils.py +11 -9
- nautobot/extras/views.py +3 -3
- nautobot/generate_secret_key.py +1 -1
- nautobot/ipam/api/serializers.py +1 -2
- nautobot/ipam/api/urls.py +1 -1
- nautobot/ipam/api/views.py +1 -0
- nautobot/ipam/apps.py +2 -1
- nautobot/ipam/factory.py +6 -9
- nautobot/ipam/fields.py +1 -1
- nautobot/ipam/filters.py +4 -3
- nautobot/ipam/formfields.py +1 -2
- nautobot/ipam/forms.py +4 -3
- nautobot/ipam/graphql/types.py +1 -1
- nautobot/ipam/homepage.py +0 -1
- nautobot/ipam/lookups.py +2 -3
- nautobot/ipam/migrations/0002_initial_part_2.py +2 -1
- nautobot/ipam/migrations/0003_remove_max_length.py +1 -0
- nautobot/ipam/migrations/0004_fixup_p2p_broadcast.py +0 -1
- nautobot/ipam/migrations/0005_auto_slug.py +1 -0
- nautobot/ipam/migrations/0010_alter_ipam_role_add_new_role.py +1 -0
- nautobot/ipam/migrations/0011_migrate_ipam_role_data.py +1 -0
- nautobot/ipam/migrations/0020_related_name_changes.py +1 -0
- nautobot/ipam/migrations/0022_aggregate_to_prefix_data_migration.py +1 -2
- nautobot/ipam/migrations/0024_interface_to_ipaddress_m2m.py +2 -1
- nautobot/ipam/migrations/0025_interface_ipaddress_m2m_data_migration.py +1 -0
- nautobot/ipam/migrations/0028_tagsfield.py +1 -0
- nautobot/ipam/migrations/0030_ipam__namespaces.py +3 -1
- nautobot/ipam/migrations/0034_status_nonnullable.py +1 -0
- nautobot/ipam/migrations/0037_data_migration_vlan_group_name_uniqueness.py +0 -1
- nautobot/ipam/models.py +7 -7
- nautobot/ipam/navigation.py +0 -1
- nautobot/ipam/querysets.py +2 -2
- nautobot/ipam/tables.py +4 -3
- nautobot/ipam/tests/test_api.py +2 -2
- nautobot/ipam/tests/test_filters.py +7 -7
- nautobot/ipam/tests/test_migrations.py +1 -2
- nautobot/ipam/tests/test_models.py +2 -2
- nautobot/ipam/tests/test_ordering.py +1 -1
- nautobot/ipam/tests/test_querysets.py +2 -2
- nautobot/ipam/tests/test_views.py +6 -6
- nautobot/ipam/urls.py +1 -0
- nautobot/ipam/utils/migrations.py +0 -1
- nautobot/ipam/views.py +6 -6
- nautobot/project-static/docs/404.html +1 -43
- nautobot/project-static/docs/apps/index.html +1 -43
- nautobot/project-static/docs/apps/nautobot-apps.html +1 -43
- nautobot/project-static/docs/code-reference/nautobot/apps/__init__.html +389 -431
- nautobot/project-static/docs/code-reference/nautobot/apps/admin.html +12 -54
- nautobot/project-static/docs/code-reference/nautobot/apps/api.html +2452 -2486
- nautobot/project-static/docs/code-reference/nautobot/apps/change_logging.html +1 -43
- nautobot/project-static/docs/code-reference/nautobot/apps/choices.html +90 -132
- nautobot/project-static/docs/code-reference/nautobot/apps/config.html +1 -43
- nautobot/project-static/docs/code-reference/nautobot/apps/datasources.html +1 -43
- nautobot/project-static/docs/code-reference/nautobot/apps/exceptions.html +1 -43
- nautobot/project-static/docs/code-reference/nautobot/apps/factory.html +1 -43
- nautobot/project-static/docs/code-reference/nautobot/apps/filters.html +26 -68
- nautobot/project-static/docs/code-reference/nautobot/apps/forms.html +993 -1035
- nautobot/project-static/docs/code-reference/nautobot/apps/graphql.html +170 -212
- nautobot/project-static/docs/code-reference/nautobot/apps/jobs.html +1789 -1831
- nautobot/project-static/docs/code-reference/nautobot/apps/models.html +961 -1003
- nautobot/project-static/docs/code-reference/nautobot/apps/querysets.html +1 -43
- nautobot/project-static/docs/code-reference/nautobot/apps/secrets.html +1 -43
- nautobot/project-static/docs/code-reference/nautobot/apps/tables.html +2 -44
- nautobot/project-static/docs/code-reference/nautobot/apps/testing.html +6904 -6946
- nautobot/project-static/docs/code-reference/nautobot/apps/ui.html +974 -1016
- nautobot/project-static/docs/code-reference/nautobot/apps/urls.html +1 -43
- nautobot/project-static/docs/code-reference/nautobot/apps/utils.html +1159 -1197
- nautobot/project-static/docs/code-reference/nautobot/apps/views.html +1796 -1832
- nautobot/project-static/docs/development/apps/api/configuration-view.html +1 -43
- nautobot/project-static/docs/development/apps/api/database-backend-config.html +1 -43
- nautobot/project-static/docs/development/apps/api/models/django-admin.html +1 -43
- nautobot/project-static/docs/development/apps/api/models/global-search.html +1 -43
- nautobot/project-static/docs/development/apps/api/models/graphql.html +1 -43
- nautobot/project-static/docs/development/apps/api/models/index.html +1 -43
- nautobot/project-static/docs/development/apps/api/nautobot-app-config.html +1 -43
- nautobot/project-static/docs/development/apps/api/platform-features/custom-validators.html +1 -43
- nautobot/project-static/docs/development/apps/api/platform-features/filter-extensions.html +1 -43
- nautobot/project-static/docs/development/apps/api/platform-features/git-repository-content.html +1 -43
- nautobot/project-static/docs/development/apps/api/platform-features/index.html +3 -45
- nautobot/project-static/docs/development/apps/api/platform-features/jinja2-filters.html +1 -43
- nautobot/project-static/docs/development/apps/api/platform-features/jobs.html +1 -43
- nautobot/project-static/docs/development/apps/api/platform-features/populating-extensibility-features.html +5 -43
- nautobot/project-static/docs/development/apps/api/platform-features/secrets-providers.html +1 -43
- nautobot/project-static/docs/development/apps/api/platform-features/uniquely-identify-objects.html +1 -43
- nautobot/project-static/docs/development/apps/api/prometheus.html +1 -43
- nautobot/project-static/docs/development/apps/api/setup.html +1 -43
- nautobot/project-static/docs/development/apps/api/testing.html +1 -43
- nautobot/project-static/docs/development/apps/api/ui-extensions/banners.html +1 -43
- nautobot/project-static/docs/development/apps/api/ui-extensions/home-page.html +1 -43
- nautobot/project-static/docs/development/apps/api/ui-extensions/index.html +1 -43
- nautobot/project-static/docs/development/apps/api/ui-extensions/navigation.html +1 -43
- nautobot/project-static/docs/development/apps/api/ui-extensions/object-detail-views.html +1 -43
- nautobot/project-static/docs/development/apps/api/views/base-template.html +1 -43
- nautobot/project-static/docs/development/apps/api/views/core-view-overrides.html +6 -48
- nautobot/project-static/docs/development/apps/api/views/django-generic-views.html +1 -43
- nautobot/project-static/docs/development/apps/api/views/help-documentation.html +1 -43
- nautobot/project-static/docs/development/apps/api/views/index.html +1 -43
- nautobot/project-static/docs/development/apps/api/views/nautobot-generic-views.html +1 -43
- nautobot/project-static/docs/development/apps/api/views/nautobotuiviewset.html +1 -43
- nautobot/project-static/docs/development/apps/api/views/nautobotuiviewsetrouter.html +1 -43
- nautobot/project-static/docs/development/apps/api/views/notes.html +3 -45
- nautobot/project-static/docs/development/apps/api/views/rest-api.html +1 -43
- nautobot/project-static/docs/development/apps/api/views/urls.html +1 -43
- nautobot/project-static/docs/development/apps/api/views/view-overrides.html +13 -5357
- nautobot/project-static/docs/development/apps/index.html +1 -43
- nautobot/project-static/docs/development/apps/migration/code-updates.html +1 -43
- nautobot/project-static/docs/development/apps/migration/dependency-updates.html +1 -43
- nautobot/project-static/docs/development/apps/migration/from-v1.html +1 -44
- nautobot/project-static/docs/development/apps/migration/model-updates/dcim.html +1 -43
- nautobot/project-static/docs/development/apps/migration/model-updates/extras.html +1 -43
- nautobot/project-static/docs/development/apps/migration/model-updates/global.html +1 -43
- nautobot/project-static/docs/development/apps/migration/model-updates/ipam.html +1 -43
- nautobot/project-static/docs/development/apps/porting-from-netbox.html +1 -43
- nautobot/project-static/docs/development/core/application-registry.html +1 -43
- nautobot/project-static/docs/development/core/best-practices.html +1 -43
- nautobot/project-static/docs/development/core/bootstrap-ui.html +1 -43
- nautobot/project-static/docs/development/core/docker-compose-advanced-use-cases.html +1 -43
- nautobot/project-static/docs/development/core/extending-models.html +1 -43
- nautobot/project-static/docs/development/core/generic-views.html +1 -43
- nautobot/project-static/docs/development/core/getting-started.html +108 -257
- nautobot/project-static/docs/development/core/homepage.html +1 -43
- nautobot/project-static/docs/development/core/index.html +1 -43
- nautobot/project-static/docs/development/core/model-features.html +1 -43
- nautobot/project-static/docs/development/core/natural-keys.html +1 -43
- nautobot/project-static/docs/development/core/navigation-menu.html +1 -43
- nautobot/project-static/docs/development/core/react-ui.html +13 -5640
- nautobot/project-static/docs/development/core/release-checklist.html +4 -52
- nautobot/project-static/docs/development/core/role-internals.html +4 -46
- nautobot/project-static/docs/development/core/style-guide.html +61 -102
- nautobot/project-static/docs/development/core/templates.html +4 -46
- nautobot/project-static/docs/development/core/testing.html +1 -43
- nautobot/project-static/docs/development/core/user-preferences.html +1 -43
- nautobot/project-static/docs/development/index.html +1 -43
- nautobot/project-static/docs/development/jobs/index.html +1 -43
- nautobot/project-static/docs/development/jobs/migration/from-v1.html +1 -43
- nautobot/project-static/docs/development/react-ui.html +3 -3
- nautobot/project-static/docs/index.html +2 -47
- nautobot/project-static/docs/release-notes/index.html +1 -43
- nautobot/project-static/docs/release-notes/version-1.0.html +1 -43
- nautobot/project-static/docs/release-notes/version-1.1.html +1 -43
- nautobot/project-static/docs/release-notes/version-1.2.html +1 -43
- nautobot/project-static/docs/release-notes/version-1.3.html +1 -43
- nautobot/project-static/docs/release-notes/version-1.4.html +1 -43
- nautobot/project-static/docs/release-notes/version-1.5.html +1 -43
- nautobot/project-static/docs/release-notes/version-1.6.html +1 -43
- nautobot/project-static/docs/release-notes/version-2.0.html +1 -43
- nautobot/project-static/docs/release-notes/version-2.1.html +189 -77
- nautobot/project-static/docs/search/search_index.json +1 -1
- nautobot/project-static/docs/sitemap.xml +236 -251
- nautobot/project-static/docs/sitemap.xml.gz +0 -0
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/ldap.html +1 -43
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/remote.html +4 -46
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/sso.html +1 -43
- nautobot/project-static/docs/user-guide/administration/configuration/index.html +1 -43
- nautobot/project-static/docs/user-guide/administration/configuration/node-configuration.html +13 -5389
- nautobot/project-static/docs/user-guide/administration/configuration/optional-settings.html +1 -65
- nautobot/project-static/docs/user-guide/administration/configuration/required-settings.html +1 -43
- nautobot/project-static/docs/user-guide/administration/guides/caching.html +1 -43
- nautobot/project-static/docs/user-guide/administration/guides/celery-queues.html +1 -43
- nautobot/project-static/docs/user-guide/administration/guides/healthcheck.html +1 -43
- nautobot/project-static/docs/user-guide/administration/guides/permissions.html +1 -43
- nautobot/project-static/docs/user-guide/administration/guides/prometheus-metrics.html +1 -43
- nautobot/project-static/docs/user-guide/administration/guides/replicating-nautobot.html +1 -43
- nautobot/project-static/docs/user-guide/administration/guides/s3-django-storage.html +1 -43
- nautobot/project-static/docs/user-guide/administration/installation/app-install.html +1 -43
- nautobot/project-static/docs/user-guide/administration/installation/docker.html +1 -43
- nautobot/project-static/docs/user-guide/administration/installation/external-authentication.html +1 -43
- nautobot/project-static/docs/user-guide/administration/installation/http-server.html +1 -43
- nautobot/project-static/docs/user-guide/administration/installation/index.html +1 -64
- nautobot/project-static/docs/user-guide/administration/installation/install_system.html +2 -57
- nautobot/project-static/docs/user-guide/administration/installation/nautobot.html +5 -94
- nautobot/project-static/docs/user-guide/administration/installation/selinux-troubleshooting.html +1 -43
- nautobot/project-static/docs/user-guide/administration/installation/services.html +1 -43
- nautobot/project-static/docs/user-guide/administration/migration/migrating-from-netbox.html +1 -43
- nautobot/project-static/docs/user-guide/administration/migration/migrating-from-postgresql.html +1 -43
- nautobot/project-static/docs/user-guide/administration/tools/nautobot-server.html +76 -137
- nautobot/project-static/docs/user-guide/administration/tools/nautobot-shell.html +1 -43
- nautobot/project-static/docs/user-guide/administration/upgrading/database-backup.html +1 -43
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/after-you-upgrade.html +1 -43
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/before-you-upgrade.html +1 -43
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/for-developers.html +1 -43
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/index.html +1 -43
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/whats-changed.html +1 -43
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/region-and-site-data-migration-guide.html +1 -43
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/upgrading-from-nautobot-v1.html +1 -43
- nautobot/project-static/docs/user-guide/administration/upgrading/upgrading.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuit.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuittermination.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuittype.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/circuits/provider.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/circuits/providernetwork.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/dcim/cable.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleport.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleporttemplate.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverport.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverporttemplate.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/dcim/device.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebay.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebaytemplate.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/dcim/deviceredundancygroup.html +2 -44
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicetype.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/dcim/frontport.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/dcim/frontporttemplate.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interface.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interfaceredundancygroup.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interfacetemplate.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/dcim/inventoryitem.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/dcim/location.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/dcim/locationtype.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/dcim/manufacturer.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/dcim/platform.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerfeed.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlet.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlettemplate.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerpanel.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerport.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerporttemplate.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rack.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rackgroup.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rackreservation.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rearport.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rearporttemplate.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/dcim/virtualchassis.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/extras/configcontext.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/extras/configcontextschema.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/ipam/ipaddress.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/ipam/namespace.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/ipam/prefix.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/ipam/rir.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/ipam/routetarget.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/ipam/service.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vlan.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vlangroup.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vrf.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/tenancy/tenant.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/tenancy/tenantgroup.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/cluster.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/clustergroup.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/clustertype.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/virtualmachine.html +1 -43
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/vminterface.html +1 -43
- nautobot/project-static/docs/user-guide/feature-guides/custom-fields.html +1 -43
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/creating-devices.html +1 -43
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/creating-location-types-and-locations.html +1 -43
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/index.html +1 -43
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/interfaces.html +1 -43
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/ipam.html +1 -43
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/platforms.html +1 -43
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/search-bar.html +1 -43
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/tenants.html +1 -43
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/vlans-and-vlan-groups.html +1 -43
- nautobot/project-static/docs/user-guide/feature-guides/git-data-source.html +1 -43
- nautobot/project-static/docs/user-guide/feature-guides/graphql.html +23 -79
- nautobot/project-static/docs/user-guide/feature-guides/ip-address-merge-tool.html +1 -43
- nautobot/project-static/docs/user-guide/feature-guides/relationships.html +1 -43
- nautobot/project-static/docs/user-guide/index.html +1 -43
- nautobot/project-static/docs/user-guide/platform-functionality/change-logging.html +1 -43
- nautobot/project-static/docs/user-guide/platform-functionality/computedfield.html +1 -43
- nautobot/project-static/docs/user-guide/platform-functionality/customfield.html +1 -43
- nautobot/project-static/docs/user-guide/platform-functionality/customlink.html +1 -43
- nautobot/project-static/docs/user-guide/platform-functionality/dynamicgroup.html +1 -43
- nautobot/project-static/docs/user-guide/platform-functionality/exporttemplate.html +1 -43
- nautobot/project-static/docs/user-guide/platform-functionality/externalintegration.html +1 -43
- nautobot/project-static/docs/user-guide/platform-functionality/gitrepository.html +1 -43
- nautobot/project-static/docs/user-guide/platform-functionality/graphql.html +1 -43
- nautobot/project-static/docs/user-guide/platform-functionality/graphqlquery.html +1 -43
- nautobot/project-static/docs/user-guide/platform-functionality/imageattachment.html +1 -43
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/index.html +1 -43
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/job-scheduling-and-approvals.html +1 -43
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobbutton.html +1 -43
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobhook.html +1 -43
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/models.html +1 -43
- nautobot/project-static/docs/user-guide/platform-functionality/napalm.html +1 -43
- nautobot/project-static/docs/user-guide/platform-functionality/note.html +1 -43
- nautobot/project-static/docs/user-guide/platform-functionality/relationship.html +1 -43
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/authentication.html +1 -43
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/filtering.html +1 -43
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/overview.html +1 -43
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/ui-related-endpoints.html +1 -43
- nautobot/project-static/docs/user-guide/platform-functionality/role.html +1 -43
- nautobot/project-static/docs/user-guide/platform-functionality/secret.html +1 -43
- nautobot/project-static/docs/user-guide/platform-functionality/status.html +1 -43
- nautobot/project-static/docs/user-guide/platform-functionality/tag.html +1 -43
- nautobot/project-static/docs/user-guide/platform-functionality/template-filters.html +1 -43
- nautobot/project-static/docs/user-guide/platform-functionality/users/objectpermission.html +5 -43
- nautobot/project-static/docs/user-guide/platform-functionality/users/token.html +1 -43
- nautobot/project-static/docs/user-guide/platform-functionality/webhook.html +1 -43
- nautobot/project-static/js/theme.js +0 -5
- nautobot/tenancy/api/urls.py +1 -1
- nautobot/tenancy/api/views.py +1 -0
- nautobot/tenancy/factory.py +2 -2
- nautobot/tenancy/filters/__init__.py +1 -2
- nautobot/tenancy/forms.py +2 -2
- nautobot/tenancy/homepage.py +0 -1
- nautobot/tenancy/migrations/0001_initial.py +2 -1
- nautobot/tenancy/migrations/0002_auto_slug.py +1 -0
- nautobot/tenancy/migrations/0004_change_tree_manager_on_tree_models.py +1 -0
- nautobot/tenancy/migrations/0008_tagsfield.py +1 -0
- nautobot/tenancy/models.py +0 -1
- nautobot/tenancy/navigation.py +0 -1
- nautobot/tenancy/tables.py +1 -0
- nautobot/tenancy/tests/test_filters.py +5 -5
- nautobot/tenancy/urls.py +1 -0
- nautobot/tenancy/views.py +2 -2
- nautobot/users/admin.py +1 -2
- nautobot/users/api/urls.py +1 -1
- nautobot/users/api/views.py +6 -4
- nautobot/users/factory.py +1 -3
- nautobot/users/filters.py +4 -4
- nautobot/users/forms.py +1 -0
- nautobot/users/migrations/0004_alter_user_managers.py +1 -0
- nautobot/users/migrations/0008_make_object_permission_a_changelogged_model.py +22 -0
- nautobot/users/models.py +2 -2
- nautobot/users/tests/test_api.py +7 -6
- nautobot/users/tests/test_filters.py +0 -1
- nautobot/users/tests/test_models.py +0 -1
- nautobot/users/tests/test_password_ui.py +1 -1
- nautobot/users/views.py +2 -2
- nautobot/virtualization/api/urls.py +1 -1
- nautobot/virtualization/api/views.py +2 -1
- nautobot/virtualization/apps.py +1 -1
- nautobot/virtualization/choices.py +0 -1
- nautobot/virtualization/factory.py +1 -1
- nautobot/virtualization/filters.py +1 -1
- nautobot/virtualization/forms.py +6 -6
- nautobot/virtualization/homepage.py +0 -1
- nautobot/virtualization/migrations/0003_vminterface_verbose_name.py +1 -0
- nautobot/virtualization/migrations/0004_auto_slug.py +1 -0
- nautobot/virtualization/migrations/0005_add_natural_indexing.py +1 -0
- nautobot/virtualization/migrations/0006_vminterface_status.py +1 -0
- nautobot/virtualization/migrations/0007_vminterface_status_data_migration.py +1 -0
- nautobot/virtualization/migrations/0011_alter_vminterface_mac_address.py +1 -0
- nautobot/virtualization/migrations/0012_alter_virtualmachine_role_add_new_role.py +1 -0
- nautobot/virtualization/migrations/0013_migrate_virtualmachine_role_data.py +1 -0
- nautobot/virtualization/migrations/0018_related_name_changes.py +1 -0
- nautobot/virtualization/migrations/0021_tagsfield_and_vminterface_to_primarymodel.py +1 -0
- nautobot/virtualization/migrations/0025_status_nonnullable.py +1 -0
- nautobot/virtualization/models.py +1 -2
- nautobot/virtualization/navigation.py +0 -1
- nautobot/virtualization/signals.py +0 -1
- nautobot/virtualization/tables.py +1 -0
- nautobot/virtualization/tests/test_filters.py +3 -3
- nautobot/virtualization/tests/test_models.py +1 -1
- nautobot/virtualization/tests/test_views.py +2 -2
- nautobot/virtualization/urls.py +1 -0
- nautobot/virtualization/views.py +1 -1
- {nautobot-2.1.0.dist-info → nautobot-2.1.1.dist-info}/METADATA +1 -1
- {nautobot-2.1.0.dist-info → nautobot-2.1.1.dist-info}/RECORD +713 -814
- nautobot/core/management/commands/build_ui.py +0 -281
- nautobot/core/templates/base_react.html +0 -55
- nautobot/core/tests/test_cli.py +0 -25
- nautobot/ui/.eslintignore +0 -3
- nautobot/ui/.gitignore +0 -7
- nautobot/ui/.prettierignore +0 -6
- nautobot/ui/.prettierrc +0 -4
- nautobot/ui/README.md +0 -27
- nautobot/ui/config/env.js +0 -102
- nautobot/ui/config/getHttpsConfig.js +0 -68
- nautobot/ui/config/jest/babelTransform.js +0 -14
- nautobot/ui/config/jest/cssTransform.js +0 -12
- nautobot/ui/config/jest/fileTransform.js +0 -38
- nautobot/ui/config/modules.js +0 -151
- nautobot/ui/config/paths.js +0 -67
- nautobot/ui/config/webpack/persistentCache/createEnvironmentHash.js +0 -8
- nautobot/ui/config/webpack.config.js +0 -674
- nautobot/ui/config/webpackDevServer.config.js +0 -127
- nautobot/ui/jest.config.js +0 -35
- nautobot/ui/jsconfig.json +0 -4
- nautobot/ui/package-lock.json +0 -22947
- nautobot/ui/package.json +0 -119
- nautobot/ui/public/index.html +0 -47
- nautobot/ui/public/logo192.png +0 -0
- nautobot/ui/public/logo512.png +0 -0
- nautobot/ui/public/manifest.json +0 -25
- nautobot/ui/public/nautobot_logo.svg +0 -131
- nautobot/ui/public/robots.txt +0 -3
- nautobot/ui/scripts/build.js +0 -224
- nautobot/ui/scripts/start.js +0 -140
- nautobot/ui/scripts/test.js +0 -40
- nautobot/ui/src/App.js +0 -79
- nautobot/ui/src/components/AppFullWidthComponents.js +0 -8
- nautobot/ui/src/components/AppTab.js +0 -40
- nautobot/ui/src/components/Apps.js +0 -60
- nautobot/ui/src/components/FeedbackModal.js +0 -123
- nautobot/ui/src/components/FiltersPanel.js +0 -693
- nautobot/ui/src/components/HomeChangelogPanel.js +0 -98
- nautobot/ui/src/components/HomePanel.js +0 -58
- nautobot/ui/src/components/JobHistoryTable.js +0 -78
- nautobot/ui/src/components/Layout.js +0 -76
- nautobot/ui/src/components/LoadingWidget.js +0 -14
- nautobot/ui/src/components/Navbar.js +0 -204
- nautobot/ui/src/components/NotificationPopover.js +0 -27
- nautobot/ui/src/components/ObjectTable/ObjectListTable.js +0 -300
- nautobot/ui/src/components/ObjectTable/ObjectTable.js +0 -96
- nautobot/ui/src/components/ObjectTable/ObjectTableItem.js +0 -70
- nautobot/ui/src/components/ObjectTable/index.js +0 -3
- nautobot/ui/src/components/Pagination/PageNumberForm.js +0 -228
- nautobot/ui/src/components/Pagination/PageSizeForm.js +0 -65
- nautobot/ui/src/components/Pagination/Pagination.js +0 -67
- nautobot/ui/src/components/Pagination/index.js +0 -3
- nautobot/ui/src/components/ReferenceDataTag.js +0 -35
- nautobot/ui/src/components/Retrieve/RenderChangeLogsTab.js +0 -58
- nautobot/ui/src/components/Retrieve/RenderColumn.js +0 -30
- nautobot/ui/src/components/Retrieve/RenderGroup.js +0 -24
- nautobot/ui/src/components/Retrieve/RenderHeader.js +0 -125
- nautobot/ui/src/components/Retrieve/RenderNotesTab.js +0 -60
- nautobot/ui/src/components/Retrieve/RenderTable.js +0 -33
- nautobot/ui/src/components/Retrieve/RenderTabs.js +0 -56
- nautobot/ui/src/components/Retrieve/index.js +0 -7
- nautobot/ui/src/components/RouterButton.js +0 -10
- nautobot/ui/src/components/RouterLink.js +0 -10
- nautobot/ui/src/components/SidebarNav.js +0 -156
- nautobot/ui/src/components/__tests__/AppFullWidthComponents.test.js +0 -16
- nautobot/ui/src/components/__tests__/AppTab.test.js +0 -21
- nautobot/ui/src/components/__tests__/Apps.test.js +0 -14
- nautobot/ui/src/components/__tests__/Layout.test.js +0 -33
- nautobot/ui/src/components/__tests__/PageSizeForm.test.js +0 -13
- nautobot/ui/src/components/__tests__/Pagination.test.js +0 -43
- nautobot/ui/src/components/__tests__/Table.test.js +0 -39
- nautobot/ui/src/components/__tests__/TableItem.test.js +0 -39
- nautobot/ui/src/components/index.js +0 -4
- nautobot/ui/src/constants/apiPath.js +0 -13
- nautobot/ui/src/constants/icons.js +0 -15
- nautobot/ui/src/constants/size.js +0 -15
- nautobot/ui/src/file_templates/app_imports.js.j2 +0 -7
- nautobot/ui/src/file_templates/jsconfig-base.json +0 -12
- nautobot/ui/src/index.js +0 -65
- nautobot/ui/src/reportWebVitals.js +0 -15
- nautobot/ui/src/router.js +0 -77
- nautobot/ui/src/utils/api.js +0 -160
- nautobot/ui/src/utils/app-import.js +0 -15
- nautobot/ui/src/utils/color.js +0 -15
- nautobot/ui/src/utils/date.js +0 -14
- nautobot/ui/src/utils/index.js +0 -15
- nautobot/ui/src/utils/navigation.js +0 -48
- nautobot/ui/src/utils/session.js +0 -64
- nautobot/ui/src/utils/store.js +0 -242
- nautobot/ui/src/utils/string.js +0 -6
- nautobot/ui/src/utils/url.js +0 -4
- nautobot/ui/src/views/Home.js +0 -142
- nautobot/ui/src/views/InstalledApps.js +0 -80
- nautobot/ui/src/views/Login.js +0 -48
- nautobot/ui/src/views/Logout.js +0 -20
- nautobot/ui/src/views/__tests__/BSCreateViewTemplate.test.js +0 -11
- nautobot/ui/src/views/__tests__/BSListViewTemplate.test.js +0 -107
- nautobot/ui/src/views/__tests__/Login.test.js +0 -15
- nautobot/ui/src/views/generic/GenericView.js +0 -191
- nautobot/ui/src/views/generic/ObjectCreate.js +0 -96
- nautobot/ui/src/views/generic/ObjectList.js +0 -137
- nautobot/ui/src/views/generic/ObjectRetrieve.js +0 -87
- {nautobot-2.1.0.dist-info → nautobot-2.1.1.dist-info}/LICENSE.txt +0 -0
- {nautobot-2.1.0.dist-info → nautobot-2.1.1.dist-info}/WHEEL +0 -0
- {nautobot-2.1.0.dist-info → nautobot-2.1.1.dist-info}/entry_points.txt +0 -0
|
@@ -1,300 +0,0 @@
|
|
|
1
|
-
import { ButtonGroup, SkeletonText, Spacer } from "@chakra-ui/react";
|
|
2
|
-
import { useLocation } from "react-router-dom";
|
|
3
|
-
import { useEffect, useRef, useState } from "react";
|
|
4
|
-
import {
|
|
5
|
-
Box,
|
|
6
|
-
calc,
|
|
7
|
-
Divider,
|
|
8
|
-
Flex,
|
|
9
|
-
getCssVar,
|
|
10
|
-
Heading,
|
|
11
|
-
NtcThumbnailIcon,
|
|
12
|
-
MeatballsIcon,
|
|
13
|
-
Button as UIButton,
|
|
14
|
-
TableRenderer,
|
|
15
|
-
useTableRenderer,
|
|
16
|
-
createColumnHelper,
|
|
17
|
-
PlusIcon,
|
|
18
|
-
Button,
|
|
19
|
-
EditIcon,
|
|
20
|
-
Tag,
|
|
21
|
-
TagLabel,
|
|
22
|
-
} from "@nautobot/nautobot-ui";
|
|
23
|
-
import { useCallback, useMemo } from "react";
|
|
24
|
-
|
|
25
|
-
import {
|
|
26
|
-
FiltersPanelContent,
|
|
27
|
-
NON_FILTER_QUERY_PARAMS,
|
|
28
|
-
useFiltersPanel,
|
|
29
|
-
} from "@components/FiltersPanel";
|
|
30
|
-
import { Pagination } from "@components/Pagination";
|
|
31
|
-
|
|
32
|
-
import LoadingWidget from "../LoadingWidget";
|
|
33
|
-
import ObjectTableItem from "./ObjectTableItem";
|
|
34
|
-
|
|
35
|
-
const getTableItemLink = (idx, obj) => {
|
|
36
|
-
if (idx === 0) {
|
|
37
|
-
// TODO: ui-schema should be providing the name of the field used to describe the object (name)
|
|
38
|
-
return window.location.pathname + obj.id + "/";
|
|
39
|
-
}
|
|
40
|
-
if (typeof obj !== "object" || !obj || !obj.url) {
|
|
41
|
-
return null;
|
|
42
|
-
}
|
|
43
|
-
// Remove domain + /api prefix
|
|
44
|
-
const url = obj.url.replace(window.location.origin + "/api", "");
|
|
45
|
-
|
|
46
|
-
return url;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
// A composite component for displaying a object list table. Just the data!
|
|
50
|
-
export default function ObjectListTable({
|
|
51
|
-
tableData,
|
|
52
|
-
defaultHeaders,
|
|
53
|
-
objectType,
|
|
54
|
-
tableHeaders,
|
|
55
|
-
filterData,
|
|
56
|
-
totalCount,
|
|
57
|
-
active_page_number,
|
|
58
|
-
page_size,
|
|
59
|
-
tableTitle,
|
|
60
|
-
data_loaded,
|
|
61
|
-
data_fetched,
|
|
62
|
-
include_button = true,
|
|
63
|
-
}) {
|
|
64
|
-
let location = useLocation();
|
|
65
|
-
const columnHelper = useMemo(() => createColumnHelper(), []);
|
|
66
|
-
// Reference point to scroll to on table reload
|
|
67
|
-
const topRef = useRef();
|
|
68
|
-
|
|
69
|
-
const [columnVisibility, setColumnVisibility] = useState({});
|
|
70
|
-
useEffect(() => {
|
|
71
|
-
let defaultNames = defaultHeaders.map((e) => e.key);
|
|
72
|
-
let allNames = tableHeaders.map((e) => e.key);
|
|
73
|
-
|
|
74
|
-
if (defaultNames.length === 0) {
|
|
75
|
-
defaultNames = allNames;
|
|
76
|
-
}
|
|
77
|
-
let disabledNames = allNames.filter((v) => !defaultNames.includes(v));
|
|
78
|
-
let columnState = {};
|
|
79
|
-
for (const key of disabledNames) {
|
|
80
|
-
columnState[key] = false;
|
|
81
|
-
}
|
|
82
|
-
setColumnVisibility(columnState);
|
|
83
|
-
}, [defaultHeaders, tableHeaders]);
|
|
84
|
-
const columns = useMemo(
|
|
85
|
-
() =>
|
|
86
|
-
tableHeaders.map(({ key, title }, idx) =>
|
|
87
|
-
columnHelper.accessor(key, {
|
|
88
|
-
cell: (props) => {
|
|
89
|
-
// Get the column data from the object
|
|
90
|
-
// e.g from {"status": {"display": "Active"}, "id": ....} get => {"display": "Active"}
|
|
91
|
-
const column_data =
|
|
92
|
-
idx === 0
|
|
93
|
-
? props.row.original
|
|
94
|
-
: props.row.original[props.column.id];
|
|
95
|
-
return (
|
|
96
|
-
<ObjectTableItem
|
|
97
|
-
name={key}
|
|
98
|
-
obj={props.getValue()}
|
|
99
|
-
url={getTableItemLink(idx, column_data)}
|
|
100
|
-
/>
|
|
101
|
-
);
|
|
102
|
-
},
|
|
103
|
-
header: title,
|
|
104
|
-
})
|
|
105
|
-
),
|
|
106
|
-
[columnHelper, tableHeaders]
|
|
107
|
-
);
|
|
108
|
-
const onRowSelectionChange = useCallback(() => {
|
|
109
|
-
// Do something.
|
|
110
|
-
}, []);
|
|
111
|
-
|
|
112
|
-
const ActionMenu = useCallback(
|
|
113
|
-
({ cellContext }) => (
|
|
114
|
-
<Button
|
|
115
|
-
leftIcon={<EditIcon size="sm" />}
|
|
116
|
-
size="xs"
|
|
117
|
-
variant="table"
|
|
118
|
-
onClick={() =>
|
|
119
|
-
alert(`Clicked ${cellContext.row.original.name}!`)
|
|
120
|
-
}
|
|
121
|
-
/>
|
|
122
|
-
),
|
|
123
|
-
[]
|
|
124
|
-
);
|
|
125
|
-
|
|
126
|
-
const filtersPanel = useFiltersPanel({
|
|
127
|
-
content: (
|
|
128
|
-
<FiltersPanelContent
|
|
129
|
-
lookupFields={filterData}
|
|
130
|
-
objectType={objectType}
|
|
131
|
-
/>
|
|
132
|
-
),
|
|
133
|
-
id: "object-list-table-filters-panel",
|
|
134
|
-
title: "Filters",
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
const table = useTableRenderer({
|
|
138
|
-
columns: columns,
|
|
139
|
-
data: tableData,
|
|
140
|
-
enableMultiRowSelection: true,
|
|
141
|
-
onRowSelectionChange,
|
|
142
|
-
state: { columnVisibility },
|
|
143
|
-
onColumnVisibilityChange: setColumnVisibility,
|
|
144
|
-
actionMenu: ActionMenu,
|
|
145
|
-
});
|
|
146
|
-
|
|
147
|
-
const activeFiltersCount = useMemo(
|
|
148
|
-
() =>
|
|
149
|
-
[...new URLSearchParams(location.search)].filter(
|
|
150
|
-
([searchParam]) =>
|
|
151
|
-
!NON_FILTER_QUERY_PARAMS.includes(searchParam)
|
|
152
|
-
).length,
|
|
153
|
-
[location]
|
|
154
|
-
);
|
|
155
|
-
|
|
156
|
-
useEffect(() => {
|
|
157
|
-
if (filtersPanel.isOpen) {
|
|
158
|
-
// This re-renders the filters panel when it is already open and the
|
|
159
|
-
// current `ObjectList` view collection is changed to another.
|
|
160
|
-
filtersPanel.open();
|
|
161
|
-
} // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
162
|
-
}, [objectType, tableHeaders]);
|
|
163
|
-
|
|
164
|
-
useEffect(
|
|
165
|
-
() => () => {
|
|
166
|
-
// This closes the filters panel when users navigate away from the
|
|
167
|
-
// `ObjectList` view. Use `setTimeout` in order to delay the filters
|
|
168
|
-
// panel closing function by one cycle. Otherwise, if called
|
|
169
|
-
// immediately, some ancestor component lifecycle will mount it
|
|
170
|
-
// again, effectively cancelling the `filtersPanel.close()` call.
|
|
171
|
-
setTimeout(() => filtersPanel.close());
|
|
172
|
-
}, // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
173
|
-
[] // Keep the dependency array empty to execute only on unmount.
|
|
174
|
-
);
|
|
175
|
-
|
|
176
|
-
return (
|
|
177
|
-
<Box borderRadius="md" height="full" ref={topRef}>
|
|
178
|
-
{!include_button ? null : (
|
|
179
|
-
<Flex align="center">
|
|
180
|
-
<Heading
|
|
181
|
-
as="h1"
|
|
182
|
-
size="H1"
|
|
183
|
-
display="flex"
|
|
184
|
-
alignItems="center"
|
|
185
|
-
gap="5px"
|
|
186
|
-
>
|
|
187
|
-
<NtcThumbnailIcon height="auto" width="24" />
|
|
188
|
-
{tableTitle}
|
|
189
|
-
</Heading>
|
|
190
|
-
<Spacer />
|
|
191
|
-
{!data_fetched ? (
|
|
192
|
-
<Box marginRight="md">
|
|
193
|
-
<LoadingWidget name={tableTitle} />
|
|
194
|
-
</Box>
|
|
195
|
-
) : null}
|
|
196
|
-
<Box>
|
|
197
|
-
<ButtonGroup alignItems="center" spacing="md">
|
|
198
|
-
<UIButton
|
|
199
|
-
variant={
|
|
200
|
-
activeFiltersCount > 0
|
|
201
|
-
? "primary"
|
|
202
|
-
: "secondary"
|
|
203
|
-
}
|
|
204
|
-
onClick={() =>
|
|
205
|
-
filtersPanel.isOpen
|
|
206
|
-
? filtersPanel.close()
|
|
207
|
-
: filtersPanel.open()
|
|
208
|
-
}
|
|
209
|
-
>
|
|
210
|
-
{activeFiltersCount > 0 ? (
|
|
211
|
-
<Tag
|
|
212
|
-
background="white-0"
|
|
213
|
-
boxShadow="none"
|
|
214
|
-
marginRight="xs"
|
|
215
|
-
size="sm"
|
|
216
|
-
variant="secondary"
|
|
217
|
-
>
|
|
218
|
-
<TagLabel>
|
|
219
|
-
{activeFiltersCount}
|
|
220
|
-
</TagLabel>
|
|
221
|
-
</Tag>
|
|
222
|
-
) : null}
|
|
223
|
-
Filters
|
|
224
|
-
</UIButton>
|
|
225
|
-
<UIButton
|
|
226
|
-
variant="primary"
|
|
227
|
-
leftIcon={<MeatballsIcon />}
|
|
228
|
-
>
|
|
229
|
-
Actions
|
|
230
|
-
</UIButton>
|
|
231
|
-
<Divider height={10} orientation="vertical" />
|
|
232
|
-
<UIButton
|
|
233
|
-
to={`${location.pathname}add/`}
|
|
234
|
-
leftIcon={<PlusIcon />}
|
|
235
|
-
onClick={(e) => {
|
|
236
|
-
e.preventDefault();
|
|
237
|
-
// Because there is currently no support for Add view in the new UI for production,
|
|
238
|
-
// the code below checks if the app is running in production and redirects the user to
|
|
239
|
-
// the Add page; after the page is reloaded, nautobot takes care of rendering the legacy UI.
|
|
240
|
-
// TODO: Get rid of this if statement when we have a Create/Update View in the new UI
|
|
241
|
-
if (process.env.NODE_ENV === "production") {
|
|
242
|
-
document.location.href += "add/";
|
|
243
|
-
}
|
|
244
|
-
}}
|
|
245
|
-
>
|
|
246
|
-
Add {tableTitle}
|
|
247
|
-
</UIButton>
|
|
248
|
-
</ButtonGroup>
|
|
249
|
-
</Box>
|
|
250
|
-
</Flex>
|
|
251
|
-
)}
|
|
252
|
-
|
|
253
|
-
<SkeletonText
|
|
254
|
-
borderRadius="md"
|
|
255
|
-
endColor="gray-0"
|
|
256
|
-
height={calc.subtract(
|
|
257
|
-
getCssVar("sizes.full"),
|
|
258
|
-
// The following compensate for the section header.
|
|
259
|
-
getCssVar("lineHeights.tall"),
|
|
260
|
-
getCssVar("space.md"),
|
|
261
|
-
// The following compensate for the pagination component.
|
|
262
|
-
getCssVar("space.md"),
|
|
263
|
-
getCssVar("sizes.40")
|
|
264
|
-
)}
|
|
265
|
-
isLoaded={data_fetched}
|
|
266
|
-
marginTop="md"
|
|
267
|
-
noOfLines={parseInt(page_size, 10)}
|
|
268
|
-
overflow="hidden"
|
|
269
|
-
skeletonHeight={calc.subtract(
|
|
270
|
-
calc.add(
|
|
271
|
-
getCssVar("lineHeights.normal"),
|
|
272
|
-
calc.multiply(getCssVar("space.sm"), 2)
|
|
273
|
-
),
|
|
274
|
-
"1px"
|
|
275
|
-
)}
|
|
276
|
-
spacing="1px"
|
|
277
|
-
startColor="gray-1"
|
|
278
|
-
sx={{
|
|
279
|
-
">": {
|
|
280
|
-
_first: data_fetched
|
|
281
|
-
? { height: "full" }
|
|
282
|
-
: { ">": { _first: { display: "none" } } },
|
|
283
|
-
},
|
|
284
|
-
}}
|
|
285
|
-
>
|
|
286
|
-
<TableRenderer
|
|
287
|
-
table={table}
|
|
288
|
-
containerProps={{ height: "full" }}
|
|
289
|
-
/>
|
|
290
|
-
</SkeletonText>
|
|
291
|
-
<Pagination
|
|
292
|
-
url={location.pathname}
|
|
293
|
-
data_count={totalCount}
|
|
294
|
-
page_size={page_size}
|
|
295
|
-
active_page={active_page_number}
|
|
296
|
-
scroll_ref={topRef}
|
|
297
|
-
></Pagination>
|
|
298
|
-
</Box>
|
|
299
|
-
);
|
|
300
|
-
}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState, useMemo, useCallback } from "react";
|
|
2
|
-
import {
|
|
3
|
-
TableRenderer,
|
|
4
|
-
useTableRenderer,
|
|
5
|
-
createColumnHelper,
|
|
6
|
-
Button,
|
|
7
|
-
EditIcon,
|
|
8
|
-
} from "@nautobot/nautobot-ui";
|
|
9
|
-
|
|
10
|
-
import ObjectTableItem from "./ObjectTableItem";
|
|
11
|
-
|
|
12
|
-
function getTableItemLink(idx, obj) {
|
|
13
|
-
if (typeof obj !== "object" || !obj || !obj.url) {
|
|
14
|
-
return null;
|
|
15
|
-
}
|
|
16
|
-
// Remove domain + /api prefix
|
|
17
|
-
return obj.url.replace(window.location.origin + "/api", "");
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function createTableColumn(tableHeaders, columnHelper) {
|
|
21
|
-
return tableHeaders.map(({ key, title }, idx) =>
|
|
22
|
-
columnHelper.accessor(key, {
|
|
23
|
-
cell: (props) => {
|
|
24
|
-
// Get the column data from the object
|
|
25
|
-
// e.g from {status: {display: "Active", id: 1, ...}, id: ....} get => {display: "Active", id: 1}
|
|
26
|
-
// In the example above it gets the col(status) value
|
|
27
|
-
const column_data =
|
|
28
|
-
idx === 0
|
|
29
|
-
? props.row.original
|
|
30
|
-
: props.row.original[props.column.id];
|
|
31
|
-
return (
|
|
32
|
-
<ObjectTableItem
|
|
33
|
-
name={key}
|
|
34
|
-
obj={props.getValue()}
|
|
35
|
-
url={getTableItemLink(idx, column_data)}
|
|
36
|
-
/>
|
|
37
|
-
);
|
|
38
|
-
},
|
|
39
|
-
header: title,
|
|
40
|
-
})
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function renderActionButton({ cellContext }) {
|
|
45
|
-
return (
|
|
46
|
-
<Button
|
|
47
|
-
leftIcon={<EditIcon size="sm" />}
|
|
48
|
-
size="xs"
|
|
49
|
-
variant="table"
|
|
50
|
-
onClick={() => alert(`Clicked ${cellContext.row.original.name}!`)}
|
|
51
|
-
/>
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// A standard Nautobot Object table. This _may_ be beneficial to move into nautobot-ui
|
|
56
|
-
export default function ObjectTable({
|
|
57
|
-
defaultHeaders,
|
|
58
|
-
tableHeaders,
|
|
59
|
-
tableData,
|
|
60
|
-
}) {
|
|
61
|
-
const columnHelper = useMemo(() => createColumnHelper(), []);
|
|
62
|
-
const [columnVisibility, setColumnVisibility] = useState({});
|
|
63
|
-
const columns = useMemo(
|
|
64
|
-
() => createTableColumn(tableHeaders, columnHelper),
|
|
65
|
-
[columnHelper, tableHeaders]
|
|
66
|
-
);
|
|
67
|
-
const ActionMenu = useCallback(renderActionButton, []);
|
|
68
|
-
|
|
69
|
-
useEffect(() => {
|
|
70
|
-
let allNames = tableHeaders.map((e) => e.key);
|
|
71
|
-
let defaultNames = defaultHeaders.map((e) => e.key);
|
|
72
|
-
|
|
73
|
-
if (defaultNames.length === 0) {
|
|
74
|
-
defaultNames = allNames;
|
|
75
|
-
}
|
|
76
|
-
let disabledNames = allNames.filter((v) => !defaultNames.includes(v));
|
|
77
|
-
let columnState = {};
|
|
78
|
-
for (const key of disabledNames) {
|
|
79
|
-
columnState[key] = false;
|
|
80
|
-
}
|
|
81
|
-
setColumnVisibility(columnState);
|
|
82
|
-
}, [defaultHeaders, tableHeaders]);
|
|
83
|
-
|
|
84
|
-
const table = useTableRenderer({
|
|
85
|
-
columns: columns,
|
|
86
|
-
data: tableData,
|
|
87
|
-
enableMultiRowSelection: true,
|
|
88
|
-
state: { columnVisibility },
|
|
89
|
-
onColumnVisibilityChange: setColumnVisibility,
|
|
90
|
-
actionMenu: ActionMenu,
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
return (
|
|
94
|
-
<TableRenderer table={table} containerProps={{ overflow: "auto" }} />
|
|
95
|
-
);
|
|
96
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
// import Badge from 'react-bootstrap/Badge';
|
|
2
|
-
import { Link } from "@components/RouterLink";
|
|
3
|
-
import { Button, CheckIcon, CloseIcon, Flex } from "@nautobot/nautobot-ui";
|
|
4
|
-
import { calculateLuminance } from "@utils/color";
|
|
5
|
-
|
|
6
|
-
function TextOrButton({ obj }) {
|
|
7
|
-
if (typeof obj === "object") {
|
|
8
|
-
const display = obj.display || obj.label;
|
|
9
|
-
if (!obj.color) {
|
|
10
|
-
return display;
|
|
11
|
-
}
|
|
12
|
-
// TODO: xs button padding left/right, borderradius and margin should be defaults in nautobot-ui?
|
|
13
|
-
// also should hover box shadow be disabled?
|
|
14
|
-
return (
|
|
15
|
-
<Button
|
|
16
|
-
size="xs"
|
|
17
|
-
bg={"#" + obj.color}
|
|
18
|
-
color={
|
|
19
|
-
calculateLuminance(obj.color) > 186 ? "#000000" : "#ffffff"
|
|
20
|
-
}
|
|
21
|
-
borderRadius="sm"
|
|
22
|
-
pl="xs"
|
|
23
|
-
pr="xs"
|
|
24
|
-
>
|
|
25
|
-
{display}
|
|
26
|
-
</Button>
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
return obj;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function TableColumnDisplay({ obj }) {
|
|
33
|
-
if (obj === undefined || obj === null || obj === "") {
|
|
34
|
-
return <>—</>;
|
|
35
|
-
} else if (typeof obj === "object" && !Array.isArray(obj)) {
|
|
36
|
-
return <TextOrButton obj={obj} />;
|
|
37
|
-
} else if (Array.isArray(obj)) {
|
|
38
|
-
if (typeof obj[0] == "object") {
|
|
39
|
-
return (
|
|
40
|
-
<Flex gap="xs">
|
|
41
|
-
{obj.map((item, idx) => (
|
|
42
|
-
<TextOrButton obj={item} key={idx} />
|
|
43
|
-
))}
|
|
44
|
-
</Flex>
|
|
45
|
-
);
|
|
46
|
-
} else {
|
|
47
|
-
return obj.join(", ");
|
|
48
|
-
}
|
|
49
|
-
} else if (typeof obj === "boolean") {
|
|
50
|
-
if (obj === true) {
|
|
51
|
-
return <CheckIcon />;
|
|
52
|
-
} else {
|
|
53
|
-
return <CloseIcon />;
|
|
54
|
-
}
|
|
55
|
-
} else {
|
|
56
|
-
return obj;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export default function ObjectTableItem({ name, obj, url }) {
|
|
61
|
-
if (url && obj) {
|
|
62
|
-
return (
|
|
63
|
-
<Link to={url}>
|
|
64
|
-
<TableColumnDisplay obj={obj} />
|
|
65
|
-
</Link>
|
|
66
|
-
);
|
|
67
|
-
} else {
|
|
68
|
-
return <TableColumnDisplay obj={obj} />;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useState } from "react";
|
|
2
|
-
import { useSearchParams } from "react-router-dom";
|
|
3
|
-
import { Box, Flex, FormControl, Input, Text } from "@nautobot/nautobot-ui";
|
|
4
|
-
import { IconButton } from "@chakra-ui/react";
|
|
5
|
-
import {
|
|
6
|
-
ArrowLeftIcon,
|
|
7
|
-
ArrowRightIcon,
|
|
8
|
-
ChevronLeftIcon,
|
|
9
|
-
ChevronRightIcon,
|
|
10
|
-
} from "@chakra-ui/icons";
|
|
11
|
-
|
|
12
|
-
export default function PageNumberForm({
|
|
13
|
-
firstPage,
|
|
14
|
-
lastPage,
|
|
15
|
-
pageSize,
|
|
16
|
-
scroll_ref,
|
|
17
|
-
totalDataCount,
|
|
18
|
-
trueCurrentPage,
|
|
19
|
-
}) {
|
|
20
|
-
let [searchParams, setSearchParams] = useSearchParams();
|
|
21
|
-
|
|
22
|
-
// State to track the current page number
|
|
23
|
-
const [pageNumber, setPageNumber] = useState(trueCurrentPage);
|
|
24
|
-
// State to track the page number form control input validity
|
|
25
|
-
const [isInputInvalid, setIsInputInvalid] = useState(false);
|
|
26
|
-
// State to track if the input box is focused
|
|
27
|
-
const [isInputFocused, setIsInputFocused] = useState(false);
|
|
28
|
-
|
|
29
|
-
// Keeps the pageNumber var updated to trueCurrentPage (i.e. if trueCurrentPage changes via arrow click)
|
|
30
|
-
useEffect(() => {
|
|
31
|
-
setPageNumber(trueCurrentPage);
|
|
32
|
-
}, [trueCurrentPage]);
|
|
33
|
-
|
|
34
|
-
// Sets isInputFocused to true
|
|
35
|
-
function handleOnFocus() {
|
|
36
|
-
setIsInputFocused(true);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// Changes the page number based on the input component after a blur event (i.e. when user clicks out of input box and element loses focus)
|
|
40
|
-
function handleOnBlur(event) {
|
|
41
|
-
const enteredValue = parseInt(event.target.value);
|
|
42
|
-
// Checks that the entered value is a number and within the valid page range
|
|
43
|
-
if (
|
|
44
|
-
!isNaN(enteredValue) &&
|
|
45
|
-
enteredValue >= firstPage &&
|
|
46
|
-
enteredValue <= lastPage
|
|
47
|
-
) {
|
|
48
|
-
setPageNumber(enteredValue);
|
|
49
|
-
setIsInputInvalid(false);
|
|
50
|
-
|
|
51
|
-
// Checks that the entered value is not already the current page
|
|
52
|
-
if (enteredValue !== trueCurrentPage) {
|
|
53
|
-
onPageNumberChange(enteredValue);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// Reset input value
|
|
57
|
-
event.target.value = "";
|
|
58
|
-
}
|
|
59
|
-
// Checks if nothing is entered into input and, if so, do nothing
|
|
60
|
-
else if (event.target.value === "") {
|
|
61
|
-
setIsInputInvalid(false);
|
|
62
|
-
}
|
|
63
|
-
// Otherwise, mark input as invalid
|
|
64
|
-
else {
|
|
65
|
-
setIsInputInvalid(true);
|
|
66
|
-
}
|
|
67
|
-
setIsInputFocused(false);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function handleOnKeyDown(event) {
|
|
71
|
-
if (event.key === "Enter") {
|
|
72
|
-
event.preventDefault();
|
|
73
|
-
|
|
74
|
-
const enteredValue = parseInt(event.target.value);
|
|
75
|
-
// Checks that the entered value is a number and within the valid page range
|
|
76
|
-
if (
|
|
77
|
-
!isNaN(enteredValue) &&
|
|
78
|
-
enteredValue >= firstPage &&
|
|
79
|
-
enteredValue <= lastPage
|
|
80
|
-
) {
|
|
81
|
-
setPageNumber(enteredValue);
|
|
82
|
-
setIsInputInvalid(false);
|
|
83
|
-
|
|
84
|
-
// Checks that the entered value is not already the current page
|
|
85
|
-
if (enteredValue !== trueCurrentPage) {
|
|
86
|
-
onPageNumberChange(enteredValue);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
// Reset input value
|
|
90
|
-
event.target.value = "";
|
|
91
|
-
}
|
|
92
|
-
// Checks if nothing is entered into input and, if so, do nothing
|
|
93
|
-
else if (event.target.value === "") {
|
|
94
|
-
setIsInputInvalid(false);
|
|
95
|
-
}
|
|
96
|
-
// Otherwise, mark input as invalid
|
|
97
|
-
else {
|
|
98
|
-
setIsInputInvalid(true);
|
|
99
|
-
}
|
|
100
|
-
setIsInputFocused(false);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function onPageNumberChange(targetPageNumber) {
|
|
105
|
-
let limit = searchParams.get("limit");
|
|
106
|
-
/* TODO: we need a REST API endpoint to query get_settings_or_config("PAGINATE_COUNT") rather than hard-coding this to 50. */
|
|
107
|
-
// Scroll to the top of the ObjectListTable Container on table reload
|
|
108
|
-
scroll_ref.current.scrollIntoView({
|
|
109
|
-
alignToTop: true,
|
|
110
|
-
behavior: "smooth",
|
|
111
|
-
});
|
|
112
|
-
|
|
113
|
-
let newPageNumber;
|
|
114
|
-
if (targetPageNumber === "<") {
|
|
115
|
-
newPageNumber = trueCurrentPage - 1;
|
|
116
|
-
} else if (targetPageNumber === ">") {
|
|
117
|
-
newPageNumber = trueCurrentPage + 1;
|
|
118
|
-
} else {
|
|
119
|
-
newPageNumber = targetPageNumber;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
setIsInputInvalid(false);
|
|
123
|
-
|
|
124
|
-
setSearchParams([
|
|
125
|
-
...[...searchParams].filter(
|
|
126
|
-
([searchParam]) =>
|
|
127
|
-
searchParam !== "limit" && searchParam !== "offset"
|
|
128
|
-
),
|
|
129
|
-
["limit", limit ? limit : 50],
|
|
130
|
-
["offset", pageSize * (newPageNumber - 1)],
|
|
131
|
-
]);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
return (
|
|
135
|
-
<Flex align="center">
|
|
136
|
-
<Box
|
|
137
|
-
color="gray-3"
|
|
138
|
-
pl="xs"
|
|
139
|
-
pr="xs"
|
|
140
|
-
mr="lg"
|
|
141
|
-
fontSize="md"
|
|
142
|
-
border="1px"
|
|
143
|
-
borderColor="gray-1"
|
|
144
|
-
borderRadius="sm"
|
|
145
|
-
>
|
|
146
|
-
{totalDataCount} rows
|
|
147
|
-
</Box>
|
|
148
|
-
<Text color="gray-3" whiteSpace="nowrap">
|
|
149
|
-
You are on page
|
|
150
|
-
</Text>
|
|
151
|
-
{trueCurrentPage > firstPage ? (
|
|
152
|
-
<Box>
|
|
153
|
-
<IconButton
|
|
154
|
-
onClick={() => onPageNumberChange(firstPage)}
|
|
155
|
-
icon={<ArrowLeftIcon boxSize={3} />}
|
|
156
|
-
color="gray-4"
|
|
157
|
-
variant="ghost"
|
|
158
|
-
pl="sm"
|
|
159
|
-
_hover={{
|
|
160
|
-
transform: "scale(1.2)",
|
|
161
|
-
color: "#007DFF",
|
|
162
|
-
}}
|
|
163
|
-
/>
|
|
164
|
-
<IconButton
|
|
165
|
-
onClick={() => onPageNumberChange("<")}
|
|
166
|
-
icon={<ChevronLeftIcon />}
|
|
167
|
-
color="gray-4"
|
|
168
|
-
variant="ghost"
|
|
169
|
-
pl="xs"
|
|
170
|
-
_hover={{
|
|
171
|
-
transform: "scale(1.2)",
|
|
172
|
-
color: "#007DFF",
|
|
173
|
-
}}
|
|
174
|
-
/>
|
|
175
|
-
</Box>
|
|
176
|
-
) : (
|
|
177
|
-
<Box pl="xs" />
|
|
178
|
-
)}
|
|
179
|
-
<FormControl
|
|
180
|
-
isInvalid={isInputInvalid}
|
|
181
|
-
align="center"
|
|
182
|
-
pl="xs"
|
|
183
|
-
pr="xs"
|
|
184
|
-
>
|
|
185
|
-
<Input
|
|
186
|
-
type="number"
|
|
187
|
-
placeholder={isInputFocused ? "" : pageNumber}
|
|
188
|
-
textAlign="center"
|
|
189
|
-
width="50px"
|
|
190
|
-
onFocus={handleOnFocus}
|
|
191
|
-
onBlur={handleOnBlur}
|
|
192
|
-
onKeyDown={handleOnKeyDown}
|
|
193
|
-
/>
|
|
194
|
-
</FormControl>
|
|
195
|
-
{trueCurrentPage < lastPage ? (
|
|
196
|
-
<Box>
|
|
197
|
-
<IconButton
|
|
198
|
-
onClick={() => onPageNumberChange(">")}
|
|
199
|
-
icon={<ChevronRightIcon />}
|
|
200
|
-
color="gray-4"
|
|
201
|
-
variant="ghost"
|
|
202
|
-
pr="xs"
|
|
203
|
-
_hover={{
|
|
204
|
-
transform: "scale(1.2)",
|
|
205
|
-
color: "#007DFF",
|
|
206
|
-
}}
|
|
207
|
-
/>
|
|
208
|
-
<IconButton
|
|
209
|
-
onClick={() => onPageNumberChange(lastPage)}
|
|
210
|
-
icon={<ArrowRightIcon boxSize={3} />}
|
|
211
|
-
color="gray-4"
|
|
212
|
-
variant="ghost"
|
|
213
|
-
pr="sm"
|
|
214
|
-
_hover={{
|
|
215
|
-
transform: "scale(1.2)",
|
|
216
|
-
color: "#007DFF",
|
|
217
|
-
}}
|
|
218
|
-
/>
|
|
219
|
-
</Box>
|
|
220
|
-
) : (
|
|
221
|
-
<Box pr="xs" />
|
|
222
|
-
)}
|
|
223
|
-
<Text color="gray-3" whiteSpace="nowrap">
|
|
224
|
-
out of {lastPage}
|
|
225
|
-
</Text>
|
|
226
|
-
</Flex>
|
|
227
|
-
);
|
|
228
|
-
}
|