Skip to content

Commit

Permalink
IBX-385: Fixed error handling when composer files are corrupted (#1758)
Browse files Browse the repository at this point in the history
  • Loading branch information
Konrad Oboza authored May 28, 2021
1 parent 372973e commit 382b365
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/bundle/Resources/config/default_parameters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ parameters:
template: '@@ezdesign/admin/systeminfo/symfony_kernel.html.twig'
match:
SystemInfo\Identifier: 'symfony_kernel'
invalid:
template: '@@ezdesign/admin/systeminfo/invalid.html.twig'
match:
SystemInfo\Identifier: 'invalid'

ezsettings.default.content_type.about:
thumbnail: '/bundles/ezplatformadminui/img/ez-icons.svg#about'
Expand Down
5 changes: 5 additions & 0 deletions src/bundle/Resources/translations/systeminfo.en.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@
<target state="new">Hardware</target>
<note>key: hardware</note>
</trans-unit>
<trans-unit id="5a3d301a871855ae4b3809c19b76fcccdb65b8ce" resname="invalid.system_unable_to_fetch">
<source>System was unable to fetch corresponding data</source>
<target state="new">System was unable to fetch corresponding data</target>
<note>key: invalid.system_unable_to_fetch</note>
</trans-unit>
<trans-unit id="81c5d49be9505089d8d248ea96f6d077fd0ab9bd" resname="memory">
<source>Memory</source>
<target state="new">Memory</target>
Expand Down
16 changes: 16 additions & 0 deletions src/bundle/Resources/views/admin/systeminfo/invalid.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{% trans_default_domain "systeminfo" %}

<table class="table ez-table--list">
<thead>
<tr>
<th class="ez-table__cell ez-table__cell--header" colspan="2">{{ 'invalid.system_unable_to_fetch'|trans|desc('System was unable to fetch corresponding data') }}</th>
</tr>
</thead>
<tbody>
<tr class="ez-table__row">
<td class="ez-table__cell" colspan="2">
{{ info.errorMessage }}
</td>
</tr>
</tbody>
</table>

0 comments on commit 382b365

Please sign in to comment.