Skip to content

Commit

Permalink
Move system requirements check to AdminBundle (#14780)
Browse files Browse the repository at this point in the history
* Moved the System Requirements check from SystemInfoBundle

* Update Docs

* Improve Doc
  • Loading branch information
aryaantony92 authored Mar 28, 2023
1 parent 944cd37 commit 9e16d23
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 316 deletions.
11 changes: 0 additions & 11 deletions bundles/SystemInfoBundle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,3 @@ Zend OPcache information, showing statistics, settings and cached files, and pro
for the cache information.

You can check via Admin UI `Tools` / `System Info & Tools` / `PHP OPcache Status` menu.

### System Requirements Check
A tool that gives you an overview of required and optional system requirements for running Pimcore Application.

You can check via Admin UI `Tools` / `System Info & Tools` / `System-Requirements Check` menu.

Or via following CLI command:

```bash
bin/console pimcore:system:requirements:check
```
5 changes: 0 additions & 5 deletions bundles/SystemInfoBundle/config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,3 @@ services:
resource: '../src/Controller'
public: true
tags: [ 'controller.service_arguments' ]

# auto-register all commands as services
Pimcore\Bundle\SystemInfoBundle\Command\:
resource: '../src/Command'
tags: [ 'console.command' ]
4 changes: 0 additions & 4 deletions bundles/SystemInfoBundle/public/css/icons.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
background: url(/bundles/pimcoreadmin/img/flat-color-icons/php.svg) center center no-repeat !important;
}

.pimcore_icon_systemrequirements {
background: url(/bundles/pimcoreadmin/img/flat-color-icons/factory.svg) center center no-repeat !important;
}

.pimcore_icon_reports {
background: url(/bundles/pimcoreadmin/img/flat-color-icons/pie_chart.svg) center center no-repeat !important;
}
20 changes: 3 additions & 17 deletions bundles/SystemInfoBundle/public/js/startup.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ pimcore.bundle.system_info.startup = Class.create({
},

addSystemInfoMenu: function (menu) {
let that = this;
const items = [];
const user = pimcore.globalmanager.get('user');
const perspectiveConfig = pimcore.globalmanager.get("perspective");
Expand All @@ -28,7 +29,7 @@ pimcore.bundle.system_info.startup = Class.create({
text: t('bundle_systemInfo_php_info'),
iconCls: 'pimcore_nav_icon_php',
itemId: 'pimcore_menu_extras_system_info_php_info',
handler: this.showPhpInfo,
handler: that.showPhpInfo,
priority: 10,
});
}
Expand All @@ -38,20 +39,10 @@ pimcore.bundle.system_info.startup = Class.create({
text: t('bundle_systemInfo_php_opcache_status'),
iconCls: 'pimcore_nav_icon_reports',
itemId: 'pimcore_menu_extras_system_info_php_opcache_status',
handler: this.showOpcacheStatus,
handler: that.showOpcacheStatus,
priority: 20,
});
}

if (perspectiveConfig.inToolbar('extras.systemtools.requirements')) {
menu.extras.items[index].menu.items.push({
text: t('bundle_systemInfo_system_requirements_check'),
iconCls: 'pimcore_nav_icon_systemrequirements',
itemId: 'pimcore_menu_extras_system_info_system_requirements_check',
handler: this.showSystemRequirementsCheck,
priority: 30,
});
}
}
});
}
Expand All @@ -66,11 +57,6 @@ pimcore.bundle.system_info.startup = Class.create({
showOpcacheStatus: function () {
pimcore.helpers.openGenericIframeWindow("opcachestatus", Routing.generate('pimcore_bundle_systeminfo_opcache_index'), "pimcore_icon_reports", "PHP OPcache Status");
},

showSystemRequirementsCheck: function () {
pimcore.helpers.openGenericIframeWindow("systemrequirementscheck", Routing.generate('pimcore_bundle_systeminfo_settings_installcheck'), "pimcore_icon_systemrequirements", "System-Requirements Check");
},

});

var bundle_system_info = new pimcore.bundle.system_info.startup();
116 changes: 0 additions & 116 deletions bundles/SystemInfoBundle/src/Command/RequirementsCheckCommand.php

This file was deleted.

21 changes: 0 additions & 21 deletions bundles/SystemInfoBundle/src/Controller/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,25 +56,4 @@ public function phpinfoAction(Request $request, ?Profiler $profiler): Response

return new Response($content);
}

/**
* @Route("/install-check", name="pimcore_bundle_systeminfo_settings_installcheck", methods={"GET", "POST"})
*
* @param Request $request
* @param Connection $db
* @param Profiler|null $profiler
*
* @return Response
*/
public function checkAction(Request $request, Connection $db, ?Profiler $profiler): Response
{
if ($profiler) {
$profiler->disable();
}

$viewParams = Requirements::checkAll($db);
$viewParams['headless'] = $request->query->getBoolean('headless') || $request->request->getBoolean('headless');

return $this->render('@PimcoreSystemInfo/admin/install/check.html.twig', $viewParams);
}
}
141 changes: 0 additions & 141 deletions bundles/SystemInfoBundle/templates/admin/install/check.html.twig

This file was deleted.

1 change: 0 additions & 1 deletion bundles/SystemInfoBundle/translations/admin.en.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
bundle_systemInfo_php_opcache_status: PHP OPcache status
bundle_systemInfo_system_requirements_check: System-Requirements Check
bundle_systemInfo_php_info: PHP Info

0 comments on commit 9e16d23

Please sign in to comment.