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

Basic version & system info on Editorial Dashboard #28

Merged
merged 26 commits into from
Mar 4, 2019
Merged

Conversation

andrerom
Copy link
Contributor

@andrerom andrerom commented Jan 2, 2019

From support/services/community side we are in need of people being able to:

  • known what version they are on (at least minor, patch version is follow up in M2 by engineering)
  • know if something is wrongly setup or expired

The work here aims to do small first step, that can be shipped in a 0.2.x release of ez-support-tools so all existing 2.x installs gets access to this retroactively and gets info when version is out of date.

This is places on editorial dashboard for a few reasons:

  • Minimal indication should be here to make sure project owners becomes aware of larger issues
    • Once we can place info in admin/systeminfo section we can make this link there instead.
  • No way to extend tabs in SystemInfo section without having to do changes in Admin UI
    • So a follow up milestone (M2) for 2.5+ here for engineering

Depends on the following:

Screenshoot

platform_dashboard_trial_view

@andrerom andrerom changed the title [WIP] Basic version and system info on Editorial Dashboard [WIP] Basic version & system info on Editorial Dashboard Jan 2, 2019
🚀 Welcome to the open source {{ ez.release }} release. Using the community friendly
<a target="_blank" href="https://ez.no/About-our-Software/Licenses-and-agreements">GPL</a> license,
<a target="_blank" href="https://www.gnu.org/licenses/old-licenses/gpl-2.0-faq.en.html#GPLModuleLicense">sharing code</a>
is what it's ❤️ about.

This comment was marked as resolved.

This comment was marked as resolved.

Resources/views/themes/admin/dashboard/block/ez.html.twig Outdated Show resolved Hide resolved
Resources/views/themes/admin/dashboard/block/ez.html.twig Outdated Show resolved Hide resolved
Resources/views/themes/admin/dashboard/block/ez.html.twig Outdated Show resolved Hide resolved
Resources/views/themes/admin/dashboard/block/ez.html.twig Outdated Show resolved Hide resolved
Resources/views/themes/admin/dashboard/block/ez.html.twig Outdated Show resolved Hide resolved
Resources/views/themes/admin/dashboard/block/ez.html.twig Outdated Show resolved Hide resolved
{% set status %}
{% if not ez.release %}
<div class="alert alert-warning" role="alert">
🤷 Could not find your <code>composer.lock</code> file, it's needed in order to determine information about

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
🤷 Could not find your <code>composer.lock</code> file, it's needed in order to determine information about
The system could not find your <code>composer.lock</code> file. It's needed to determine information about your eZ Platform installation. We recommend to keep this file during project development to make sure same package versions are used across all environments.

<div class="alert alert-warning" role="alert">
💁 Your setup is running with unstable packages.
{% if ez.isEnterpise %}
This is not supported unless told otherwise, if you need assistance <a href="https://support.ez.no">get in touch</a>.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This is not supported unless told otherwise, if you need assistance <a href="https://support.ez.no">get in touch</a>.
This is not supported unless communicated otherwise. If you need assistance, <a href="https://support.ez.no">get in touch with us</a>.

</div>
{% elseif not ez.debug and ez.stability != 'stable' %}
<div class="alert alert-warning" role="alert">
💁 Your setup is running with unstable packages.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
💁 Your setup is running with unstable packages.
Your setup is running with unstable packages.

{% if ez.isEnterpise %}
This is not supported unless told otherwise, if you need assistance <a href="https://support.ez.no">get in touch</a>.
{% else %}
This is not recommended, unless for testing updates.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This is not recommended, unless for testing updates.
This is not recommended.

Copy link
Contributor Author

@andrerom andrerom Feb 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New string is Your setup is running with unstable packages, this is not recommended besides when testing updates.

ok @SylvainGuittard ?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect!

{% if ez.isEndOfLife %}
{% set badge = '<span class="badge badge-pill badge-danger">Trial</span>' %}
<div class="alert alert-danger" role="alert">
⚠️ Unfortunately your trial has expired and your <a target="_blank" href="https://ez.no/About-our-Software/Licenses-and-agreements/eZ-Trial-and-Test-License-Agreement-eZ-TTL-v2.1">TTL license</a>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
⚠️ Unfortunately your trial has expired and your <a target="_blank" href="https://ez.no/About-our-Software/Licenses-and-agreements/eZ-Trial-and-Test-License-Agreement-eZ-TTL-v2.1">TTL license</a>
Unfortunately your trial period has expired and your <a target="_blank" href="https://ez.no/About-our-Software/Licenses-and-agreements/eZ-Trial-and-Test-License-Agreement-eZ-TTL-v2.1">TTL license</a>

