nautobot 2.2.1__py3-none-any.whl → 2.2.3__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.
Files changed (99) hide show
  1. nautobot/apps/jobs.py +2 -0
  2. nautobot/core/api/utils.py +12 -9
  3. nautobot/core/apps/__init__.py +2 -2
  4. nautobot/core/celery/__init__.py +79 -68
  5. nautobot/core/celery/backends.py +9 -1
  6. nautobot/core/celery/control.py +4 -7
  7. nautobot/core/celery/schedulers.py +4 -2
  8. nautobot/core/celery/task.py +78 -5
  9. nautobot/core/graphql/schema.py +2 -1
  10. nautobot/core/jobs/__init__.py +2 -1
  11. nautobot/core/templates/generic/object_list.html +3 -3
  12. nautobot/core/templatetags/helpers.py +66 -9
  13. nautobot/core/testing/__init__.py +6 -1
  14. nautobot/core/testing/api.py +12 -13
  15. nautobot/core/testing/mixins.py +2 -2
  16. nautobot/core/testing/views.py +50 -51
  17. nautobot/core/tests/test_api.py +23 -2
  18. nautobot/core/tests/test_templatetags_helpers.py +32 -0
  19. nautobot/core/tests/test_views.py +21 -1
  20. nautobot/core/tests/test_views_utils.py +22 -1
  21. nautobot/core/utils/module_loading.py +89 -0
  22. nautobot/core/views/generic.py +4 -4
  23. nautobot/core/views/mixins.py +4 -3
  24. nautobot/core/views/utils.py +3 -2
  25. nautobot/core/wsgi.py +9 -2
  26. nautobot/dcim/choices.py +14 -0
  27. nautobot/dcim/forms.py +59 -4
  28. nautobot/dcim/models/device_components.py +9 -5
  29. nautobot/dcim/templates/dcim/device/lldp_neighbors.html +2 -2
  30. nautobot/dcim/templates/dcim/devicefamily_retrieve.html +1 -1
  31. nautobot/dcim/templates/dcim/location.html +32 -13
  32. nautobot/dcim/templates/dcim/location_migrate_data_to_contact.html +102 -0
  33. nautobot/dcim/tests/test_forms.py +49 -2
  34. nautobot/dcim/tests/test_views.py +137 -0
  35. nautobot/dcim/urls.py +5 -0
  36. nautobot/dcim/views.py +149 -1
  37. nautobot/extras/api/views.py +21 -10
  38. nautobot/extras/constants.py +3 -3
  39. nautobot/extras/context_managers.py +56 -0
  40. nautobot/extras/datasources/git.py +47 -58
  41. nautobot/extras/forms/forms.py +3 -1
  42. nautobot/extras/jobs.py +79 -146
  43. nautobot/extras/models/datasources.py +0 -2
  44. nautobot/extras/models/jobs.py +36 -18
  45. nautobot/extras/plugins/__init__.py +1 -20
  46. nautobot/extras/signals.py +88 -57
  47. nautobot/extras/test_jobs/__init__.py +8 -0
  48. nautobot/extras/test_jobs/dry_run.py +3 -2
  49. nautobot/extras/test_jobs/fail.py +43 -0
  50. nautobot/extras/test_jobs/ipaddress_vars.py +40 -1
  51. nautobot/extras/test_jobs/jobs_module/__init__.py +5 -0
  52. nautobot/extras/test_jobs/jobs_module/jobs_submodule/__init__.py +1 -0
  53. nautobot/extras/test_jobs/jobs_module/jobs_submodule/jobs.py +6 -0
  54. nautobot/extras/test_jobs/pass.py +40 -0
  55. nautobot/extras/test_jobs/relative_import.py +11 -0
  56. nautobot/extras/tests/test_api.py +3 -0
  57. nautobot/extras/tests/test_context_managers.py +98 -1
  58. nautobot/extras/tests/test_datasources.py +125 -118
  59. nautobot/extras/tests/test_job_variables.py +57 -15
  60. nautobot/extras/tests/test_jobs.py +135 -1
  61. nautobot/extras/tests/test_models.py +26 -19
  62. nautobot/extras/tests/test_plugins.py +1 -3
  63. nautobot/extras/tests/test_views.py +2 -4
  64. nautobot/extras/utils.py +37 -0
  65. nautobot/extras/views.py +47 -95
  66. nautobot/ipam/api/views.py +8 -1
  67. nautobot/ipam/graphql/types.py +11 -0
  68. nautobot/ipam/mixins.py +32 -0
  69. nautobot/ipam/models.py +2 -1
  70. nautobot/ipam/querysets.py +6 -1
  71. nautobot/ipam/tables.py +1 -1
  72. nautobot/ipam/tests/test_models.py +82 -0
  73. nautobot/project-static/docs/assets/extra.css +4 -0
  74. nautobot/project-static/docs/code-reference/nautobot/apps/api.html +1 -1
  75. nautobot/project-static/docs/code-reference/nautobot/apps/jobs.html +180 -211
  76. nautobot/project-static/docs/development/apps/api/platform-features/jobs.html +1 -1
  77. nautobot/project-static/docs/development/core/application-registry.html +126 -84
  78. nautobot/project-static/docs/development/core/model-checklist.html +49 -1
  79. nautobot/project-static/docs/development/core/model-features.html +1 -1
  80. nautobot/project-static/docs/development/jobs/index.html +334 -58
  81. nautobot/project-static/docs/development/jobs/migration/from-v1.html +1 -1
  82. nautobot/project-static/docs/objects.inv +0 -0
  83. nautobot/project-static/docs/release-notes/version-1.6.html +504 -201
  84. nautobot/project-static/docs/release-notes/version-2.2.html +392 -43
  85. nautobot/project-static/docs/search/search_index.json +1 -1
  86. nautobot/project-static/docs/sitemap.xml +254 -254
  87. nautobot/project-static/docs/sitemap.xml.gz +0 -0
  88. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/upgrading-from-nautobot-v1.html +7 -4
  89. nautobot/project-static/docs/user-guide/core-data-model/ipam/vlan.html +111 -0
  90. nautobot/project-static/docs/user-guide/platform-functionality/jobs/index.html +15 -28
  91. nautobot/project-static/docs/user-guide/platform-functionality/jobs/models.html +4 -4
  92. nautobot/project-static/js/forms.js +18 -11
  93. {nautobot-2.2.1.dist-info → nautobot-2.2.3.dist-info}/METADATA +3 -3
  94. {nautobot-2.2.1.dist-info → nautobot-2.2.3.dist-info}/RECORD +98 -92
  95. nautobot/extras/test_jobs/job_variables.py +0 -93
  96. {nautobot-2.2.1.dist-info → nautobot-2.2.3.dist-info}/LICENSE.txt +0 -0
  97. {nautobot-2.2.1.dist-info → nautobot-2.2.3.dist-info}/NOTICE +0 -0
  98. {nautobot-2.2.1.dist-info → nautobot-2.2.3.dist-info}/WHEEL +0 -0
  99. {nautobot-2.2.1.dist-info → nautobot-2.2.3.dist-info}/entry_points.txt +0 -0
