nautobot 2.4.13__py3-none-any.whl → 2.4.15__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.

Files changed (463) hide show
  1. nautobot/apps/choices.py +8 -0
  2. nautobot/apps/ui.py +14 -0
  3. nautobot/core/api/views.py +2 -0
  4. nautobot/core/choices.py +4 -0
  5. nautobot/core/filters.py +21 -41
  6. nautobot/core/graphql/generators.py +8 -0
  7. nautobot/core/graphql/schema.py +30 -30
  8. nautobot/core/management/commands/check_job_approval_status.py +47 -0
  9. nautobot/core/management/commands/generate_test_data.py +1 -1
  10. nautobot/core/management/commands/migrate.py +90 -1
  11. nautobot/core/models/tree_queries.py +17 -0
  12. nautobot/core/settings.py +2 -2
  13. nautobot/core/settings.yaml +3 -3
  14. nautobot/core/tables.py +29 -6
  15. nautobot/core/templates/base_django.html +1 -1
  16. nautobot/core/templates/components/panel/header_extra_content_table.html +1 -1
  17. nautobot/core/templates/generic/object_list.html +17 -20
  18. nautobot/core/templates/inc/breadcrumbs.html +14 -0
  19. nautobot/core/templatetags/buttons.py +2 -4
  20. nautobot/core/templatetags/helpers.py +29 -6
  21. nautobot/core/templatetags/ui_framework.py +21 -0
  22. nautobot/core/testing/api.py +7 -0
  23. nautobot/core/testing/filters.py +20 -3
  24. nautobot/core/testing/forms.py +1 -1
  25. nautobot/core/tests/integration/test_filters.py +2 -2
  26. nautobot/core/tests/test_breadcrumbs.py +366 -0
  27. nautobot/core/tests/test_commands.py +40 -0
  28. nautobot/core/tests/test_filters.py +51 -1
  29. nautobot/core/tests/test_forms.py +1 -1
  30. nautobot/core/tests/test_graphql.py +4 -4
  31. nautobot/core/tests/test_titles.py +183 -0
  32. nautobot/core/tests/test_tree_queries.py +30 -0
  33. nautobot/core/tests/test_views.py +2 -2
  34. nautobot/core/tests/test_views_utils.py +1 -1
  35. nautobot/core/ui/breadcrumbs.py +538 -0
  36. nautobot/core/ui/bulk_buttons.py +53 -0
  37. nautobot/core/ui/object_detail.py +31 -8
  38. nautobot/core/ui/titles.py +127 -0
  39. nautobot/core/ui/utils.py +25 -0
  40. nautobot/core/utils/migrations.py +1 -1
  41. nautobot/core/views/__init__.py +1 -1
  42. nautobot/core/views/mixins.py +26 -1
  43. nautobot/core/views/renderers.py +20 -2
  44. nautobot/core/views/utils.py +14 -13
  45. nautobot/dcim/api/serializers.py +9 -0
  46. nautobot/dcim/choices.py +55 -0
  47. nautobot/dcim/constants.py +0 -16
  48. nautobot/dcim/factory.py +1 -1
  49. nautobot/dcim/filters/__init__.py +15 -3
  50. nautobot/dcim/forms.py +120 -7
  51. nautobot/dcim/management/commands/trace_paths.py +1 -1
  52. nautobot/dcim/migrations/0072_alter_powerfeed_options_and_more.py +97 -0
  53. nautobot/dcim/models/device_component_templates.py +8 -0
  54. nautobot/dcim/models/device_components.py +31 -12
  55. nautobot/dcim/models/devices.py +1 -1
  56. nautobot/dcim/models/power.py +171 -10
  57. nautobot/dcim/models/racks.py +7 -4
  58. nautobot/dcim/tables/devices.py +2 -0
  59. nautobot/dcim/tables/devicetypes.py +1 -0
  60. nautobot/dcim/tables/power.py +30 -2
  61. nautobot/dcim/templates/dcim/device.html +2 -2
  62. nautobot/dcim/templates/dcim/devicetype_retrieve.html +1 -214
  63. nautobot/dcim/templates/dcim/location_retrieve.html +2 -2
  64. nautobot/dcim/templates/dcim/powerfeed_edit.html +8 -0
  65. nautobot/dcim/templates/dcim/powerfeed_retrieve.html +1 -1
  66. nautobot/dcim/templates/dcim/rack.html +2 -318
  67. nautobot/dcim/templates/dcim/rack_edit.html +2 -47
  68. nautobot/dcim/templates/dcim/rack_retrieve.html +318 -0
  69. nautobot/dcim/templates/dcim/rack_update.html +47 -0
  70. nautobot/dcim/tests/integration/test_device_bulk_operations.py +61 -0
  71. nautobot/dcim/tests/test_api.py +24 -4
  72. nautobot/dcim/tests/test_filters.py +91 -13
  73. nautobot/dcim/tests/test_models.py +262 -0
  74. nautobot/dcim/tests/test_views.py +20 -12
  75. nautobot/dcim/urls.py +2 -27
  76. nautobot/dcim/utils.py +13 -30
  77. nautobot/dcim/views.py +428 -146
  78. nautobot/extras/choices.py +12 -4
  79. nautobot/extras/factory.py +19 -20
  80. nautobot/extras/filters/__init__.py +3 -2
  81. nautobot/extras/filters/mixins.py +23 -7
  82. nautobot/extras/forms/__init__.py +2 -1
  83. nautobot/extras/forms/forms.py +71 -0
  84. nautobot/extras/forms/mixins.py +4 -2
  85. nautobot/extras/managers.py +4 -1
  86. nautobot/extras/migrations/0062_collect_roles_from_related_apps_roles.py +30 -7
  87. nautobot/extras/migrations/0124_add_joblogentry_index.py +16 -0
  88. nautobot/extras/migrations/0125_jobresult_date_started.py +18 -0
  89. nautobot/extras/models/customfields.py +53 -5
  90. nautobot/extras/models/datasources.py +1 -2
  91. nautobot/extras/models/jobs.py +13 -3
  92. nautobot/extras/models/relationships.py +55 -6
  93. nautobot/extras/plugins/views.py +24 -1
  94. nautobot/extras/secrets/__init__.py +1 -1
  95. nautobot/extras/tables.py +9 -0
  96. nautobot/extras/templates/extras/customfield.html +2 -129
  97. nautobot/extras/templates/extras/customfield_edit.html +2 -108
  98. nautobot/extras/templates/extras/customfield_retrieve.html +129 -0
  99. nautobot/extras/templates/extras/customfield_update.html +108 -0
  100. nautobot/extras/templates/extras/graphqlquery.html +2 -97
  101. nautobot/extras/templates/extras/graphqlquery_list.html +1 -0
  102. nautobot/extras/templates/extras/graphqlquery_retrieve.html +97 -0
  103. nautobot/extras/templates/extras/inc/jobresult.html +7 -3
  104. nautobot/extras/templates/extras/jobresult.html +2 -155
  105. nautobot/extras/templates/extras/jobresult_retrieve.html +155 -0
  106. nautobot/extras/templates/extras/marketplace.html +5 -6
  107. nautobot/extras/templates/extras/note.html +2 -53
  108. nautobot/extras/templates/extras/note_retrieve.html +53 -0
  109. nautobot/extras/templates/extras/plugins_list.html +5 -6
  110. nautobot/extras/templates/extras/secretsgroup.html +2 -29
  111. nautobot/extras/templates/extras/secretsgroup_edit.html +2 -82
  112. nautobot/extras/templates/extras/secretsgroup_retrieve.html +29 -0
  113. nautobot/extras/templates/extras/secretsgroup_update.html +82 -0
  114. nautobot/extras/templatetags/custom_links.py +2 -2
  115. nautobot/extras/templatetags/job_buttons.py +1 -1
  116. nautobot/extras/templatetags/plugins.py +1 -1
  117. nautobot/extras/tests/integration/test_computedfields.py +2 -2
  118. nautobot/extras/tests/integration/test_customfields.py +14 -11
  119. nautobot/extras/tests/integration/test_dynamicgroups.py +1 -1
  120. nautobot/extras/tests/integration/test_notes.py +1 -1
  121. nautobot/extras/tests/integration/test_plugins.py +6 -6
  122. nautobot/extras/tests/integration/test_relationships.py +2 -2
  123. nautobot/extras/tests/test_customfields.py +115 -7
  124. nautobot/extras/tests/test_filters.py +9 -0
  125. nautobot/extras/tests/test_forms.py +2 -2
  126. nautobot/extras/tests/test_plugins.py +2 -3
  127. nautobot/extras/tests/test_relationships.py +14 -8
  128. nautobot/extras/tests/test_views.py +285 -2
  129. nautobot/extras/urls.py +5 -110
  130. nautobot/extras/utils.py +5 -2
  131. nautobot/extras/views.py +116 -311
  132. nautobot/ipam/api/views.py +69 -6
  133. nautobot/ipam/tables.py +8 -15
  134. nautobot/ipam/tests/migration/test_migrations.py +8 -8
  135. nautobot/ipam/tests/test_api.py +352 -2
  136. nautobot/ipam/tests/test_models.py +1 -1
  137. nautobot/project-static/docs/404.html +34 -34
  138. nautobot/project-static/docs/apps/index.html +34 -34
  139. nautobot/project-static/docs/apps/nautobot-apps.html +34 -34
  140. nautobot/project-static/docs/assets/_mkdocstrings.css +44 -6
  141. nautobot/project-static/docs/assets/javascripts/{bundle.56ea9cef.min.js → bundle.50899def.min.js} +2 -2
  142. nautobot/project-static/docs/assets/javascripts/{bundle.56ea9cef.min.js.map → bundle.50899def.min.js.map} +2 -2
  143. nautobot/project-static/docs/assets/stylesheets/{main.342714a4.min.css → main.7e37652d.min.css} +1 -1
  144. nautobot/project-static/docs/assets/stylesheets/{main.342714a4.min.css.map → main.7e37652d.min.css.map} +1 -1
  145. nautobot/project-static/docs/code-reference/nautobot/apps/__init__.html +39 -34
  146. nautobot/project-static/docs/code-reference/nautobot/apps/admin.html +36 -34
  147. nautobot/project-static/docs/code-reference/nautobot/apps/api.html +139 -54
  148. nautobot/project-static/docs/code-reference/nautobot/apps/change_logging.html +48 -38
  149. nautobot/project-static/docs/code-reference/nautobot/apps/choices.html +50 -40
  150. nautobot/project-static/docs/code-reference/nautobot/apps/config.html +36 -34
  151. nautobot/project-static/docs/code-reference/nautobot/apps/constants.html +35 -34
  152. nautobot/project-static/docs/code-reference/nautobot/apps/datasources.html +43 -39
  153. nautobot/project-static/docs/code-reference/nautobot/apps/events.html +52 -42
  154. nautobot/project-static/docs/code-reference/nautobot/apps/exceptions.html +50 -41
  155. nautobot/project-static/docs/code-reference/nautobot/apps/factory.html +54 -44
  156. nautobot/project-static/docs/code-reference/nautobot/apps/filters.html +85 -93
  157. nautobot/project-static/docs/code-reference/nautobot/apps/forms.html +154 -62
  158. nautobot/project-static/docs/code-reference/nautobot/apps/graphql.html +54 -46
  159. nautobot/project-static/docs/code-reference/nautobot/apps/jobs.html +146 -87
  160. nautobot/project-static/docs/code-reference/nautobot/apps/models.html +240 -70
  161. nautobot/project-static/docs/code-reference/nautobot/apps/querysets.html +38 -35
  162. nautobot/project-static/docs/code-reference/nautobot/apps/secrets.html +41 -35
  163. nautobot/project-static/docs/code-reference/nautobot/apps/tables.html +173 -52
  164. nautobot/project-static/docs/code-reference/nautobot/apps/testing.html +269 -85
  165. nautobot/project-static/docs/code-reference/nautobot/apps/ui.html +5987 -2643
  166. nautobot/project-static/docs/code-reference/nautobot/apps/urls.html +36 -34
  167. nautobot/project-static/docs/code-reference/nautobot/apps/utils.html +165 -89
  168. nautobot/project-static/docs/code-reference/nautobot/apps/views.html +161 -69
  169. nautobot/project-static/docs/development/apps/api/configuration-view.html +34 -34
  170. nautobot/project-static/docs/development/apps/api/database-backend-config.html +34 -34
  171. nautobot/project-static/docs/development/apps/api/models/django-admin.html +34 -34
  172. nautobot/project-static/docs/development/apps/api/models/global-search.html +34 -34
  173. nautobot/project-static/docs/development/apps/api/models/graphql.html +34 -34
  174. nautobot/project-static/docs/development/apps/api/models/index.html +34 -34
  175. nautobot/project-static/docs/development/apps/api/nautobot-app-config.html +34 -34
  176. nautobot/project-static/docs/development/apps/api/platform-features/custom-validators.html +34 -34
  177. nautobot/project-static/docs/development/apps/api/platform-features/filter-extensions.html +34 -34
  178. nautobot/project-static/docs/development/apps/api/platform-features/git-repository-content.html +34 -34
  179. nautobot/project-static/docs/development/apps/api/platform-features/index.html +34 -34
  180. nautobot/project-static/docs/development/apps/api/platform-features/jinja2-filters.html +34 -34
  181. nautobot/project-static/docs/development/apps/api/platform-features/jobs.html +34 -34
  182. nautobot/project-static/docs/development/apps/api/platform-features/populating-extensibility-features.html +34 -34
  183. nautobot/project-static/docs/development/apps/api/platform-features/secrets-providers.html +34 -34
  184. nautobot/project-static/docs/development/apps/api/platform-features/table-extensions.html +34 -34
  185. nautobot/project-static/docs/development/apps/api/platform-features/uniquely-identify-objects.html +34 -34
  186. nautobot/project-static/docs/development/apps/api/prometheus.html +34 -34
  187. nautobot/project-static/docs/development/apps/api/setup.html +34 -34
  188. nautobot/project-static/docs/development/apps/api/testing.html +34 -34
  189. nautobot/project-static/docs/development/apps/api/ui-extensions/banners.html +34 -34
  190. nautobot/project-static/docs/development/apps/api/ui-extensions/home-page.html +34 -34
  191. nautobot/project-static/docs/development/apps/api/ui-extensions/index.html +34 -34
  192. nautobot/project-static/docs/development/apps/api/ui-extensions/navigation.html +34 -34
  193. nautobot/project-static/docs/development/apps/api/ui-extensions/object-views.html +34 -34
  194. nautobot/project-static/docs/development/apps/api/views/base-template.html +34 -34
  195. nautobot/project-static/docs/development/apps/api/views/core-view-overrides.html +34 -34
  196. nautobot/project-static/docs/development/apps/api/views/django-generic-views.html +34 -34
  197. nautobot/project-static/docs/development/apps/api/views/help-documentation.html +34 -34
  198. nautobot/project-static/docs/development/apps/api/views/index.html +34 -34
  199. nautobot/project-static/docs/development/apps/api/views/nautobot-generic-views.html +34 -34
  200. nautobot/project-static/docs/development/apps/api/views/nautobotuiviewset.html +42 -36
  201. nautobot/project-static/docs/development/apps/api/views/nautobotuiviewsetrouter.html +34 -34
  202. nautobot/project-static/docs/development/apps/api/views/notes.html +34 -34
  203. nautobot/project-static/docs/development/apps/api/views/rest-api.html +34 -34
  204. nautobot/project-static/docs/development/apps/api/views/urls.html +34 -34
  205. nautobot/project-static/docs/development/apps/index.html +34 -34
  206. nautobot/project-static/docs/development/apps/migration/code-updates.html +34 -34
  207. nautobot/project-static/docs/development/apps/migration/dependency-updates.html +34 -34
  208. nautobot/project-static/docs/development/apps/migration/from-v1.html +34 -34
  209. nautobot/project-static/docs/development/apps/migration/model-updates/dcim.html +34 -34
  210. nautobot/project-static/docs/development/apps/migration/model-updates/extras.html +34 -34
  211. nautobot/project-static/docs/development/apps/migration/model-updates/global.html +34 -34
  212. nautobot/project-static/docs/development/apps/migration/model-updates/ipam.html +34 -34
  213. nautobot/project-static/docs/development/apps/migration/ui-component-framework/best-practices.html +37 -37
  214. nautobot/project-static/docs/development/apps/migration/ui-component-framework/breadcrumbs-titles.html +10544 -0
  215. nautobot/project-static/docs/development/apps/migration/ui-component-framework/custom-content.html +34 -34
  216. nautobot/project-static/docs/development/apps/migration/ui-component-framework/index.html +34 -34
  217. nautobot/project-static/docs/development/apps/migration/ui-component-framework/migration-steps.html +34 -34
  218. nautobot/project-static/docs/development/apps/porting-from-netbox.html +37 -37
  219. nautobot/project-static/docs/development/core/application-registry.html +162 -133
  220. nautobot/project-static/docs/development/core/best-practices.html +34 -34
  221. nautobot/project-static/docs/development/core/bootstrap-ui.html +34 -34
  222. nautobot/project-static/docs/development/core/caching.html +34 -34
  223. nautobot/project-static/docs/development/core/controllers.html +34 -34
  224. nautobot/project-static/docs/development/core/docker-compose-advanced-use-cases.html +34 -34
  225. nautobot/project-static/docs/development/core/generic-views.html +34 -34
  226. nautobot/project-static/docs/development/core/getting-started.html +34 -34
  227. nautobot/project-static/docs/development/core/homepage.html +34 -34
  228. nautobot/project-static/docs/development/core/index.html +34 -34
  229. nautobot/project-static/docs/development/core/minikube-dev-environment-for-k8s-jobs.html +34 -34
  230. nautobot/project-static/docs/development/core/model-checklist.html +34 -34
  231. nautobot/project-static/docs/development/core/model-features.html +34 -34
  232. nautobot/project-static/docs/development/core/natural-keys.html +34 -34
  233. nautobot/project-static/docs/development/core/navigation-menu.html +34 -34
  234. nautobot/project-static/docs/development/core/release-checklist.html +34 -34
  235. nautobot/project-static/docs/development/core/role-internals.html +34 -34
  236. nautobot/project-static/docs/development/core/settings.html +34 -34
  237. nautobot/project-static/docs/development/core/style-guide.html +34 -34
  238. nautobot/project-static/docs/development/core/templates.html +34 -34
  239. nautobot/project-static/docs/development/core/testing.html +34 -34
  240. nautobot/project-static/docs/development/core/ui-component-framework.html +724 -289
  241. nautobot/project-static/docs/development/core/user-preferences.html +34 -34
  242. nautobot/project-static/docs/development/index.html +34 -34
  243. nautobot/project-static/docs/development/jobs/getting-started.html +34 -34
  244. nautobot/project-static/docs/development/jobs/index.html +34 -34
  245. nautobot/project-static/docs/development/jobs/installation.html +34 -34
  246. nautobot/project-static/docs/development/jobs/job-extensions.html +34 -34
  247. nautobot/project-static/docs/development/jobs/job-logging.html +34 -34
  248. nautobot/project-static/docs/development/jobs/job-patterns.html +34 -34
  249. nautobot/project-static/docs/development/jobs/job-structure.html +34 -34
  250. nautobot/project-static/docs/development/jobs/migration/from-v1.html +34 -34
  251. nautobot/project-static/docs/development/jobs/testing.html +34 -34
  252. nautobot/project-static/docs/index.html +34 -34
  253. nautobot/project-static/docs/media/development/core/ui-component-framework/breadcrumbs-titles-data-flow.png +0 -0
  254. nautobot/project-static/docs/media/power_distribution.png +0 -0
  255. nautobot/project-static/docs/objects.inv +0 -0
  256. nautobot/project-static/docs/overview/application_stack.html +34 -34
  257. nautobot/project-static/docs/overview/design_philosophy.html +34 -34
  258. nautobot/project-static/docs/release-notes/index.html +34 -34
  259. nautobot/project-static/docs/release-notes/version-1.0.html +34 -34
  260. nautobot/project-static/docs/release-notes/version-1.1.html +34 -34
  261. nautobot/project-static/docs/release-notes/version-1.2.html +34 -34
  262. nautobot/project-static/docs/release-notes/version-1.3.html +34 -34
  263. nautobot/project-static/docs/release-notes/version-1.4.html +34 -34
  264. nautobot/project-static/docs/release-notes/version-1.5.html +34 -34
  265. nautobot/project-static/docs/release-notes/version-1.6.html +34 -34
  266. nautobot/project-static/docs/release-notes/version-2.0.html +34 -34
  267. nautobot/project-static/docs/release-notes/version-2.1.html +34 -34
  268. nautobot/project-static/docs/release-notes/version-2.2.html +34 -34
  269. nautobot/project-static/docs/release-notes/version-2.3.html +34 -34
  270. nautobot/project-static/docs/release-notes/version-2.4.html +402 -34
  271. nautobot/project-static/docs/requirements.txt +3 -3
  272. nautobot/project-static/docs/search/search_index.json +1 -1
  273. nautobot/project-static/docs/sitemap.xml +303 -299
  274. nautobot/project-static/docs/sitemap.xml.gz +0 -0
  275. nautobot/project-static/docs/user-guide/administration/configuration/authentication/ldap.html +34 -34
  276. nautobot/project-static/docs/user-guide/administration/configuration/authentication/remote.html +34 -34
  277. nautobot/project-static/docs/user-guide/administration/configuration/authentication/sso.html +34 -34
  278. nautobot/project-static/docs/user-guide/administration/configuration/index.html +34 -34
  279. nautobot/project-static/docs/user-guide/administration/configuration/redis.html +34 -34
  280. nautobot/project-static/docs/user-guide/administration/configuration/settings.html +37 -37
  281. nautobot/project-static/docs/user-guide/administration/configuration/time-zones.html +34 -34
  282. nautobot/project-static/docs/user-guide/administration/guides/celery-queues.html +34 -34
  283. nautobot/project-static/docs/user-guide/administration/guides/docker.html +34 -34
  284. nautobot/project-static/docs/user-guide/administration/guides/health-checks.html +34 -34
  285. nautobot/project-static/docs/user-guide/administration/guides/permissions.html +34 -34
  286. nautobot/project-static/docs/user-guide/administration/guides/prometheus-metrics.html +34 -34
  287. nautobot/project-static/docs/user-guide/administration/guides/replicating-nautobot.html +34 -34
  288. nautobot/project-static/docs/user-guide/administration/guides/request-profiling.html +34 -34
  289. nautobot/project-static/docs/user-guide/administration/guides/s3-django-storage.html +34 -34
  290. nautobot/project-static/docs/user-guide/administration/guides/selinux-troubleshooting.html +34 -34
  291. nautobot/project-static/docs/user-guide/administration/installation/app-install.html +34 -34
  292. nautobot/project-static/docs/user-guide/administration/installation/external-authentication.html +34 -34
  293. nautobot/project-static/docs/user-guide/administration/installation/http-server.html +34 -34
  294. nautobot/project-static/docs/user-guide/administration/installation/index.html +34 -34
  295. nautobot/project-static/docs/user-guide/administration/installation/install_system.html +34 -34
  296. nautobot/project-static/docs/user-guide/administration/installation/nautobot.html +34 -34
  297. nautobot/project-static/docs/user-guide/administration/installation/services.html +34 -34
  298. nautobot/project-static/docs/user-guide/administration/migration/migrating-from-netbox.html +34 -34
  299. nautobot/project-static/docs/user-guide/administration/migration/migrating-from-postgresql.html +34 -34
  300. nautobot/project-static/docs/user-guide/administration/security/index.html +34 -34
  301. nautobot/project-static/docs/user-guide/administration/security/notices.html +34 -34
  302. nautobot/project-static/docs/user-guide/administration/tools/nautobot-server.html +296 -251
  303. nautobot/project-static/docs/user-guide/administration/tools/nautobot-shell.html +34 -34
  304. nautobot/project-static/docs/user-guide/administration/upgrading/database-backup.html +34 -34
  305. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/after-you-upgrade.html +34 -34
  306. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/before-you-upgrade.html +34 -34
  307. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/for-developers.html +34 -34
  308. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/index.html +34 -34
  309. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/whats-changed.html +34 -34
  310. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/region-and-site-data-migration-guide.html +34 -34
  311. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/upgrading-from-nautobot-v1.html +34 -34
  312. nautobot/project-static/docs/user-guide/administration/upgrading/upgrading.html +34 -34
  313. nautobot/project-static/docs/user-guide/core-data-model/circuits/circuit.html +34 -34
  314. nautobot/project-static/docs/user-guide/core-data-model/circuits/circuittermination.html +34 -34
  315. nautobot/project-static/docs/user-guide/core-data-model/circuits/circuittype.html +34 -34
  316. nautobot/project-static/docs/user-guide/core-data-model/circuits/provider.html +34 -34
  317. nautobot/project-static/docs/user-guide/core-data-model/circuits/providernetwork.html +34 -34
  318. nautobot/project-static/docs/user-guide/core-data-model/cloud/cloud.html +34 -34
  319. nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudaccount.html +34 -34
  320. nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudnetwork.html +34 -34
  321. nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudnetworkprefixassignment.html +34 -34
  322. nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudresourcetype.html +34 -34
  323. nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudservice.html +34 -34
  324. nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudservicenetworkassignment.html +34 -34
  325. nautobot/project-static/docs/user-guide/core-data-model/dcim/cable.html +34 -34
  326. nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleport.html +34 -34
  327. nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleporttemplate.html +34 -34
  328. nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverport.html +34 -34
  329. nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverporttemplate.html +34 -34
  330. nautobot/project-static/docs/user-guide/core-data-model/dcim/controller.html +34 -34
  331. nautobot/project-static/docs/user-guide/core-data-model/dcim/controllermanageddevicegroup.html +34 -34
  332. nautobot/project-static/docs/user-guide/core-data-model/dcim/device.html +34 -34
  333. nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebay.html +34 -34
  334. nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebaytemplate.html +34 -34
  335. nautobot/project-static/docs/user-guide/core-data-model/dcim/devicefamily.html +34 -34
  336. nautobot/project-static/docs/user-guide/core-data-model/dcim/deviceredundancygroup.html +34 -34
  337. nautobot/project-static/docs/user-guide/core-data-model/dcim/devicetype.html +34 -34
  338. nautobot/project-static/docs/user-guide/core-data-model/dcim/frontport.html +34 -34
  339. nautobot/project-static/docs/user-guide/core-data-model/dcim/frontporttemplate.html +34 -34
  340. nautobot/project-static/docs/user-guide/core-data-model/dcim/interface.html +37 -37
  341. nautobot/project-static/docs/user-guide/core-data-model/dcim/interfaceredundancygroup.html +34 -34
  342. nautobot/project-static/docs/user-guide/core-data-model/dcim/interfacetemplate.html +34 -34
  343. nautobot/project-static/docs/user-guide/core-data-model/dcim/inventoryitem.html +42 -52
  344. nautobot/project-static/docs/user-guide/core-data-model/dcim/location.html +34 -34
  345. nautobot/project-static/docs/user-guide/core-data-model/dcim/locationtype.html +34 -34
  346. nautobot/project-static/docs/user-guide/core-data-model/dcim/manufacturer.html +34 -34
  347. nautobot/project-static/docs/user-guide/core-data-model/dcim/module.html +34 -34
  348. nautobot/project-static/docs/user-guide/core-data-model/dcim/modulebay.html +37 -37
  349. nautobot/project-static/docs/user-guide/core-data-model/dcim/modulebaytemplate.html +34 -34
  350. nautobot/project-static/docs/user-guide/core-data-model/dcim/modulefamily.html +34 -34
  351. nautobot/project-static/docs/user-guide/core-data-model/dcim/moduletype.html +34 -34
  352. nautobot/project-static/docs/user-guide/core-data-model/dcim/platform.html +34 -34
  353. nautobot/project-static/docs/user-guide/core-data-model/dcim/powerfeed.html +316 -39
  354. nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlet.html +35 -35
  355. nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlettemplate.html +34 -34
  356. nautobot/project-static/docs/user-guide/core-data-model/dcim/powerpanel.html +147 -37
  357. nautobot/project-static/docs/user-guide/core-data-model/dcim/powerport.html +52 -35
  358. nautobot/project-static/docs/user-guide/core-data-model/dcim/powerporttemplate.html +51 -34
  359. nautobot/project-static/docs/user-guide/core-data-model/dcim/rack.html +34 -34
  360. nautobot/project-static/docs/user-guide/core-data-model/dcim/rackgroup.html +34 -34
  361. nautobot/project-static/docs/user-guide/core-data-model/dcim/rackreservation.html +34 -34
  362. nautobot/project-static/docs/user-guide/core-data-model/dcim/rearport.html +34 -34
  363. nautobot/project-static/docs/user-guide/core-data-model/dcim/rearporttemplate.html +34 -34
  364. nautobot/project-static/docs/user-guide/core-data-model/dcim/softwareimagefile.html +34 -34
  365. nautobot/project-static/docs/user-guide/core-data-model/dcim/softwareversion.html +34 -34
  366. nautobot/project-static/docs/user-guide/core-data-model/dcim/virtualchassis.html +34 -34
  367. nautobot/project-static/docs/user-guide/core-data-model/dcim/virtualdevicecontext.html +34 -34
  368. nautobot/project-static/docs/user-guide/core-data-model/extras/configcontext.html +34 -34
  369. nautobot/project-static/docs/user-guide/core-data-model/extras/configcontextschema.html +34 -34
  370. nautobot/project-static/docs/user-guide/core-data-model/extras/contact.html +34 -34
  371. nautobot/project-static/docs/user-guide/core-data-model/extras/team.html +34 -34
  372. nautobot/project-static/docs/user-guide/core-data-model/ipam/ipaddress.html +34 -34
  373. nautobot/project-static/docs/user-guide/core-data-model/ipam/namespace.html +34 -34
  374. nautobot/project-static/docs/user-guide/core-data-model/ipam/prefix.html +34 -34
  375. nautobot/project-static/docs/user-guide/core-data-model/ipam/rir.html +34 -34
  376. nautobot/project-static/docs/user-guide/core-data-model/ipam/routetarget.html +34 -34
  377. nautobot/project-static/docs/user-guide/core-data-model/ipam/service.html +34 -34
  378. nautobot/project-static/docs/user-guide/core-data-model/ipam/vlan.html +34 -34
  379. nautobot/project-static/docs/user-guide/core-data-model/ipam/vlangroup.html +34 -34
  380. nautobot/project-static/docs/user-guide/core-data-model/ipam/vrf.html +34 -34
  381. nautobot/project-static/docs/user-guide/core-data-model/overview/introduction.html +34 -34
  382. nautobot/project-static/docs/user-guide/core-data-model/tenancy/tenant.html +34 -34
  383. nautobot/project-static/docs/user-guide/core-data-model/tenancy/tenantgroup.html +34 -34
  384. nautobot/project-static/docs/user-guide/core-data-model/virtualization/cluster.html +34 -34
  385. nautobot/project-static/docs/user-guide/core-data-model/virtualization/clustergroup.html +34 -34
  386. nautobot/project-static/docs/user-guide/core-data-model/virtualization/clustertype.html +34 -34
  387. nautobot/project-static/docs/user-guide/core-data-model/virtualization/virtualmachine.html +34 -34
  388. nautobot/project-static/docs/user-guide/core-data-model/virtualization/vminterface.html +34 -34
  389. nautobot/project-static/docs/user-guide/core-data-model/wireless/index.html +34 -34
  390. nautobot/project-static/docs/user-guide/core-data-model/wireless/radioprofile.html +34 -34
  391. nautobot/project-static/docs/user-guide/core-data-model/wireless/supporteddatarate.html +34 -34
  392. nautobot/project-static/docs/user-guide/core-data-model/wireless/wirelessnetwork.html +34 -34
  393. nautobot/project-static/docs/user-guide/feature-guides/contacts-and-teams.html +34 -34
  394. nautobot/project-static/docs/user-guide/feature-guides/custom-fields.html +34 -34
  395. nautobot/project-static/docs/user-guide/feature-guides/getting-started/creating-devices.html +34 -34
  396. nautobot/project-static/docs/user-guide/feature-guides/getting-started/creating-location-types-and-locations.html +34 -34
  397. nautobot/project-static/docs/user-guide/feature-guides/getting-started/index.html +34 -34
  398. nautobot/project-static/docs/user-guide/feature-guides/getting-started/interfaces.html +34 -34
  399. nautobot/project-static/docs/user-guide/feature-guides/getting-started/ipam.html +34 -34
  400. nautobot/project-static/docs/user-guide/feature-guides/getting-started/platforms.html +34 -34
  401. nautobot/project-static/docs/user-guide/feature-guides/getting-started/search-bar.html +34 -34
  402. nautobot/project-static/docs/user-guide/feature-guides/getting-started/tenants.html +34 -34
  403. nautobot/project-static/docs/user-guide/feature-guides/getting-started/vlans-and-vlan-groups.html +34 -34
  404. nautobot/project-static/docs/user-guide/feature-guides/git-data-source.html +34 -34
  405. nautobot/project-static/docs/user-guide/feature-guides/graphql.html +34 -34
  406. nautobot/project-static/docs/user-guide/feature-guides/ip-address-merge-tool.html +34 -34
  407. nautobot/project-static/docs/user-guide/feature-guides/relationships.html +34 -34
  408. nautobot/project-static/docs/user-guide/feature-guides/software-image-files-and-versions.html +34 -34
  409. nautobot/project-static/docs/user-guide/feature-guides/wireless-networks-and-controllers.html +34 -34
  410. nautobot/project-static/docs/user-guide/index.html +34 -34
  411. nautobot/project-static/docs/user-guide/platform-functionality/change-logging.html +34 -34
  412. nautobot/project-static/docs/user-guide/platform-functionality/computedfield.html +34 -34
  413. nautobot/project-static/docs/user-guide/platform-functionality/customfield.html +34 -34
  414. nautobot/project-static/docs/user-guide/platform-functionality/customlink.html +34 -34
  415. nautobot/project-static/docs/user-guide/platform-functionality/dynamicgroup.html +34 -34
  416. nautobot/project-static/docs/user-guide/platform-functionality/events.html +34 -34
  417. nautobot/project-static/docs/user-guide/platform-functionality/exporttemplate.html +34 -34
  418. nautobot/project-static/docs/user-guide/platform-functionality/externalintegration.html +34 -34
  419. nautobot/project-static/docs/user-guide/platform-functionality/gitrepository.html +34 -34
  420. nautobot/project-static/docs/user-guide/platform-functionality/graphql.html +34 -34
  421. nautobot/project-static/docs/user-guide/platform-functionality/graphqlquery.html +34 -34
  422. nautobot/project-static/docs/user-guide/platform-functionality/imageattachment.html +34 -34
  423. nautobot/project-static/docs/user-guide/platform-functionality/jobs/index.html +34 -34
  424. nautobot/project-static/docs/user-guide/platform-functionality/jobs/job-scheduling-and-approvals.html +35 -35
  425. nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobbutton.html +34 -34
  426. nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobhook.html +34 -34
  427. nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobqueue.html +34 -34
  428. nautobot/project-static/docs/user-guide/platform-functionality/jobs/kubernetes-job-support.html +34 -34
  429. nautobot/project-static/docs/user-guide/platform-functionality/jobs/managing-jobs.html +34 -34
  430. nautobot/project-static/docs/user-guide/platform-functionality/jobs/models.html +34 -34
  431. nautobot/project-static/docs/user-guide/platform-functionality/napalm.html +34 -34
  432. nautobot/project-static/docs/user-guide/platform-functionality/note.html +34 -34
  433. nautobot/project-static/docs/user-guide/platform-functionality/objectmetadata.html +34 -34
  434. nautobot/project-static/docs/user-guide/platform-functionality/relationship.html +34 -34
  435. nautobot/project-static/docs/user-guide/platform-functionality/rendering-jinja-templates.html +34 -34
  436. nautobot/project-static/docs/user-guide/platform-functionality/rest-api/authentication.html +34 -34
  437. nautobot/project-static/docs/user-guide/platform-functionality/rest-api/filtering.html +34 -34
  438. nautobot/project-static/docs/user-guide/platform-functionality/rest-api/overview.html +34 -34
  439. nautobot/project-static/docs/user-guide/platform-functionality/rest-api/ui-related-endpoints.html +34 -34
  440. nautobot/project-static/docs/user-guide/platform-functionality/role.html +34 -34
  441. nautobot/project-static/docs/user-guide/platform-functionality/savedview.html +34 -34
  442. nautobot/project-static/docs/user-guide/platform-functionality/secret.html +34 -34
  443. nautobot/project-static/docs/user-guide/platform-functionality/staticgroupassociation.html +34 -34
  444. nautobot/project-static/docs/user-guide/platform-functionality/status.html +34 -34
  445. nautobot/project-static/docs/user-guide/platform-functionality/tag.html +34 -34
  446. nautobot/project-static/docs/user-guide/platform-functionality/template-filters.html +34 -34
  447. nautobot/project-static/docs/user-guide/platform-functionality/users/objectpermission.html +34 -34
  448. nautobot/project-static/docs/user-guide/platform-functionality/users/token.html +34 -34
  449. nautobot/project-static/docs/user-guide/platform-functionality/webhook.html +34 -34
  450. nautobot/tenancy/api/views.py +2 -1
  451. nautobot/users/tests/test_api.py +2 -2
  452. nautobot/virtualization/templates/virtualization/virtualmachine.html +2 -252
  453. nautobot/virtualization/templates/virtualization/virtualmachine_edit.html +2 -75
  454. nautobot/virtualization/templates/virtualization/virtualmachine_retrieve.html +252 -0
  455. nautobot/virtualization/templates/virtualization/virtualmachine_update.html +75 -0
  456. nautobot/virtualization/urls.py +3 -61
  457. nautobot/virtualization/views.py +48 -72
  458. {nautobot-2.4.13.dist-info → nautobot-2.4.15.dist-info}/METADATA +27 -27
  459. {nautobot-2.4.13.dist-info → nautobot-2.4.15.dist-info}/RECORD +463 -439
  460. {nautobot-2.4.13.dist-info → nautobot-2.4.15.dist-info}/LICENSE.txt +0 -0
  461. {nautobot-2.4.13.dist-info → nautobot-2.4.15.dist-info}/NOTICE +0 -0
  462. {nautobot-2.4.13.dist-info → nautobot-2.4.15.dist-info}/WHEEL +0 -0
  463. {nautobot-2.4.13.dist-info → nautobot-2.4.15.dist-info}/entry_points.txt +0 -0
