Skip to content

Commit

Permalink
feat: add class on requirement link
Browse files Browse the repository at this point in the history
  • Loading branch information
tblivet committed Nov 27, 2024
1 parent ea295fa commit db4e3dc
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 21 deletions.
2 changes: 1 addition & 1 deletion classes/UpgradeSelfCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public function getRequirementWording(int $requirement, bool $isWebVersion = fal
if ($isWebVersion) {
$maintenanceLink = Context::getContext()->link->getAdminLink('AdminMaintenance');
$params = [
'[1]' => '<a href=' . $maintenanceLink . ' target="_blank">',
'[1]' => '<a class="link" href=' . $maintenanceLink . ' target="_blank">',
'[/1]' => '</a>',
];
} else {
Expand Down
83 changes: 63 additions & 20 deletions storybook/stories/components/CheckRequirements.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,28 +37,71 @@ export const Default = {
requirements: {
requirements_ok: true,
errors: [
'Your current PHP version isn\'t compatible with PrestaShop 9.0.0. (Expected: 8.1 - 8.3 | Current: 8.0)',
'Your store\'s root directory xxx isn\'t writable. Provide write access to the user running PHP with appropriate permission & ownership.',
'The "/admin/autoupgrade" directory isn\'t writable. Provide write access to the user running PHP with appropriate permission & ownership.',
'PHP\'s "Safe mode" needs to be disabled.',
'Files can\'t be downloaded. Enable PHP\'s "allow_url_fopen" option or install PHP extension "cURL".',
'Missing PHP extension "zip".',
'Maintenance mode needs to be enabled. Enable maintenance mode and add your maintenance IP in Shop parameters > General > Maintenance.',
'PrestaShop\'s caching features needs to be disabled. Disable caching features in Advanced parameters > Performance > Caching',
'PHP\'s max_execution_time setting needs to have a high value or needs to be disabled entirely (current value: 15 seconds)',
'Apache mod_rewrite needs to be enabled.',
'The following PHP extensions needs to be installed: curl, dom, fileinfo, gd',
'The following PHP functions needs to be allowed: fopen, fclose, fread, fwrite',
'PHP memory_limit needs to be greater than 256 MB.',
'PHP file_uploads configuration needs to be enabled.',
'Unable to generate private keys using openssl_pkey_new. Check your OpenSSL configuration, especially the path to openssl.cafile.',
'It\'s not possible to write in the following folders: xxx, yyy, zzz. Provide write access to the user running PHP with appropriate permission & ownership.',
'The version of PrestaShop does not match the one stored in database. Your database structure may not be up-to-date and/or the value of PS_VERSION_DB needs to be updated in the configuration table.',
{
message: 'Your current PHP version isn\'t compatible with PrestaShop 9.0.0. (Expected: 8.1 - 8.3 | Current: 8.0)'
},
{
message: 'Your store\'s root directory xxx isn\'t writable. Provide write access to the user running PHP with appropriate permission & ownership.'
},
{
message: 'The "/admin/autoupgrade" directory isn\'t writable. Provide write access to the user running PHP with appropriate permission & ownership.'
},
{
message: 'PHP\'s "Safe mode" needs to be disabled.'
},
{
message: 'Files can\'t be downloaded. Enable PHP\'s "allow_url_fopen" option or install PHP extension "cURL".'
},
{
message: 'Missing PHP extension "zip".'
},
{
message: 'Maintenance mode needs to be enabled. Enable maintenance mode and add your maintenance IP in Shop parameters > General > Maintenance.'
},
{
message: 'PrestaShop\'s caching features needs to be disabled. Disable caching features in Advanced parameters > Performance > Caching'
},
{
message: 'PHP\'s max_execution_time setting needs to have a high value or needs to be disabled entirely (current value: 15 seconds)'
},
{
message: 'Apache mod_rewrite needs to be enabled.'
},
{
message: 'The following PHP extensions needs to be installed: ',
list: ['curl', 'dom', 'fileinfo', 'gd']
},
{
message: 'The following PHP functions needs to be allowed: ',
list: ['fopen', 'fclose', 'fread', 'fwrite']
},
{
message: 'PHP memory_limit needs to be greater than 256 MB.'
},
{
message: 'PHP file_uploads configuration needs to be enabled.'
},
{
message: 'Unable to generate private keys using openssl_pkey_new. Check your OpenSSL configuration, especially the path to openssl.cafile.'
},
{
message: 'It\'s not possible to write in the following folders: ',
list: ['xxx', 'yyy', 'zzz']
},
{
message: 'The version of PrestaShop does not match the one stored in database. Your database structure may not be up-to-date and/or the value of PS_VERSION_DB needs to be updated in the configuration table.'
}
],
warnings: [
'Your current version of the module is out of date. Update now Modules > Module Manager > Updates',
'We were unable to check your PHP compatibility with PrestaShop 9.0.0',
'Some core files have been altered, customization made on these files will be lost during the update. See the list in Advanced parameters > Information',
{
message: 'Your current version of the module is out of date. Update now Modules > Module Manager > Updates'
},
{
message: 'We were unable to check your PHP compatibility with PrestaShop 9.0.0'
},
{
message: 'Some core files have been altered, customization made on these files will be lost during the update. See the list in Advanced parameters > Information'
}
],
},
},
Expand Down

0 comments on commit db4e3dc

Please sign in to comment.