Binary file
@@ -12993,16 +12993,19 @@ Most removed database fields in Nautobot 2.0 fall into the following general cat
12993
12993
  <p>See <a href="../../../../development/jobs/migration/from-v1.html">Migrating Jobs From Nautobot v1</a> for more information on how to migrate your existing jobs to Nautobot v2.</p>
12994
12994
  </div>
12995
12995
  <h3 id="fundamental-changes">Fundamental Changes<a class="headerlink" href="#fundamental-changes" title="Permanent link">&para;</a></h3>
12996
- <p>The <code>BaseJob</code> class is now a subclass of Celery's <code>Task</code> class. Some fundamental changes to the job's methods and signatures were required to support this change:</p>
12996
+ <div class="admonition version-changed">
12997
+ <p class="admonition-title">Changed in version 2.2.3</p>
12998
+ <p>In Nautobot 2.0.0 through 2.2.2, Nautobot's <code>BaseJob</code> class was made to be a subclass of Celery's <code>Task</code> class. The implications of this change are outside the scope of this document, but this change has been reverted in Nautobot 2.2.3 and later.</p>
12999
+ </div>
12997
13000
  <ul>
12998
- <li>The <code>test_*</code> and <code>post_run</code> methods for backwards compatibility to NetBox scripts and reports were removed. Celery implements <code>before_start</code>, <code>on_success</code>, <code>on_retry</code>, <code>on_failure</code>, and <code>after_return</code> methods that can be used by job authors to perform similar functions.</li>
13001
+ <li>The <code>test_*</code> and <code>post_run</code> methods for backwards compatibility to NetBox scripts and reports were removed. In their place, Nautobot Jobs now have <code>before_start</code>, <code>on_success</code>, <code>on_failure</code>, and <code>after_return</code> methods that can be used by job authors to perform similar functions.</li>
12999
13002
  </ul>