@@ -1,3 +1,4 @@
1
+ from collections import defaultdict
1
2
  import logging
2
3
 
3
4
  from django import forms
@@ -422,31 +423,38 @@ class RelationshipModel(models.Model):
422
423
  class RelationshipManager(BaseManager.from_queryset(RestrictedQuerySet)):
423
424
  use_in_migrations = True
424
425
 
425
- def get_for_model(self, model, hidden=None):
426
+ def get_for_model(self, model, hidden=None, get_queryset=True):
426
427
  """
427
428
  Return all Relationships assigned to the given model.
428
429
 
429
430
  Args:
430
431
  model (Model): The django model to which relationships are registered
431
432
  hidden (bool): Filter based on the value of the hidden flag, or None to not apply this filter
433
+ get_queryset (bool): Whether to return querysets or object lists.
432
434
 
433
- Returns a tuple of source and destination scoped relationship querysets.
435
+ Returns a tuple of source and destination scoped relationship record querysets/lists.
434
436
  """
435
437
  return (
436
- self.get_for_model_source(model, hidden=hidden),
437
- self.get_for_model_destination(model, hidden=hidden),
438
+ self.get_for_model_source(model, hidden=hidden, get_queryset=get_queryset),
439
+ self.get_for_model_destination(model, hidden=hidden, get_queryset=get_queryset),
438
440
  )
