feature #15160 Redesigned the web debug toolbar (javiereguiluz)

This PR was merged into the 2.8 branch.

Discussion
----------

Redesigned the web debug toolbar

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

In my opinion, the design of the current Web Debug Toolbar suffers from two problems: it looks outdated and it lacks polishing on some parts. Symfony has always introduced a big update in this toolbar for each big release, so I propose to do the same for Symfony 3.

Let's see the new proposed toolbar in action:

-----

**This is the default toolbar** (click on the image to enlarge it)

![default](https://cloud.githubusercontent.com/assets/73419/8449444/cb4be4ea-1fd1-11e5-9358-332449375531.png)

As you can see, if some panel doesn't provide any information, we don't show it (e.g. 0 queries, 0 forms, 0 logs, 0 ajax requests).

-----

Let's compare some panels in detail:

**Symfony Panel**

![symfony-old-panel](https://cloud.githubusercontent.com/assets/73419/8449504/407302b2-1fd2-11e5-80da-a49dc99e68f5.png) ![symfony-new-panel](https://cloud.githubusercontent.com/assets/73419/8449505/41698e20-1fd2-11e5-8ced-e2717716c2d3.png)

**Request Panel**

![request-old-panel](https://cloud.githubusercontent.com/assets/73419/8449531/7d6888ea-1fd2-11e5-829e-93c9e50b7b64.png) ![request-new-panel](https://cloud.githubusercontent.com/assets/73419/8449532/7e359da8-1fd2-11e5-87e6-f194d824254c.png)

-----

When needed, more panels are displayed, such as the SQL information:  (click on the image to enlarge it)

![sql_panel](https://cloud.githubusercontent.com/assets/73419/8449554/b6abc1d0-1fd2-11e5-8450-13eae5bc3c50.png)

As you can see, the new toolbar provides more information than the old one and it takes less space.

Some of the new panels include more information in the extended info, such as the Doctrine one showing that the second level cache is disabled:

![sql_old_panel](https://cloud.githubusercontent.com/assets/73419/8449573/fc288aae-1fd2-11e5-9823-46b33fa9d998.png) ![sql_new_panel](https://cloud.githubusercontent.com/assets/73419/8449572/fab6244c-1fd2-11e5-9e14-28045de0b143.png)

-----

**Errors and warnings** now stand out more clearly because all the panel background is changed.

For example, if there are i18n errors: (click on the image to enlarge it)

![i18n_panel_error](https://cloud.githubusercontent.com/assets/73419/8449590/20708786-1fd3-11e5-8ad7-6bd3b3f4b933.png)

If the page is loading too slowly: (click on the image to enlarge it)

![slow_page](https://cloud.githubusercontent.com/assets/73419/8449597/2bc0c6e6-1fd3-11e5-9a9e-55bfe07ac170.png)

If Symfony version is deprecated: (click on the image to enlarge it)

![deprecated_symfony](https://cloud.githubusercontent.com/assets/73419/8449605/3cfa9860-1fd3-11e5-8dbd-9915597970f4.png)

-----

HTTP Errors also stand out more clearly: (click on the image to enlarge it)

![error_404](https://cloud.githubusercontent.com/assets/73419/8449617/56a4ccb8-1fd3-11e5-9638-322f1840937c.png)

![error_500](https://cloud.githubusercontent.com/assets/73419/8449618/57a79294-1fd3-11e5-8383-2598dee73fc6.png)

-----

Some questions that you may be wondering:

  * **Why use a dark toolbar instead of maintaining the light toolbar?** Because a dark toolbar stands out more from most of the web designs. It's more probable that your applications display a light background than a dark background, so the Symfony Toolbar stands out more if it's designed in dark.
  * **What about the profiler?** If this proposal is approved I'll also update the design of the profiler to match this new dark and modern look-and-feel.
  * **What about smaller screens?** This is a proposal, so I haven't finished it. Tweaking the design for smaller screens will be the next step. Anyway, as you can see the new toolbar already takes much less space than the current one, so it won't be hard to adapt it.

Commits
-------

5a571b6 Reordered the toolbar elements via service priorities
f237ff1 Increased the z-index of .sf-toolbar-info
b3ad83d Removed an unused media query
b438ee5 Redesigned "abbr" elements
7d92cb8 Restored the old behavior for toolbars with lots of elements
597637e Tweaks and bug fixes
9df0f8b Added some upgrade notes about the new toolbar design
22f6bc5 Removed an useless CSS class and added styles for <hr>
5070861 Added a new profiler_markup_version to improve BC of the new toolbar
2fb3319 Removed an unused import
7ec1cd4 Reverted the feature to display different toolbar versions
084cca6 Minor JavaScript optimizations
972a92e Misc. tweaks and improvements
ebb44e4 Added some styles to make old panels look better in the new design
1847285 Pass the toolbar version number from the controller, to ease transition and keep BC
a0e03f6 Minor tweaks
002dda5 Fixed toolbar issues when displaying it inside the profiler
e94a6a0 Smaller font sizes for smartphones, fixed request status padding issue and make too long panels always be displayed at the leftmost part of browser window
9b585b9 Made the close icon a bit smaller
3ab2e20 fixed all vertical aligning issues and tweaked icons
f087ac0 More vertical aligning fixes
9e38a8a Minor CSS tweaks and made font sizes bigger
0dfcb60 Fixed an issue with the Config panel in the Profiler view
cd53210 Fixed another z-index issue
e28f895 A very high z-index value is required to avoid issues in the profiler view
23dc884 Fixed a potential issue in the request panel
7c35d25 Fixed another insignificant syntax issue
e14fb6d Fixed a minor syntax issue
9d89841 Finished the toolbar redesign
b25b6dd Finished "dump" panel and other minor tweaks
2bccdd4 Minor CSS fixes
c0bee9b Tweaked the Twig panel
77d522a Tweaked the translation panel
041d424 Improved the Security toolbar panel
af3dcb2 Minor Ajax tweaks
acee052 Finished the Ajax panel redesign
fac5391 Lots of minor improvements
ef53850 More fixes and tweaks
51a79c9 Reorder toolbar panels
2735346 Fixed a minor markup error that broke the toolbar
64b8f38 A new batch of updates
4eee931 Restored all the code removed by mistake
b6f413f First batch of fixes
c2fcadc Redesigned the web debug toolbar
This commit is contained in:
Fabien Potencier 2015-07-31 18:40:00 +02:00
commit 251314e541
31 changed files with 720 additions and 540 deletions

View File

@ -136,3 +136,64 @@ DependencyInjection
<service id="foo" class="stdClass" shared="false" />
</services>
```
Web Development Toolbar
-----------------------
The web development toolbar has been completely redesigned. This update has
introduced some changes in the HTML markup of the toolbar items.
Before:
Information was wrapped with simple `<span>` elements:
```twig
{% block toolbar %}
{% set icon %}
<span>
<svg ...></svg>
<span>{{ '%.1f'|format(collector.memory / 1024 / 1024) }} MB</span>
</span>
{% endset %}
{% endblock %}
```
After:
Information is now semantically divided into values and labels according to
the `class` attribute of each `<span>` element:
```twig
{% block toolbar %}
{% set icon %}
<svg ...></svg>
<span class="sf-toolbar-value">
{{ '%.1f'|format(collector.memory / 1024 / 1024) }}
</span>
<span class="sf-toolbar-label">MB</span>
{% endset %}
{% endblock %}
```
Most of the blocks designed for the previous toolbar will still be displayed
correctly. However, if you want to support both the old and the new toolbar,
it's better to make use of the new `profiler_markup_version` variable passed
to the toolbar templates:
```twig
{% block toolbar %}
{% set profiler_markup_version = profiler_markup_version|default(1) %}
{% set icon %}
{% if profiler_markup_version == 1 %}
{# code for the original toolbar #}
{% else %}
{# code for the new toolbar (Symfony 2.8+) #}
{% endif %}
{% endset %}
{% endblock %}
```

View File

@ -5,17 +5,17 @@
{% if dumps_count %}
{% set icon %}
<svg width="21" height="28" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="0 0 21 28" enable-background="new 0 0 21 28" xml:space="preserve"><path fill="#3F3F3F" d="M21 14h-1c-0.3-4.8-4.1-8.7-9-9V4h-1v1c-4.8 0.3-8.7 4.1-9 9H0v1h1c0.3 4.8 4.1 8.7 9 9v1h1v-1 c4.8-0.3 8.7-4.1 9-9h1V14z M11 22v-4h-1v4c-3.7-0.2-6.7-3.2-7-7h4v-1H3c0.2-3.7 3.2-6.7 7-7v4h1V7c3.7 0.2 6.7 3.2 7 7h-4v1h4 C17.7 18.7 14.7 21.7 11 22z"/></svg>
<span class="sf-toolbar-status sf-toolbar-status-yellow">{{ dumps_count }}</span>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" height="24" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<path fill="#AAAAAA" d="M12,22.6c-5.8,0-10.5-4.7-10.5-10.5C1.5,6.3,6.2,1.5,12,1.5s10.5,4.7,10.5,10.5C22.5,17.9,17.8,22.6,12,22.6z M12,4.5c-4.2,0-7.5,3.4-7.5,7.5c0,4.2,3.4,7.5,7.5,7.5s7.5-3.4,7.5-7.5C19.5,7.9,16.2,4.5,12,4.5z"/>
<path fill="#AAAAAA" d="M12,9.1c-0.8,0-1.5-0.7-1.5-1.5v-6c0-0.8,0.7-1.5,1.5-1.5s1.5,0.7,1.5,1.5v6C13.5,8.4,12.8,9.1,12,9.1zM13.5,22.4v-6c0-0.8-0.7-1.5-1.5-1.5s-1.5,0.7-1.5,1.5v6c0,0.8,0.7,1.5,1.5,1.5S13.5,23.2,13.5,22.4z M23.9,12c0-0.8-0.7-1.5-1.5-1.5h-6c-0.8,0-1.5,0.7-1.5,1.5s0.7,1.5,1.5,1.5h6C23.2,13.5,23.9,12.8,23.9,12z M9.1,12c0-0.8-0.7-1.5-1.5-1.5h-6c-0.8,0-1.5,0.7-1.5,1.5s0.7,1.5,1.5,1.5h6C8.4,13.5,9.1,12.8,9.1,12z"/>
</svg>
<span class="sf-toolbar-value">{{ dumps_count }}</span>
{% endset %}
{% set text %}
<div class="sf-toolbar-info-piece">
<b>dump()</b>
</div>
{% for dump in collector.getDumps('html') %}
<div class="sf-toolbar-info-piece">
in
<span>
{% if dump.file %}
{% set link = dump.file|file_link(dump.line) %}
{% if link %}
@ -26,14 +26,15 @@
{% else %}
{{ dump.name }}
{% endif %}
line {{ dump.line }}:
</span>
<span class="sf-toolbar-file-line">line {{ dump.line }}</span>
{{ dump.data|raw }}
</div>
{% endfor %}
<img src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" onload="var h = this.parentNode.innerHTML, rx=/<script>(.*?)<\/script>/g, s; while (s = rx.exec(h)) {eval(s[1]);};" />
{% endset %}
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': true } %}
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { 'link': true }) }}
{% endif %}
{% endblock %}

View File

@ -17,17 +17,17 @@
<services>
<service id="data_collector.config" class="%data_collector.config.class%" public="false">
<tag name="data_collector" template="@WebProfiler/Collector/config.html.twig" id="config" priority="255" />
<tag name="data_collector" template="@WebProfiler/Collector/config.html.twig" id="config" priority="-255" />
<call method="setKernel"><argument type="service" id="kernel" on-invalid="ignore" /></call>
</service>
<service id="data_collector.request" class="%data_collector.request.class%">
<tag name="kernel.event_subscriber" />
<tag name="data_collector" template="@WebProfiler/Collector/request.html.twig" id="request" priority="255" />
<tag name="data_collector" template="@WebProfiler/Collector/request.html.twig" id="request" priority="260" />
</service>
<service id="data_collector.ajax" class="Symfony\Bundle\FrameworkBundle\DataCollector\AjaxDataCollector" public="false">
<tag name="data_collector" template="@WebProfiler/Collector/ajax.html.twig" id="ajax" priority="255" />
<tag name="data_collector" template="@WebProfiler/Collector/ajax.html.twig" id="ajax" priority="256" />
</service>
<service id="data_collector.exception" class="%data_collector.exception.class%" public="false">
@ -46,13 +46,13 @@
</service>
<service id="data_collector.time" class="%data_collector.time.class%" public="false">
<tag name="data_collector" template="@WebProfiler/Collector/time.html.twig" id="time" priority="255" />
<tag name="data_collector" template="@WebProfiler/Collector/time.html.twig" id="time" priority="259" />
<argument type="service" id="kernel" on-invalid="ignore" />
<argument type="service" id="debug.stopwatch" on-invalid="ignore" />
</service>
<service id="data_collector.memory" class="%data_collector.memory.class%" public="false">
<tag name="data_collector" template="@WebProfiler/Collector/memory.html.twig" id="memory" priority="255" />
<tag name="data_collector" template="@WebProfiler/Collector/memory.html.twig" id="memory" priority="258" />
</service>
<service id="data_collector.router" class="%data_collector.router.class%" >

View File

@ -2,39 +2,47 @@
{% block toolbar %}
{% if collector.tokenClass %}
{% set color_code = (collector.enabled and collector.authenticated) ? 'green' : 'yellow' %}
{% set authentication_color_code = (collector.enabled and collector.authenticated) ? 'green' : 'red' %}
{% set authentication_color_text = (collector.enabled and collector.authenticated) ? 'Yes' : 'No' %}
{% set is_authenticated = collector.enabled and collector.authenticated %}
{% set color_code = is_authenticated ? '' : 'yellow' %}
{% else %}
{% set color_code = collector.enabled ? 'red' : 'black' %}
{% set color_code = collector.enabled ? 'red' : '' %}
{% endif %}
{% set icon %}
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" height="24" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<path fill="#AAAAAA" d="M21,20.4V22H3v-1.6c0-3.7,2.4-6.9,5.8-8c-1.7-1.1-2.9-3-2.9-5.2c0-3.4,2.7-6.1,6.1-6.1s6.1,2.7,6.1,6.1c0,2.2-1.2,4.1-2.9,5.2C18.6,13.5,21,16.7,21,20.4z"/>
</svg>
<span class="sf-toolbar-value">{{ collector.user|default('n/a') }}</span>
{% endset %}
{% set text %}
{% if collector.tokenClass %}
<div class="sf-toolbar-info-piece">
<b>Logged in as</b>
<span class="sf-toolbar-status sf-toolbar-status-{{ color_code }}">{{ collector.user }}</span>
<span>{{ collector.user }}</span>
</div>
<div class="sf-toolbar-info-piece">
<b>Authenticated</b>
<span class="sf-toolbar-status sf-toolbar-status-{{ authentication_color_code }}">{{ authentication_color_text }}</span>
<span class="sf-toolbar-status sf-toolbar-status-{{ is_authenticated ? 'green' : 'red' }}">{{ is_authenticated ? 'Yes' : 'No' }}</span>
</div>
{% if collector.tokenClass != null %}
<div class="sf-toolbar-info-piece">
<b>Token class</b>
{{ collector.tokenClass|abbr_class }}
<span>{{ collector.tokenClass|abbr_class }}</span>
</div>
{% endif %}
{% elseif collector.enabled %}
You are not authenticated.
<div class="sf-toolbar-info-piece">
<span>You are not authenticated.</span>
</div>
{% else %}
The security is disabled.
<div class="sf-toolbar-info-piece">
<span>The security is disabled.</span>
</div>
{% endif %}
{% endset %}
{% set icon %}
<svg width="24" height="28" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="0 0 24 28" enable-background="new 0 0 24 28" xml:space="preserve"><g><path fill="#3F3F3F" d="M8.6 14.6c0-0.4 0-0.6 0-0.9c0.2-0.1 0.5-0.6 0.5-1.1c0.1 0 0.3-0.1 0.4-0.6c0-0.3-0.1-0.4-0.2-0.5 c0.2-0.6 0.6-2.6-0.8-2.8C8.4 8.4 8 8.3 7.5 8.3c-2 0-2.2 1.5-1.8 3.2c-0.1 0-0.2 0.2-0.2 0.5c0.1 0.5 0.3 0.6 0.4 0.6 c0 0.5 0.4 1 0.5 1.1c0 0.3 0 0.6 0 0.9c-0.4 1.1-3 0.8-3.2 2.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.3 1 0.7 1.3 1.3c0.3 0.5 0.4 1 0.4 1.6c0 0.8-0.3 1.6-0.9 2.2c-0.5 0.6-1.1 0.9-1.7 0.9 c-0.2 0-0.4 0-0.5-0.1c-0.1-0.1-0.2-0.1-0.3-0.3c0-0.1-0.1-0.2-0.1-0.4c-0.2 0.2-0.4 0.4-0.6 0.5c-0.2 0.1-0.5 0.2-0.7 0.2 c-0.3 0-0.5-0.1-0.7-0.2c-0.2-0.1-0.4-0.4-0.6-0.7c-0.2-0.3-0.2-0.7-0.2-1c0-0.5 0.1-0.9 0.4-1.4c0.2-0.5 0.5-0.8 0.9-1 c0.3-0.2 0.7-0.3 1-0.3c0.3 0 0.5 0.1 0.7 0.2c0.2 0.1 0.4 0.3 0.6 0.6l0.1-0.7h0.8l-0.6 2.9c-0.1 0.4-0.1 0.6-0.1 0.7 c0 0.1 0 0.1 0.1 0.2c0.1 0.1 0.1 0.1 0.2 0.1c0.2 0 0.4-0.1 0.6-0.3c0.3-0.2 0.6-0.5 0.8-0.9c0.2-0.4 0.3-0.8 0.3-1.2 c0-0.5-0.1-0.9-0.4-1.3c-0.2-0.4-0.6-0.8-1.1-1s-1-0.4-1.6-0.4c-0.7 0-1.3 0.2-1.8 0.5c-0.6 0.3-1 0.8-1.3 1.4 c-0.3 0.6-0.5 1.2-0.5 1.9c0 0.7 0.2 1.3 0.5 1.8c0.3 0.5 0.8 0.9 1.3 1.1c0.6 0.2 1.2 0.4 1.9 0.4c0.8 0 1.4-0.1 1.9-0.4 c0.5-0.3 0.9-0.6 1.1-0.9h0.8C22 14.9 21.8 15.3 21.4 15.6z"/></g></svg>
<span class="sf-toolbar-status sf-toolbar-status-{{ color_code }}">{{ collector.user }}</span>
{% endset %}
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %}
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: color_code }) }}
{% endblock %}
{% block menu %}

View File

@ -79,7 +79,7 @@
<service id="twig.profile" class="Twig_Profiler_Profile" />
<service id="data_collector.twig" class="Symfony\Bridge\Twig\DataCollector\TwigDataCollector" public="false">
<tag name="data_collector" template="@WebProfiler/Collector/twig.html.twig" id="twig" priority="255" />
<tag name="data_collector" template="@WebProfiler/Collector/twig.html.twig" id="twig" priority="257" />
<argument type="service" id="twig.profile" />
</service>

View File

@ -11,13 +11,13 @@
namespace Symfony\Bundle\WebProfilerBundle\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Bundle\WebProfilerBundle\Profiler\TemplateManager;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Session\Flash\AutoExpireFlashBag;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\HttpKernel\Profiler\Profiler;
use Symfony\Component\HttpFoundation\Session\Flash\AutoExpireFlashBag;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\WebProfilerBundle\Profiler\TemplateManager;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
/**
@ -207,6 +207,7 @@ class ProfilerController
'templates' => $this->getTemplateManager()->getTemplates($profile),
'profiler_url' => $url,
'token' => $token,
'profiler_markup_version' => 2, // 1 = original toolbar, 2 = Symfony 2.8+ toolbar
)), 200, array('Content-Type' => 'text/html'));
}

View File

@ -72,6 +72,7 @@ class TemplateManager
public function getTemplates(Profile $profile)
{
$templates = $this->getNames($profile);
foreach ($templates as $name => $template) {
$templates[$name] = $this->twig->loadTemplate($template);
}

View File

@ -2,15 +2,13 @@
{% block toolbar %}
{% set icon %}
<span>
<svg width="24" height="28" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="0 0 24 28" enable-background="new 0 0 24 28" xml:space="preserve"><polygon fill="#3F3F3F" points="18.4,3.8 12.8,9.4 16.3,9.4 16.3,21.1 14.1,21.1 9.9,25.3 16.3,25.3 20.5,25.3 20.5,21.1 20.5,9.4 23.9,9.4"/><polygon fill="#3F3F3F" points="5.6,25.3 11.2,19.7 7.7,19.7 7.7,8 9.9,8 14.1,3.8 7.7,3.8 3.5,3.8 3.5,8 3.5,19.7 0.1,19.7"/></svg>
<span class="sf-toolbar-ajax-requests">0</span>
</span>
{{ include('@WebProfiler/Icon/ajax.svg') }}
<span class="sf-toolbar-value sf-toolbar-ajax-requests">0</span>
{% endset %}
{% set text %}
<div class="sf-toolbar-info-piece">
<b>AJAX requests</b>
<span class="sf-toolbar-ajax-info"></span>
<b class="sf-toolbar-ajax-info"></b>
</div>
<div class="sf-toolbar-info-piece">
<table class="sf-toolbar-ajax-requests">
@ -26,5 +24,6 @@
</table>
</div>
{% endset %}
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': false } %}
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: false }) }}
{% endblock %}

View File

@ -1,115 +1,106 @@
{% extends '@WebProfiler/Profiler/layout.html.twig' %}
{% block toolbar %}
{# Symfony Logo #}
{% if 'unknown' == collector.symfonyState %}
{% set block_status = '' %}
{% set symfony_version_status = 'Unable to retrieve information about the Symfony version.' %}
{% elseif 'eol' == collector.symfonyState %}
{% set block_status = 'red' %}
{% set symfony_version_status = 'This Symfony version will no longer receive security fixes.' %}
{% elseif 'eom' == collector.symfonyState %}
{% set block_status = 'yellow' %}
{% set symfony_version_status = 'This Symfony version will only receive security fixes.' %}
{% elseif 'dev' == collector.symfonyState %}
{% set block_status = 'yellow' %}
{% set symfony_version_status = 'This Symfony version is still in the development phase.' %}
{% else %}
{% set block_status = '' %}
{% set symfony_version_status = '' %}
{% endif %}
{% set icon %}
<a href="https://symfony.com/">
<svg width="26" height="28" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="0 0 26 28" enable-background="new 0 0 26 28" xml:space="preserve"><path fill="#010202" d="M13 0C5.8 0 0 5.8 0 13c0 7.2 5.8 13 13 13c7.2 0 13-5.8 13-13C26 5.8 20.2 0 13 0z M20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{% if collector.applicationname %}
{{ collector.applicationname }} {{ collector.applicationversion }}
{% elseif collector.symfonyState is defined %}
{% if 'unknown' == collector.symfonyState -%}
<span class="sf-toolbar-status sf-toolbar-info-piece-additional" title="Unable to retrieve information about the Symfony version.">
{%- elseif 'eol' == collector.symfonyState -%}
<span class="sf-toolbar-status sf-toolbar-status-red" title="This Symfony version will no longer receive security fixes.">
{%- elseif 'eom' == collector.symfonyState -%}
<span class="sf-toolbar-status sf-toolbar-status-yellow" title="This Symfony version will only receive security fixes.">
{%- elseif 'dev' == collector.symfonyState -%}
<span class="sf-toolbar-status sf-toolbar-status-yellow" title="This Symfony version is still in the development phase.">
{%- else -%}
<span class="sf-toolbar-status sf-toolbar-status-green">
{%- endif -%}
{{ collector.symfonyversion }}</span>
{% endif %}
{% if collector.symfonyState is defined %}
<span class="sf-toolbar-label">
{{ include('@WebProfiler/Icon/symfony.svg') }}
</span>
</a>
<span class="sf-toolbar-value">{{ collector.symfonyversion }}</span>
{% elseif collector.applicationname %}
<span class="sf-toolbar-label">{{ collector.applicationname }}</span>
<span class="sf-toolbar-value">{{ collector.applicationversion }}</span>
{% endif %}
{% endset %}
{% set text %}
{% if collector.applicationname %}
<div class="sf-toolbar-info-piece">
{{ collector.applicationname }} <b>{{ collector.applicationversion }}</b>
</div>
{% endif %}
<div class="sf-toolbar-info-piece">
Symfony <b>{{ collector.symfonyversion }}</b>
</div>
<div class="sf-toolbar-info-piece">
<a href="https://symfony.com/doc/{{ collector.symfonyversion }}/index.html" rel="help">Symfony Documentation</a>
</div>
{% endset %}
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': false } %}
{# PHP Information #}
{% set icon %}
<a href="{{ path('_profiler_phpinfo') }}">
<svg width="26" height="28" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="0 0 26 28" enable-background="new 0 0 26 28" xml:space="preserve"><g><path fill="#010202" d="M8 11.5c-0.2-0.1-0.4-0.1-0.7-0.1s-0.5 0-0.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z M13.7 15.9l0.9-3.5c0.1-0.2 0.1-0.3 0.1-0.5 c0-0.1 0-0.2-0.1-0.3c-0.1-0.1-0.2-0.1-0.3-0.2c-0.1 0-0.3-0.1-0.5-0.1l-1.2 0l-1.2 4.5H10L12.1 8h1.5l-0.6 2.1h1.4 c0.4 0 0.7 0 1 0.1s0.5 0.2 0.7 0.3c0.2 0.1 0.3 0.4 0.3 0.6c0 0.3 0 0.6-0.1 1l-1 3.7H13.7z M23 13.4c-0.1 0.2-0.2 0.4-0.2 0.6 c-0.1 0.2-0.2 0.4-0.3 0.5S22.2 14.9 22 15c-0.2 0.2-0.4 0.3-0.6 0.5c-0.2 0.1-0.4 0.2-0.6 0.3c-0.2 0.1-0.4 0.1-0.6 0.1 c-0.2 0-0.4 0-0.7 0h-1.3L17.6 18h-1.5l2.1-7.9h2.9c0.4 0 0.8 0.1 1.1 0.2c0.3 0.1 0.5 0.3 0.7 0.6c0.2 0.2 0.3 0.5 0.3 0.9 c0 0.3 0 0.7-0.1 1.1C23.1 13.1 23.1 13.3 23 13.4z"/></g></svg>
</a>
{% endset %}
{% set text %}
{% spaceless %}
<div class="sf-toolbar-info-piece sf-toolbar-info-php">
<b>PHP</b>
<span>{{ collector.phpversion }}</span>
</div>
<div class="sf-toolbar-info-piece sf-toolbar-info-php-ext">
<b>PHP Extensions</b>
<span class="sf-toolbar-status sf-toolbar-status-{{ collector.hasxdebug ? 'green' : 'red' }}">xdebug</span>
<span class="sf-toolbar-status sf-toolbar-status-{{ collector.hasaccelerator ? 'green' : 'red' }}">accel</span>
</div>
<div class="sf-toolbar-info-piece">
<b>PHP SAPI</b>
<span>{{ collector.sapiName }}</span>
</div>
{% endspaceless %}
{% endset %}
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': false } %}
{# Environment #}
{% set debug_status_class %}sf-toolbar-status sf-toolbar-status-{{ collector.debug ? 'green' : 'red' }}{% endset %}
{% set icon %}
<svg width="21" height="28" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="0 0 21 28" enable-background="new 0 0 21 28" xml:space="preserve"><g><path fill="#3F3F3F" d="M5 17H1c-0.5 0-1-0.4-1-1V9c0-0.5 0.4-1 1-1h4c0.5 0 1 0.4 1 1v7C6 16.6 5.6 17 5 17z"/><path fill="#3F3F3F" d="M19 17h-4c-0.5 0-1-0.4-1-1V9c0-0.5 0.4-1 1-1h4c0.5 0 1 0.4 1 1v7C20 16.6 19.6 17 19 17z"/><path fill="#3F3F3F" d="M12.1 20h-4c-0.5 0-1-0.4-1-1v-7c0-0.5 0.4-1 1-1h4c0.5 0 1 0.4 1 1v7C13.1 19.5 12.6 20 12.1 20z"/><rect x="9.1" y="5.8" fill="#3F3F3F" width="2" height="4.5"/><rect x="16" y="17.7" fill="#3F3F3F" width="2" height="4.5"/><rect x="2.1" y="17.7" fill="#3F3F3F" width="2" height="4.5"/><rect x="9.1" y="20.7" fill="#3F3F3F" width="2" height="1.5"/><rect x="2.1" y="5.7" fill="#3F3F3F" width="2" height="1.5"/><rect x="16.1" y="5.7" fill="#3F3F3F" width="2" height="1.5"/></g></svg>
<span class="sf-toolbar-info-piece-additional {{ debug_status_class }}">{{ token }}</span>
{% if 'n/a' != collector.appname or 'n/a' != collector.env %}
<span class="sf-toolbar-info-piece-additional-detail">
<span class="sf-toolbar-info-with-delimiter">{{ collector.appname }}</span>
<span>{{ collector.env }}</span>
<div class="sf-toolbar-info-piece">
<b>Profiler token</b>
<span>
{% if profiler_url %}
<a href="{{ profiler_url }}">{{ collector.token }}</a>
{% else %}
{{ collector.token }}
{% endif %}
</span>
{% endif %}
{% endset %}
{% set text %}
{% spaceless %}
{% if 'n/a' != collector.appname %}
<div class="sf-toolbar-info-piece">
<b>Name</b>
<span>{{ collector.appname }}</span>
</div>
{% endif %}
{% if 'n/a' != collector.env %}
<div class="sf-toolbar-info-piece">
<b>Environment</b>
<span>{{ collector.env }}</span>
</div>
{% endif %}
{% if 'n/a' != collector.debug %}
<div class="sf-toolbar-info-piece">
<b>Debug</b>
<span class="{{ debug_status_class }}">{{ collector.debug ? 'en' : 'dis' }}abled</span>
</div>
{% endif %}
</div>
{% if 'n/a' != collector.appname %}
<div class="sf-toolbar-info-piece">
<b>Token</b>
<b>Kernel name</b>
<span>{{ collector.appname }}</span>
</div>
{% endif %}
{% if 'n/a' != collector.env %}
<div class="sf-toolbar-info-piece">
<b>Environment</b>
<span>{{ collector.env }}</span>
</div>
{% endif %}
{% if 'n/a' != collector.debug %}
<div class="sf-toolbar-info-piece">
<b>Debug</b>
<span class="{{ debug_status_class }}">{{ collector.debug ? 'enabled' : 'disabled' }}</span>
</div>
{% endif %}
<div class="sf-toolbar-info-piece sf-toolbar-info-php">
<b>PHP version</b>
<span>
{{ collector.phpversion }}
&nbsp; <a href="{{ path('_profiler_phpinfo') }}">View phpinfo()</a>
</span>
</div>
<div class="sf-toolbar-info-piece sf-toolbar-info-php-ext">
<b>PHP Extensions</b>
<span class="sf-toolbar-status sf-toolbar-status-{{ collector.hasxdebug ? 'green' : 'red' }}">xdebug</span>
<span class="sf-toolbar-status sf-toolbar-status-{{ collector.hasaccelerator ? 'green' : 'red' }}">accel</span>
</div>
<div class="sf-toolbar-info-piece">
<b>PHP SAPI</b>
<span>{{ collector.sapiName }}</span>
</div>
{% if collector.symfonyversion is defined %}
<div class="sf-toolbar-info-piece">
<b>Resources</b>
<span>
{% if profiler_url %}
<a href="{{ profiler_url }}">{{ collector.token }}</a>
{% else %}
{{ collector.token }}
{% endif %}
<a href="https://symfony.com/doc/{{ collector.symfonyversion }}/index.html" rel="help">
Read Symfony {{ collector.symfonyversion }} Docs
</a>
</span>
</div>
{% endspaceless %}
{% endif %}
{% endset %}
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %}
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: false, status: block_status }) }}
{% endblock %}
{% block menu %}

View File

@ -3,13 +3,31 @@
{% from _self import form_tree_entry, form_tree_details %}
{% block toolbar %}
{% if collector.data|length %}
{% if collector.data.nb_errors > 0 or collector.data.forms|length %}
{% set status_color = collector.data.nb_errors ? 'red' : '' %}
{% set icon %}
<svg width="20" height="28" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="0 0 20 28" enable-background="new 0 0 20 28" xml:space="preserve"><g><polygon fill="#3F3F3F" points="16,5 13,5 13,3 7,3 7,5 4,5 4,9 16,9"/><path fill="#3F3F3F" d="M17 6v4H3V6H0v19h20V6H17z M8 22H3v-1h5V22z M17 20H3v-1h14V20z M17 18H3v-1h14V18z M17 16H3v-1h14V16z M17 14H4v-1h13V14z"/></g></svg>
<span class="sf-toolbar-status sf-toolbar-status-{% if collector.data.nb_errors %}red{% else %}green{% endif %}">{% if collector.data.nb_errors %}{{ collector.data.nb_errors }}{% else %}{{ collector.data.forms|length }}{% endif %}</span>
{{ include('@WebProfiler/Icon/form.svg') }}
<span class="sf-toolbar-value">
{% if collector.data.nb_errors %}
{{ collector.data.nb_errors }}
{% else %}
{{ collector.data.forms|length }}
{% endif %}
</span>
{% endset %}
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %}
{% set text %}
<div class="sf-toolbar-info-piece">
<b>Number of forms</b>
<span class="sf-toolbar-status">{{ collector.data.forms|length }}</span>
</div>
<div class="sf-toolbar-info-piece">
<b>Number of errors</b>
<span class="sf-toolbar-status sf-toolbar-status-{{ collector.data.nb_errors > 0 ? 'red' }}">{{ collector.data.nb_errors }}</span>
</div>
{% endset %}
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }}
{% endif %}
{% endblock %}

View File

@ -5,36 +5,30 @@
{% block toolbar %}
{% if collector.counterrors or collector.countdeprecations or collector.countscreams %}
{% set icon %}
<svg width="16" height="28" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="0 0 16 28" enable-background="new 0 0 16 28" xml:space="preserve"><g><path fill="#3F3F3F" d="M15 6h-1V5c0-0.5-0.5-1-1-1H2C1.4 4 1 4.4 1 5v2v13c0 1.6 1.3 3 3 3h11c0.5 0 1-0.5 1-1V7 C16 6.5 15.5 6 15 6z M6 15h3v3H6V15z M6 13V7h3v6H6z M15 21c0 0.6-0.4 1-1 1H5c-0.9 0-1.7-0.4-2.2-1H13c0.6 0 1-0.4 1-1V7 c0.5 0 1 0.5 1 1V21z"/></g></svg>
{% if collector.counterrors %}
{% set status_color = "red" %}
{% elseif collector.countdeprecations %}
{% set status_color = "yellow" %}
{% endif %}
{% set status_color = collector.counterrors ? 'red' : collector.countdeprecations ? 'yellow' : '' %}
{% set error_count = collector.counterrors + collector.countdeprecations + collector.countscreams %}
<span class="sf-toolbar-status{% if status_color is defined %} sf-toolbar-status-{{ status_color }}{% endif %}">{{ error_count }}</span>
{{ include('@WebProfiler/Icon/logger.svg') }}
<span class="sf-toolbar-value">{{ error_count }}</span>
{% endset %}
{% set text %}
{% if collector.counterrors %}
<div class="sf-toolbar-info-piece">
<b>Errors</b>
<span class="sf-toolbar-status sf-toolbar-status-red">{{ collector.counterrors }}</span>
</div>
{% endif %}
{% if collector.countdeprecations %}
<div class="sf-toolbar-info-piece">
<b>Deprecated Calls</b>
<span class="sf-toolbar-status sf-toolbar-status-yellow">{{ collector.countdeprecations }}</span>
</div>
{% endif %}
{% if collector.countscreams %}
<div class="sf-toolbar-info-piece">
<b>Silenced Errors</b>
<span class="sf-toolbar-status sf-toolbar-status">{{ collector.countscreams }}</span>
</div>
{% endif %}
<div class="sf-toolbar-info-piece">
<b>Errors</b>
<span class="sf-toolbar-status sf-toolbar-status-{{ collector.counterrors ? 'red' }}">{{ collector.counterrors|default(0) }}</span>
</div>
<div class="sf-toolbar-info-piece">
<b>Deprecated Calls</b>
<span class="sf-toolbar-status sf-toolbar-status-{{ collector.countdeprecations ? 'yellow' }}">{{ collector.countdeprecations|default(0) }}</span>
</div>
<div class="sf-toolbar-info-piece">
<b>Silenced Errors</b>
<span class="sf-toolbar-status">{{ collector.countscreams|default(0) }}</span>
</div>
{% endset %}
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %}
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }}
{% endif %}
{% endblock %}

View File

@ -2,16 +2,23 @@
{% block toolbar %}
{% set icon %}
<span>
<svg width="13" height="28" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="0 0 13 28" enable-background="new 0 0 13 28" xml:space="preserve"><g><rect x="3" y="11" fill="#BCBCBB" width="7" height="9"/></g><g><path fill="#3F3F3F" d="M11 6V21H2V6H0V22c0 0.6 0.4 1 1 1h11c0.6 0 1-0.4 1-1V6H11z"/></g></svg>
<span>{{ '%.1f'|format(collector.memory / 1024 / 1024) }} MB</span>
</span>
{% set status_color = (collector.memory / 1024 / 1024) > 50 ? 'yellow' : '' %}
{{ include('@WebProfiler/Icon/memory.svg') }}
<span class="sf-toolbar-value">{{ '%.1f'|format(collector.memory / 1024 / 1024) }}</span>
<span class="sf-toolbar-label">MB</span>
{% endset %}
{% set text %}
<div class="sf-toolbar-info-piece">
<b>Memory usage</b>
<span>{{ '%.1f'|format(collector.memory / 1024 / 1024) }} / {{ collector.memoryLimit == -1 ? '&infin;' : '%.1f'|format(collector.memoryLimit / 1024 / 1024)|escape }} MB</span>
<b>Peak memory usage</b>
<span>{{ '%.1f'|format(collector.memory / 1024 / 1024) }} MB</span>
</div>
<div class="sf-toolbar-info-piece">
<b>PHP memory limit</b>
<span>{{ collector.memoryLimit == -1 ? '&infin;' : '%.0f'|format(collector.memoryLimit / 1024 / 1024)|escape }} MB</span>
</div>
{% endset %}
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': false } %}
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: false, status: status_color }) }}
{% endblock %}

View File

@ -1,41 +1,54 @@
{% extends '@WebProfiler/Profiler/layout.html.twig' %}
{% block toolbar %}
{% set request_handler %}
{% if collector.controller.class is defined %}
{% set link = collector.controller.file|file_link(collector.controller.line) %}
{% if collector.controller.method %}
<span class="sf-toolbar-info-class sf-toolbar-info-with-next-pointer">{{ collector.controller.class|abbr_class }}</span>
<span class="sf-toolbar-info-method"{% if link %} onclick="window.location='{{link|e('js')}}';window.event.stopPropagation();return false;"{% endif %}>
{{ collector.controller.method }}
</span>
{% else %}
<span class="sf-toolbar-info-class"{% if link %} onclick="window.location='{{link|e('js')}}';window.event.stopPropagation();return false;"{% endif %}>{{ collector.controller.class|abbr_class }}</span>
{% endif %}
{% if link %}<a href="{{ link }}" title="{{ collector.controller.file }}">{% else %}<span>{% endif %}
{{ collector.controller.class|abbr_class|striptags }}
{%- if collector.controller.method -%}
&nbsp;::&nbsp;{{ collector.controller.method }}
{%- endif -%}
{% if link %}</a>{% else %}</span>{% endif %}
{% else %}
<span class="sf-toolbar-info-class">{{ collector.controller }}</span>
<span>{{ collector.controller }}</span>
{% endif %}
{% endset %}
{% set request_status_code_color = (400 > collector.statuscode) ? ((200 == collector.statuscode) ? 'green' : 'yellow') : 'red'%}
{% set request_route = collector.route ? collector.route : 'NONE' %}
{% set request_status_code_color = (400 > collector.statuscode) ? ((200 == collector.statuscode) ? 'green' : 'yellow') : 'red' %}
{% set icon %}
<svg width="28" height="28" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="0 0 28 28" enable-background="new 0 0 28 28" xml:space="preserve"><path fill="#3F3F3F" d="M19.5 18c0 0.2 0 0.5 0.1 0.8c-0.8 0.7-1.2 1.2-1.3 1.3c0 0 0 0.1 0 0.1c0.7 1 1.1 1.4 1.1 1.4 c0.1 0 0.3-0.1 0.8-0.3c0.4-0.2 0.8-0.4 0.9-0.5c0.1 0.1 0.3 0.1 0.3 0.2c0.1 0 0.2 0.1 0.4 0.1c0 0.2 0.1 0.6 0.3 1 c0.1 0.5 0.2 0.7 0.3 0.8c0 0 0.6-0.1 1.8-0.2c0 0 0.1 0 0.1-0.1c0.1-0.2 0.1-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 1.1 2.7S12.9 14.4 12.1 15.2z"/><circle fill="#3F3F3F" cx="9.5" cy="12.5" r="2"/></svg>
<span class="sf-toolbar-status sf-toolbar-status-{{ request_status_code_color }}" title="{{ collector.statustext }}">{{ collector.statuscode }}</span>
<span class="sf-toolbar-status sf-toolbar-info-piece-additional">{{ request_handler }}</span>
<span class="sf-toolbar-status sf-toolbar-status-{{ request_status_code_color }}">{{ collector.statuscode }}</span>
{% if collector.route %}
<span class="sf-toolbar-label">@</span>
<span class="sf-toolbar-value sf-toolbar-info-piece-additional">{{ collector.route }}</span>
{% endif %}
{% endset %}
{% set text %}
{% spaceless %}
<div class="sf-toolbar-info-piece">
<b>Status</b>
<span class="sf-toolbar-status sf-toolbar-status-{{ request_status_code_color }}">{{ collector.statuscode }}</span> {{ collector.statustext }}
<b>HTTP status</b>
<span>{{ collector.statuscode }} {{ collector.statustext }}</span>
</div>
<div class="sf-toolbar-info-piece">
<b>Controller</b>
{{ request_handler }}
<span>{{ request_handler }}</span>
</div>
{% if collector.controller.class is defined %}
<div class="sf-toolbar-info-piece">
<b>Controller class</b>
<span>{{ collector.controller.class }}</span>
</div>
{% endif %}
<div class="sf-toolbar-info-piece">
<b>Route name</b>
<span>{{ request_route }}</span>
<span>{{ collector.route|default('NONE') }}</span>
</div>
<div class="sf-toolbar-info-piece">
<b>Has session</b>
@ -43,7 +56,8 @@
</div>
{% endspaceless %}
{% endset %}
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %}
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url }) }}
{% endblock %}
{% block menu %}

View File

@ -16,18 +16,28 @@
{% endif %}
{% block toolbar %}
{% set duration = collector.events|length ? '%.0f ms'|format(collector.duration) : 'n/a' %}
{% set total_time = collector.events|length ? '%.0f'|format(collector.duration) : 'n/a' %}
{% set initialization_time = collector.events|length ? '%.0f'|format(collector.inittime) : 'n/a' %}
{% set status_color = collector.events|length and collector.duration > 1000 ? 'yellow' : '' %}
{% set icon %}
<svg width="16" height="28" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="0 0 16 28" enable-background="new 0 0 16 28" xml:space="preserve"><rect x="6" y="4" fill="#3F3F3F" width="4" height="2"/><path fill="#3F3F3F" d="M8 7c-4.4 0-8 3.6-8 8s3.6 8 8 8s8-3.6 8-8S12.4 7 8 7z M12 16H9H7v-6h2v4h3V16z"/></svg>
<span>{{ duration }}</span>
{{ include('@WebProfiler/Icon/time.svg') }}
<span class="sf-toolbar-value">{{ total_time }}</span>
<span class="sf-toolbar-label">ms</span>
{% endset %}
{% set text %}
<div class="sf-toolbar-info-piece">
<b>Total time</b>
<span>{{ duration }}</span>
<span>{{ total_time }} ms</span>
</div>
<div class="sf-toolbar-info-piece">
<b>Initialization time</b>
<span>{{ initialization_time }} ms</span>
</div>
{% endset %}
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %}
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }}
{% endblock %}
{% block menu %}

View File

@ -5,36 +5,34 @@
{% block toolbar %}
{% if collector.messages|length %}
{% set icon %}
<svg width="28" height="28" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 417 300" enable-background="new 0 0 417 300" xml:space="preserve"><g id="Layer_1_1_"><g id="outline_1_"><path fill="#B5B5B6" d="M275.9,145c0,18.2-14.799,33-33,33H120.701l-36.3,42l-0.3-42H40c-18.2,0-33-14.8-33-33V44c0-18.2,14.8-33,33-33h202.9c18.199,0,33,14.8,33,33V145L275.9,145z"/></g><g enable-background="new"><path fill="#FFFFFF" d="M194.501,146.962h-23.898l-9.5-24.715h-43.492l-8.98,24.715H85.326l42.379-108.805h23.23L194.501,146.962zM154.052,103.915L139.06,63.54l-14.695,40.375H154.052z"/></g></g><g id="Layer_2_1_"><g id="japanese"><g id="outline"><path fill="#414141" d="M141.451,214c0,18.2,14.8,33,33,33h122.2l36.301,42l0.301-42h44.1c18.201,0,33-14.8,33-33V113c0-18.2-14.799-33-33-33H174.453c-18.201,0-33,14.8-33,33L141.451,214L141.451,214z"/></g><g enable-background="new"><path fill="#FFFFFF" d="M312.158,143.327c-0.455,1.672-0.912,3.344-1.215,5.016c22.039,6.08,31.766,21.431,31.766,38.455c0,24.318-18.238,40.733-57.301,45.598c-1.217-3.952-5.016-11.248-7.904-15.352c27.359-3.04,45.295-12.159,45.295-29.791c0-5.016-1.672-16.871-18.088-22.19c-6.688,15.199-16.871,29.335-28.727,39.519c0.607,1.976,1.367,3.647,2.127,5.167l-15.654,10.032c-0.76-1.521-1.52-3.192-2.129-5.017c-7.6,4.256-15.959,6.992-24.471,6.992c-13.375,0-22.189-8.512-22.189-22.647c0-20.975,16.111-37.542,37.693-46.357c-0.305-6.536-0.305-13.223-0.305-20.215c-11.398,0.304-23.711,0.608-29.789,0.456l-0.912-17.783c6.99,0.152,19.758,0.152,31.006,0.152c0.305-6.536,0.457-14.135,0.76-20.519l23.863,1.824c-0.305,1.52-1.52,2.736-4.104,3.04c-0.457,4.408-0.76,10.184-1.217,15.047c16.568-0.76,37.391-2.736,54.262-6.384l1.672,18.391c-16.719,3.04-38.605,4.56-56.846,5.168c-0.15,5.319-0.303,10.487-0.303,15.503c6.383-1.52,15.654-2.432,22.799-1.976c0.607-2.28,1.063-4.56,1.215-6.84L312.158,143.327z M255.77,198.044c-1.672-8.056-2.736-17.479-3.496-27.814c-12.008,5.927-20.215,15.199-20.215,25.382c0,8.664,6.535,8.36,8.512,8.209C245.281,203.668,250.449,201.539,255.77,198.044zM286.473,162.021c-2.129-0.304-10.033,0.305-16.871,2.128c0.455,7.6,0.91,14.591,1.975,20.671C277.504,178.589,282.672,170.686,286.473,162.021z"/></g></g></g></svg>
{% if collector.countMissings %}
{% set status_color = "red" %}
{% elseif collector.countFallbacks %}
{% set status_color = "yellow" %}
{% endif %}
{{ include('@WebProfiler/Icon/translation.svg') }}
{% set status_color = collector.countMissings ? 'red' : collector.countFallbacks ? 'yellow' : '' %}
{% set error_count = collector.countMissings + collector.countFallbacks %}
<span class="sf-toolbar-status{% if status_color is defined %} sf-toolbar-status-{{ status_color }}{% endif %}">{{ error_count ?: collector.countdefines }}</span>
<span class="sf-toolbar-value">{{ error_count ?: collector.countdefines }}</span>
{% endset %}
{% set text %}
{% if collector.countMissings %}
<div class="sf-toolbar-info-piece">
<b>Missing messages</b>
<span class="sf-toolbar-status sf-toolbar-status-red">{{ collector.countMissings }}</span>
</div>
{% endif %}
{% if collector.countFallbacks %}
<div class="sf-toolbar-info-piece">
<b>Fallback messages</b>
<span class="sf-toolbar-status sf-toolbar-status-yellow">{{ collector.countFallbacks }}</span>
</div>
{% endif %}
{% if collector.countdefines %}
<div class="sf-toolbar-info-piece">
<b>Defined messages</b>
<span class="sf-toolbar-status sf-toolbar-status-green">{{ collector.countdefines }}</span>
</div>
{% endif %}
<div class="sf-toolbar-info-piece">
<b>Missing messages</b>
<span class="sf-toolbar-status sf-toolbar-status-{{ collector.countMissings ? 'red' }}">
{{ collector.countMissings }}
</span>
</div>
<div class="sf-toolbar-info-piece">
<b>Fallback messages</b>
<span class="sf-toolbar-status sf-toolbar-status-{{ collector.countFallbacks ? 'yellow' }}">
{{ collector.countFallbacks }}
</span>
</div>
<div class="sf-toolbar-info-piece">
<b>Defined messages</b>
<span class="sf-toolbar-status">{{ collector.countdefines }}</span>
</div>
{% endset %}
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %}
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }}
{% endif %}
{% endblock %}

View File

@ -1,30 +1,33 @@
{% extends '@WebProfiler/Profiler/layout.html.twig' %}
{% block toolbar %}
{% set time = collector.templatecount ? '%0.0f ms'|format(collector.time) : 'n/a' %}
{% set time = collector.templatecount ? '%0.0f'|format(collector.time) : 'n/a' %}
{% set icon %}
<img height="28" alt="Twig" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAcCAYAAACOGPReAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAbElEQVRIx2NgGAXUBowMDAwMaWlp/6ll4KxZsxhZYJy0tDRqGMjAwMDAwEQL77OgCxSXlJBsSG9PDwqfJi6lj/fRvTJ4XYocUTBXE4q8oRtRRBnKwsw8RFw6fA0lKkd1dnYOIpfCCthRMIIAAI0IFu9Hxh7ZAAAAAElFTkSuQmCC" />
<span class="sf-toolbar-status">{{ time }}</span>
{{ include('@WebProfiler/Icon/twig.svg') }}
<span class="sf-toolbar-value">{{ time }}</span>
<span class="sf-toolbar-label">ms</span>
{% endset %}
{% set text %}
<div class="sf-toolbar-info-piece">
<b>Render Time</b>
<span>{{ time }}</span>
<span>{{ time }} ms</span>
</div>
<div class="sf-toolbar-info-piece">
<b>Template Calls</b>
<span>{{ collector.templatecount }}</span>
<span class="sf-toolbar-status">{{ collector.templatecount }}</span>
</div>
<div class="sf-toolbar-info-piece">
<b>Block Calls</b>
<span>{{ collector.blockcount }}</span>
<span class="sf-toolbar-status">{{ collector.blockcount }}</span>
</div>
<div class="sf-toolbar-info-piece">
<b>Macro Calls</b>
<span>{{ collector.macrocount }}</span>
<span class="sf-toolbar-status">{{ collector.macrocount }}</span>
</div>
{% endset %}
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %}
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url }) }}
{% endblock %}
{% block menu %}

View File

@ -0,0 +1,6 @@
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" height="24" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<path fill="#AAAAAA" d="M9.8,18l-3.8,4.4c-0.3,0.3-0.8,0.4-1.1,0L1,18c-0.4-0.5-0.1-1,0.5-1H3V6.4C3,3.8,5.5,2,8.2,2h3.9
c1.1,0,2,0.9,2,2s-0.9,2-2,2H8.2C7.7,6,7,6,7,6.4V17h2.2C9.8,17,10.2,17.5,9.8,18z M23,6l-3.8-4.5c-0.3-0.3-0.8-0.3-1.1,0L14.2,6
c-0.4,0.5-0.1,1,0.5,1H17v10.6c0,0.4-0.7,0.4-1.2,0.4h-3.9c-1.1,0-2,0.9-2,2s0.9,2,2,2h3.9c2.6,0,5.2-1.8,5.2-4.4V7h1.5
C23.1,7,23.4,6.5,23,6z"/>
</svg>

After

Width:  |  Height:  |  Size: 562 B

View File

@ -0,0 +1,5 @@
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" height="24" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<path fill="#AAAAAA" d="M21.1,18.3c0.8,0.8,0.8,2,0,2.8c-0.4,0.4-0.9,0.6-1.4,0.6s-1-0.2-1.4-0.6L12,14.8l-6.3,6.3
c-0.4,0.4-0.9,0.6-1.4,0.6s-1-0.2-1.4-0.6c-0.8-0.8-0.8-2,0-2.8L9.2,12L2.9,5.7c-0.8-0.8-0.8-2,0-2.8c0.8-0.8,2-0.8,2.8,0L12,9.2
l6.3-6.3c0.8-0.8,2-0.8,2.8,0c0.8,0.8,0.8,2,0,2.8L14.8,12L21.1,18.3z"/>
</svg>

After

Width:  |  Height:  |  Size: 481 B

View File

@ -0,0 +1,6 @@
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" height="24" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<path fill="#AAAAAA" d="M20.5,4H18V2.5C18,1.7,17.3,1,16.5,1h-9C6.7,1,6,1.7,6,2.5V4H3.5C2.7,4,2,4.7,2,5.5v16C2,22.3,2.7,23,3.5,
23h17c0.8,0,1.5-0.7,1.5-1.5v-16C22,4.7,21.3,4,20.5,4z M9,4h6v1H9V4z M19,20H5V7h1.1c0.2,0.6,0.8,1,1.4,1h9c0.7,0,1.2-0.4,1.4-1H19
V20z M17,11c0,0.6-0.4,1-1,1H8c-0.6,0-1-0.4-1-1s0.4-1,1-1h8C16.6,10,17,10.4,17,11z M17,14c0,0.6-0.4,1-1,1H8c-0.6,0-1-0.4-1-1
s0.4-1,1-1h8C16.6,13,17,13.4,17,14z M13,17c0,0.6-0.4,1-1,1H8c-0.6,0-1-0.4-1-1s0.4-1,1-1h4C12.6,16,13,16.4,13,17z"/>
</svg>

After

Width:  |  Height:  |  Size: 676 B

View File

@ -0,0 +1,7 @@
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" height="24" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<path fill="#AAAAAA" d="M21,4v13.8c0,2.7-2.5,5.2-5.2,5.2H6c-0.6,0-1-0.4-1-1s0.4-1,1-1h9.8c1.6,0,3.2-1.7,3.2-3.2V4
c0-0.6,0.4-1,1-1S21,3.4,21,4z M5.5,20C4.1,20,3,18.9,3,17.5V3.5C3,2.1,4.1,1,5.5,1h10.1C16.9,1,18,2.1,18,3.5v14.1
c0,1.4-1.1,2.5-2.5,2.5H5.5z M9,11.4C9,11.7,9.3,12,9.6,12h1.8c0.3,0,0.6-0.3,0.6-0.6V4.6C12,4.3,11.7,4,11.4,4H9.6
C9.3,4,9,4.3,9,4.6V11.4z M9,16.4C9,16.7,9.3,17,9.6,17h1.8c0.3,0,0.6-0.3,0.6-0.6v-1.8c0-0.3-0.3-0.6-0.6-0.6H9.6
C9.3,14,9,14.3,9,14.6V16.4z"/>
</svg>

After

Width:  |  Height:  |  Size: 661 B

View File

@ -0,0 +1,5 @@
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" height="24" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<path fill="#AAAAAA" d="M6,18.9V15h12v3.9c0,0.7-0.2,1.1-1,1.1H7C6.2,20,6,19.6,6,18.9z M20,1C20,1,20,1,20,1c-0.6,0-1,0.5-1,1.1
l0,18c0,0.5-0.4,0.9-0.9,0.9H5.9C5.4,21,5,20.6,5,20.1l0-18C5,1.5,4.6,1,4,1c0,0,0,0,0,0C3.5,1,3,1.5,3,2.1l0,18
C3,21.7,4.3,23,5.9,23h12.2c1.6,0,2.9-1.3,2.9-2.9l0-18C21,1.5,20.6,1,20,1z M18,9H6v5h12V9z"/>
</svg>

After

Width:  |  Height:  |  Size: 501 B

View File

@ -0,0 +1,12 @@
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" height="24" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<path fill="#AAAAAA" d="M12,0.9C5.8,0.9,0.9,5.8,0.9,12s5,11.1,11.1,11.1s11.1-5,11.1-11.1S18.2,0.9,12,0.9z M18.5,6.9
c-0.6,0-0.9-0.3-0.9-0.8c0-0.2,0-0.4,0.2-0.6c0.1-0.3,0.2-0.3,0.2-0.4c0-0.3-0.5-0.4-0.6-0.4c-1.8,0.1-2.3,2.5-2.7,4.4l-0.2,1
c1,0.2,1.8,0,2.2-0.3c0.6-0.4-0.2-0.7-0.1-1.2c0.1-0.3,0.5-0.5,0.7-0.6c0.5,0,0.7,0.5,0.7,0.9c0,0.7-1,1.8-3,1.8
c-0.3,0-0.5,0-0.6-0.1L13.8,13c-0.4,1.6-0.8,3.8-2.4,5.7c-1.4,1.7-2.9,1.9-3.5,1.9c-1.2,0-1.9-0.6-2-1.5c0-0.8,0.7-1.3,1.2-1.3
c0.6,0,1.1,0.5,1.1,1c0,0.5-0.2,0.6-0.4,0.6c-0.1,0.1-0.3,0.2-0.3,0.4c0,0.1,0.1,0.3,0.4,0.3c0.5,0,0.8-0.3,1.1-0.5
c1.2-0.9,1.6-2.7,2.2-5.7l0.1-0.7c0.2-1,0.5-2.1,0.7-3.2c-0.8-0.6-1.3-1.4-2.4-1.7C9,8.2,8.5,8.4,8.1,8.8c-0.4,0.5-0.2,1.1,0.2,1.5
L9,10.9c0.7,0.8,1.2,1.6,1,2.5C9.7,14.9,8,16,6,15.3c-1.8-0.6-2-1.8-1.8-2.5c0.2-0.6,0.6-0.7,1.1-0.6c0.5,0.2,0.6,0.7,0.6,1.2
c0,0.1,0,0.1-0.1,0.3c-0.2,0.1-0.3,0.3-0.3,0.4c-0.1,0.4,0.4,0.6,0.7,0.7c0.7,0.3,1.6-0.2,1.8-0.8c0.2-0.6-0.2-1-0.4-1.1l-0.7-0.8
c-0.4-0.4-1.1-1.4-0.7-2.6C6.3,9,6.6,8.6,6.9,8.2c0.9-0.6,1.8-0.7,2.8-0.6c1.2,0.4,1.8,1.1,2.6,1.8c0.5-1.2,1-2.4,1.8-3.5
C15,5,16,4.3,17.2,4.2c1.3,0.2,2.2,0.7,2.2,1.6C19.4,6.2,19.2,6.9,18.5,6.9z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,5 @@
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" height="24" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<path fill="#AAAAAA" d="M15.1,4.3c-2.1-0.5-4.2-0.5-6.2,0C8.6,4.3,8.2,4.1,8.2,3.8V3.4c0-1.2,1-2.3,2.3-2.3h3c1.2,0,2.3,1,2.3,2.3
v0.3C15.8,4.1,15.4,4.3,15.1,4.3z M20.9,14c0,4.9-4,8.9-8.9,8.9s-8.9-4-8.9-8.9s4-8.9,8.9-8.9S20.9,9.1,20.9,14z M16.7,15
c0-0.6-0.4-1-1-1H13V8.4c0-0.6-0.4-1-1-1s-1,0.4-1,1v6.2c0,0.6,0.4,1.3,1,1.3h3.7C16.2,16,16.7,15.6,16.7,15z"/>
</svg>

After

Width:  |  Height:  |  Size: 527 B

View File

@ -0,0 +1,13 @@
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" height="24" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<path fill="#AAAAAA" d="M5.4,6H7v0.3c0,1.2-0.7,1.9-1.7,1.9c-1.1,0-1.4-0.4-1.4-1.1C3.9,6.2,4.5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.3,0.3,0.5,0.5,0.8,0.9
C21.1,16.4,20.9,16.6,20.7,16.8z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1,5 @@
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" height="24" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<path fill="#AAAAAA" d="M20.1,1H3.9C2.3,1,1,2.3,1,3.9v16.3C1,21.7,2.3,23,3.9,23h16.3c1.6,0,2.9-1.3,2.9-2.9V3.9
C23,2.3,21.7,1,20.1,1z M21,20.1c0,0.5-0.4,0.9-0.9,0.9H3.9C3.4,21,3,20.6,3,20.1V3.9C3,3.4,3.4,3,3.9,3h16.3C20.6,3,21,3.4,21,3.9
V20.1z M5,5h14v3H5V5z M5,10h3v9H5V10z M10,10h9v9h-9V10z"/>
</svg>

After

Width:  |  Height:  |  Size: 470 B

View File

@ -86,6 +86,7 @@
return;
}
var ajaxToolbarPanel = document.querySelector('.sf-toolbar-block-ajax');
var tbodies = document.querySelectorAll('.sf-toolbar-ajax-request-list');
var state = 'ok';
if (tbodies.length) {
@ -165,31 +166,24 @@
tbody.appendChild(rows);
if (infoSpan) {
var text = requestStack.length + ' call' + (requestStack.length > 1 ? 's' : '');
var text = requestStack.length + ' AJAX request' + (requestStack.length > 1 ? 's' : '');
infoSpan.textContent = text;
}
} else {
var cell = document.createElement('td');
cell.setAttribute('colspan', '4');
cell.textContent = "No AJAX requests yet.";
var row = document.createElement('tr');
row.appendChild(cell);
tbody.appendChild(row);
ajaxToolbarPanel.style.display = 'none';
}
}
requestCounter[0].textContent = requestStack.length;
var className = 'sf-toolbar-ajax-requests sf-toolbar-status';
if (state == 'ok') {
className += ' sf-toolbar-status-green';
} else if (state == 'error') {
className += ' sf-toolbar-status-red';
} else {
className += ' sf-ajax-request-loading';
}
var className = 'sf-toolbar-ajax-requests sf-toolbar-value';
requestCounter[0].className = className;
if (state == 'error') {
Sfjs.addClass(ajaxToolbarPanel, 'sf-toolbar-status-red');
} else {
Sfjs.addClass(ajaxToolbarPanel, 'sf-ajax-request-loading');
}
};
var addEventListener;

View File

@ -179,7 +179,7 @@ pre, code {
width: 250px;
margin-left: -100%;
}
table td {
#collector-content table td {
background-color: white;
}
h1 {
@ -273,15 +273,15 @@ ul.alt li {
ul.alt li.even {
background: #f1f7e2;
}
ul.alt li.error, tr.error td {
ul.alt li.error {
background-color: #f66;
margin-bottom: 1px;
}
ul.alt li.warning, tr.warning td {
ul.alt li.warning {
background-color: #ffcc00;
margin-bottom: 1px;
}
ul.alt li.scream, ul.alt li.scream strong, tr.scream td, tr.scream strong {
ul.alt li.scream, ul.alt li.scream strong {
color: gray;
}
ul.sf-call-stack li {

View File

@ -1,21 +1,12 @@
.sf-minitoolbar {
display: none;
position: fixed;
background-color: #222;
bottom: 0;
display: none;
height: 36px;
padding: 5px 6px 0;
position: fixed;
right: 0;
padding: 5px 5px 0;
background-color: #f7f7f7;
background-image: -moz-linear-gradient(top, #e4e4e4, #ffffff);
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#e4e4e4), to(#ffffff));
background-image: -o-linear-gradient(top, #e4e4e4, #ffffff);
background: linear-gradient(top, #e4e4e4, #ffffff);
border-radius: 16px 0 0 0;
z-index: 6000000;
z-index: 99999;
}
.sf-toolbarreset * {
@ -26,127 +17,135 @@
}
.sf-toolbarreset {
position: fixed;
background-color: #f7f7f7;
left: 0;
right: 0;
margin: 0;
padding: 0 40px 0 0;
z-index: 6000000;
font: 11px Verdana, Arial, sans-serif;
text-align: left;
color: #2f2f2f;
background-image: -moz-linear-gradient(top, #e4e4e4, #ffffff);
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#e4e4e4), to(#ffffff));
background-image: -o-linear-gradient(top, #e4e4e4, #ffffff);
background: linear-gradient(top, #e4e4e4, #ffffff);
background-color: #222;
bottom: 0;
border-top: 1px solid #bbb;
box-shadow: 0 -1px 0px rgba(0, 0, 0, 0.2);
color: #EEE;
font: 11px Arial, sans-serif;
left: 0;
margin: 0;
padding: 0 36px 0 0;
position: fixed;
right: 0;
text-align: left;
z-index: 99999;
}
.sf-toolbarreset abbr {
border-bottom: 1px dotted #000000;
cursor: help;
}
.sf-toolbarreset span,
.sf-toolbarreset div,
.sf-toolbarreset td,
.sf-toolbarreset th {
font-size: 11px;
border: dashed #777;
border-width: 0 0 1px;
}
.sf-toolbarreset svg,
.sf-toolbarreset img {
width: auto;
display: inline;
}
.sf-toolbarreset table {
border-collapse: collapse;
border-spacing: 0;
background-color: #000;
margin: 0;
padding: 0;
border: 0;
width: 100%;
table-layout: auto;
max-height: 20px;
}
.sf-toolbarreset .hide-button {
background: #444;
cursor: pointer;
display: block;
position: absolute;
top: 0;
right: 0;
width: 40px;
height: 40px;
width: 36px;
height: 36px;
cursor: pointer;
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAMAAAAMCGV4AAAAllBMVEXDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PExMTPz8/Q0NDR0dHT09Pb29vc3Nzf39/h4eHi4uLj4+P6+vr7+/v8/Pz9/f3///+Nh2QuAAAAIXRSTlMABgwPGBswMzk8QktRV4SKjZOWmaKlq7TAxszb3urt+fy1vNEpAAAAiklEQVQIHUXBBxKCQBREwRFzDqjoGh+C2YV//8u5Sll2S0E/dof1tKdKM6GyqCto7PjZRJIS/mbSELgXOSd/BzpKIH1ZefVWpDDTHsi8mZVnwImPi5ndCLbaAZk3M58Bay0h9VbeSvMpjDUAHj4jL55AW1rxN5fU2PLjIgVRzNdxVFOlGzvnJi0Fb1XNGBHA9uQOAAAAAElFTkSuQmCC');
background-repeat: no-repeat;
background-position: 13px 11px;
text-align: center;
}
.sf-toolbarreset .hide-button svg {
max-height: 18px;
padding-top: 10px;
}
.sf-toolbar-block {
white-space: nowrap;
color: #2f2f2f;
display: block;
min-height: 28px;
border-bottom: 1px solid #e4e4e4;
border-right: 1px solid #e4e4e4;
padding: 0;
float: left;
cursor: default;
display: block;
float: left;
height: 36px;
margin-right: 0;
white-space: nowrap;
}
.sf-toolbar-block > a,
.sf-toolbar-block > a:hover {
display: block;
text-decoration: none;
}
.sf-toolbar-block span {
display: inline-block;
}
.sf-toolbar-block .sf-toolbar-value {
color: #F5F5F5;
font-size: 13px;
line-height: 36px;
padding: 0;
}
.sf-toolbar-block .sf-toolbar-label,
.sf-toolbar-block .sf-toolbar-class-separator {
color: #AAA;
font-size: 12px;
}
.sf-toolbar-block .sf-toolbar-info {
border-collapse: collapse;
display: table;
z-index: 100000;
}
.sf-toolbar-block hr {
border-top: 1px solid #777;
margin: 4px 0;
padding-top: 4px;
}
.sf-toolbar-block .sf-toolbar-info-piece {
line-height: 19px;
margin-bottom: 5px;
/* this 'border-bottom' trick is needed because 'margin-bottom' doesn't work for table rows */
border-bottom: solid transparent 3px;
display: table-row;
}
.sf-toolbar-block .sf-toolbar-info-piece-additional,
.sf-toolbar-block .sf-toolbar-info-piece-additional-detail {
display: none;
}
.sf-toolbar-block .sf-toolbar-info-piece .sf-toolbar-status {
padding: 0px 5px;
border-radius: 5px;
padding: 2px 5px;
margin-bottom: 0px;
vertical-align: top;
}
.sf-toolbar-block .sf-toolbar-info-piece .sf-toolbar-status + .sf-toolbar-status {
margin-left: 4px;
}
.sf-toolbar-block .sf-toolbar-info-piece:last-child {
margin-bottom: 0;
}
.sf-toolbar-block .sf-toolbar-info-piece a,
.sf-toolbar-block .sf-toolbar-info-piece abbr {
color: #2f2f2f;
.sf-toolbar-block .sf-toolbar-info-piece a {
color: #99CDD8;
text-decoration: underline;
}
.sf-toolbar-block .sf-toolbar-info-piece a:hover {
text-decoration: none;
}
.sf-toolbar-block .sf-toolbar-info-piece b {
display: inline-block;
min-width: 110px;
vertical-align: top;
color: #AAA;
display: table-cell;
font-size: 11px;
padding: 4px 8px 4px 0;
}
.sf-toolbar-block .sf-toolbar-info-piece span {
.sf-toolbar-block .sf-toolbar-info-with-next-pointer:after {
content: ' :: ';
color: #999;
}
.sf-toolbar-block .sf-toolbar-info-with-delimiter {
border-right: 1px solid #999;
padding-right: 5px;
.sf-toolbar-block .sf-toolbar-info-piece span {
color: #F5F5F5;
font-size: 12px;
}
.sf-toolbar-block .sf-toolbar-info {
background-color: #444;
bottom: 36px;
color: #F5F5F5;
display: none;
position: absolute;
background-color: #fff;
border: 1px solid #bbb;
padding: 9px 0;
margin-left: -1px;
bottom: 38px;
border-bottom-width: 0;
border-bottom: 1px solid #bbb;
border-radius: 4px 4px 0 0;
position: absolute;
}
.sf-toolbar-block .sf-toolbar-info:empty {
@ -155,154 +154,131 @@
.sf-toolbar-block .sf-toolbar-status {
display: inline-block;
color: #fff;
color: #FFF;
background-color: #666;
padding: 3px 6px;
border-radius: 3px;
margin-bottom: 2px;
vertical-align: middle;
min-width: 6px;
min-height: 13px;
}
.sf-toolbar-block .sf-toolbar-status abbr {
color: #fff;
border-bottom: 1px dotted black;
}
.sf-toolbar-block .sf-toolbar-status-green {
background-color: #759e1a;
background-color: rgba(117, 158, 43, 0.8);
}
.sf-toolbar-block .sf-toolbar-status-red {
background-color: #a33;
background-color: rgba(200, 43, 43, 0.8);
}
.sf-toolbar-block .sf-toolbar-status-yellow {
background-color: #ffcc00;
color: #000;
background-color: rgb(189, 132, 0);
}
.sf-toolbar-block .sf-toolbar-status-black {
background-color: #000;
.sf-toolbar-block.sf-toolbar-status-green {
background-color: rgba(117, 158, 43, 0.8);
color: #FFF;
}
.sf-toolbar-block.sf-toolbar-status-red {
background-color: rgba(200, 43, 43, 0.8);
color: #FFF;
}
.sf-toolbar-block.sf-toolbar-status-yellow {
background-color: rgb(189, 132, 0);
color: #FFF;
}
.sf-toolbar-block-request .sf-toolbar-status {
color: #FFF;
display: inline-block;
font-size: 14px;
height: 36px;
line-height: 36px;
padding: 0 10px;
}
.sf-toolbar-block-request .sf-toolbar-info-piece a {
text-decoration: none;
}
.sf-toolbar-block-request .sf-toolbar-info-piece a:hover {
text-decoration: underline;
}
.sf-toolbar-status-green .sf-toolbar-label,
.sf-toolbar-status-yellow .sf-toolbar-label,
.sf-toolbar-status-red .sf-toolbar-label {
color: #FFF;
}
.sf-toolbar-status-green svg path,
.sf-toolbar-status-red svg path,
.sf-toolbar-status-yellow svg path {
fill: #FFF;
}
.sf-toolbar-block-config svg path {
fill: #FFF;
}
.sf-toolbar-block .sf-toolbar-icon {
display: block;
height: 36px;
padding: 0 7px;
}
.sf-toolbar-block-request .sf-toolbar-icon {
padding-left: 0;
padding-right: 0;
}
.sf-toolbar-block .sf-toolbar-icon > a,
.sf-toolbar-block .sf-toolbar-icon > span {
display: block;
font-weight: normal;
text-decoration: none;
margin: 0;
padding: 5px 8px;
min-width: 20px;
text-align: center;
vertical-align: middle;
}
.sf-toolbar-block .sf-toolbar-icon > a,
.sf-toolbar-block .sf-toolbar-icon > a:link
.sf-toolbar-block .sf-toolbar-icon > a:hover {
color: black !important;
}
.sf-toolbar-block .sf-toolbar-icon > a[href]:after {
content: "";
}
.sf-toolbar-block .sf-toolbar-icon img, .sf-toolbar-block .sf-toolbar-icon svg {
.sf-toolbar-block .sf-toolbar-icon img,
.sf-toolbar-block .sf-toolbar-icon svg {
border-width: 0;
vertical-align: middle;
position: relative;
top: 8px;
}
.sf-toolbar-block .sf-toolbar-icon img + span, .sf-toolbar-block .sf-toolbar-icon svg + span {
margin-left: 5px;
margin-top: 2px;
.sf-toolbar-block .sf-toolbar-icon img + span,
.sf-toolbar-block .sf-toolbar-icon svg + span {
margin-left: 4px;
}
.sf-toolbar-block .sf-toolbar-icon .sf-toolbar-status {
border-radius: 12px;
border-bottom-left-radius: 0;
margin-top: 0;
}
.sf-toolbar-block .sf-toolbar-info-method {
border-bottom: 1px dashed #ccc;
cursor: help;
}
.sf-toolbar-block .sf-toolbar-info-method[onclick=""] {
border-bottom: none;
cursor: inherit;
}
.sf-toolbar-info-php {}
.sf-toolbar-info-php-ext {}
.sf-toolbar-info-php-ext .sf-toolbar-status {
margin-left: 2px;
}
.sf-toolbar-info-php-ext .sf-toolbar-status:first-child {
margin-left: 0;
}
.sf-toolbar-block a .sf-toolbar-info-piece-additional,
.sf-toolbar-block a .sf-toolbar-info-piece-additional-detail {
display: inline-block;
}
.sf-toolbar-block a .sf-toolbar-info-piece-additional:empty,
.sf-toolbar-block a .sf-toolbar-info-piece-additional-detail:empty {
display: none;
}
.sf-toolbarreset:hover {
box-shadow: rgba(0, 0, 0, 0.3) 0 0 50px;
.sf-toolbar-block-config .sf-toolbar-icon .sf-toolbar-value {
margin-left: 4px;
}
.sf-toolbar-block:hover {
box-shadow: rgba(0, 0, 0, 0.35) 0 0 5px;
border-right: none;
margin-right: 1px;
position: relative;
}
.sf-toolbar-block:hover .sf-toolbar-icon {
background-color: #fff;
border-top: 1px dotted #DDD;
background-color: #444;
position: relative;
margin-top: -1px;
z-index: 10002;
}
.sf-toolbar-block:hover .sf-toolbar-info {
display: block;
min-width: -webkit-calc(100% + 2px);
min-width: calc(100% + 2px);
z-index: 10001;
box-sizing: border-box;
padding: 9px;
line-height: 19px;
padding: 10px;
max-width: 480px;
max-height: 480px;
word-wrap: break-word;
overflow: hidden;
overflow-y: auto;
}
.sf-toolbar-ajax-requests th, .sf-toolbar-ajax-requests td {
border-bottom: 1px solid #ddd;
padding: 0 4px;
color: #2f2f2f;
background-color: #fff;
.sf-toolbar-info-piece b.sf-toolbar-ajax-info {
color: #F5F5F5;
}
.sf-toolbar-ajax-requests {
width: 100%;
}
.sf-toolbar-ajax-requests td {
background-color: #444;
border-bottom: 1px solid #777;
color: #F5F5F5;
font-size: 12px;
padding: 4px;
}
.sf-toolbar-ajax-requests tr:last-child td {
border-bottom: 0;
}
.sf-toolbar-ajax-requests th {
background-color: #eee;
background-color: #222;
border-bottom: 0;
color: #AAA;
font-size: 11px;
padding: 4px;
}
.sf-ajax-request-url {
max-width: 300px;
@ -310,12 +286,15 @@
overflow: hidden;
text-overflow: ellipsis;
}
.sf-toolbar-ajax-requests .sf-ajax-request-url a {
text-decoration: none;
}
.sf-toolbar-ajax-requests .sf-ajax-request-url a:hover {
text-decoration: underline;
}
.sf-ajax-request-duration {
text-align: right;
}
.sf-ajax-request-error {
color: #a33 !important;
}
.sf-ajax-request-loading {
-webkit-animation: sf-blink .5s ease-in-out infinite;
-o-animation: sf-blink .5s ease-in-out infinite;
@ -323,121 +302,155 @@
animation: sf-blink .5s ease-in-out infinite;
}
@-webkit-keyframes sf-blink {
0% { color: black; }
50% { color: #bbb; }
100% { color: black; }
0% { background: #222; }
50% { background: #444; }
100% { background: #222; }
}
@-moz-keyframes sf-blink {
0% { color: black; }
50% { color: #bbb; }
100% { color: black; }
}
@-o-keyframes sf-blink {
0% { color: black; }
50% { color: #bbb; }
100% { color: black; }
0% { background: #222; }
50% { background: #444; }
100% { background: #222; }
}
@keyframes sf-blink {
0% { color: black; }
50% { color: #bbb; }
100% { color: black; }
0% { background: #222; }
50% { background: #444; }
100% { background: #222; }
}
/***** Override the setting when the toolbar is on the top *****/
.sf-toolbar-block-dump pre.sf-dump {
background-color: #222;
border-color: #777;
border-radius: 0;
margin: 6px 0 12px 0;
width: 200px;
}
.sf-toolbar-block-dump pre.sf-dump:last-child {
margin-bottom: 0;
}
.sf-toolbar-block-dump .sf-toolbar-info-piece .sf-toolbar-file-line {
color: #AAA;
margin-left: 4px;
}
.sf-toolbar-block-dump .sf-toolbar-info img {
display: none;
}
/* Override the setting when the toolbar is on the top */
{% if position == 'top' %}
.sf-minitoolbar {
top: 0;
bottom: auto;
right: 0;
background-color: #f7f7f7;
background-image: -moz-linear-gradient(225deg, #e4e4e4, #ffffff);
background-image: -webkit-gradient(linear, 100% 0%, 0% 0%, from(#e4e4e4), to(#ffffff));
background-image: -o-linear-gradient(135deg, #e4e4e4, #ffffff);
background: linear-gradient(225deg, #e4e4e4, #ffffff);
border-radius: 0 0 0 16px;
top: 0;
}
.sf-toolbarreset {
background-image: -moz-linear-gradient(225deg, #e4e4e4, #ffffff);
background-image: -webkit-gradient(linear, 100% 0%, 0% 0%, from(#e4e4e4), to(#ffffff));
background-image: -o-linear-gradient(135deg, #e4e4e4, #ffffff);
background: linear-gradient(225deg, #e4e4e4, #ffffff);
top: 0;
bottom: auto;
border-bottom: 1px solid #bbb;
box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2);
top: 0;
}
.sf-toolbar-block .sf-toolbar-info {
top: 39px;
bottom: auto;
border-top-width: 0;
border-radius: 0 0 4px 4px;
}
.sf-toolbar-block:hover .sf-toolbar-icon {
border-top: none;
border-bottom: 1px dotted #DDD;
margin-top: 0;
margin-bottom: -1px;
top: 36px;
}
{% endif %}
{% if not floatable %}
.sf-toolbarreset {
position: static;
background: #cbcbcb;
background-image: -moz-linear-gradient(90deg, #cbcbcb, #e8e8e8) !important;
background-image: -webkit-gradient(linear, 0% 0%, 100% 0%, from(#cbcbcb), to(#e8e8e8)) !important;
background-image: -o-linear-gradient(180deg, #cbcbcb, #e8e8e8) !important;
background: linear-gradient(90deg, #cbcbcb, #e8e8e8) !important;
}
{% endif %}
/***** Media query *****/
@media screen and (max-width: 779px) {
.sf-toolbar-block .sf-toolbar-icon > * > :first-child ~ * {
display: none;
/* Responsive Design */
.sf-toolbar-icon .sf-toolbar-label,
.sf-toolbar-icon .sf-toolbar-value {
display: none;
}
.sf-toolbar-block-config .sf-toolbar-icon .sf-toolbar-label {
display: inline-block;
}
/* Legacy Design - these styles are maintained to make old panels look
a bit better on the new toolbar */
.sf-toolbar-block .sf-toolbar-info-piece-additional-detail {
color: #AAA;
font-size: 12px;
}
.sf-toolbar-status-green .sf-toolbar-info-piece-additional-detail,
.sf-toolbar-status-yellow .sf-toolbar-info-piece-additional-detail,
.sf-toolbar-status-red .sf-toolbar-info-piece-additional-detail {
color: #FFF;
}
@media (min-width: 768px) {
.sf-toolbar-icon .sf-toolbar-label,
.sf-toolbar-icon .sf-toolbar-value {
display: inline;
}
.sf-toolbar-block .sf-toolbar-icon > * > .sf-toolbar-info-piece-additional,
.sf-toolbar-block .sf-toolbar-icon > * > .sf-toolbar-info-piece-additional-detail {
display: none !important;
.sf-toolbar-block .sf-toolbar-icon img,
.sf-toolbar-block .sf-toolbar-icon svg {
top: 6px;
}
.sf-toolbar-block-config:hover .sf-toolbar-info {
right: 0;
}
.sf-toolbar-block-time .sf-toolbar-icon svg,
.sf-toolbar-block-memory .sf-toolbar-icon svg {
display: none;
}
.sf-toolbar-block-time .sf-toolbar-icon svg + span,
.sf-toolbar-block-memory .sf-toolbar-icon svg + span {
margin-left: 0;
}
.sf-toolbar-block .sf-toolbar-icon {
padding: 0 10px;
}
.sf-toolbar-block-time .sf-toolbar-icon {
padding-right: 5px;
}
.sf-toolbar-block-memory .sf-toolbar-icon {
padding-left: 5px;
}
.sf-toolbar-block-request .sf-toolbar-icon {
padding-left: 0;
padding-right: 0;
}
.sf-toolbar-block-request .sf-toolbar-status + .sf-toolbar-label {
margin-left: 4px;
}
.sf-toolbar-block-request .sf-toolbar-label + .sf-toolbar-value {
margin-right: 10px;
}
.sf-toolbar-block-request:hover .sf-toolbar-info {
max-width: none;
}
.sf-toolbar-block .sf-toolbar-info-piece b {
font-size: 12px;
}
.sf-toolbar-block .sf-toolbar-info-piece span {
font-size: 13px;
}
.sf-toolbar-block-config {
float: right;
margin-left: 0;
margin-right: 0;
}
}
@media screen and (min-width: 880px) {
.sf-toolbar-block .sf-toolbar-icon a[href$="config"] .sf-toolbar-info-piece-additional {
@media (min-width: 1024px) {
.sf-toolbar-block .sf-toolbar-info-piece-additional,
.sf-toolbar-block .sf-toolbar-info-piece-additional-detail {
display: inline-block;
}
}
@media screen and (min-width: 980px) {
.sf-toolbar-block .sf-toolbar-icon a[href$="security"] .sf-toolbar-info-piece-additional {
display: inline-block;
}
}
@media screen and (max-width: 1179px) {
.sf-toolbar-block .sf-toolbar-icon > * > .sf-toolbar-info-piece-additional {
.sf-toolbar-block .sf-toolbar-info-piece-additional:empty,
.sf-toolbar-block .sf-toolbar-info-piece-additional-detail:empty {
display: none;
}
}
@media screen and (max-width: 1439px) {
.sf-toolbar-block .sf-toolbar-icon > * > .sf-toolbar-info-piece-additional-detail {
display: none;
}
}
/***** Media query print: Do not print the Toolbar. *****/
@media print {
.sf-toolbar {
display: none;
visibility: hidden;
}
}

View File

@ -15,11 +15,11 @@
Sfjs.setPreference('toolbar/displayState', 'block');
">
<svg width="26" height="28" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="0 0 26 28" enable-background="new 0 0 26 28" xml:space="preserve"><path fill="#010202" d="M13 0C5.8 0 0 5.8 0 13c0 7.2 5.8 13 13 13c7.2 0 13-5.8 13-13C26 5.8 20.2 0 13 0z M20 7.5 c-0.6 0-1-0.3-1-0.9c0-0.2 0-0.4 0.2-0.6c0.1-0.3 0.2-0.3 0.2-0.4c0-0.3-0.5-0.4-0.7-0.4c-2 0.1-2.5 2.7-2.9 4.8l-0.2 1.1 c1.1 0.2 1.9 0 2.4-0.3c0.6-0.4-0.2-0.8-0.1-1.3C18 9.2 18.4 9 18.7 8.9c0.5 0 0.8 0.5 0.8 1c0 0.8-1.1 2-3.3 1.9 c-0.3 0-0.5 0-0.7-0.1L15 14.1c-0.4 1.7-0.9 4.1-2.6 6.2c-1.5 1.8-3.1 2.1-3.8 2.1c-1.3 0-2.1-0.6-2.2-1.6c0-0.9 0.8-1.4 1.3-1.4 c0.7 0 1.2 0.5 1.2 1.1c0 0.5-0.2 0.6-0.4 0.7c-0.1 0.1-0.3 0.2-0.3 0.4c0 0.1 0.1 0.3 0.4 0.3c0.5 0 0.9-0.3 1.2-0.5 c1.3-1 1.7-2.9 2.4-6.2l0.1-0.8c0.2-1.1 0.5-2.3 0.8-3.5c-0.9-0.7-1.4-1.5-2.6-1.8c-0.8-0.2-1.3 0-1.7 0.4C8.4 10 8.6 10.7 9 11.1 l0.7 0.7c0.8 0.9 1.3 1.7 1.1 2.7c-0.3 1.6-2.1 2.8-4.3 2.1c-1.9-0.6-2.2-1.9-2-2.7c0.2-0.6 0.7-0.8 1.2-0.6 c0.5 0.2 0.7 0.8 0.6 1.3c0 0.1 0 0.1-0.1 0.3C6 15 5.9 15.2 5.9 15.3c-0.1 0.4 0.4 0.7 0.8 0.8c0.8 0.3 1.7-0.2 1.9-0.9 c0.2-0.6-0.2-1.1-0.4-1.2l-0.8-0.9c-0.4-0.4-1.2-1.5-0.8-2.8c0.2-0.5 0.5-1 0.9-1.4c1-0.7 2-0.8 3-0.6c1.3 0.4 1.9 1.2 2.8 1.9 c0.5-1.3 1.1-2.6 2-3.8c0.9-1 2-1.7 3.3-1.8C20 4.8 21 5.4 21 6.3C21 6.7 20.8 7.5 20 7.5z"/></svg>
{{ include('@WebProfiler/Icon/symfony.svg') }}
</a>
</div>
<style>
{% include '@WebProfiler/Profiler/toolbar.css.twig' with { 'position': position, 'floatable': true } %}
{{ include('@WebProfiler/Profiler/toolbar.css.twig', { 'position': position, 'floatable': true }) }}
</style>
<div id="sfToolbarClearer-{{ token }}" style="clear: both; height: 38px;"></div>
{% endif %}
@ -30,7 +30,8 @@
'collector': profile.getcollector(name),
'profiler_url': profiler_url,
'token': profile.token,
'name': name
'name': name,
'profiler_markup_version': profiler_markup_version
})
}}
{% endfor %}
@ -42,7 +43,9 @@
(p.previousElementSibling || p.previousSibling).style.display = 'none';
document.getElementById('sfMiniToolbar-{{ token }}').style.display = 'block';
Sfjs.setPreference('toolbar/displayState', 'none');
"></a>
">
{{ include('@WebProfiler/Icon/close.svg') }}
</a>
{% endif %}
</div>
<!-- END of Symfony Web Debug Toolbar -->

View File

@ -1,9 +1,6 @@
{% if link %}
{% set icon %}
<a href="{{ path('_profiler', { 'token': token, 'panel': name }) }}">{{ icon }}</a>
{% endset %}
{% endif %}
<div class="sf-toolbar-block">
<div class="sf-toolbar-icon">{{ icon|default('') }}</div>
<div class="sf-toolbar-info">{{ text|default('') }}</div>
<div class="sf-toolbar-block sf-toolbar-block-{{ name }} sf-toolbar-status-{{ status|default('normal') }}">
{% if link %}<a href="{{ path('_profiler', { token: token, panel: name }) }}">{% endif %}
<div class="sf-toolbar-icon">{{ icon|default('') }}</div>
{% if link %}</a>{% endif %}
<div class="sf-toolbar-info">{{ text|default('') }}</div>
</div>

View File

@ -46,12 +46,15 @@
toolbarInfo.style.right = '';
toolbarInfo.style.left = '';
if (leftValue > 0 && rightValue > 0) {
if (elementWidth > pageWidth) {
toolbarInfo.style.left = 0;
}
else if (leftValue > 0 && rightValue > 0) {
toolbarInfo.style.right = (rightValue * -1) + 'px';
} else if (leftValue < 0) {
toolbarInfo.style.left = 0;
} else {
toolbarInfo.style.right = '-1px';
toolbarInfo.style.right = '0px';
}
};
}