Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EZP-32097: Expose EzSystemInfo in Admin UI and SystemInfoDumpCommand #69

Merged
merged 10 commits into from
Nov 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/bundle/Resources/config/default_settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ parameters:
ezsettings.default.system_info_view: {}
ezsettings.global.system_info_view:
pjax_tab:
ibexa:
template: '@@ezdesign/system_info/my_ibexa.html.twig'
match:
SystemInfo\Identifier: 'ibexa'
composer:
template: '@@ezdesign/system_info/composer.html.twig'
match:
Expand Down
11 changes: 5 additions & 6 deletions src/bundle/Resources/config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ parameters:
support_tools.system_info.ezc.wrapper.class: EzSystems\EzSupportToolsBundle\SystemInfo\EzcSystemInfoWrapper
support_tools.system_info.collector.composer.lock_file.class: EzSystems\EzSupportToolsBundle\SystemInfo\Collector\JsonComposerLockSystemInfoCollector
support_tools.system_info.collector.database.doctrine.class: EzSystems\EzSupportToolsBundle\SystemInfo\Collector\DoctrineDatabaseSystemInfoCollector
support_tools.system_info.collector.system.ez.class: EzSystems\EzSupportToolsBundle\SystemInfo\Collector\EzSystemInfoCollector
support_tools.system_info.collector.system.ibexa.class: EzSystems\EzSupportToolsBundle\SystemInfo\Collector\IbexaSystemInfoCollector
support_tools.system_info.collector.hardware.ezc.class: EzSystems\EzSupportToolsBundle\SystemInfo\Collector\EzcHardwareSystemInfoCollector
support_tools.system_info.collector.php.ezc.class: EzSystems\EzSupportToolsBundle\SystemInfo\Collector\EzcPhpSystemInfoCollector
support_tools.system_info.collector.symfony.kernel.config.class: EzSystems\EzSupportToolsBundle\SystemInfo\Collector\ConfigurationSymfonyKernelSystemInfoCollector
Expand Down Expand Up @@ -52,14 +52,13 @@ services:

# SystemInfoCollectors

support_tools.system_info.collector.system.ez:
class: "%support_tools.system_info.collector.system.ez.class%"
support_tools.system_info.collector.system.ibexa:
class: "%support_tools.system_info.collector.system.ibexa.class%"
arguments:
- "@support_tools.system_info.collector.composer.lock_file"
- "%kernel.debug%"
# Can't tag this before v0.3 (2.5?) as it will blow up in admin UI for missing templates there
# And it does not look like there is any way to add it from this package, so maybe it needs to be made extensible(?)
#tags: [{ name: "support_tools.system_info.collector", identifier: "ez" }]
tags:
- { name: "support_tools.system_info.collector", identifier: "ibexa" }

support_tools.system_info.collector.composer.lock_file:
class: "%support_tools.system_info.collector.composer.lock_file.class%"
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Resources/config/view.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ services:
autowire: true
arguments:
$template: '@@ezdesign/ui/dashboard/block/ez.html.twig'
$ezSystemInfo: "@=service('support_tools.system_info.collector.system.ez').collect()"
$ibexaSystemInfo: "@=service('support_tools.system_info.collector.system.ibexa').collect()"
$urlList: '%support_tools.ez_url_list%'
tags:
- { name: ezplatform.admin_ui.component, group: 'dashboard-blocks', priority: 200 }
45 changes: 45 additions & 0 deletions src/bundle/Resources/translations/systeminfo.en.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,46 @@
<target state="new">Disabled</target>
<note>key: disabled</note>
</trans-unit>
<trans-unit id="d87becd0d1497fe04536d2e9291290a8b07e9dfb" resname="ibexa.product">
<source>Product</source>
<target state="new">Product</target>
<note>key: ibexa.product</note>
</trans-unit>
<trans-unit id="b7ffaa791bbf39db2ea700efec5362a0bc4e2021" resname="ibexa.name">
<source>Name</source>
<target state="new">Name</target>
<note>key: ibexa.name</note>
</trans-unit>
<trans-unit id="d6025d67b03f12dac6c912f6224bb309347f6465" resname="ibexa.version">
<source>Version</source>
<target state="new">Version</target>
<note>key: ibexa.version</note>
</trans-unit>
<trans-unit id="4a9e6f9b28c3203784cb5f01ebe73e67661cc823" resname="ibexa.eom">
<source>End of Maintenance</source>
<target state="new">End of Maintenance</target>
<note>key: ibexa.eom</note>
</trans-unit>
<trans-unit id="ed1f723e05fbc74c1c90cfc6f64c2bcda6f4bb9d" resname="ibexa.eol">
<source>End of Life</source>
<target state="new">End of Life</target>
<note>key: ibexa.eol</note>
</trans-unit>
<trans-unit id="804e14084add4426182add3b4a0a710506ef742b" resname="ibexa.is_trial">
<source>Is Trial</source>
<target state="new">Is Trial</target>
<note>key: ibexa.is_trial</note>
</trans-unit>
<trans-unit id="341340ab8c700ad6fe83322ec29cb3977262f5df" resname="ibexa.stability">
<source>Stability</source>
<target state="new">Stability</target>
<note>key: ibexa.stability</note>
</trans-unit>
<trans-unit id="972bcf808b8ce2b0a08a21db7f0f15f520f4b87b" resname="ibexa.read_more">
<source>You can read more about Service Life for Ibexa DXP with a business license at</source>
<target state="new">You can read more about Service Life for Ibexa DXP with a business license at</target>
<note>key: ibexa.read_more</note>
</trans-unit>
<trans-unit id="608cb271bb7fb52c99a1a8e003e0f80f57fb41e1" resname="hardware">
<source>Hardware</source>
<target state="new">Hardware</target>
Expand Down Expand Up @@ -176,6 +216,11 @@
<target state="new">System Information</target>
<note>key: systeminfo</note>
</trans-unit>
<trans-unit id="7dd1b2ca71037e00112dfe0297383f47c6904c77" resname="tab.name.ibexa">
<source>My Ibexa</source>
<target state="new">My Ibexa</target>
<note>key: tab.name.ibexa</note>
</trans-unit>
<trans-unit id="a2a92e9d0e41ea4a14c99ab0f702d5df3ea017c3" resname="tab.name.composer">
<source>Composer</source>
<target state="new">Composer</target>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{% trans_default_domain "systeminfo" %}