13000
13003
  <div class="admonition important">
13001
13004
  <p class="admonition-title">Important</p>
13002
13005
  <p>Be sure to call the <code>super()</code> method when overloading any of the job's <code>before_start</code>, <code>on_success</code>, <code>on_retry</code>, <code>on_failure</code>, or <code>after_return</code> methods</p>
13003
13006
  </div>
13004
13007
  <ul>
13005
- <li>The run method signature is now customizable by the job author. This means that the <code>data</code> and <code>commit</code> arguments are no longer passed to the job by default and the job's run method signature should match the the job's input variables.</li>
13008
+ <li>The <code>run</code> method signature now includes each of the input variables defined on the Job. This means that the <code>data</code> and <code>commit</code> arguments are no longer passed to the job by default and the job's run method signature should match the the job's input variables.</li>
13006
13009
  </ul>
13007
13010
  <div class="admonition example">
13008
13011
  <p class="admonition-title">Example</p>
@@ -13012,7 +13015,7 @@ Most removed database fields in Nautobot 2.0 fall into the following general cat
13012
13015
  <a id="__codelineno-12-4" name="__codelineno-12-4" href="#__codelineno-12-4"></a> <span class="n">var3</span> <span class="o">=</span> <span class="n">BooleanVar</span><span class="p">()</span>
13013
13016
  <a id="__codelineno-12-5" name="__codelineno-12-5" href="#__codelineno-12-5"></a> <span class="n">var4</span> <span class="o">=</span> <span class="n">ObjectVar</span><span class="p">(</span><span class="n">model</span><span class="o">=</span><span class="n">Role</span><span class="p">)</span>
13014
13017
  <a id="__codelineno-12-6" name="__codelineno-12-6" href="#__codelineno-12-6"></a>
13015
- <a id="__codelineno-12-7" name="__codelineno-12-7" href="#__codelineno-12-7"></a> <span class="k">def</span> <span class="nf">run</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">var1</span><span class="p">,</span> <span class="n">var2</span><span class="p">,</span> <span class="n">var3</span><span class="p">,</span> <span class="n">var4</span><span class="p">):</span>
13018
+ <a id="__codelineno-12-7" name="__codelineno-12-7" href="#__codelineno-12-7"></a> <span class="k">def</span> <span class="nf">run</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="p">,</span> <span class="n">var1</span><span class="p">,</span> <span class="n">var2</span><span class="p">,</span> <span class="n">var3</span><span class="p">,</span> <span class="n">var4</span><span class="p">):</span>
13016
13019
  <a id="__codelineno-12-8" name="__codelineno-12-8" href="#__codelineno-12-8"></a> <span class="o">...</span>
13017
13020
  </code></pre></div>
13018
13021
  </div>
@@ -3534,6 +3534,17 @@
3534
3534
 
3535
3535
 
3536
3536
 
