Closes #20981: Enhance JSON rendering for Custom Validators and Protection Rules in Config Revision View #403

Closed
opened 2026-04-05 16:29:54 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @pheus on 2/6/2026

Fixes: #20981

This PR harmonizes how JSON-like configuration values are displayed in the configuration revision UI.

ConfigRevisionView.get_extra_context() now prepares a safe, pretty-printed JSON representation for CUSTOM_VALIDATORS, DEFAULT_USER_PREFERENCES and PROTECTION_RULES before rendering config_data.html. This mirrors the behavior users already see in the global system configuration view and makes these fields consistently readable in the config history view.

Thanks for the review!

*Originally created by @pheus on 2/6/2026* ### Fixes: #20981 This PR harmonizes how JSON-like configuration values are displayed in the configuration revision UI. `ConfigRevisionView.get_extra_context()` now prepares a safe, pretty-printed JSON representation for `CUSTOM_VALIDATORS`, `DEFAULT_USER_PREFERENCES` and `PROTECTION_RULES` before rendering `config_data.html`. This mirrors the behavior users already see in the global system configuration view and makes these fields consistently readable in the config history view. Thanks for the review!
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#403