439
441
 
440
- def get_for_model_source(self, model, hidden=None):
442
+ def get_for_model_source(self, model, hidden=None, get_queryset=True):
441
443
  """
442
444
  Return all Relationships assigned to the given model for the source side only.
443
445
 
444
446
  Args:
445
447
  model (Model): The django model to which relationships are registered
446
448
  hidden (bool): Filter based on the value of the hidden flag, or None to not apply this filter
449
+ get_queryset (bool): Whether to return a queryset or an object list.
447
450
  """
448
451
  concrete_model = model._meta.concrete_model
449
452
  cache_key = f"{self.get_for_model_source.cache_key_prefix}.{concrete_model._meta.label_lower}.{hidden}"
453
+ list_cache_key = f"{cache_key}.list"
454
+ if not get_queryset:
455
+ listing = cache.get(list_cache_key)
456
+ if listing is not None:
457
+ return listing
450
458
  queryset = cache.get(cache_key)
451
459
  if queryset is None:
452
460
  content_type = ContentType.objects.get_for_model(concrete_model)
@@ -456,20 +464,30 @@ class RelationshipManager(BaseManager.from_queryset(RestrictedQuerySet)):
456
464
  if hidden is not None:
457
465
  queryset = queryset.filter(source_hidden=hidden)
458
466
  cache.set(cache_key, queryset)