3537
+ <label class="md-nav__link md-nav__link--active" for="__toc">
3538
+
3539
+
3540
+ <span class="md-ellipsis">
3541
+ VLAN
3542
+ </span>
3543
+
3544
+
3545
+ <span class="md-nav__icon md-icon"></span>
3546
+ </label>
3547
+
3537
3548
  <a href="vlan.html" class="md-nav__link md-nav__link--active">
3538
3549
 
3539
3550
 
@@ -3544,6 +3555,58 @@
3544
3555
 
3545
3556
  </a>
3546
3557
 
3558
+
3559
+
3560
+ <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
3561
+
3562
+
3563
+
3564
+
3565
+
3566
+
3567
+ <label class="md-nav__title" for="__toc">
3568
+ <span class="md-nav__icon md-icon"></span>
3569
+ Table of contents
3570
+ </label>
3571
+ <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
3572
+
3573
+ <li class="md-nav__item">
3574
+ <a href="#modeling-vlans" class="md-nav__link">
3575
+ <span class="md-ellipsis">
3576
+ Modeling VLANs
3577
+ </span>
3578
+ </a>
3579
+
3580
+ <nav class="md-nav" aria-label="Modeling VLANs">
3581
+ <ul class="md-nav__list">
3582
+
3583
+ <li class="md-nav__item">
3584
+ <a href="#multiple-locations-using-same-vlan-id" class="md-nav__link">
3585
+ <span class="md-ellipsis">
3586
+ Multiple Locations Using Same VLAN ID
3587
+ </span>
3588
+ </a>
3589
+
3590
+ </li>
3591
+
3592
+ <li class="md-nav__item">
3593
+ <a href="#multiple-locations-stretched-layer-2" class="md-nav__link">
3594
+ <span class="md-ellipsis">
3595
+ Multiple Locations, Stretched Layer 2
3596
+ </span>
3597
+ </a>
3598
+
3599
+ </li>
3600
+
3601
+ </ul>
3602
+ </nav>
3603
+
3604
+ </li>
3605
+
3606
+ </ul>
3607
+
3608
+ </nav>
3609
+
3547
3610
  </li>
3548
3611
 
3549
3612
 
@@ -7711,6 +7774,47 @@
7711
7774
 
7712
7775
 
7713
7776
 
7777
+ <label class="md-nav__title" for="__toc">
7778
+ <span class="md-nav__icon md-icon"></span>
7779
+ Table of contents
7780
+ </label>
7781
+ <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
7782
+
7783
+ <li class="md-nav__item">
7784
+ <a href="#modeling-vlans" class="md-nav__link">
7785
+ <span class="md-ellipsis">
7786
+ Modeling VLANs
7787
+ </span>
7788
+ </a>
7789
+
7790
+ <nav class="md-nav" aria-label="Modeling VLANs">
7791
+ <ul class="md-nav__list">
7792
+
7793
+ <li class="md-nav__item">
7794
+ <a href="#multiple-locations-using-same-vlan-id" class="md-nav__link">
7795
+ <span class="md-ellipsis">
7796
+ Multiple Locations Using Same VLAN ID
7797
+ </span>
7798
+ </a>
7799
+
7800
+ </li>
7801
+
7802
+ <li class="md-nav__item">
7803
+ <a href="#multiple-locations-stretched-layer-2" class="md-nav__link">
7804
+ <span class="md-ellipsis">
7805
+ Multiple Locations, Stretched Layer 2
7806
+ </span>
7807
+ </a>
7808
+
7809
+ </li>
7810
+
7811
+ </ul>
7812
+ </nav>
7813
+
7814
+ </li>
7815
+
7816
+ </ul>
7817
+
7714
7818
  </nav>
7715
7819
  </div>
7716
7820
  </div>
@@ -7752,6 +7856,13 @@
7752
7856
  <li>Replaced <code>location</code> ForeignKey field with <code>locations</code> ManyToManyField, allowing a VLAN to be assigned to multiple Locations.</li>
7753
7857
  </ul>
7754
7858
  </div>
