netbox
netbox copied to clipboard
Display Script Results Instead of Job Logs
NetBox version
v4.0.0
Feature type
Restore functionality back to the way it was prior to NetBox 4.0; so you can get a link back to the results, from the list of jobs.
Proposed functionality
From the list of completed jobs, provide link to the script "results" page instead of the jobs "logs" page.
Script Results: (right after the script runs)
Job Log: (Prior to NetBox 4.0 clicking on the "Name" would bring you to the results page. Now both "ID" and "Name" bring you to log page.
Use case
Restore functionality back to the way it was prior to NetBox 4.0; so you can get a link back to the results.
Change this link: /core/jobs/41699/
to this: /extras/scripts/results/41699/
It's much easier to read the results with all the formatting and color coding.
Database changes
No response
External dependencies
No response
Thanks for taking this up @abhi1693
Just wanted to confirm that this adds a new column for the "results" to the main jobs page. /core/jobs/
I'm trying to follow along and it looks like the results are only showing up here: /extras/scripts/ID/jobs/
I use the main jobs page the most to navigate all the various jobs and to view the results.
looks like there are a couple of jobs tables and it took me a minute to figure out why I was not seeing the changes when I implemented the code proposed.
@bitcollector1 we can't add a "result" column to the generic jobs list as not all jobs reference a result (those are only for scripts).
To add on to this...it doesn't appear adding an object to logs references the object anymore.
self.log_info("example message",obj=Device.objects.get(serial=serial_no["sr_no"]))
There is a very similar issue with the results of a report. The object name and URL are shown as 2 separate columns which is hard to read. I suggest hiding the URL column and making it a hyperlink on the name. I think this is how it worked in v3, but I'm not positive. The spirit of this change is the same for both, but let me know if this should be a separate issue.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.
This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.