If you are in need of assistance, eZ Services like <a target="_blank" href="https://ez.no/Services/Consulting">Consulting</a>
and <a target="_blank" href="https://ez.no/Services/Training">Training</a> help you get the most out your install.
{% elseif rand == 1 %}
To simplify the work involved in upgrading, <a target="_blank" href="https://ez.no/Products/eZ-Platform-Cloud">eZ Platform Cloud</a> might be a good option.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To simplify the work involved in upgrading, <a target="_blank" href="https://ez.no/Products/eZ-Platform-Cloud">eZ Platform Cloud</a> might be a good option.
If you want to accelerate your deployment process, <a target="_blank" href="https://ez.no/Products/eZ-Platform-Cloud">eZ Platform Cloud</a> is what you are looking for.

{% elseif rand == 1 %}
To simplify the work involved in upgrading, <a target="_blank" href="https://ez.no/Products/eZ-Platform-Cloud">eZ Platform Cloud</a> might be a good option.
{% elseif rand == 2 %}
Wondering about adding commerce capabilities while upgrading? <a target="_blank" href="https://ez.no/Products/eZ-Commerce">eZ Commerce</a> could be what you need.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Wondering about adding commerce capabilities while upgrading? <a target="_blank" href="https://ez.no/Products/eZ-Commerce">eZ Commerce</a> could be what you need.
Wondering about adding commerce capabilities? <a target="_blank" href="https://ez.no/Products/eZ-Commerce">eZ Commerce</a> could be what you need.

{% set badge = '<span class="badge badge-pill badge-light">GPL</span>' %}
<div class="alert alert-info" role="alert">
🚀 Welcome to the open source {{ ez.release }} release. Using the community friendly
<a target="_blank" href="https://ez.no/About-our-Software/Licenses-and-agreements">GPL</a> license,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<a target="_blank" href="https://ez.no/About-our-Software/Licenses-and-agreements">GPL</a> license,
<a target="_blank" href="https://ez.no/About-our-Software/Licenses-and-agreements">GPL license</a>,

