From 13c6602ea8bc99aebbf2abe6ae8f5a39e5ab4b2f Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Mon, 14 Apr 2025 10:25:55 -0400 Subject: [PATCH] #17653: Style JSON data for config & export templates (#19171) --- netbox/templates/extras/configtemplate.html | 6 +++++- netbox/templates/extras/exporttemplate.html | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/netbox/templates/extras/configtemplate.html b/netbox/templates/extras/configtemplate.html index eeb962cfb..5443efff1 100644 --- a/netbox/templates/extras/configtemplate.html +++ b/netbox/templates/extras/configtemplate.html @@ -71,7 +71,11 @@

{% trans "Environment Parameters" %}

-
{{ object.environment_params }}
+ {% if object.environment_params %} +
{{ object.environment_params|json }}
+ {% else %} + {% trans "None" %} + {% endif %}
{% plugin_right_page object %} diff --git a/netbox/templates/extras/exporttemplate.html b/netbox/templates/extras/exporttemplate.html index fd1e56d11..21f656160 100644 --- a/netbox/templates/extras/exporttemplate.html +++ b/netbox/templates/extras/exporttemplate.html @@ -82,7 +82,11 @@

{% trans "Environment Parameters" %}

-
{{ object.environment_params }}
+ {% if object.environment_params %} +
{{ object.environment_params|json }}
+ {% else %} + {% trans "None" %} + {% endif %}
{% plugin_right_page object %}