7859
+ <h2 id="modeling-vlans">Modeling VLANs<a class="headerlink" href="#modeling-vlans" title="Permanent link">&para;</a></h2>
7860
+ <p>With the update to Nautobot 2.2 that introduced the ability to have a single VLAN be associated to multiple locations, there needs to be some <em>recommended</em> methods to model VLANs with the new functionality.</p>
7861
+ <p>You should be looking to model VLANs in the same way that the layer 2 functionality is set up.</p>
7862
+ <h3 id="multiple-locations-using-same-vlan-id">Multiple Locations Using Same VLAN ID<a class="headerlink" href="#multiple-locations-using-same-vlan-id" title="Permanent link">&para;</a></h3>
7863
+ <p>In many organizations the use of cookiecutter like VLAN architecture is leveraged. In that a location may have VLAN30 be for the same purpose (ie Wireless, User, Voice) at each location. In this scenario, you should model a distinct VLAN30 in Nautobot for each Location. Creating a single VLAN and then associating it with multiple Locations would not accurately reflect the state of the layer 2 network.</p>
7864
+ <h3 id="multiple-locations-stretched-layer-2">Multiple Locations, Stretched Layer 2<a class="headerlink" href="#multiple-locations-stretched-layer-2" title="Permanent link">&para;</a></h3>
7865
+ <p>You would want to have a single VLAN that is associated with multiple Locations when the layer 2 environment is in fact stretched and devices within the VLAN are able to communicate via layer 2 mechanisms. Such designs include a campus network where you do have multiple Locations but a shared VLAN across all of them, for example wireless networks. Or in a data center fabric where the layer 2 is in fact stretched across the sites.</p>
7755
7866
 
7756
7867
 
7757
7868
 
@@ -7724,21 +7724,6 @@
7724
7724
  </span>
7725
7725
  </a>
7726
7726
 
7727
- <nav class="md-nav" aria-label="Enabling Jobs for Running">
7728
- <ul class="md-nav__list">
7729
-
7730
- <li class="md-nav__item">
7731
- <a href="#enabling-job-hooks" class="md-nav__link">
7732
- <span class="md-ellipsis">
7733
- Enabling Job Hooks
7734
- </span>
7735
- </a>
7736
-
7737
- </li>
7738
-
7739
- </ul>
7740
- </nav>
7741
-
7742
7727
  </li>
7743
7728
 
7744
7729
  <li class="md-nav__item">
@@ -7869,6 +7854,16 @@
7869
7854
  </div>
7870
7855
  <h2 id="managing-jobs">Managing Jobs<a class="headerlink" href="#managing-jobs" title="Permanent link">&para;</a></h2>
7871
7856
  <p>As of Nautobot 1.3, each Job class installed in Nautobot is represented by a corresponding Job data record in the Nautobot database. These data records are refreshed when the <code>nautobot-server migrate</code> or <code>nautobot-server post_upgrade</code> command is run, or (for Jobs from a Git repository) when a Git repository is enabled or re-synced in Nautobot. These data records make it possible for an administrative user (or other user with appropriate access privileges) to exert a level of administrative control over the Jobs created and updated by Job authors.</p>
7857
+ <div class="admonition tip">
7858
+ <p class="admonition-title">Tip</p>
7859
+ <p>A "Job" can refer to one of two different constructs. There are both the actual Python code that implements the logic of a Job as a Python class, and the Nautobot database model that represents a given Job class in the database. In cases where the distinction between these objects is important, we refer to the first as a "Job class", and the second as a "Job model" or "Job record".</p>
7860
+ <p>It's important to understand this dichotomy, as actions that change one may not necessarily update the other. For example:</p>
7861
+ <ul>
7862
+ <li>Editing or replacing a Python file in your <code>JOBS_ROOT</code> directory will update the Job <em>class</em> on disk, but will not automatically refresh the Job <em>record</em> corresponding to this class - you must run <code>nautobot-server post_upgrade</code> to make this happen.</li>
7863
+ <li>Changing the metadata of a Job <em>record</em> (e.g., assigning it a different categorical <code>grouping</code>) is recorded as an override of the default grouping defined by the Job <em>class</em> source code; it does not in any way change the source code of the Job class.</li>
7864
+ </ul>
7865
+ <p>The Job <em>model</em> is used to enforce user permissions, present information about the Job to the user, and so forth, while actually executing the Job makes use of the Job <em>class</em> only.</p>
7866
+ </div>
7872
7867
  <h3 id="enabling-jobs-for-running">Enabling Jobs for Running<a class="headerlink" href="#enabling-jobs-for-running" title="Permanent link">&para;</a></h3>
