Skip to content

Add UI URL pattern for scripts to allow a specific script to be accessed by module and class in addition to ID #18024

@atownson

Description

@atownson

NetBox version

v4.1.6

Feature type

New functionality

Triage priority

I volunteer to perform this work (if approved)

Proposed functionality

Related to #16145, proposing to allow a URL pattern for scripts to reference them by <module>.<class>. The scope of this request is simply to allow this new URL pattern in addition to the existing scripts/<int:pk>/, scripts/<int:pk>/source/, and scripts/<int:pk>/jobs/ patterns. The templates and Script.get_absolute_url() would still reference the pk. The suggested URL pattern should match the allowed pattern for the API resolved in #16145.

Use case

When using Custom Links to link to a specific script, using the pk is problematic because it's subject to change as the scripts are updated over time. By allowing the <module>.<class> pattern, the custom links could be configured to use that pattern and return the correct script.

Database changes

None

External dependencies

None

Metadata

Metadata

Assignees

Labels

complexity: lowRequires minimal effort to implementstatus: acceptedThis issue has been accepted for implementationtype: featureIntroduction of new functionality to the application

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions