Skip to content

Commit

Permalink
Merge pull request #35 from section-io/magento-update-2-3-2
Browse files Browse the repository at this point in the history
2.3.2 support
  • Loading branch information
Nicholas Roberts committed Sep 18, 2019
2 parents 8276c15 + 925faa2 commit 529ae46
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Block/Adminhtml/Report/Edit/Tab/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ protected function _prepareForm()
'vcl_lbl',
'note',
[
'text' => $this->helper->getCopy('management:configure-application:vcl-explanation', 'Update Varnish Configuration with section.io. It will update and apply configuration in the <strong>Production branch</strong>.')
'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>.')
]
);
$managementFieldset->addField(
Expand Down
24 changes: 12 additions & 12 deletions Block/Adminhtml/Report/Edit/Tabs.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,18 @@ protected function _beforeToHtml()
->getFirstItem()
->getData('id');
// only show tab if default account_id and application_id exist
if ($account_id and $application_id) {
$this->addTab(
'report_edit_tabs_metrics',
[
'label' => __('View Site Metrics'),
'title' => __('View Site Metrics'),
'content' => $this->getLayout()->createBlock(
'Sectionio\Metrics\Block\Adminhtml\Report\Edit\Tab\Metrics'
)->toHtml()
]
);
}
// if ($account_id and $application_id) {
// $this->addTab(
// 'report_edit_tabs_metrics',
// [
// 'label' => __('View Site Metrics'),
// 'title' => __('View Site Metrics'),
// 'content' => $this->getLayout()->createBlock(
// 'Sectionio\Metrics\Block\Adminhtml\Report\Edit\Tab\Metrics'
// )->toHtml()
// ]
// );
// }

return parent::_beforeToHtml();
}
Expand Down
2 changes: 1 addition & 1 deletion Console/Command/UpdateVclCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
/** Extract the generated VCL code appropriate for their version*/
$vcl = $this->helper->getCorrectVCL($this->pageCacheConfig, $major_release);

$result = $this->aperture->updateProxyConfiguration($account_id, $application_id, $environment_name, $proxy_name, $vcl, 'MagentoTurpentine');
$result = $this->aperture->updateProxyConfiguration($account_id, $application_id, $environment_name, $proxy_name, $vcl, 'Magento2');

if ($result['http_code'] == 200) {
$output->writeln('You have successfully updated varnish configuration.');
Expand Down
2 changes: 1 addition & 1 deletion Controller/Adminhtml/Report/Save.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public function updateVarnishConfiguration()
/** Extract the generated VCL code appropriate for their version*/
$vcl = $this->helper->getCorrectVCL($this->pageCacheConfig, $major_release);

$result = $this->aperture->updateProxyConfiguration($account_id, $application_id, $environment_name, 'varnish', $vcl, 'MagentoTurpentine');
$result = $this->aperture->updateProxyConfiguration($account_id, $application_id, $environment_name, 'varnish', $vcl, 'Magento2');

if ($result['http_code'] == 200) {
$this->messageManager->addSuccess(__('You have successfully updated varnish configuration.'));
Expand Down
2 changes: 1 addition & 1 deletion Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ public function updateApplication($account_id, $id, $application_name)
$model->setData('account_id', $account_id);
$model->setData('application_id', $id);
$model->setData('application_name', $application_name);
$model->setData('is_active', '0');
$model->setData('is_active', '1');
// save application
$model->save();
}
Expand Down

0 comments on commit 529ae46

Please sign in to comment.