7873
7868
  <p>When a new Job record is created for a newly discovered Job class, it defaults to <code>enabled = False</code>, which prevents the Job from being run by any user. This is intended to provide a level of security and oversight regarding the installation of new Jobs into Nautobot.</p>
7874
7869
  <div class="admonition important">
@@ -7884,18 +7879,6 @@
7884
7879
  <li>In the second section titled <strong>Job</strong>, select the <strong>Enabled</strong> checkbox</li>
7885
7880
  <li>Select <strong>Update</strong> button at the bottom</li>
7886
7881
  </ul>
7887
- <h4 id="enabling-job-hooks">Enabling Job Hooks<a class="headerlink" href="#enabling-job-hooks" title="Permanent link">&para;</a></h4>
7888
- <p>Job hooks are enabled in a similar fashion, but by using the <strong>default</strong> filters when navigating to the Jobs page the Job Hooks will not be visible. To enable job hooks:</p>
7889
- <ul>
7890
- <li>Navigate to Jobs &gt; Jobs menu</li>
7891
- <li>Select the <strong>Filter</strong> button to bring up the Filter Jobs context</li>
7892
- <li>Look for <strong>Is job hook receiver</strong> and change the drop down to <strong>Yes</strong></li>
7893
- <li>Select <strong>Apply</strong> button</li>
7894
- <li>Select a job that has been installed</li>
7895
- <li>Select <strong>Edit</strong> button</li>
7896
- <li>In the second section titled <strong>Job</strong>, select the <strong>Enabled</strong> checkbox</li>
7897
- <li>Select <strong>Update</strong> button at the bottom</li>
7898
- </ul>
7899
7882
  <h3 id="overriding-metadata">Overriding Metadata<a class="headerlink" href="#overriding-metadata" title="Permanent link">&para;</a></h3>
7900
7883
  <p>An administrator or user with <code>extras.change_job</code> permission can also edit a Job database record to optionally override any or all of the following metadata attributes defined by the Job module or class:</p>
7901
7884
  <ul>
@@ -7913,6 +7896,10 @@
7913
7896
  <p>This is done by setting the corresponding "override" flag (<code>grouping_override</code>, <code>name_override</code>, etc.) to <code>True</code> then providing a new value for the attribute in question. An overridden attribute will remain set to its overridden value even if the underlying Job class definition changes and <code>nautobot-server &lt;migrate|post_upgrade&gt;</code> gets run again. Conversely, clearing the "override" flag for an attribute and saving the database record will revert the attribute to the underlying value defined within the Job class source code.</p>
7914
7897
  <h3 id="deleting-jobs">Deleting Jobs<a class="headerlink" href="#deleting-jobs" title="Permanent link">&para;</a></h3>
7915
7898
  <p>When a previously installed Job class is removed, after running <code>nautobot-server &lt;migrate|post_upgrade&gt;</code> or refreshing the providing Git repository, the Job database record will <em>not</em> be automatically deleted, but <em>will</em> be flagged as <code>installed = False</code> and can no longer be run or scheduled.</p>
