Skip to content

Commit ed6dfb0

Browse files
committed
add user display for module conflict
1 parent 81fe87b commit ed6dfb0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Block/Adminhtml/Report/Edit/Tab/Settings.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ class Settings extends Generic implements TabInterface
1616
protected $accountFactory;
1717
/** @var \Sectionio\Metrics\Model\ApplicationFactory $applicationFactory */
1818
protected $applicationFactory;
19+
/** @var \Magento\Framework\Module\Manager $moduleManager */
20+
protected $moduleManager;
1921
// var \Sectionio\Metrics\Helper\Data $helper
2022
protected $helper;
2123
// var \Sectionio\Metrics\Helper\Status $state
@@ -50,6 +52,7 @@ public function __construct(
5052
\Sectionio\Metrics\Helper\State $state,
5153
\Magento\Backend\Model\UrlInterface $urlBuilder,
5254
\Magento\PageCache\Model\Config $pageCacheConfig,
55+
\Magento\Framework\Module\Manager $moduleManager,
5356
array $data = []
5457
) {
5558
parent::__construct($context, $registry, $formFactory, $data);
@@ -61,6 +64,7 @@ public function __construct(
6164
$this->urlBuilder = $urlBuilder;
6265
$this->pageCacheConfig = $pageCacheConfig;
6366
$this->logger = $context->getLogger();
67+
$this->moduleManager = $moduleManager;
6468
$this->setUseContainer(true);
6569
}
6670

@@ -216,11 +220,12 @@ protected function _prepareForm()
216220
);
217221

218222
//Varnish Configuration
223+
219224
$managementFieldset->addField(
220225
'vcl_lbl',
221226
'note',
222227
[
223-
'text' => $this->helper->getCopy('management:configure-application:vcl-explanation', 'Upload Varnish Configuration to section.io. <u><strong style="color:red;font-size:16px;">NOTE: This will overwrite your default.vcl!</strong></u> The changes will be shown in the git log, and are revertable, but your current default.vcl will be entirely overwritten. This is intended to be a step to set up your website. It will update and apply configuration in the <strong>Production branch</strong>.')
228+
'text' => $this->helper->getCopy('management:configure-application:vcl-explanation', ($this->moduleManager->isEnabled('Magento_CacheInvalidate') ? "Magento_CacheInvalidate is active. <b>Disable it unless you are also running a local instance of varnish.</b><pre>root@magento:/var/www/html# /bin/magento module:disable Magento_CacheInvalidate</pre>" : "Magento_CacheInvalidate is <b>not active</b>. Will only purge on Section, not local cache. (this is proper for most configurations)") . '<br><br>Upload Varnish Configuration to section.io. <u><strong style="color:red;font-size:16px;">NOTE: This will overwrite your default.vcl!</strong></u> The changes will be shown in the git log, and are revertable, but your current default.vcl will be entirely overwritten. This is intended to be a step to set up your website. It will update and apply configuration in the <strong>Production branch</strong>.')
224229
]
225230
);
226231
$managementFieldset->addField(

0 commit comments

Comments
 (0)