467
+ if not get_queryset:
468
+ listing = list(queryset)
469
+ cache.set(list_cache_key, listing)
470
+ return listing
459
471
  return queryset
460
472
 
461
473
  get_for_model_source.cache_key_prefix = "nautobot.extras.relationship.get_for_model_source"
462
474
 
463
- def get_for_model_destination(self, model, hidden=None):
475
+ def get_for_model_destination(self, model, hidden=None, get_queryset=True):
464
476
  """
465
477
  Return all Relationships assigned to the given model for the destination side only.
466
478
 
467
479
  Args:
468
480
  model (Model): The django model to which relationships are registered
469
481
  hidden (bool): Filter based on the value of the hidden flag, or None to not apply this filter
482
+ get_queryset (bool): Whether to return a queryset or an object list.
470
483
  """
471
484
  concrete_model = model._meta.concrete_model
472
485
  cache_key = f"{self.get_for_model_destination.cache_key_prefix}.{concrete_model._meta.label_lower}.{hidden}"
486
+ list_cache_key = f"{cache_key}.list"
487
+ if not get_queryset:
488
+ listing = cache.get(list_cache_key)
489
+ if listing is not None:
490
+ return listing
473
491
  queryset = cache.get(cache_key)
474
492
  if queryset is None:
475
493
  content_type = ContentType.objects.get_for_model(concrete_model)