7899
+ <div class="admonition note">
7900
+ <p class="admonition-title">Note</p>
7901
+ <p>The Job list view hides by default any Jobs that are not installed. To view non-installed Job records, you need to select the "Filter" button in the list view and explicitly specify the filter "Installed: No".</p>
7902
+ </div>
7916
7903
  <p>An administrator or user with <code>extras.delete_job</code> permissions <em>may</em> delete such a Job database record if desired, but be aware that doing so will result in any existing JobResult or ScheduledJob records that originated from this Job losing their association to the Job; this association will not be automatically restored even if the Job is later reinstalled or reintroduced.</p>
7917
7904
  <h2 id="running-jobs">Running Jobs<a class="headerlink" href="#running-jobs" title="Permanent link">&para;</a></h2>
7918
7905
  <div class="admonition note">
@@ -7928,7 +7915,7 @@
7928
7915
  </div>
7929
7916
  <p>It is a key concept to understand the 2 <code>class_path</code> elements:</p>
7930
7917
  <ul>
7931
- <li><code>module_name</code>: which is the importable Python path to the job definition (with <code>.</code> in place of <code>/</code> in the directory path, and not including the <code>.py</code> file extension, as per Python syntax standards).<ul>
7918
+ <li><code>module_name</code>: which is the importable Python path to the job class definition (with <code>.</code> in place of <code>/</code> in the directory path, and not including the <code>.py</code> file extension, as per Python syntax standards).<ul>
7932
7919
  <li>For an App-provided job, this might be something like <code>my_app_name.jobs.my_job_filename</code> or <code>nautobot_golden_config.jobs</code></li>
7933
7920
  <li>For a locally installed job, this would match the file name, such as <code>my_job_filename</code></li>
7934
7921
  <li>For a Git-provided job, this includes the repository's defined <code>slug</code>, such as <code>my_repository.jobs.my_job_filename</code></li>
@@ -7824,7 +7824,7 @@
7824
7824
  <div class="admonition version-added">
7825
7825
  <p class="admonition-title">Added in version 1.3.0</p>
7826
7826
  </div>
7827
- <p>The Job data model provides a database representation of metadata describing a specific installed Job. It also serves as an anchor point for other data models (JobResult and ScheduledJob in particular) to link against.</p>
7827
+ <p>The Job data model provides a database representation of metadata describing a specific installed Job class. It also serves as an anchor point for other data models (JobResult and ScheduledJob in particular) to link against.</p>
7828
7828
  <p>For any given Job record, most of its fields are populated initially from data defined in the source code of the corresponding job class. These fields may be explicitly overridden by editing the Job record via the Nautobot UI or REST API if desired. This is generally accomplished by setting a value for the desired field (e.g. <code>grouping</code>) and also setting the corresponding <code>override</code> flag (e.g. <code>grouping_override</code>) to <code>True</code>. If the <code>override</code> flag for a field is cleared (set back to <code>False</code>) then the corresponding flag will automatically revert to the original value defined by the Job class source code when the record is saved.</p>
7829
7829
  <div class="admonition note">
7830
7830
  <p class="admonition-title">Note</p>
@@ -7834,10 +7834,10 @@
7834
7834
  <p>Records of this type store the following data as read-only (not modifiable via the UI or REST API):</p>
7835
7835
  <ul>
7836
7836
  <li>The source of the job (local installation, Git repository, App)</li>
7837
- <li>The name of the module containing the Job</li>
7837
+ <li>The name of the module containing the Job class</li>
7838
7838
  <li>The name of the Job class</li>
7839
- <li>Whether the job is installed presently</li>
7840
- <li>Whether the job is read-only</li>
7839
+ <li>Whether the job class is installed presently</li>
7840
+ <li>Whether the job is self-described as "read-only"</li>
7841
7841
  <li>Whether the job is a <a href="jobhook.html#job-hook-receivers">Job Hook Receiver</a></li>
7842
7842
  <li>Whether the job is a <a href="jobbutton.html#job-button-receivers">Job Button Receiver</a></li>
7843
7843
  </ul>
