Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Winkler <github@lw1.at>2019-04-23 02:11:40 +0300
committerThomas Steur <tsteur@users.noreply.github.com>2019-04-23 02:11:40 +0300
commit88dc7a5330fa20d3bd87e0cff338eff836aced9e (patch)
treee039c2ab50118a038c72aff5fcc19da0d61a308c /plugins/Diagnostics
parentfc4cfd9c55fa9a3278bb919cc17cbaee1ba40499 (diff)
print objects as JSON (#14171)
Diffstat (limited to 'plugins/Diagnostics')
-rw-r--r--plugins/Diagnostics/stylesheets/configfile.less4
-rw-r--r--plugins/Diagnostics/templates/configfile.twig6
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 %}