<!-- Tab name: {{ 'tab.name.ibexa'|trans|desc('My Ibexa') }} -->

<section class="ez-fieldgroup">
<h2 class="ez-fieldgroup__name">{{ 'ibexa.product'|trans|desc('Product') }}</h2>
<div class="ez-fieldgroup__content">
<table class="table ez-table ez-table--list ez-table--to-left">
<tbody>
<tr class="ez-table__row">
<td class="ez-table__cell">{{ 'ibexa.name'|trans|desc('Name') }}</td>
<td class="ez-table__cell">{{ info.name }}</td>
</tr>
<tr class="ez-table__row">
<td class="ez-table__cell">{{ 'ibexa.version'|trans|desc('Version') }}</td>
<td class="ez-table__cell">{{ info.release }}</td>
</tr>
<tr class="ez-table__row">
<td class="ez-table__cell">{{ 'ibexa.is_trial'|trans|desc('Is Trial') }}</td>
<td class="ez-table__cell">
<svg class="ez-icon ez-icon--small">
<use xlink:href="{{ ez_icon_path(info.isTrial ? 'checkmark' : 'discard') }}"></use>
</svg>
</td>
</tr>
<tr class="ez-table__row">
<td class="ez-table__cell">{{ 'ibexa.stability'|trans|desc('Stability') }}</td>
<td class="ez-table__cell">{{ info.stability }}</td>
</tr>
{% if info.isEnterprise %}
<tr class="ez-table__row">
<td class="ez-table__cell">{{ 'ibexa.eom'|trans|desc('End of Maintenance') }}*</td>
<td class="ez-table__cell">
{{ info.endOfMaintenanceDate is empty ? '' : info.endOfMaintenanceDate|date('F Y') }}
</td>
</tr>
<tr class="ez-table__row">
<td class="ez-table__cell">{{ 'ibexa.eol'|trans|desc('End of Life') }}*</td>
<td class="ez-table__cell">
{{ info.endOfLifeDate is empty ? '' : info.endOfLifeDate|date('F Y') }}
</td>
</tr>
<tr class="ez-table__row">
<td colspan="2">
<hr/>
* {{ 'ibexa.read_more'|trans|desc('You can read more about Service Life for Ibexa DXP with a business license at') }}
<a target="_blank" href="https://support.ibexa.co/Public/Service-Life">
https://support.ibexa.co/Public/Service-Life
</a>
</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
</section>
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
{% else %}
{{ 'dashboard.ez_version.non_stable_packages'|trans({'%stability%': ez.stability})|desc("Your setup is running with @%stability% composer packages. This is not recommended except when testing updates or during development.") }}
{% endif %}
{% if ez.isEnterpise %}
{% if ez.isEnterprise %}
{{ 'dashboard.ez_version.non_stable_ee'|trans({'%support_url%': urls['support']})|desc("If you need assistance, don't hesitate to <a target=\"_blank\" href=\"%support_url%\">get in touch with Ibexa support</a>.")|raw }}
{% endif %}
</div>
Expand Down Expand Up @@ -79,7 +79,7 @@
|raw }}
</div>
</div>
{% elseif not ez.isEnterpise %}
{% elseif not ez.isEnterprise %}
{% set badge = 'GPL' %}
{% if ez.isEndOfMaintenance %}
{# In the future with retrival of info from updates.ez.no we can detect missing (public) security fixes and then let this become an error #}
Expand Down
Loading