From 08b8fbf1833bdbc651be1971ad5216c41d2b592b Mon Sep 17 00:00:00 2001 From: Fabien Bourigault Date: Tue, 21 Feb 2017 13:16:09 +0100 Subject: [PATCH] show profiler badges in the toolbar and the menu --- CHANGELOG.md | 1 + Resources/views/webprofiler.html.twig | 13 +++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f65dbbf5..43dcd128 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - The profiler collector has been rewritten to use objects instead of arrays. - Bumped minimum Symfony version to 2.8. +- Updated profiler badges to match Symfony 2.8+ profiler design. ### Fixed diff --git a/Resources/views/webprofiler.html.twig b/Resources/views/webprofiler.html.twig index fa00ade2..689ab89d 100644 --- a/Resources/views/webprofiler.html.twig +++ b/Resources/views/webprofiler.html.twig @@ -13,15 +13,15 @@ {% set text %}
Successful requests - {{ collector.successfulStacks|length }} + {{ collector.successfulStacks|length }}
Failed requests - {{ collector.failedStacks|length }} + {{ collector.failedStacks|length }}
{% endset %} - {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with { 'link': profiler_url } %} + {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with { 'link': profiler_url, 'status': collector.failedStacks|length ? 'red' : '' } %} {% endif %} {% endblock %} @@ -33,11 +33,16 @@ {% block menu %} {# This left-hand menu appears when using the full-screen profiler. #} - + {{ include('@Httplug/Icon/httplug.svg') }} Httplug + {% if collector.failedStacks|length %} + + {{ collector.failedStacks|length }} + + {% endif %} {% endblock %}