Skip to content

Commit

Permalink
Merge pull request #254 from WouterJ/patch-2
Browse files Browse the repository at this point in the history
Use PHPCR logo as collector icon
  • Loading branch information
dbu committed Mar 25, 2016
2 parents 0dce79c + ec44672 commit 4db94fa
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 37 deletions.
5 changes: 2 additions & 3 deletions Resources/views/Collector/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 34 additions & 34 deletions Resources/views/Collector/phpcr.html.twig
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
{% extends 'WebProfilerBundle:Profiler:layout.html.twig' %}

{% block toolbar %}
{% set profiler_markup_version = profiler_markup_version|default(1) %}

{% set icon %}
{% if profiler_markup_version == 1 %}
<img width="20" height="28" alt="Database" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAcCAYAAABh2p9gAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQRJREFUeNpi/P//PwM1ARMDlcGogZQDlpMnT7pxc3NbA9nhQKxOpL5rQLwJiPeBsI6Ozl+YBOOOHTv+AOllQNwtLS39F2owKYZ/gRq8G4i3ggxEToggWzvc3d2Pk+1lNL4fFAs6ODi8JzdS7mMRVyDVoAMHDsANdAPiOCC+jCQvQKqBQB/BDbwBxK5AHA3E/kB8nKJkA8TMQBwLxaBIKQbi70AvTADSBiSadwFXpCikpKQU8PDwkGTaly9fHFigkaKIJid4584dkiMFFI6jkTJII0WVmpHCAixZQEXWYhDeuXMnyLsVlEQKI45qFBQZ8eRECi4DBaAlDqle/8A48ip6gAADANdQY88Uc0oGAAAAAElFTkSuQmCC" />
<span class="sf-toolbar-status{% if 50 < collector.callcount %} sf-toolbar-status-yellow{% endif %}">{{ collector.callcount }}</span>
{% if collector.callcount > 0 %}
<span class="sf-toolbar-info-piece-additional-detail">in {{ '%0.2f'|format(collector.time * 1000) }} ms</span>
{% endif %}
{% else %}
{% if collector.callcount > 0 %}
{% set status = collector.callcount > 50 ? 'yellow' %}

{{ include('@DoctrinePHPCR/Collector/icon.svg') }}

<span class="sf-toolbar-value">{{ collector.callcount }}</span>
<span class="sf-toolbar-info-piece-additional-detail">
<span class="sf-toolbar-label">in</span>
<span class="sf-toolbar-value">{{ '%0.2f'|format(collector.time * 1000) }}</span>
<span class="sf-toolbar-label">ms</span>
</span>
{% if collector.callcount > 0 %}
{% set profiler_markup_version = profiler_markup_version|default(1) %}

{% set icon %}
{% if profiler_markup_version == 1 %}
<img width="20" height="28" alt="Database" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAN5JREFUeNpiZAACe3v7+UAqgYF0kHjw4MEFyAJMUFqBgTyAoY+JgcqABUo3AvEHIBYgQe8DIF6ALsiISzUwXN9DLQBZpAgMqw9QcZA3z2OxvBGopgGflwWQaAO0cMPmE3uahiE2sAHmZaBXDiCJX0CSQwYTsYYhMIzWkxA5jWiWoboQaJgDkAogwYcHgfgATdMhuoEXoJgY8AHddYTS4XqkSAkk14XIABSW4DCFhi3FBlIlDNHDCEYTG65Y0yEoa9WjFU0foGnuAjk5JQFHYXuRGJfSJQwfEAhTvAAgwAArLzncFel3VAAAAABJRU5ErkJggg==" />
<span class="sf-toolbar-status{% if 50 < collector.callcount %} sf-toolbar-status-yellow{% endif %}">{{ collector.callcount }}</span>
{% if collector.callcount > 0 %}
<span class="sf-toolbar-info-piece-additional-detail">in {{ '%0.2f'|format(collector.time * 1000) }} ms</span>
{% endif %}
{% else %}
{% set status = collector.callcount > 50 ? 'yellow' %}

{{ include('@DoctrinePHPCR/Collector/icon.svg') }}

<span class="sf-toolbar-value">{{ collector.callcount }}</span>
<span class="sf-toolbar-info-piece-additional-detail">
<span class="sf-toolbar-label">in</span>
<span class="sf-toolbar-value">{{ '%0.2f'|format(collector.time * 1000) }}</span>
<span class="sf-toolbar-label">ms</span>
</span>
{% endif %}
{% endif %}
{% endset %}
{% endset %}

{% set text %}
<div class="sf-toolbar-info-piece">
<b>PHPCR Calls</b>
<span class="sf-toolbar-status">{{ collector.callcount }}</span>
</div>
<div class="sf-toolbar-info-piece">
<b>Call time</b>
<span>{{ '%0.2f'|format(collector.time * 1000) }} ms</span>
</div>
{% endset %}
{% set text %}
<div class="sf-toolbar-info-piece">
<b>PHPCR Calls</b>
<span class="sf-toolbar-status">{{ collector.callcount }}</span>
</div>
<div class="sf-toolbar-info-piece">
<b>Call time</b>
<span>{{ '%0.2f'|format(collector.time * 1000) }} ms</span>
</div>
{% endset %}

{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status|default('') }) }}
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status|default('') }) }}
{% endif %}
{% endblock %}

{% block menu %}
Expand Down

0 comments on commit 4db94fa

Please sign in to comment.