-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed as not planned
Labels
complexity: mediumRequires a substantial but not unusual amount of effort to implementRequires a substantial but not unusual amount of effort to implementtype: featureIntroduction of new functionality to the applicationIntroduction of new functionality to the application
Description
NetBox version
v4.3.3
Feature type
New functionality
Proposed functionality
Extend the JobRunner class to allow specifying the path to a custom template. If provided, this template will be used to render the job's data in the UI.
class MyJob(JobRunner):
template_name = 'foo/my_job.html'
def run(self, *args, **kwargs):
...Also add a render() method to JobRunner, which will render HTML content from the template, using the job's data as context.
Use case
This will enable the presentation of job data to the user via more elegant means, as opposed to raw data. NetBox does something similar today for custom scripts, but this requires a separate view (ScriptResultView). (It is likely that this view can be replaced by this feature.)
Database changes
N/A
External dependencies
N/A
Metadata
Metadata
Assignees
Labels
complexity: mediumRequires a substantial but not unusual amount of effort to implementRequires a substantial but not unusual amount of effort to implementtype: featureIntroduction of new functionality to the applicationIntroduction of new functionality to the application