mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
* Fixes #14572 - Constrains JobView (and related views) badge to specific named job * Adjust report views to resolve same problem * Fixed PEP8 error * Update netbox/templates/extras/script/base.html Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com> * Move function to method on PythonModuleMixin * Update netbox/extras/views.py Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com> * Update netbox/extras/views.py Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com> * Update netbox/extras/views.py Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com> * Update netbox/extras/views.py Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com> * Update to mixin and view --------- Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
@@ -8,6 +8,16 @@ __all__ = (
|
||||
|
||||
class PythonModuleMixin:
|
||||
|
||||
def get_jobs(self, name):
|
||||
"""
|
||||
Returns a list of Jobs associated with this specific script or report module
|
||||
:param name: The class name of the script or report
|
||||
:return: List of Jobs associated with this
|
||||
"""
|
||||
return self.jobs.filter(
|
||||
name=name
|
||||
)
|
||||
|
||||
@property
|
||||
def path(self):
|
||||
return os.path.splitext(self.file_path)[0]
|
||||
|
||||
Reference in New Issue
Block a user