From 481bb4cdf9179c2756f7ad7dc543ecaa8d4921dd Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Thu, 10 Mar 2011 11:00:24 +0100 Subject: [PATCH 01/11] [WebProfilerBundle] Introduce a template for toolbar items --- .../Resources/views/Collector/db.html.twig | 11 ++-- .../views/Collector/mongodb.html.twig | 11 ++-- .../views/Collector/security.html.twig | 27 +++++---- .../views/Collector/config.html.twig | 56 ++++++++++--------- .../views/Collector/logger.html.twig | 11 ++-- .../views/Collector/memory.html.twig | 11 ++-- .../views/Collector/request.html.twig | 23 ++++---- .../Resources/views/Collector/timer.html.twig | 11 ++-- .../views/Profiler/toolbar_item.html.twig | 5 ++ 9 files changed, 98 insertions(+), 68 deletions(-) create mode 100644 src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig diff --git a/src/Symfony/Bundle/DoctrineBundle/Resources/views/Collector/db.html.twig b/src/Symfony/Bundle/DoctrineBundle/Resources/views/Collector/db.html.twig index f607df8550..5a47ce8721 100644 --- a/src/Symfony/Bundle/DoctrineBundle/Resources/views/Collector/db.html.twig +++ b/src/Symfony/Bundle/DoctrineBundle/Resources/views/Collector/db.html.twig @@ -1,10 +1,13 @@ {% extends 'WebProfilerBundle:Profiler:layout.html.twig' %} {% block toolbar %} - - Database - {{ collector.querycount }} - + {% set icon %} + Database + {% endset %} + {% set text %} + {{ collector.querycount }} + {% endset %} + {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'icon' : icon, 'text' : text } only %} {% endblock %} {% block menu %} diff --git a/src/Symfony/Bundle/DoctrineMongoDBBundle/Resources/views/Collector/mongodb.html.twig b/src/Symfony/Bundle/DoctrineMongoDBBundle/Resources/views/Collector/mongodb.html.twig index 9dd8d1ee06..d5268dbef3 100644 --- a/src/Symfony/Bundle/DoctrineMongoDBBundle/Resources/views/Collector/mongodb.html.twig +++ b/src/Symfony/Bundle/DoctrineMongoDBBundle/Resources/views/Collector/mongodb.html.twig @@ -1,10 +1,13 @@ {% extends 'WebProfilerBundle:Profiler:layout.html.twig' %} {% block toolbar %} - - Mongo - {{ collector.querycount }} - + {% set icon %} + Mongo + {% endset %} + {% set text %} + {{ collector.querycount }} + {% endset %} + {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'icon' : icon, 'text' : text } only %} {% endblock %} {% block menu %} diff --git a/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig b/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig index 54528c4402..578f00eaa6 100644 --- a/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig +++ b/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig @@ -1,18 +1,21 @@ {% extends 'WebProfilerBundle:Profiler:layout.html.twig' %} {% block toolbar %} - - Security - - {% if collector.authenticated %} - {{ collector.user }} - {% elseif collector.enabled %} - anon. - {% else %} - disabled - {% endif %} - - + {% set icon %} + Security + {% endset %} + {% set text %} + + {% if collector.authenticated %} + {{ collector.user }} + {% elseif collector.enabled %} + anon. + {% else %} + disabled + {% endif %} + + {% endset %} + {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'icon' : icon, 'text' : text } only %} {% endblock %} {% block menu %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig index 520fef6a50..d1281a1080 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig @@ -1,32 +1,36 @@ {% extends 'WebProfilerBundle:Profiler:layout.html.twig' %} {% block toolbar %} - - Symfony - {{ collector.symfonyversion }} - + {% set icon %} + Symfony + {% endset %} + {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'icon' : icon, 'text' : collector.symfonyversion} only %} - - PHP {{ collector.phpversion }} - | - xdebug - | - accel - + {% set text %} + PHP {{ collector.phpversion }} + | + xdebug + | + accel + {% endset %} + {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'text' : text} only %} - - Environment - {{ collector.appname }} - | - {{ collector.env }} - | - {{ collector.debug ? 'debug' : 'no-debug' }} - | - {% if profiler_url %} - {{ collector.token }} - {% else %} - {{ collector.token }} - {% endif %} - + {% set icon %} + Environment + {% endset %} + {% set text %} + {{ collector.appname }} + | + {{ collector.env }} + | + {{ collector.debug ? 'debug' : 'no-debug' }} + | + {% if profiler_url %} + {{ collector.token }} + {% else %} + {{ collector.token }} + {% endif %} + {% endset %} + {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'icon' : icon, 'text' : text} only %} {% endblock %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig index 9b0bd64139..ae71c5be55 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig @@ -1,10 +1,13 @@ {% extends 'WebProfilerBundle:Profiler:layout.html.twig' %} {% block toolbar %} - - Logs - {{ collector.counterrors }} - + {% set icon %} + Logs + {% endset %} + {% set text %} + {{ collector.counterrors }} + {% endset %} + {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'icon' : icon, 'text' : text } only %} {% endblock %} {% block menu %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig index 99bd77f631..6412b5c2e6 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig @@ -1,8 +1,11 @@ {% extends 'WebProfilerBundle:Profiler:layout.html.twig' %} {% block toolbar %} - - Memory Usage - {{ '%.0f'|format(collector.memory / 1024) }} KB - + {% set icon %} + Memory Usage + {% endset %} + {% set text %} + {{ '%.0f'|format(collector.memory / 1024) }} KB + {% endset %} + {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'icon' : icon, 'text' : text } only %} {% endblock %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig index c1ff4237c9..94f11d3cb6 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig @@ -1,16 +1,19 @@ {% extends 'WebProfilerBundle:Profiler:layout.html.twig' %} {% block toolbar %} - - Request - {{ collector.route ? collector.route : 'NONE' }} - | - {{ collector.format }} - | - {{ collector.statuscode }} - | - {{ collector.contenttype }} - + {% set icon %} + Request + {% endset %} + {% set text %} + {{ collector.route ? collector.route : 'NONE' }} + | + {{ collector.format }} + | + {{ collector.statuscode }} + | + {{ collector.contenttype }} + {% endset %} + {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'icon' : icon, 'text' : text } only %} {% endblock %} {% block menu %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/timer.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/timer.html.twig index c7f6c38f1d..80d4624f26 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/timer.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/timer.html.twig @@ -1,8 +1,11 @@ {% extends 'WebProfilerBundle:Profiler:layout.html.twig' %} {% block toolbar %} - - Timers - {{ '%.0f'|format(collector.time * 1000) }} ms - + {% set icon %} + Timers + {% endset %} + {% set text %} + {{ '%.0f'|format(collector.time * 1000) }} ms + {% endset %} + {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'icon' : icon, 'text' : text } only %} {% endblock %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig new file mode 100644 index 0000000000..5381775218 --- /dev/null +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig @@ -0,0 +1,5 @@ + + {% if icon is defined %}{{ icon }}{% endif %} + {% if text is defined %}{{ text }}{% endif %} + + From 66f8ed8e51843a8a840175f5174ceddc4def349e Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Thu, 10 Mar 2011 11:05:38 +0100 Subject: [PATCH 02/11] [WebProfilerBundle] Tweak styles --- .../Resources/views/Collector/config.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig index d1281a1080..5487151b4d 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig @@ -2,7 +2,7 @@ {% block toolbar %} {% set icon %} - Symfony + Symfony {% endset %} {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'icon' : icon, 'text' : collector.symfonyversion} only %} From f752dd34a0d366467e41d0c8a4ab90fb4e7e6ae8 Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Thu, 10 Mar 2011 11:14:33 +0100 Subject: [PATCH 03/11] [Profiler] Profilers now return a status which is used for visual feedback --- .../DataCollector/DoctrineDataCollector.php | 7 +++++++ .../Resources/views/Collector/db.html.twig | 4 ++-- .../DataCollector/DoctrineMongoDBDataCollector.php | 7 +++++++ .../Resources/views/Collector/mongodb.html.twig | 4 ++-- .../Resources/views/Collector/security.html.twig | 2 +- .../Resources/views/Collector/logger.html.twig | 2 +- .../Resources/views/Collector/memory.html.twig | 2 +- .../Resources/views/Collector/request.html.twig | 2 +- .../Resources/views/Collector/timer.html.twig | 2 +- .../Resources/views/Profiler/toolbar_item.html.twig | 13 ++++++++++--- .../HttpKernel/DataCollector/DataCollector.php | 10 ++++++++++ .../DataCollector/DataCollectorInterface.php | 11 +++++++++++ .../DataCollector/LoggerDataCollector.php | 8 ++++++++ 13 files changed, 62 insertions(+), 12 deletions(-) diff --git a/src/Symfony/Bundle/DoctrineBundle/DataCollector/DoctrineDataCollector.php b/src/Symfony/Bundle/DoctrineBundle/DataCollector/DoctrineDataCollector.php index 9a8371f09b..6777b853b1 100644 --- a/src/Symfony/Bundle/DoctrineBundle/DataCollector/DoctrineDataCollector.php +++ b/src/Symfony/Bundle/DoctrineBundle/DataCollector/DoctrineDataCollector.php @@ -67,4 +67,11 @@ class DoctrineDataCollector extends DataCollector { return 'db'; } + + /** + * {@inheritdoc} + */ + public function getStatus() { + return $this->getQueryCount() < 10 ? self::INFO : self::WARNING; + } } diff --git a/src/Symfony/Bundle/DoctrineBundle/Resources/views/Collector/db.html.twig b/src/Symfony/Bundle/DoctrineBundle/Resources/views/Collector/db.html.twig index 5a47ce8721..256802dec5 100644 --- a/src/Symfony/Bundle/DoctrineBundle/Resources/views/Collector/db.html.twig +++ b/src/Symfony/Bundle/DoctrineBundle/Resources/views/Collector/db.html.twig @@ -5,9 +5,9 @@ Database {% endset %} {% set text %} - {{ collector.querycount }} + {{ collector.querycount }} {% endset %} - {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'icon' : icon, 'text' : text } only %} + {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'icon' : icon, 'text' : text, 'status' : collector.status } only %} {% endblock %} {% block menu %} diff --git a/src/Symfony/Bundle/DoctrineMongoDBBundle/DataCollector/DoctrineMongoDBDataCollector.php b/src/Symfony/Bundle/DoctrineMongoDBBundle/DataCollector/DoctrineMongoDBDataCollector.php index e6c14eca15..3eff736e93 100644 --- a/src/Symfony/Bundle/DoctrineMongoDBBundle/DataCollector/DoctrineMongoDBDataCollector.php +++ b/src/Symfony/Bundle/DoctrineMongoDBBundle/DataCollector/DoctrineMongoDBDataCollector.php @@ -56,4 +56,11 @@ class DoctrineMongoDBDataCollector extends DataCollector { return 'mongodb'; } + + /** + * {@inheritdoc} + */ + public function getStatus() { + return $this->getQueryCount() < 10 ? self::INFO : self::WARNING; + } } diff --git a/src/Symfony/Bundle/DoctrineMongoDBBundle/Resources/views/Collector/mongodb.html.twig b/src/Symfony/Bundle/DoctrineMongoDBBundle/Resources/views/Collector/mongodb.html.twig index d5268dbef3..1b5964b761 100644 --- a/src/Symfony/Bundle/DoctrineMongoDBBundle/Resources/views/Collector/mongodb.html.twig +++ b/src/Symfony/Bundle/DoctrineMongoDBBundle/Resources/views/Collector/mongodb.html.twig @@ -5,9 +5,9 @@ Mongo {% endset %} {% set text %} - {{ collector.querycount }} + {{ collector.querycount }} {% endset %} - {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'icon' : icon, 'text' : text } only %} + {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'icon' : icon, 'text' : text, 'status' : collector.status } only %} {% endblock %} {% block menu %} diff --git a/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig b/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig index 578f00eaa6..35819686b9 100644 --- a/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig +++ b/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig @@ -15,7 +15,7 @@ {% endif %} {% endset %} - {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'icon' : icon, 'text' : text } only %} + {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'icon' : icon, 'text' : text, 'status' : collector.status } only %} {% endblock %} {% block menu %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig index ae71c5be55..062acd23b8 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig @@ -7,7 +7,7 @@ {% set text %} {{ collector.counterrors }} {% endset %} - {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'icon' : icon, 'text' : text } only %} + {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'icon' : icon, 'text' : text, 'status' : collector.status } only %} {% endblock %} {% block menu %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig index 6412b5c2e6..80687d39c0 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig @@ -7,5 +7,5 @@ {% set text %} {{ '%.0f'|format(collector.memory / 1024) }} KB {% endset %} - {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'icon' : icon, 'text' : text } only %} + {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'icon' : icon, 'text' : text, 'status' : collector.status } only %} {% endblock %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig index 94f11d3cb6..15b0a368d0 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig @@ -13,7 +13,7 @@ | {{ collector.contenttype }} {% endset %} - {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'icon' : icon, 'text' : text } only %} + {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'icon' : icon, 'text' : text, 'status' : collector.status } only %} {% endblock %} {% block menu %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/timer.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/timer.html.twig index 80d4624f26..234d96ed41 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/timer.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/timer.html.twig @@ -7,5 +7,5 @@ {% set text %} {{ '%.0f'|format(collector.time * 1000) }} ms {% endset %} - {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'icon' : icon, 'text' : text } only %} + {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'icon' : icon, 'text' : text, 'status' : collector.status } only %} {% endblock %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig index 5381775218..410f8cef81 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig @@ -1,5 +1,12 @@ - +{% set style = '' %} +{% if status is defined %} + {% if 'error' == status %} + {% set style = 'background-color: #f66;' %} + {% elseif 'warning' == status %} + {% set style = 'background-color: #fa2;' %} + {% endif %} +{% endif %} + {% if icon is defined %}{{ icon }}{% endif %} {% if text is defined %}{{ text }}{% endif %} - - + \ No newline at end of file diff --git a/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php index f1002fbb83..6a0e721fc2 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php @@ -24,6 +24,16 @@ abstract class DataCollector implements DataCollectorInterface, \Serializable { protected $data; + /** + * Returns the status of the collector. + * + * @return integer The status of the collector + */ + public function getStatus() + { + return self::INFO; + } + public function serialize() { return serialize($this->data); diff --git a/src/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterface.php b/src/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterface.php index d4a28547ea..74f01d6103 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterface.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterface.php @@ -22,6 +22,10 @@ use Symfony\Component\HttpFoundation\Response; */ interface DataCollectorInterface { + const INFO = 'info'; + const WARNING = 'warning'; + const ERROR = 'error'; + /** * Collects data for the given Request and Response. * @@ -37,4 +41,11 @@ interface DataCollectorInterface * @return string The collector name */ function getName(); + + /** + * Returns the status of the collector. + * + * @return string The status of the collector + */ + function getStatus(); } diff --git a/src/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php index 6fbef25c86..ad3c57af37 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php @@ -72,4 +72,12 @@ class LoggerDataCollector extends DataCollector { return 'logger'; } + + /** + * {@inheritdoc} + */ + public function getStatus() + { + return 0 === $this->countErrors() ? self::INFO : self::ERROR; + } } From 5b39894efcb044fd6385f38392006a05f0614f08 Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Thu, 10 Mar 2011 13:48:38 +0100 Subject: [PATCH 04/11] [WebProfilerBundle] Add shortcuts to the panels in the toolbar --- .../Resources/views/Collector/db.html.twig | 4 +-- .../views/Collector/mongodb.html.twig | 4 +-- .../views/Collector/security.html.twig | 4 +-- .../views/Collector/config.html.twig | 8 +++--- .../views/Collector/logger.html.twig | 4 +-- .../views/Collector/memory.html.twig | 2 +- .../views/Collector/request.html.twig | 4 +-- .../Resources/views/Collector/timer.html.twig | 2 +- .../views/Profiler/toolbar.html.twig | 2 +- .../views/Profiler/toolbar_item.html.twig | 28 ++++++++++++------- 10 files changed, 35 insertions(+), 27 deletions(-) diff --git a/src/Symfony/Bundle/DoctrineBundle/Resources/views/Collector/db.html.twig b/src/Symfony/Bundle/DoctrineBundle/Resources/views/Collector/db.html.twig index 256802dec5..be1ffcd1a5 100644 --- a/src/Symfony/Bundle/DoctrineBundle/Resources/views/Collector/db.html.twig +++ b/src/Symfony/Bundle/DoctrineBundle/Resources/views/Collector/db.html.twig @@ -2,12 +2,12 @@ {% block toolbar %} {% set icon %} - Database + Database {% endset %} {% set text %} {{ collector.querycount }} {% endset %} - {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'icon' : icon, 'text' : text, 'status' : collector.status } only %} + {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with { 'link': profiler_url, 'status': collector.status } %} {% endblock %} {% block menu %} diff --git a/src/Symfony/Bundle/DoctrineMongoDBBundle/Resources/views/Collector/mongodb.html.twig b/src/Symfony/Bundle/DoctrineMongoDBBundle/Resources/views/Collector/mongodb.html.twig index 1b5964b761..deb0a30e88 100644 --- a/src/Symfony/Bundle/DoctrineMongoDBBundle/Resources/views/Collector/mongodb.html.twig +++ b/src/Symfony/Bundle/DoctrineMongoDBBundle/Resources/views/Collector/mongodb.html.twig @@ -2,12 +2,12 @@ {% block toolbar %} {% set icon %} - Mongo + Mongo {% endset %} {% set text %} {{ collector.querycount }} {% endset %} - {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'icon' : icon, 'text' : text, 'status' : collector.status } only %} + {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with { 'link': profiler_url, 'status': collector.status } %} {% endblock %} {% block menu %} diff --git a/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig b/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig index 35819686b9..288163dccb 100644 --- a/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig +++ b/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig @@ -2,7 +2,7 @@ {% block toolbar %} {% set icon %} - Security + Security {% endset %} {% set text %} @@ -15,7 +15,7 @@ {% endif %} {% endset %} - {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'icon' : icon, 'text' : text, 'status' : collector.status } only %} + {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with { 'link': profiler_url, 'status': collector.status } %} {% endblock %} {% block menu %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig index 5487151b4d..1ab981e48c 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig @@ -4,7 +4,7 @@ {% set icon %} Symfony {% endset %} - {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'icon' : icon, 'text' : collector.symfonyversion} only %} + {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with { 'link': false, 'text': collector.symfonyversion } %} {% set text %} PHP {{ collector.phpversion }} @@ -13,10 +13,10 @@ | accel {% endset %} - {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'text' : text} only %} + {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with { 'link': false, 'icon': '' } %} {% set icon %} - Environment {% endset %} {% set text %} @@ -32,5 +32,5 @@ {{ collector.token }} {% endif %} {% endset %} - {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'icon' : icon, 'text' : text} only %} + {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with { 'link': profiler_url } %} {% endblock %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig index 062acd23b8..c12c7b72db 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig @@ -2,12 +2,12 @@ {% block toolbar %} {% set icon %} - Logs + Logs {% endset %} {% set text %} {{ collector.counterrors }} {% endset %} - {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'icon' : icon, 'text' : text, 'status' : collector.status } only %} + {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with { 'link': profiler_url, 'status': collector.status } %} {% endblock %} {% block menu %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig index 80687d39c0..d2e0328388 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig @@ -7,5 +7,5 @@ {% set text %} {{ '%.0f'|format(collector.memory / 1024) }} KB {% endset %} - {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'icon' : icon, 'text' : text, 'status' : collector.status } only %} + {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with { 'link': false, 'status': collector.status } %} {% endblock %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig index 15b0a368d0..13cb75bda9 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig @@ -2,7 +2,7 @@ {% block toolbar %} {% set icon %} - Request + Request {% endset %} {% set text %} {{ collector.route ? collector.route : 'NONE' }} @@ -13,7 +13,7 @@ | {{ collector.contenttype }} {% endset %} - {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'icon' : icon, 'text' : text, 'status' : collector.status } only %} + {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with { 'link': profiler_url, 'status': collector.status } %} {% endblock %} {% block menu %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/timer.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/timer.html.twig index 234d96ed41..420c8bba2b 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/timer.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/timer.html.twig @@ -7,5 +7,5 @@ {% set text %} {{ '%.0f'|format(collector.time * 1000) }} ms {% endset %} - {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with {'icon' : icon, 'text' : text, 'status' : collector.status } only %} + {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with { 'link': false, 'status': collector.status } %} {% endblock %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig index 03043bd10e..e5fa9b4ffa 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig @@ -24,7 +24,7 @@   {% for name, template in templates %} - {{ template.renderblock('toolbar', { 'collector': profiler.get(name), 'profiler_url': profiler_url }) }} + {{ template.renderblock('toolbar', { 'collector': profiler.get(name), 'profiler_url': profiler_url, 'token': profiler.token, 'name': name }) }} {% endfor %} {% if 'normal' != position %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig index 410f8cef81..7afa5f61bb 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig @@ -1,12 +1,20 @@ -{% set style = '' %} -{% if status is defined %} - {% if 'error' == status %} - {% set style = 'background-color: #f66;' %} - {% elseif 'warning' == status %} - {% set style = 'background-color: #fa2;' %} - {% endif %} +{% if link %} + {% set icon %} + {% if 'config' == name %} + {{ icon }} + {% else %} + {{ icon }} + {% endif %} + {% endset %} +{% endif %} +{% if 'info' == status|default('info') %} + {% set style = '' %} +{% elseif 'warning' == status %} + {% set style = 'background-color: #fa2;' %} +{% else %} + {% set style = 'background-color: #f66;' %} {% endif %} - {% if icon is defined %}{{ icon }}{% endif %} - {% if text is defined %}{{ text }}{% endif %} - \ No newline at end of file + {{ icon|default('') }} + {{ text|default('') }} + From 308ea7a6680692398fc3116034e706474104a28a Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Sat, 12 Mar 2011 15:40:10 +0100 Subject: [PATCH 05/11] [WebProfilerBundle] Specify missing alt attributes --- .../Resources/views/Collector/events.html.twig | 2 +- .../Resources/views/Collector/exception.html.twig | 2 +- .../Resources/views/Collector/logger.html.twig | 2 +- .../Resources/views/Collector/request.html.twig | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/events.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/events.html.twig index c00d33206b..98148c4b96 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/events.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/events.html.twig @@ -2,7 +2,7 @@ {% block menu %} - + Events Events {% endblock %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/exception.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/exception.html.twig index 7220aa3573..03d59a67b2 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/exception.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/exception.html.twig @@ -7,7 +7,7 @@ {% block menu %} - + Exception Exception {% if collector.hasexception %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig index c12c7b72db..e5f4680215 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig @@ -12,7 +12,7 @@ {% block menu %} - + Logger Logs {% if collector.counterrors %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig index 13cb75bda9..5a207e9fb3 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig @@ -18,7 +18,7 @@ {% block menu %} - + Request Request {% endblock %} From b04a647c6536b93d2b6cdec369d01f051c5351aa Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Sat, 12 Mar 2011 15:40:59 +0100 Subject: [PATCH 06/11] [WebProfilerBundle] Create a configuration panel --- .../Controller/ProfilerController.php | 4 +- .../Resources/config/routing/profiler.xml | 3 - .../Resources/public/css/profiler.css | 6 +- .../public/images/profiler/config.png | Bin 0 -> 497 bytes .../views/Collector/config.html.twig | 57 ++++++++++++++++++ .../Resources/views/Profiler/layout.html.twig | 2 +- .../views/Profiler/toolbar_item.html.twig | 6 +- .../DataCollector/ConfigDataCollector.php | 50 +++++++++++---- 8 files changed, 103 insertions(+), 25 deletions(-) create mode 100644 src/Symfony/Bundle/WebProfilerBundle/Resources/public/images/profiler/config.png diff --git a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php index 0979441bc5..8de208ab7a 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php @@ -30,10 +30,12 @@ class ProfilerController extends ContainerAware * * @return Response A Response instance */ - public function panelAction($token, $panel = 'request') + public function panelAction($token) { $this->container->get('profiler')->disable(); + $panel = $this->container->get('request')->query->get('panel', 'request'); + $profiler = $this->container->get('profiler')->loadFromToken($token); if ($profiler->isEmpty()) { diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/config/routing/profiler.xml b/src/Symfony/Bundle/WebProfilerBundle/Resources/config/routing/profiler.xml index 3e26f8b352..7c3d3232c0 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/config/routing/profiler.xml +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/config/routing/profiler.xml @@ -28,7 +28,4 @@ WebProfilerBundle:Profiler:panel - - WebProfilerBundle:Profiler:panel - diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/public/css/profiler.css b/src/Symfony/Bundle/WebProfilerBundle/Resources/public/css/profiler.css index ea9c64c7f7..e22503e8fc 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/public/css/profiler.css +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/public/css/profiler.css @@ -198,9 +198,9 @@ fieldset background:#d1d1d1 url(../images/profiler/bg_submenu.gif) repeat-x 0 0; } -.menu_profiler .request, -.menu_profiler .request a, -.menu_profiler .request a span.label +.menu_profiler li:first-child, +.menu_profiler li:first-child a, +.menu_profiler li:first-child a span.label { -moz-border-radius:16px 0 0 0; -webkit-border-radius:16px 0 0 0; diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/public/images/profiler/config.png b/src/Symfony/Bundle/WebProfilerBundle/Resources/public/images/profiler/config.png new file mode 100644 index 0000000000000000000000000000000000000000..6907b485cca3e69502dc8fe3cf66f91fde3e4bdb GIT binary patch literal 497 zcmVFIeGgh6aHH9Q_39w$MVSUDCbE&cubcN-WRh;Jfkl=<=FhZ&3w#5V}Z!3^b&ii$c2 zW23o71P2=gxPbZ&!PqcCMxd9EfBW{$0!1Yk*NJW0wz&eCUx3&F2=;@-4;(n)2%^6Q8v}m(t3?92o?K{N8fLJ`WS(QbS;o!bLrA0 zaNz6d={*HfM}YVhFwxJzW+E^XWB@5K9Qsy)lGG|7zM7Ypw-&0Q4#Wpy6+A9|0?k?2 z^gUsM79J0gG(3cgeZb?z4|w!_g(ZGoBuN + Configuration + Config + +{% endblock %} + +{% block panel %} +

Configuration

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyValue
Symfony version{{ collector.symfonyversion }}
Application{{ collector.appname }}
Environment{{ collector.env }}
Debug{{ collector.debug ? 'enabled' : 'disabled' }}
PHP version{{ collector.phpversion }}
Xdebug{{ collector.hasxdebug ? 'enabled' : 'disabled' }}
PHP acceleration{{ collector.hasaccelerator ? 'enabled' : 'disabled' }}
XCache{{ collector.hasxcache ? 'enabled' : 'disabled' }}
APC{{ collector.hasapc ? 'enabled' : 'disabled' }}
EAccelerator{{ collector.haseaccelerator ? 'enabled' : 'disabled' }}
+{% endblock %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/layout.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/layout.html.twig index aef342daa6..90990d16a6 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/layout.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/layout.html.twig @@ -30,7 +30,7 @@ {% set menu %}{{ template.renderBlock('menu', { 'collector': profiler.get(name)}) }}{% endset %} {% if menu != '' %}
  • - {{ menu|raw }} + {{ menu|raw }}
  • {% endif %} {% endfor %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig index 7afa5f61bb..b5ab6bcc3e 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig @@ -1,10 +1,6 @@ {% if link %} {% set icon %} - {% if 'config' == name %} - {{ icon }} - {% else %} - {{ icon }} - {% endif %} + {{ icon }} {% endset %} {% endif %} {% if 'info' == status|default('info') %} diff --git a/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php index 158191a605..9052f5fe72 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php @@ -48,14 +48,10 @@ class ConfigDataCollector extends DataCollector 'env' => $this->kernel->getEnvironment(), 'debug' => $this->kernel->isDebug(), 'php_version' => PHP_VERSION, - 'xdebug' => extension_loaded('xdebug'), - 'accel' => ( - (extension_loaded('eaccelerator') && ini_get('eaccelerator.enable')) - || - (extension_loaded('apc') && ini_get('apc.enabled')) - || - (extension_loaded('xcache') && ini_get('xcache.cacher')) - ), + 'xdebug_enabled' => extension_loaded('xdebug'), + 'eaccel_enabled' => extension_loaded('eaccelerator') && ini_get('eaccelerator.enable'), + 'apc_enabled' => extension_loaded('apc') && ini_get('apc.enabled'), + 'xcache_enabled' => extension_loaded('xcache') && ini_get('xcache.cacher'), ); } @@ -126,17 +122,47 @@ class ConfigDataCollector extends DataCollector */ public function hasXDebug() { - return $this->data['xdebug']; + return $this->data['xdebug_enabled']; } /** - * Returns true if an accelerator is enabled. + * Returns true if EAccelerator is enabled. * - * @return Boolean true if an accelerator is enabled, false otherwise + * @return Boolean true if EAccelerator is enabled, false otherwise + */ + public function hasEAccelerator() + { + return $this->data['eaccel_enabled']; + } + + /** + * Returns true if APC is enabled. + * + * @return Boolean true if APC is enabled, false otherwise + */ + public function hasApc() + { + return $this->data['apc_enabled']; + } + + /** + * Returns true if XCache is enabled. + * + * @return Boolean true if XCache is enabled, false otherwise + */ + public function hasXCache() + { + return $this->data['xcache_enabled']; + } + + /** + * Returns true if any accelerator is enabled. + * + * @return Boolean true if any accelerator is enabled, false otherwise */ public function hasAccelerator() { - return $this->data['accel']; + return $this->hasApc() || $this->hasEAccelerator() || $this->hasXCache(); } /** From 1d8be2b112bf50752cb873f074fdfd1bb342f8f2 Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Sat, 12 Mar 2011 16:11:04 +0100 Subject: [PATCH 07/11] [WebProfilerBundle] DOM and CSS tweaks --- .../Resources/public/css/profiler.css | 77 ++++++++++--------- .../Resources/views/Profiler/header.html.twig | 2 +- .../Resources/views/Profiler/layout.html.twig | 10 +-- .../views/Profiler/notfound.html.twig | 8 +- 4 files changed, 49 insertions(+), 48 deletions(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/public/css/profiler.css b/src/Symfony/Bundle/WebProfilerBundle/Resources/public/css/profiler.css index e22503e8fc..5f6a7b4cd3 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/public/css/profiler.css +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/public/css/profiler.css @@ -135,12 +135,12 @@ fieldset min-width: 970px; } -.header +#header { padding:30px 30px 20px 30px; } -.header h1 +#header h1 { float:left; } @@ -150,12 +150,12 @@ fieldset float:right; } -.menu_profiler +#menu_profiler { border-right: 1px solid #dfdfdf; } -.menu_profiler li +#menu_profiler li { border-bottom: 1px solid #dfdfdf; position: relative; @@ -164,7 +164,7 @@ fieldset background-color: #f6f6f6; } -.menu_profiler li a +#menu_profiler li a { color: #404040; display: block; @@ -174,7 +174,7 @@ fieldset cursor: pointer; } -.menu_profiler li a span.label +#menu_profiler li a span.label { display: block; padding: 20px 20px 16px 65px; @@ -182,7 +182,7 @@ fieldset _height: 24px; } -.menu_profiler li a span.icon +#menu_profiler li a span.icon { display: block; position: absolute; @@ -192,22 +192,22 @@ fieldset text-align: center; } -.menu_profiler li.selected a, -.menu_profiler li a:hover +#menu_profiler li.selected a, +#menu_profiler li a:hover { background:#d1d1d1 url(../images/profiler/bg_submenu.gif) repeat-x 0 0; } -.menu_profiler li:first-child, -.menu_profiler li:first-child a, -.menu_profiler li:first-child a span.label +#menu_profiler li:first-child, +#menu_profiler li:first-child a, +#menu_profiler li:first-child a span.label { -moz-border-radius:16px 0 0 0; -webkit-border-radius:16px 0 0 0; border-radius:16px 0 0 0; } -.menu_profiler li a span.count +#menu_profiler li a span.count { padding: 0; position:absolute; @@ -215,23 +215,23 @@ fieldset top: 20px; } -.navigation, .collector_content +#navigation, #collector_content { float:left } -.navigation +#navigation { width:250px; } -.collector_content +#collector_content { width:620px; padding:40px 0 40px 50px; } -.collector_content table td +#collector_content table td { background-color: white; } @@ -253,7 +253,7 @@ li } -.main, .resume +#main, #resume { -moz-border-radius:16px; -webkit-border-radius:16px; @@ -261,7 +261,7 @@ li margin-bottom:20px; } -.menu_profiler span.count span +#menu_profiler span.count span { display:inline-block; background-color:#aacd4e; @@ -274,20 +274,20 @@ li font-size: 11px; } -.resume +#resume { background-color:#f6f6f6; border:1px solid #dfdfdf; padding:16px 28px; } -.resume p +#resume p { color:#313131; font-size:12px; } -.resume .date +#resume .date { display:block; } @@ -306,14 +306,14 @@ table th.value padding-bottom:2px; } -#content .main +#content #main { padding: 0; background-color:#FFFFFF; border:1px solid #dfdfdf; } -#content .main p +#content #main p { color:#868686; font-size:14px; @@ -344,9 +344,10 @@ ul.alt li.even { ul.alt li.error { background-color: #f66; + margin-bottom: 1px; } -td.main, td.menu { +td#main, td.menu { text-align: left; margin: 0; padding: 0; @@ -437,7 +438,7 @@ td.main, td.menu { background: transparent url(../images/profiler/btn_bg.png) repeat-x top left; } -.navigation .search +#navigation .search { padding-top: 15px; float: none; @@ -448,7 +449,7 @@ td.main, td.menu { border-left: none; } -.navigation .search h3 +#navigation .search h3 { font-family: Arial,Helvetica,sans-serif; text-transform: uppercase; @@ -456,49 +457,49 @@ td.main, td.menu { font-size: 13px; } -.navigation .search form +#navigation .search form { padding: 15px 0; } -.navigation .search button +#navigation .search button { float: right; margin-right: 20px; } -.navigation .search label +#navigation .search label { display: block; float: left; width: 50px; } -.navigation .search input, -.navigation .search select, -.navigation .search label, -.navigation .search a +#navigation .search input, +#navigation .search select, +#navigation .search label, +#navigation .search a { font-size: 12px; } -.navigation .search form +#navigation .search form { padding-left: 10px; } -.navigation .search input +#navigation .search input { width: 160px; } -.navigation .import label +#navigation .import label { float: none; display: inline; } -.navigation .import input +#navigation .import input { width: 100px; } \ No newline at end of file diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/header.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/header.html.twig index 368a0612e6..fc9cc117f8 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/header.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/header.html.twig @@ -1,4 +1,4 @@ -
    +