mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-26 12:08:47 +02:00
* Update Symfony lib to version ~6.4.0 * Update code missing return type * Add an iTop general configuration entry to store application secret (Symfony mandatory parameter) * Use dependency injection in ExceptionListener & UserProvider classes
25 lines
977 B
Twig
25 lines
977 B
Twig
{% extends '@WebProfiler/Profiler/layout.html.twig' %}
|
|
|
|
{% block toolbar %}
|
|
{% set icon %}
|
|
{% set status_color = (collector.memory / 1024 / 1024) > 50 ? 'yellow' %}
|
|
{{ source('@WebProfiler/Icon/memory.svg') }}
|
|
<span class="sf-toolbar-value">{{ '%.1f'|format(collector.memory / 1024 / 1024) }}</span>
|
|
<span class="sf-toolbar-label">MiB</span>
|
|
{% endset %}
|
|
|
|
{% set text %}
|
|
<div class="sf-toolbar-info-piece">
|
|
<b>Peak memory usage</b>
|
|
<span>{{ '%.1f'|format(collector.memory / 1024 / 1024) }} MiB</span>
|
|
</div>
|
|
|
|
<div class="sf-toolbar-info-piece">
|
|
<b>PHP memory limit</b>
|
|
<span>{{ collector.memoryLimit == -1 ? 'Unlimited' : '%.0f MiB'|format(collector.memoryLimit / 1024 / 1024) }}</span>
|
|
</div>
|
|
{% endset %}
|
|
|
|
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, name: 'time', status: status_color }) }}
|
|
{% endblock %}
|