@@ -632,18 +632,19 @@ function initializeDynamicFilterForm(context){
632
632
 
633
633
  // Remove applied filters
634
634
  this_context.find(".remove-filter-param").on("click", function(){
635
- let query_params = location.search;
635
+ let query_params = new URLSearchParams(location.search);
636
636
  let type = $(this).attr("data-field-type");
637
637
  let field_value = $(this).attr("data-field-value");
638
- let query_string = location.search.substr(1).split("&");
639
638
 
640
639
  if (type === "parent") {
641
- query_string = query_string.filter(item => item.search(field_value) < 0);
640
+ // Remove all instances of this query param
641
+ query_params.delete(field_value);
642
642
  } else {
643
+ // Remove this specific instance of this query param
643
644
  let parent = $(this).attr("data-field-parent");
644
- query_string = query_string.filter(item => item.search(parent + "=" + field_value) < 0)
645
+ query_params.delete(parent, field_value);
645
646
  }
646
- location.replace("?" + query_string.join("&"))
647
+ location.assign("?" + query_params);
647
648
  })
648
649
 
649
650
  // On submit of filter form
@@ -657,12 +658,18 @@ function initializeDynamicFilterForm(context){
657
658
  q_field_phantom.val(q_field.val())
658
659
  dynamic_form.append(q_field_phantom);
659
660
 
660
- // Get the serialize data from the forms and filter out query_params which values are empty e.g ?sam=&dan=2 becomes dan=2
661
- let dynamic_filter_form_query = $("#dynamic-filter-form").serialize().split("&").filter(params => params.split("=")[1]?.length || 0 )
662
- let default_filter_form_query = $("#default-filter form").serialize().split("&").filter(params => params.split("=")[1]?.length || 0 )
663
- // Union Operation
664
- let search_query = [...new Set([...default_filter_form_query, ...dynamic_filter_form_query])].join("&")
665
- location.replace("?" + search_query)
661
+ // Get the serialized data from the forms and:
662
+ // 1) filter out query_params which values are empty e.g ?sam=&dan=2 becomes dan=2
663
+ // 2) combine the two forms into a single set of data without duplicate entries
664
+ let search_query = new URLSearchParams();
665
+ let dynamic_query = new URLSearchParams(new FormData(document.getElementById("dynamic-filter-form")));
666
+ dynamic_query.forEach((value, key) => { if (value != "") { search_query.append(key, value); }});
667
+ let default_query = new URLSearchParams(new FormData(document.getElementById("default-filter").firstElementChild));
668
+ default_query.forEach((value, key) => {
669
+ if (value != "" && !search_query.has(key, value)) { search_query.append(key, value); }
670
+ });
671
+ $("#FilterForm_modal").modal("hide");
672
+ location.assign("?" + search_query);
666
673
  })
667
674
 
668
675
  // On submit of filter search form
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nautobot
3
- Version: 2.2.1
3
+ Version: 2.2.3
4
4
  Summary: Source of truth and network automation platform.
5
5
  Home-page: https://nautobot.com
6
6
  License: Apache-2.0
@@ -67,8 +67,8 @@ Requires-Dist: prometheus-client (>=0.20.0,<0.21.0)
67
67
  Requires-Dist: psycopg2-binary (>=2.9.9,<2.10.0)
68
68
  Requires-Dist: python-slugify (>=8.0.3,<8.1.0)
69
69
  Requires-Dist: pyuwsgi (>=2.0.23,<2.1.0)
70
- Requires-Dist: social-auth-app-django (>=5.4.0,<5.5.0)
71
- Requires-Dist: social-auth-core[openidconnect,saml] (>=4.5.3,<4.6.0) ; extra == "all" or extra == "sso"
70
+ Requires-Dist: social-auth-app-django (>=5.4.1,<5.5.0)
71
+ Requires-Dist: social-auth-core[saml] (>=4.5.3,<4.6.0) ; extra == "all" or extra == "sso"
72
72
  Requires-Dist: svgwrite (>=1.4.2,<1.5.0)
73
73
  Project-URL: Documentation, https://docs.nautobot.com
74
74
  Project-URL: Repository, https://github.com/nautobot/nautobot