From a94ba72e6646ceb6d11684a2ed123c7c30c8773b Mon Sep 17 00:00:00 2001 From: Alexander Kellner Date: Thu, 22 Feb 2024 15:14:45 +0100 Subject: [PATCH] [FEATURE] Add site filter for Analysis/Content --- Classes/Controller/AnalysisController.php | 1 - .../DataProvider/DomainDataProvider.php | 3 -- .../DataProvider/LanguagesDataProvider.php | 3 -- .../Domain/Repository/PagevisitRepository.php | 4 +-- .../Partials/Filter/Analysis/Content.html | 30 +++++++++---------- 5 files changed, 17 insertions(+), 24 deletions(-) diff --git a/Classes/Controller/AnalysisController.php b/Classes/Controller/AnalysisController.php index ff9a3c4b..50158241 100644 --- a/Classes/Controller/AnalysisController.php +++ b/Classes/Controller/AnalysisController.php @@ -106,7 +106,6 @@ public function contentAction(FilterDto $filter, string $export = ''): ResponseI 'downloads' => $this->downloadRepository->findCombinedByHref($filter), 'languageData' => GeneralUtility::makeInstance(LanguagesDataProvider::class, $filter), 'domainData' => GeneralUtility::makeInstance(DomainDataProvider::class, $filter), - 'domains' => $this->pagevisitsRepository->getAllDomains($filter), ]); $this->addDocumentHeaderForCurrentController(); diff --git a/Classes/Domain/DataProvider/DomainDataProvider.php b/Classes/Domain/DataProvider/DomainDataProvider.php index 607b6c88..d16d8500 100644 --- a/Classes/Domain/DataProvider/DomainDataProvider.php +++ b/Classes/Domain/DataProvider/DomainDataProvider.php @@ -3,7 +3,6 @@ declare(strict_types=1); namespace In2code\Lux\Domain\DataProvider; -use Doctrine\DBAL\DBALException; use Doctrine\DBAL\Driver\Exception as ExceptionDbalDriver; use In2code\Lux\Domain\Repository\PagevisitRepository; use In2code\Lux\Utility\LocalizationUtility; @@ -27,7 +26,6 @@ class DomainDataProvider extends AbstractDataProvider * ] * * @return void - * @throws DBALException * @throws ExceptionDbalDriver */ public function prepareData(): void @@ -41,7 +39,6 @@ public function prepareData(): void /** * @return array - * @throws DBALException * @throws ExceptionDbalDriver */ protected function getDomains(): array diff --git a/Classes/Domain/DataProvider/LanguagesDataProvider.php b/Classes/Domain/DataProvider/LanguagesDataProvider.php index aec13190..2fe04610 100644 --- a/Classes/Domain/DataProvider/LanguagesDataProvider.php +++ b/Classes/Domain/DataProvider/LanguagesDataProvider.php @@ -3,7 +3,6 @@ declare(strict_types=1); namespace In2code\Lux\Domain\DataProvider; -use Doctrine\DBAL\DBALException; use Doctrine\DBAL\Driver\Exception as ExceptionDbalDriver; use In2code\Lux\Domain\Repository\LanguageRepository; use In2code\Lux\Domain\Repository\PagevisitRepository; @@ -28,7 +27,6 @@ class LanguagesDataProvider extends AbstractDataProvider * ] * * @return void - * @throws DBALException * @throws ExceptionDbalDriver */ public function prepareData(): void @@ -42,7 +40,6 @@ public function prepareData(): void /** * @return array - * @throws DBALException * @throws ExceptionDbalDriver */ protected function getLanguagesFromSystem(): array diff --git a/Classes/Domain/Repository/PagevisitRepository.php b/Classes/Domain/Repository/PagevisitRepository.php index 5cbad4ea..da964df3 100644 --- a/Classes/Domain/Repository/PagevisitRepository.php +++ b/Classes/Domain/Repository/PagevisitRepository.php @@ -386,7 +386,7 @@ public function getDomainsWithAmountOfVisits(FilterDto $filter): array . ' left join ' . Visitor::TABLE_NAME . ' v on v.uid = pv.visitor' . ' left join ' . Categoryscoring::TABLE_NAME . ' cs on v.uid = cs.visitor' . ' where pv.domain!="" ' . $this->extendWhereClauseWithFilterTime($filter, true, 'pv') - . $this->extendWhereClauseWithFilterDomain($filter, 'pv') + . $this->extendWhereClauseWithFilterSite($filter, 'pv') . $this->extendWhereClauseWithFilterScoring($filter, 'v') . $this->extendWhereClauseWithFilterCategoryScoring($filter, 'cs') . ' group by domain order by count desc'; @@ -432,7 +432,7 @@ public function getAllLanguages(FilterDto $filter): array . ' left join ' . Visitor::TABLE_NAME . ' v on v.uid = pv.visitor' . ' left join ' . Categoryscoring::TABLE_NAME . ' cs on v.uid = cs.visitor' . ' where ' . $this->extendWhereClauseWithFilterTime($filter, false, 'pv') - . $this->extendWhereClauseWithFilterDomain($filter, 'pv') + . $this->extendWhereClauseWithFilterSite($filter, 'pv') . $this->extendWhereClauseWithFilterScoring($filter, 'v') . $this->extendWhereClauseWithFilterCategoryScoring($filter, 'cs') . ' group by pv.language order by count desc '; diff --git a/Resources/Private/Partials/Filter/Analysis/Content.html b/Resources/Private/Partials/Filter/Analysis/Content.html index 9206a6ff..87d2a5bb 100644 --- a/Resources/Private/Partials/Filter/Analysis/Content.html +++ b/Resources/Private/Partials/Filter/Analysis/Content.html @@ -79,21 +79,21 @@
f:count()} > 0"> -
- - - Domain - - - {domain} - - - -
- +
+ + +