View revision source files in the UI

Open
#24 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
62/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python

Research direction

Start at the revision's Files view and trace how it identifies active and retained revisions and reads from the verified revision store. Check the view permission and source-display behavior for text, binary, and oversized files; done when the selected revision is explicit, content is escaped and size-limited, and Script-run permission alone is insufficient.

Written by the indexing model from the issue text.

Description

app: scripts complexity: medium status: backlog type: feature
Plugin Version

v0.0.1

Proposed functionality

Add a read-only source page for text files listed in a revision's Files view. Identify the selected revision clearly and support both active and retained historical source.

Read from the verified revision store without importing the module. Require netbox_scripts.view_scriptprojectrevision and the corresponding object access; permission to run a Script should not grant source access on its own.

Escape displayed content, apply a documented size limit, and explain when a binary or oversized file cannot be displayed. Editing is outside this request.

Use case

Operators need to inspect what a Script will do and review the exact source associated with an earlier run. The current Files view shows metadata but not file contents.

External dependencies

No new package or service is expected. Syntax highlighting is optional.

Dominant language
Python
Stars
8
Forks
0
Avg merge
9h 34m
Merged PRs (30d)
32

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from netbox-community/netbox-scripts

All issues in netbox-community/netbox-scripts

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.