Skip to content

Commit

Permalink
Merge pull request #73 from smartbooster/list_api_call_route_url
Browse files Browse the repository at this point in the history
list_api_call_route_url.html.twig template to reduce the size of the url on AbstractApiCallAdmin
  • Loading branch information
mathieu-ducrot authored Sep 9, 2024
2 parents 2f5c52c + 2ba0ab0 commit ff0a176
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG_list_api_call_route_url.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
### Added
- `list_api_call_route_url.html.twig` template to reduce the size of the url on `AbstractApiCallAdmin`
5 changes: 4 additions & 1 deletion src/Admin/Monitoring/AbstractApiCallAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@ protected function configureListFields(ListMapper $list): void
'template' => '@SmartSonata/admin/base_field/list_api_call_status_code.html.twig',
])
->add('method', null, ['label' => 'label.method'])
->add('routeUrl', null, ['label' => 'label.route_url'])
->add('routeUrl', null, [
'label' => 'label.route_url',
'template' => '@SmartSonata/admin/base_field/list_api_call_route_url.html.twig',
])
->add('durationAsString', null, ['label' => 'label.duration'])
->add('summary', null, [
'label' => 'label.summary',
Expand Down
6 changes: 6 additions & 0 deletions templates/admin/base_field/list_api_call_route_url.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{% extends '@SonataAdmin/CRUD/base_list_field.html.twig' %}
{% block field %}
<div style="max-width: 450px">
{{ value }}
</div>
{% endblock %}

0 comments on commit ff0a176

Please sign in to comment.