@@ -481,6 +499,10 @@ class RelationshipManager(BaseManager.from_queryset(RestrictedQuerySet)):
481
499
  if hidden is not None:
482
500
  queryset = queryset.filter(destination_hidden=hidden)
483
501
  cache.set(cache_key, queryset)
502
+ if not get_queryset:
503
+ listing = list(queryset)
504
+ cache.set(list_cache_key, listing)
505
+ return listing
484
506
  return queryset
485
507
 
486
508
  get_for_model_destination.cache_key_prefix = "nautobot.extras.relationship.get_for_model_destination"
@@ -495,6 +517,33 @@ class RelationshipManager(BaseManager.from_queryset(RestrictedQuerySet)):
495
517
  | Q(destination_type=content_type, required_on=RelationshipRequiredSideChoices.DESTINATION_SIDE_REQUIRED)
496
518
  )
497
519
 
520
+ def populate_list_caches(self):
521
+ """Populate all relevant caches for `get_for_model(..., get_queryset=False)` and related lookups."""
522
+ queryset = self.all().select_related("source_type", "destination_type")
523
+ listings = defaultdict(lambda: defaultdict(lambda: defaultdict(list)))
524
+ for rel in queryset:
525
+ listings["source"][f"{rel.source_type.app_label}.{rel.source_type.model}"]["None"].append(rel)
526
+ listings["source"][f"{rel.source_type.app_label}.{rel.source_type.model}"][str(rel.source_hidden)].append(
527
+ rel
528
+ )
529
+ listings["destination"][f"{rel.destination_type.app_label}.{rel.destination_type.model}"]["None"].append(
530
+ rel
531
+ )
532
+ listings["destination"][f"{rel.destination_type.app_label}.{rel.destination_type.model}"][
533
+ str(rel.destination_hidden)
534
+ ].append(rel)
535
+ for ct in ContentType.objects.all():
536
+ label = f"{ct.app_label}.{ct.model}"
537
+ for hidden in ["None", "True", "False"]:
538
+ cache.set(
539
+ f"{self.get_for_model_source.cache_key_prefix}.{label}.{hidden}.list",
540
+ listings["source"][label][hidden],
541
+ )
542
+ cache.set(
543
+ f"{self.get_for_model_destination.cache_key_prefix}.{label}.{hidden}.list",
544
+ listings["destination"][label][hidden],
545
+ )
546
+
498
547
 
