Skip to content

Commit

Permalink
Merge pull request #7 from tmihalicka/master
Browse files Browse the repository at this point in the history
fixed collector twig template
  • Loading branch information
Martin Fris authored Feb 24, 2021
2 parents bf77c9c + 95cd3b6 commit dc75a6a
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion bin/grumphp_hooks/environment_spinup
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ export PATH="/usr/local/bin:$PATH"
#
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

if [[ -z `docker-compose ps -q php-phystrix-bundle` ]] || [[ -z `docker ps -q --no-trunc | grep $(docker-compose ps -q php-phystrix-bundle)` ]]; then
if [[ -z `docker-compose ps -q phystrix-bundle-php` ]] || [[ -z `docker ps -q --no-trunc | grep $(docker-compose ps -q phystrix-bundle-php)` ]]; then
docker-compose up -d
fi
6 changes: 3 additions & 3 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
version: '3.3'

services:
php-phystrix-bundle:
container_name: php-phystrix-bundle
image: php:7.4-cli
phystrix-bundle-php:
container_name: phystrix-bundle-php
image: php:7.4-fpm
volumes:
- .:/app:delegated
working_dir: /app
2 changes: 1 addition & 1 deletion grumphp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ grumphp:
process_timeout: 600
ignore_unstaged_changes: true
git_hook_variables:
EXEC_GRUMPHP_COMMAND: './bin/grumphp_hooks/environment_spinup && docker exec -i php-phystrix-bundle'
EXEC_GRUMPHP_COMMAND: './bin/grumphp_hooks/environment_spinup && docker exec -i phystrix-bundle-php'
tasks:
phpcs:
standard: 'phpcs.ruleset.xml'
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ services:
arguments:
- "@phystrix.request_log"
tags:
- { name: data_collector, template: "OdeskPhystrixBundle:Collector:phystrix", id: "phystrix"}
- { name: data_collector, template: "@OdeskPhystrix/Collector/phystrix.html.twig", id: "phystrix"}
30 changes: 16 additions & 14 deletions src/Resources/views/Collector/phystrix.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,31 @@

{% block toolbar %}
{% set icon %}
<span>
<span>
<span>
{% if collector.commands|length %}
{{ collector.commands|length }} Phystrix commands executed
<span class="sf-toolbar-value">{{ collector.commands|length }}</span> <span class="sf-toolbar-label">Phystrix commands executed</span>
{% else %}
No Phystrix commands executed
<span class="sf-toolbar-value">
No Phystrix commands executed
<span>
{% endif %}
</span>
</span>
{% endset %}
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %}
{% endblock %}
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %}
{% endblock %}

{% block menu %}
<span class="label">
{% block menu %}
<span class="label">
<strong>Phystrix</strong>
</span>
{% endblock %}
{% endblock %}

{% block panel %}
<h2>Phystrix commands executed</h2>
{% block panel %}
<h2>Phystrix commands executed</h2>
{% if collector.commands|length %}
<table>
<table>
<thead>
<tr>
<th scope="col" style="width: 25%">Command</th>
Expand All @@ -43,8 +45,8 @@
</tbody>
</table>
{% else %}
<p>
<p>
<em>No Phystrix commands have been executed</em>
</p>
{% endif %}
{% endblock %}
{% endif %}
{% endblock %}

0 comments on commit dc75a6a

Please sign in to comment.