netbox icon indicating copy to clipboard operation
netbox copied to clipboard

Harmonize displaying json data from the netbox configuration

Open jonasnieberle opened this issue 2 weeks ago • 1 comments

NetBox version

v4.4.8

Feature type

New functionality

Proposed functionality

Harmonize the displaying of Json data in the configuration history view:

At the moment only the "Default preferences" are rendered correct as JSON form:

Image

I think it make sense to render the Validation rules for objects as JSON as well:

Image

I think is just adding the "|json" statement, here:

Image

Use case

Better and easier readability of the json data.

Database changes

External dependencies

jonasnieberle avatar Dec 15 '25 06:12 jonasnieberle

@jonasnieberle, can you re-confirm as I can not reproduce this in my local.

Image

These filters were removed explicitly in #17219 and #18369. My understanding is that these should be working this way already, due to the new specialized [ConfigJSONEncoder](https://github.com/netbox-community/netbox/pull/17247) introduced in the fix for # #17219.

jnovinger avatar Dec 15 '25 18:12 jnovinger

@jnovinger yes that's right, but it only works at system --> config.

Navigate to Configuration History --> click on the ID of a config-revisions and then you see it.

Image

Thats from the demo environment: https://demo.netbox.dev/core/config-revisions/2/

Image

jonasnieberle avatar Dec 16 '25 09:12 jonasnieberle

@jnovinger yes that's right, but it only works at system --> config.

Ah, excellent point. Apologies for the confusion. Is this something you'd like to tackle, @jonasnieberle?

jnovinger avatar Dec 17 '25 22:12 jnovinger

@jnovinger Im not very familar with software development and alle processes with github / branching ... etc. I think it's just adding the "|json" statement to the code which I provide in the first message. For someone who know all the processes just 5min work :)

jonasnieberle avatar Dec 19 '25 09:12 jonasnieberle

@jnovinger Im not very familar with software development and alle processes with github / branching ... etc. I think it's just adding the "|json" statement to the code which I provide in the first message. For someone who know all the processes just 5min work :)

Understood, appreciate the report!

jnovinger avatar Dec 19 '25 23:12 jnovinger