499
548
  class Relationship(
500
549
  ChangeLoggedModel,
@@ -16,6 +16,8 @@ import yaml
16
16
 
17
17
  from nautobot.core.api.views import AuthenticatedAPIRootView, NautobotAPIVersionMixin
18
18
  from nautobot.core.forms import TableConfigForm
19
+ from nautobot.core.ui.breadcrumbs import Breadcrumbs, ViewNameBreadcrumbItem
20
+ from nautobot.core.ui.titles import Titles
19
21
  from nautobot.core.views.generic import GenericView
20
22
  from nautobot.core.views.paginator import EnhancedPaginator, get_paginate_count
21
23
  from nautobot.extras.plugins.tables import InstalledAppsTable
@@ -84,6 +86,10 @@ class InstalledAppsView(GenericView):
84
86
  """
85
87
 
86
88
  table = InstalledAppsTable
89
+ breadcrumbs = Breadcrumbs(
90
+ items={"generic": [ViewNameBreadcrumbItem(view_name="apps:apps_list", label="Installed Apps")]}
91
+ )
92
+ view_titles = Titles(titles={"generic": "Installed Apps"})
87
93
 
88
94
  def get(self, request):
89
95
  marketplace_data = load_marketplace_data()
@@ -123,6 +129,9 @@ class InstalledAppsView(GenericView):
123
129
  "filter_form": None,
124
130
  "app_icons": app_icons,
125
131
  "display": display,
132
+ "view_action": "generic",
133
+ "breadcrumbs": self.breadcrumbs,
134
+ "view_titles": self.view_titles,
126
135
  },
127
136
  )
128
137
 
@@ -228,6 +237,11 @@ class MarketplaceView(GenericView):
228
237
  View for listing all available Apps.
229
238
  """
230
239
 
240
+ breadcrumbs = Breadcrumbs(
241
+ items={"generic": [ViewNameBreadcrumbItem(view_name="apps:apps_marketplace", label="Apps Marketplace")]}
242
+ )
243
+ view_titles = Titles(titles={"generic": "Apps Marketplace"})
244
+
231
245
  def get(self, request):
232
246
  marketplace_data = load_marketplace_data()
233
247
 
@@ -240,4 +254,13 @@ class MarketplaceView(GenericView):
240
254
  marketplace_app["installed"] = True
241
255
  break
242
256
 
243
- return render(request, "extras/marketplace.html", {"apps": marketplace_data["apps"]})
257
+ return render(
258
+ request,
259
+ "extras/marketplace.html",
260
+ {
261
+ "apps": marketplace_data["apps"],
262
+ "view_action": "generic",
263
+ "breadcrumbs": self.breadcrumbs,
264
+ "view_titles": self.view_titles,
265
+ },
266
+ )
@@ -65,7 +65,7 @@ def register_secrets_provider(provider):
65
65
  if provider.slug in registry["secrets_providers"]:
66
66
  raise KeyError(
67
67
  f'Cannot register {provider} as slug "{provider.slug}" is already registered '
68
- f'by {registry["secrets_providers"][provider.slug]}'
68
+ f"by {registry['secrets_providers'][provider.slug]}"
69
69
  )
70
70
  registry["secrets_providers"][provider.slug] = provider
71
71
 
nautobot/extras/tables.py CHANGED
@@ -890,6 +890,8 @@ class JobResultTable(BaseTable):
890
890
  pk = ToggleColumn()
891
891
  job_model = tables.Column(linkify=True)
892
892
  date_created = tables.DateTimeColumn(linkify=True, format=settings.SHORT_DATETIME_FORMAT)
893
+ date_started = tables.DateTimeColumn(linkify=True, format=settings.SHORT_DATETIME_FORMAT)
894
+ date_done = tables.DateTimeColumn(linkify=True, format=settings.SHORT_DATETIME_FORMAT)
893
895
  status = tables.TemplateColumn(
894
896
  template_code="{% include 'extras/inc/job_label.html' with result=record %}",
895
897
  )
@@ -961,6 +963,8 @@ class JobResultTable(BaseTable):
961
963
  fields = (
962
964
  "pk",
963
965
  "date_created",
966
+ "date_started",
967
+ "date_done",
964
968
  "name",
965
969
  "job_model",
966
970
  "scheduled_job",
@@ -1193,6 +1197,11 @@ class ObjectChangeTable(BaseTable):
1193
1197
  "request_id",
1194
1198
  )
1195
1199
 
1200
+ def __init__(self, *args, **kwargs):
1201
+ super().__init__(*args, **kwargs)
1202
+ # The `object_repr` column also uses the `changed_object` generic-foreign-key value
1203
+ self.add_conditional_prefetch("object_repr", "changed_object")
1204
+
1196
1205
 
1197
1206
  #
1198
1207
  # Relationship
@@ -1,129 +1,2 @@
1
- {% extends 'generic/object_retrieve.html' %}
2
- {% load buttons %}
3
- {% load helpers %}
4
-
5
- {% block content_left_page %}
6
- <div class="panel panel-default">
7
- <div class="panel-heading">
8
- <strong>Custom Field</strong>
9
- </div>
10
- <table class="table table-hover panel-body attr-table">
11
- <tr>
12
- <td>Label</td>
13
- <td>{{ object.label }}</td>
14
- </tr>
15
- <tr>
16
- <td>Key</td>
17
- <td>{{ object.key }}</td>
18
- </tr>
19
- <tr>
20
- <td>Type</td>
21
- <td>{{ object.type | capfirst }}</td>
22
- </tr>
23
- <tr>
24
- <td>Weight</td>
25
- <td>{{ object.weight }}</td>
26
- </tr>
27
- <tr>
28
- <td>Grouping</td>
29
- <td>{{ object.grouping | placeholder }}</td>
30
- </tr>
31
- <tr>
32
- <td>Description</td>
33
- <td>{{ object.description | render_markdown | placeholder }}</td>
34
- </tr>
35
- <tr>
36
- <td>Required</td>
37
- <td>{{ object.required | render_boolean }}</td>
38
- </tr>
39
- <tr>
40
- <td>Default</td>
41
- <td>
42
- {% if object.type == "markdown" %}
43
- {{ object.default | render_markdown | placeholder }}
44
- {% elif object.type == "json" and object.default is not None %}
45
- <pre>{{ object.default | render_json }}</pre>
46
- {% else %}
47
- {{ object.default | placeholder }}
48
- {% endif %}
49
- </td>
50
- </tr>
51
- <tr>
52
- <td>Filter Logic</td>
53
- <td>{{ object.filter_logic | capfirst }}</td>
54
- </tr>
55
- <tr>
56
- <td>Move to Advanced Tab</td>
57
- <td>{{ object.advanced_ui | render_boolean }}</td>
58
- </tr>
59
- </table>
60
- </div>
61
- {% if object.custom_field_choices.exists %}
62
- <div class="panel panel-default">
63
- <div class="panel-heading">
64
- <strong>Custom Field Choices</strong>
65
- </div>
66
- <table class="table table-hover panel-body attr-table">
67
- <thead>
68
- <tr>
69
- <th>Value</th>
70
- <th>Weight</th>
71
- </tr>
72
- </thead>
73
- <tbody>
74
- {% for choice in object.custom_field_choices.all %}
75
- <tr>
76
- <td>{{ choice.value }}</td>
77
- <td>{{ choice.weight }}</td>
78
- </tr>
79
- {% endfor %}
80
- </tbody>
81
- </table>
82
- </div>
83
- {% endif %}
84
- {% endblock content_left_page %}
85
-
86
- {% block content_right_page %}
87
- <div class="panel panel-default">
88
- <div class="panel-heading">
89
- <strong>Assignment</strong>
90
- </div>
91
- <table class="table table-hover panel-body attr-table">
92
- <tr>
93
- <td>Content Types</td>
94
- <td>
95
- <ul>
96
- {% for ct in object.content_types.all %}
97
- <li>{{ ct }}</li>
98
- {% endfor %}
99
- </ul>
100
- </td>
101
- </tr>
102
- </table>
103
- </div>
104
- <div class="panel panel-default">
105
- <div class="panel-heading">
106
- <strong>Validation Rules</strong>
107
- </div>
108
- <table class="table table-hover panel-body attr-table">
109
- <tr>
110
- <td>Minimum Value/Length</td>
111
- <td>{{ object.validation_minimum | placeholder }}</td>
112
- </tr>
113
- <tr>
114
- <td>Maximum Value/Length</td>
115
- <td>{{ object.validation_maximum | placeholder }}</td>
116
- </tr>
117
- <tr>
118
- <td>Validation Regex</td>
119
- <td>
120
- {% if object.validation_regex %}
121
- <code>{{ object.validation_regex | placeholder }}</code>
122
- {% else %}
123
- {{ object.validation_regex | placeholder }}
124
- {% endif %}
125
- </td>
126
- </tr>
127
- </table>
128
- </div>
129
- {% endblock content_right_page %}
1
+ {% extends 'extras/customfield_retrieve.html' %}
2
+ {% comment %}3.0 TODO: remove this template, which only exists for backward compatibility with 2.4 and earlier{% endcomment %}
@@ -1,108 +1,2 @@
1
- {% extends 'generic/object_create.html' %}
2
- {% load static %}
3
- {% load form_helpers %}
4
-
5
- {% block form %}
6
- <div class="panel panel-default">
7
- <div class="panel-heading"><strong>Custom Field</strong></div>
8
- <div class="panel-body">
9
- {% render_field form.label %}
10
- {% render_field form.grouping %}
11
- {% render_field form.key %}
12
- {% render_field form.type %}
13
- {% render_field form.weight %}
14
- {% render_field form.description %}
15
- {% render_field form.required %}
16
- {% render_field form.default %}
17
- {% render_field form.filter_logic %}
18
- {% render_field form.advanced_ui %}
19
- </div>
20
- </div>
21
- <div class="panel panel-default">
22
- <div class="panel-heading"><strong>Assignment</strong></div>
23
- <div class="panel-body">
24
- {% render_field form.content_types %}
25
- </div>
26
- </div>
27
- <div class="panel panel-default">
28
- <div class="panel-heading"><strong>Validation Rules</strong></div>
29
- <div class="panel-body">
30
- {% render_field form.validation_minimum %}
31
- {% render_field form.validation_maximum %}
32
- {% render_field form.validation_regex %}
33
- </div>
34
- </div>
35
- <div class="panel panel-default">
36
- <div class="panel-heading"><strong>Custom Field Choices</strong></div>
37
- <div class="panel-body">
38
- {% if choices.errors %}
39
- <div class="text-danger">
40
- Please correct the error(s) below:
41
-
42
- {% for choice in choices.forms %}
43
- {% if choice.errors %}
44
- {% for error in choice.errors.values %}{{ error }}{% endfor %}
45
- {% endif %}
46
- {% endfor %}
47
- </div>
48
- {% endif %}
49
- {{ choices.non_field_errors }}
50
- <table class="table" id="custom-field-choices">
51
- {{ choices.management_form }}
52
- {% for choice in choices.forms %}
53
- {% if forloop.first %}
54
- <thead>
55
- <tr>
56
- {% for field in choice.visible_fields %}
57
- <th>{{ field.label|capfirst }}</th>
58
- {% endfor %}
59
- </tr>
60
- </thead>
61
- {% endif %}
62
- <tr class="formset_row-{{ choices.prefix }}">
63
- {% for field in choice.visible_fields %}
64
- <td>
65
- {# Include the hidden fields in the form #}
66
- {% if forloop.first %}
67
- {% for hidden in choice.hidden_fields %}
68
- {{ hidden }}
69
- {% endfor %}
70
- {% endif %}
71
- {{ field }}
72
- {% if field.errors %}
73
- <ul>
74
- {% for error in field.errors %}
75
- {# Embed an HTML comment indicating the error for extraction by tests #}
76
- <!-- FORM-ERROR {{ field.name }}: {{ error }} -->
77
- <li class="text-danger">{{ error }}</li>
78
- {% endfor %}
79
- </ul>
80
- {% endif %}
81
- </td>
82
- {% endfor %}
83
- </tr>
84
- {% endfor %}
85
- </table>
86
- </div>
87
- </div>
88
- {% include 'inc/extras_features_edit_form_fields.html' %}
89
-
90
- {% endblock form %}
91
-
92
- {% block javascript %}
93
- {{ block.super }}
94
- <script src="{% static 'jquery/jquery.formset.js' %}"></script>
95
- <script type="text/javascript">
96
- const slugify_prefer_underscores = true; // Custom fields work better in GraphQL (etc.) with underscore-based slugs
97
- $('.formset_row-{{ choices.prefix }}').formset({
98
- addText: '<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add another Custom Field Choice',
99
- addCssClass: 'btn btn-primary add-row',
100
- deleteText: '<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span>',
101
- deleteCssClass: 'btn btn-danger delete-row',
102
- prefix: '{{ choices.prefix }}',
103
- formCssClass: 'dynamic-formset-{{ choices.prefix }}',
104
- keepFieldValues: 'input[type="number"]',
105
- added: jsify_form
106
- });
107
- </script>
108
- {% endblock javascript %}
1
+ {% extends 'extras/customfield_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,129 @@
1
+ {% extends 'generic/object_retrieve.html' %}
2
+ {% load buttons %}
3
+ {% load helpers %}
4
+
5
+ {% block content_left_page %}
6
+ <div class="panel panel-default">
7
+ <div class="panel-heading">
8
+ <strong>Custom Field</strong>
9
+ </div>
10
+ <table class="table table-hover panel-body attr-table">
11
+ <tr>
12
+ <td>Label</td>
13
+ <td>{{ object.label }}</td>
14
+ </tr>
15
+ <tr>
16
+ <td>Key</td>
17
+ <td>{{ object.key }}</td>
18
+ </tr>
19
+ <tr>
20
+ <td>Type</td>
21
+ <td>{{ object.type | capfirst }}</td>
22
+ </tr>
23
+ <tr>
24
+ <td>Weight</td>
25
+ <td>{{ object.weight }}</td>
26
+ </tr>
27
+ <tr>
28
+ <td>Grouping</td>
29
+ <td>{{ object.grouping | placeholder }}</td>
30
+ </tr>
31
+ <tr>
32
+ <td>Description</td>
33
+ <td>{{ object.description | render_markdown | placeholder }}</td>
34
+ </tr>
35
+ <tr>
36
+ <td>Required</td>
37
+ <td>{{ object.required | render_boolean }}</td>
38
+ </tr>
39
+ <tr>
40
+ <td>Default</td>
41
+ <td>
42
+ {% if object.type == "markdown" %}
43
+ {{ object.default | render_markdown | placeholder }}
44
+ {% elif object.type == "json" and object.default is not None %}
45
+ <pre>{{ object.default | render_json }}</pre>
46
+ {% else %}
47
+ {{ object.default | placeholder }}
48
+ {% endif %}
49
+ </td>
50
+ </tr>
51
+ <tr>
52
+ <td>Filter Logic</td>
53
+ <td>{{ object.filter_logic | capfirst }}</td>
54
+ </tr>
55
+ <tr>
56
+ <td>Move to Advanced Tab</td>
57
+ <td>{{ object.advanced_ui | render_boolean }}</td>
58
+ </tr>
59
+ </table>
60
+ </div>
61
+ {% if object.custom_field_choices.exists %}
62
+ <div class="panel panel-default">
63
+ <div class="panel-heading">
64
+ <strong>Custom Field Choices</strong>
65
+ </div>
66
+ <table class="table table-hover panel-body attr-table">
67
+ <thead>
68
+ <tr>
69
+ <th>Value</th>
70
+ <th>Weight</th>
71
+ </tr>
72
+ </thead>
73
+ <tbody>
74
+ {% for choice in object.custom_field_choices.all %}
75
+ <tr>
76
+ <td>{{ choice.value }}</td>
77
+ <td>{{ choice.weight }}</td>
78
+ </tr>
79
+ {% endfor %}
80
+ </tbody>
81
+ </table>
82
+ </div>
83
+ {% endif %}
84
+ {% endblock content_left_page %}
85
+
86
+ {% block content_right_page %}
87
+ <div class="panel panel-default">
88
+ <div class="panel-heading">
89
+ <strong>Assignment</strong>
90
+ </div>
91
+ <table class="table table-hover panel-body attr-table">
92
+ <tr>
93
+ <td>Content Types</td>
94
+ <td>
95
+ <ul>
96
+ {% for ct in object.content_types.all %}
97
+ <li>{{ ct }}</li>
98
+ {% endfor %}
99
+ </ul>
100
+ </td>
101
+ </tr>
102
+ </table>
103
+ </div>
104
+ <div class="panel panel-default">
105
+ <div class="panel-heading">
106
+ <strong>Validation Rules</strong>
107
+ </div>
108
+ <table class="table table-hover panel-body attr-table">
109
+ <tr>
110
+ <td>Minimum Value/Length</td>
111
+ <td>{{ object.validation_minimum | placeholder }}</td>
112
+ </tr>
113
+ <tr>
114
+ <td>Maximum Value/Length</td>
115
+ <td>{{ object.validation_maximum | placeholder }}</td>
116
+ </tr>
117
+ <tr>
118
+ <td>Validation Regex</td>
119
+ <td>
120
+ {% if object.validation_regex %}
121
+ <code>{{ object.validation_regex | placeholder }}</code>
122
+ {% else %}
123
+ {{ object.validation_regex | placeholder }}
124
+ {% endif %}
125
+ </td>
126
+ </tr>
127
+ </table>
128
+ </div>
129
+ {% endblock content_right_page %}