{% elseif ez.isEndOfLife %}
{# As we don't yet here know if subscription has expired this is a warning and not a error (subscription expiry on BUL would be a license violation, so similar like on TTL) #}
<div class="alert alert-warning" role="alert">
⚠️ Unfortunately {{ ez.release }} has reached <a href="https://support.ez.no/Public/Service-Life">end of life</a>,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
⚠️ Unfortunately {{ ez.release }} has reached <a href="https://support.ez.no/Public/Service-Life">end of life</a>,
Unfortunately {{ ez.release }} has reached <a href="https://support.ez.no/Public/Service-Life">end of life</a>,

{# As we don't yet here know if subscription has expired this is a warning and not a error (subscription expiry on BUL would be a license violation, so similar like on TTL) #}
<div class="alert alert-warning" role="alert">
⚠️ Unfortunately {{ ez.release }} has reached <a href="https://support.ez.no/Public/Service-Life">end of life</a>,
please plan to upgrade. If you are in need of assistance, don't hesitate to <a href="https://support.ez.no">get in touch</a>.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
please plan to upgrade. If you are in need of assistance, don't hesitate to <a href="https://support.ez.no">get in touch</a>.
please plan to upgrade. If you need assistance, don't hesitate to <a target="_blank" href="https://ez.no/About-eZ/Contact-Us">contact eZ</a>.

@lserwatka
Copy link
Member

Shall we externalise links from templates to yaml? It will be easier to change it in case some of the pages will change/move.

@andrerom andrerom changed the title [WIP] Basic version & system info on Editorial Dashboard Basic version & system info on Editorial Dashboard Mar 1, 2019
@andrerom
Copy link
Contributor Author

andrerom commented Mar 1, 2019

@lserwatka @SylvainGuittard this more or less should be ready now for someone to take over on strings to do another round on that and generate translation strings.

Translation system is now in use and URLs are not part of the strings anymore.

Resources/views/themes/admin/dashboard/block/ez.html.twig Outdated Show resolved Hide resolved
<div class="alert alert-warning collapse" role="alert" id="systemInfoCollapse">
{% trans %}
The system could not find your <code>composer.lock</code> file, it's needed in order to determine information about
your eZ install, and recommended to be kept on project development to make sure same package versions are used across all environments.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
your eZ install, and recommended to be kept on project development to make sure same package versions are used across all environments.
your eZ Platform installation. We recommend to keep this file during project development to make sure same package versions are used across all environments.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, this now kind of implies we only need this file during development, but actually we need it also after code is deployed in prod. Could we write this in a different way maybe?

Resources/views/themes/admin/dashboard/block/ez.html.twig Outdated Show resolved Hide resolved
Resources/views/themes/admin/dashboard/block/ez.html.twig Outdated Show resolved Hide resolved
Resources/views/themes/admin/dashboard/block/ez.html.twig Outdated Show resolved Hide resolved
Resources/views/themes/admin/dashboard/block/ez.html.twig Outdated Show resolved Hide resolved
Resources/views/themes/admin/dashboard/block/ez.html.twig Outdated Show resolved Hide resolved
Resources/views/themes/admin/dashboard/block/ez.html.twig Outdated Show resolved Hide resolved
Resources/views/themes/admin/dashboard/block/ez.html.twig Outdated Show resolved Hide resolved
@SylvainGuittard
Copy link

@andrerom Final review done.

@lserwatka
Copy link
Member

lserwatka commented Mar 1, 2019

@adamwojs or @ViniTou could you help generate translations in this branch once @andrerom is done with last requested changes?

@ViniTou
Copy link
Contributor

ViniTou commented Mar 4, 2019

Hi

during extracting translations, I have took liberty to move urls from view to yml configuration.
d24b8f4

@andrerom
@adamwojs
@mikadamczyk
@lserwatka

public function render(array $parameters = []): string
{
$urls = $this->replaceUrlPlaceholders();
return $this->twig->render(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing empty line

/**
* @return array
*/
private function replaceUrlPlaceholders()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing return type hint

{% endspaceless %}
{% endset %}


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to many empty lines

*/
private $debug;

public function __construct(JsonComposerLockSystemInfoCollector $composerCollector, $debug = false)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public function __construct(JsonComposerLockSystemInfoCollector $composerCollector, $debug = false)
public function __construct(SystemInfoCollector $composerCollector, $debug = false)

composer.json Outdated
@@ -10,6 +10,7 @@
}
],
"require": {
"php": "^5.6 || ^7.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"php": "^5.6 || ^7.0",
"php": "^7.1",

and also ezsystems/ezplatform-admin-ui should be added to dependencies // cc @lserwatka

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, and could you change branch alias to 1.0.x-dev this package is super stable.

Copy link
Contributor Author

@andrerom andrerom Mar 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not for 0.2.x, for followup where we change admin ui to allow extensibility on system info tab and add eZ tab (ideally from this repo to avoid maintaining templates in admin ui) we can and should do things like this

This is 0.2.x for reasons explained in description, TL;DR to make all 2.x users aware if they are on a unsupported version.

"php": "^5.6 || ^7.0",
"ezsystems/ezpublish-kernel": "~6.7.8 || ~6.13.4 || ^7.0",
"php": ">=7.1",
"ezsystems/ezpublish-kernel": "^7.4@dev",
Copy link
Contributor Author

@andrerom andrerom Mar 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do these kernel and php changes post merge, half the point doing this from support side it to do a 0.2.x for v2 (2.0-2.4)* users letting them know if something is wrong with their install (including which version they are on and if it is expired)

* NB: Technically 0.2 is also used on 1.13 and updated 1.7 installs, hence we can't do php bump in 0.2, but we can in master when we bump version alias to 1.0.x there.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then I think also \EzSystems\EzSupportToolsBundle\AdminUi\Component\EzInfoTwigComponent should go to higher version, as it creates dependency on adminUI (and php7+).

@lserwatka lserwatka merged commit a9feda2 into master Mar 4, 2019
@lserwatka lserwatka deleted the dashboard branch March 4, 2019 15:57
@ViniTou
Copy link
Contributor

ViniTou commented Mar 4, 2019

So, for right now -> this will be merged to master as 1.0.x, and I will create new PR for 0.2 with compiler pass for compatibility with 1.13 and php5.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

7 participants