diff options
author | Lukas Winkler <github@lw1.at> | 2019-04-23 02:11:40 +0300 |
---|---|---|
committer | Thomas Steur <tsteur@users.noreply.github.com> | 2019-04-23 02:11:40 +0300 |
commit | 88dc7a5330fa20d3bd87e0cff338eff836aced9e (patch) | |
tree | e039c2ab50118a038c72aff5fcc19da0d61a308c /plugins/Diagnostics | |
parent | fc4cfd9c55fa9a3278bb919cc17cbaee1ba40499 (diff) |
print objects as JSON (#14171)
Diffstat (limited to 'plugins/Diagnostics')
-rw-r--r-- | plugins/Diagnostics/stylesheets/configfile.less | 4 | ||||
-rw-r--r-- | plugins/Diagnostics/templates/configfile.twig | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/plugins/Diagnostics/stylesheets/configfile.less b/plugins/Diagnostics/stylesheets/configfile.less index 16d4110b5a..ecccc4197c 100644 --- a/plugins/Diagnostics/stylesheets/configfile.less +++ b/plugins/Diagnostics/stylesheets/configfile.less @@ -7,6 +7,10 @@ font-style: italic; } + .pre { + white-space: pre-wrap; + } + td.name { max-width: 330px; word-wrap: break-word; diff --git a/plugins/Diagnostics/templates/configfile.twig b/plugins/Diagnostics/templates/configfile.twig index a50337fb49..f2e9adba9b 100644 --- a/plugins/Diagnostics/templates/configfile.twig +++ b/plugins/Diagnostics/templates/configfile.twig @@ -8,6 +8,10 @@ {% elseif value is null %} {% elseif value is emptyString %} '' + {% elseif value is empty %} + [] + {% elseif value is iterable %} + <div class="pre">{{ value|json_encode(constant('JSON_PRETTY_PRINT')) }}</div> {% else %} {{ value|join(', ') }} {% endif %} @@ -54,4 +58,4 @@ </table> </div> -{% endblock %}
\ No newline at end of file +{% endblock %} |