From 09185b80951bc91c189c21ad7fe6c279c2ca15e0 Mon Sep 17 00:00:00 2001 From: amadulhaxxani Date: Tue, 25 Nov 2025 16:53:07 +0100 Subject: [PATCH] Remove Clarin Matomo statistics component Deleted the ClarinMatomoStatisticsComponent and its related files, removed its route and module declaration, and cleaned up i18n keys associated with Matomo statistics. This streamlines the codebase by eliminating unused statistics functionality. (cherry picked from commit 1167e194c6291de43142644615fa6c2141856e6b) (cherry picked from commit 812c6e1594376bf0e2b22917005034eba0087e7f) --- .../clarin-matomo-statistics.component.html | 50 -- .../clarin-matomo-statistics.component.scss | 80 --- .../clarin-matomo-statistics.component.ts | 547 ------------------ .../clarin-statistics-button.component.html | 8 - .../clarin-statistics-button.component.scss | 3 - .../clarin-statistics-button.component.ts | 41 -- src/app/item-page/item-page-routing-paths.ts | 2 - src/app/item-page/item-page-routing.module.ts | 10 +- src/app/item-page/item-page.module.ts | 4 - src/assets/i18n/cs.json5 | 9 - src/assets/i18n/de.json5 | 12 - src/assets/i18n/en.json5 | 6 - src/assets/i18n/it.json5 | 12 - 13 files changed, 1 insertion(+), 783 deletions(-) delete mode 100644 src/app/item-page/clarin-matomo-statistics/clarin-matomo-statistics.component.html delete mode 100644 src/app/item-page/clarin-matomo-statistics/clarin-matomo-statistics.component.scss delete mode 100644 src/app/item-page/clarin-matomo-statistics/clarin-matomo-statistics.component.ts delete mode 100644 src/app/item-page/clarin-statistics-button/clarin-statistics-button.component.html delete mode 100644 src/app/item-page/clarin-statistics-button/clarin-statistics-button.component.scss delete mode 100644 src/app/item-page/clarin-statistics-button/clarin-statistics-button.component.ts diff --git a/src/app/item-page/clarin-matomo-statistics/clarin-matomo-statistics.component.html b/src/app/item-page/clarin-matomo-statistics/clarin-matomo-statistics.component.html deleted file mode 100644 index 4e1e768abf7..00000000000 --- a/src/app/item-page/clarin-matomo-statistics/clarin-matomo-statistics.component.html +++ /dev/null @@ -1,50 +0,0 @@ -
-
- - {{'item.matomo-statistics.info.message' | translate}} -
-
- - -
-
- {{chartMessage}} - -
-
- - -
-
- - - Filewise Statistics - - - - - - - -
{{fileData.value}}{{fileData.key}}
-
-
diff --git a/src/app/item-page/clarin-matomo-statistics/clarin-matomo-statistics.component.scss b/src/app/item-page/clarin-matomo-statistics/clarin-matomo-statistics.component.scss deleted file mode 100644 index 1356931036e..00000000000 --- a/src/app/item-page/clarin-matomo-statistics/clarin-matomo-statistics.component.scss +++ /dev/null @@ -1,80 +0,0 @@ -.alert-info { - color: #3a87ad; - background-color: #d9edf7; - border-color: #bce8f1; -} - -.clarin-chart-button { - cursor: pointer; - border: 1px solid; - border-radius: 4px 4px 0 0; -} - -.clarin-chart-downloads { - color: #1f78b4; -} - -.clarin-chart-views { - color: #60a22a; -} - -.clarin-chart-downloads-clicked { - background-color: #207698; - color: whitesmoke; - border-bottom: none; -} - -.clarin-chart-views-clicked { - background-color: #92C642; - color: whitesmoke; - border-bottom: none; -} - -.clarin-chart-button:hover { - //background-color: var(--ds-breadcrumb-bg); - color: whitesmoke; -} - -.clarin-chart-views-clicked:hover { - background-color: transparent; - color: #60a22a; -} - -.clarin-chart-downloads-clicked:hover { - background-color: transparent; - color: #1f78b4; -} - -.clarin-bottom-line { - border-bottom: 1px solid #ddd; -} - -.btn-success:hover { - color: #fff !important; - background-color: #7ba739 !important; - border-color: #92C642 !important; -} - -.btn-success { - color: #fff !important; - background-color: #92C642 !important; - border-color: #92C642 !important; -} - -.chart-message { - background-color: #5bc0de; - color: white; -} - -.clarin-btn-back { - color: #fff; - background-color: #428bca; - border-color: #357ebd; -} - -.clarin-btn-back:hover { - //color: #fff; - background-color: #2e6391; - //border-color: #357ebd; -} - diff --git a/src/app/item-page/clarin-matomo-statistics/clarin-matomo-statistics.component.ts b/src/app/item-page/clarin-matomo-statistics/clarin-matomo-statistics.component.ts deleted file mode 100644 index 8f73e51e766..00000000000 --- a/src/app/item-page/clarin-matomo-statistics/clarin-matomo-statistics.component.ts +++ /dev/null @@ -1,547 +0,0 @@ -import { Component, OnInit, ViewChild } from '@angular/core'; -import { ChartConfiguration } from 'chart.js'; -import { BaseChartDirective } from 'ng2-charts'; -import { HttpClient } from '@angular/common/http'; -import { ConfigurationDataService } from '../../core/data/configuration-data.service'; -import { isNull, isUndefined } from '../../shared/empty.util'; -import { BehaviorSubject } from 'rxjs'; -import { getFirstSucceededRemoteData } from '../../core/shared/operators'; -import { map } from 'rxjs/operators'; -import { ActivatedRoute } from '@angular/router'; -import { RemoteData } from '../../core/data/remote-data'; -import { Item } from '../../core/shared/item.model'; - -@Component({ - selector: 'ds-clarin-matomo-statistics', - templateUrl: './clarin-matomo-statistics.component.html', - styleUrls: ['./clarin-matomo-statistics.component.scss'] -}) -export class ClarinMatomoStatisticsComponent implements OnInit { - - constructor(protected http: HttpClient, - private configurationService: ConfigurationDataService, - protected route: ActivatedRoute) { - } - - @ViewChild(BaseChartDirective, { static: true }) chart: BaseChartDirective; - - itemRD$: BehaviorSubject = new BehaviorSubject(null); - - // Month shortcut with full name - public months = [ - ['Jan', 'January'], - ['Feb', 'February'], - ['Mar', 'March'], - ['Apr', 'April'], - ['May', 'May'], - ['Jun', 'June'], - ['Jul', 'July'], - ['Aug', 'August'], - ['Sep', 'September'], - ['Oct', 'October'], - ['Nov', 'November'], - ['Dec', 'December'] - ]; - - public periodMonth = 'month'; - public periodYear = 'year'; - public periodDay = 'day'; - - public actualPeriod = ''; - private periodSequence = ['year', 'month', 'day']; - - public actualYear = ''; - public actualMonth = ''; - - public chartMessage = ''; - public chartLabels: ChartConfiguration<'line'>['data'] = { - labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], - datasets: [ - { - data: [], - label: 'Views', - backgroundColor: '#9ee37d', - borderColor: '#358600', - pointBackgroundColor: '#1f6200', - hidden: false, - }, - { - data: [], - label: 'Downloads', - backgroundColor: '#51b9f2', - borderColor: '#336ab5', - pointBackgroundColor: '#124a94', - hidden: false, - } - ], - - - }; - // public chartLabels: Label[] = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; - - // `lineTension: 0` = straight lines - // public chartData: ChartDataSets[] = [ - // { - // data: [], - // label: 'Views', - // backgroundColor: '#9ee37d', - // borderColor: '#358600', - // pointBackgroundColor: '#1f6200', - // hidden: false, - // lineTension: 0 - // }, - // { - // data: [], - // label: 'Downloads', - // backgroundColor: '#51b9f2', - // borderColor: '#336ab5', - // pointBackgroundColor: '#124a94', - // hidden: false, - // lineTension: 0 - // } - // ]; - - public color = '#27496d'; - public chartOptions: ChartConfiguration['options'] = { - scales: { - x: { - grid: { - color: this.color - }, - ticks: { - color: '#00a8cc' - }, - }, - y:{ - grid: { - color: this.color - }, - ticks: { - color: this.color - } - } - } - }; - - public viewsButtonClicked = true; - public downloadsButtonClicked = true; - - public filesDownloads: BehaviorSubject<{ [name: string]: number }> = new BehaviorSubject({}); - - - ngOnInit(): void { - this.route.data.pipe( - map((data) => data.dso as RemoteData)) - .subscribe(data => { - this.itemRD$.next(data?.payload); - }); - - this.actualPeriod = this.periodYear; - this.fetchDataAndUpdateChart(undefined); - } - - private getActualPeriodIndex() { - let actualPeriodIndex = 0; - this.periodSequence.forEach((per, index) => { - if (per === this.actualPeriod) { - actualPeriodIndex = index; - } - }); - return actualPeriodIndex; - } - - back() { - this.setToPreviousPeriod(); - this.fetchDataAndUpdateChart(undefined); - } - // 0 = year, 1 = month, 2 = day - private setToPreviousPeriod() { - let actualPeriodIndex = this.getActualPeriodIndex(); - if (actualPeriodIndex === 0) { - // The actual period is year period - there is no way back - return; - } - - this.actualPeriod = this.periodSequence[--actualPeriodIndex]; - } - - // 0 = year, 1 = month, 2 = day - private setToNextPeriod() { - let actualPeriodIndex = this.getActualPeriodIndex(); - if (actualPeriodIndex === 2 ) { - // The actual period is year period - there is no way back - return; - } - - this.actualPeriod = this.periodSequence[++actualPeriodIndex]; - } - - // Hide/Show the dataset - toggleDownload() { - const index = 1; - this.toggleDatasetHidden(index); - this.downloadsButtonClicked = !this.downloadsButtonClicked; - } - - toggleViews() { - const index = 0; - this.toggleDatasetHidden(index); - this.viewsButtonClicked = !this.viewsButtonClicked; - } - - toggleDatasetHidden(index) { - this.chart.datasets[index].hidden = !this.chart.datasets[index].hidden; - this.chart.update(); - } - - generateNumber(): number { - return Math.floor((Math.random())); - } - - chartClicked({ event, active }: { event?: any, active?: {}[] }): void { - // @ts-ignore - const clickedLabelIndex = active[0]?._index; - - // The label value wasn;t clicked - if (isUndefined(clickedLabelIndex)) { - return; - } - const labelValue = this.chartLabels[clickedLabelIndex]; - - this.setToNextPeriod(); - this.fetchDataAndUpdateChart(labelValue); - } - - private getCacheServerURI(): Promise { - return this.configurationService.findByPropertyName('statistics.cache-server.uri') - .pipe(getFirstSucceededRemoteData()).toPromise(); - } - - async getStatisticsDataFromCacheServer(parametersURI): Promise { - const cacheServerURI = await this.getCacheServerURI() - .then(res => { - return res.payload?.values?.[0]; - }); - - if (isUndefined(cacheServerURI)) { - console.error('Cannot load the cache-server URI'); - return; - } - - return this.http.get(cacheServerURI + parametersURI) - .pipe().toPromise(); - } - - async fetchAndProcessYearsStatistics() { - // Get statistics data from the cache server - const response = await this.getStatisticsDataFromCacheServer('?h=' + this.itemRD$.value.handle + '&period=year') - .then(res => { - return res; - }); - - if (isUndefined(response) || isNull(response)) { - console.error('Cannot get the cache-server statistics data.'); - return; - } - - // Get views - const views = response?.views; - // Get downloads - const downloads = response?.downloads; - - if (isUndefined(views) || isUndefined(downloads) || isNull(views) || isNull(downloads)) { - console.error('The response does not contains the `views` or `downloads` property.'); - return; - } - - // Get labels - year values - const labelYears = Object.keys(views); - - // If the item has statistics only for one year show the month statistics - if (labelYears.length === 1) { - this.setToNextPeriod(); - this.fetchDataAndUpdateChart(undefined); - } - - // Remove `total` from views and downloads - const totalIndex = labelYears.indexOf('total'); - labelYears.splice(totalIndex, 1); - - // Get views data - const totalDataViews = []; - Object.values(views?.total).forEach((viewData: {}) => { - // Get only years data - // @ts-ignore - if (isUndefined(viewData?.nb_hits)) { - return; - } - // @ts-ignore - totalDataViews.push(viewData?.nb_hits); - }); - - // Get downloads data - const totalDataDownloads = []; - Object.values(downloads?.total).forEach((downloadData: {}) => { - // Get only years data - // @ts-ignore - if (isUndefined(downloadData?.nb_hits)) { - return; - } - // @ts-ignore - totalDataDownloads.push(downloadData?.nb_hits); - }); - - // Get download files data - // Go through download statistics and count occurrences of the file downloading - const filesDownloadsResponse = response.downloads; - const filesDownloads = this.countFileDownloads(filesDownloadsResponse); - this.filesDownloads.next(filesDownloads); - - this.updateChartData(labelYears, totalDataViews, totalDataDownloads); - } - - async fetchAndProcessMonthsStatistics() { - // Get statistics data from the cache server - const response = await this.getStatisticsDataFromCacheServer('?h=' + this.itemRD$.value.handle + '&period=month&date=' + this.actualYear) - .then(res => { - return res; - }); - - if (isUndefined(response) || isNull(response)) { - console.error('Cannot get the cache-server statistics data.'); - return; - } - - // Get views - const views = response?.views; - // Get downloads - const downloads = response?.downloads; - - if (isUndefined(views) || isUndefined(downloads) || isNull(views) || isNull(downloads)) { - console.error('The response does not contains the `views` or `downloads` property.'); - return; - } - - // Get month labels - const monthLabels = []; - // Month are in the format `[['Feb', 'February']] - this.months.forEach(monthArray => { - // Add shortcut of the the month to the label. - monthLabels.push(monthArray[0]); - }); - - // Get views data - const totalDataViews = []; - const totalDataDownloads = []; - - const viewsForActualYear = views?.total?.[this.actualYear]; - const downloadsForActualYear = downloads?.total?.[this.actualYear]; - this.months.forEach((month, index) => { - // The months are indexed from 1 to 12, not from 0 to 11 - let increasedIndex = index; - increasedIndex++; - - // View Data - const monthViewData = viewsForActualYear?.['' + increasedIndex]; - if (isUndefined(monthViewData) || isUndefined(monthViewData?.nb_hits)) { - totalDataViews.push(0); - } else { - // @ts-ignore - totalDataViews.push(monthViewData?.nb_hits); - } - - // Download Data - const monthDownloadData = downloadsForActualYear?.['' + increasedIndex]; - if (isUndefined(monthDownloadData) || isUndefined(monthDownloadData?.nb_hits)) { - totalDataDownloads.push(0); - } else { - // @ts-ignore - totalDataDownloads.push(monthDownloadData?.nb_hits); - } - }); - - // Get download files data - // Go through download statistics and count occurrences of the file downloading for the actual year - const filesDownloadsResponse = response.downloads[this.actualYear]; - const filesDownloads = this.countFileDownloads(filesDownloadsResponse); - this.filesDownloads.next(filesDownloads); - - this.updateChartData(monthLabels, totalDataViews, totalDataDownloads); - } - - async fetchAndProcessDaysStatistics() { - const actualMonthIndex: number = this.getActualMonthIndex(); - - // Get statistics data from the cache server - const response = await this.getStatisticsDataFromCacheServer('?h=' + this.itemRD$.value.handle + '&period=day&date=' + this.actualYear + '-' + actualMonthIndex) - .then(res => { - return res; - }); - - if (isUndefined(response) || isNull(response)) { - console.error('Cannot get the cache-server statistics data.'); - return; - } - - // Get views - const actualDayViews = response.views?.total?.[this.actualYear]?.['' + actualMonthIndex]; - const actualDayDownloads = response.downloads?.total?.[this.actualYear]?.['' + actualMonthIndex]; - if (isUndefined(actualDayViews) || isUndefined(actualDayDownloads) || isNull(actualDayViews) || - isNull(actualDayDownloads)) { - console.error('The response does not contains the `views` or `downloads` property.'); - return; - } - - const daysOfActualMonth = new Date(Number(this.actualYear), actualMonthIndex - 1, 0).getDate(); - const totalDataViews = []; - const totalDataDownloads = []; - const daysArray = [...Array(daysOfActualMonth).keys()]; - - daysArray.forEach(day => { - // Days are indexed from 1 to 31, not from 0 - let dayIndex = day; - dayIndex++; - - // View Data - const dayViewData = actualDayViews?.['' + dayIndex]; - if (isUndefined(dayViewData) || isUndefined(dayViewData?.nb_hits)) { - totalDataViews.push(0); - } else { - // @ts-ignore - totalDataViews.push(dayViewData?.nb_hits); - } - - // Download Data - const dayDownloadData = actualDayDownloads?.['' + dayIndex]; - if (isUndefined(dayDownloadData) || isUndefined(dayDownloadData?.nb_hits)) { - totalDataDownloads.push(0); - } else { - // @ts-ignore - totalDataDownloads.push(dayDownloadData?.nb_hits); - } - }); - - // Get download files data - // Go through download statistics and count occurrences of the file downloading for the actual year - const filesDownloadsResponse = response.downloads[this.actualYear]['' + actualMonthIndex]; - const filesDownloads = this.countFileDownloads(filesDownloadsResponse); - this.filesDownloads.next(filesDownloads); - - this.updateChartData(daysArray, totalDataViews, totalDataDownloads); - } - - countFileDownloads(filesDownloadsResponse) { - let filesDownloads: { [name: string]: number } = {}; - Object.keys(filesDownloadsResponse).forEach(year => { - const yearDownloadFilesData = filesDownloadsResponse[year]; - if (year === 'total') { - return; - } - Object.keys(yearDownloadFilesData).forEach(fileName => { - const shortenedFileName = this.getFileNameFromFullURI(fileName); - const actualValue = isUndefined(filesDownloads[shortenedFileName]) ? 0 : filesDownloads[shortenedFileName]; - filesDownloads[shortenedFileName] = actualValue + yearDownloadFilesData[fileName].nb_hits; - }); - }); - - filesDownloads = this.sortByValue(filesDownloads); - return filesDownloads; - } - - getFileNameFromFullURI(fileName) { - if (isUndefined(fileName)) { - return undefined; - } - // Shortened file name - return fileName.substr(fileName.lastIndexOf('/') + 1, fileName.indexOf('handle/')); - } - - sortByValue(dictionary) { - const sortedData: { [name: string]: number } = {}; - Object.keys(dictionary) - .sort((a, b) => (dictionary[a] < dictionary[b] ? 1 : -1)) - .map(x => { - sortedData[x] = dictionary[x]; - }); - return sortedData; - } - - getActualMonthIndex(): number { - let actualMonthIndex = 0; - this.months.forEach((month, index) => { - if (month[0] === this.actualMonth) { - actualMonthIndex = index; - } - }); - - // The month is index from 1 to 12, not from 0 to 11 - actualMonthIndex++; - return actualMonthIndex; - } - - fetchDataAndUpdateChart(labelValue) { - switch (this.actualPeriod) { - case this.periodYear: - this.fetchAndProcessYearsStatistics(); - break; - case this.periodMonth: - this.actualYear = isUndefined(labelValue) ? this.actualYear : labelValue; - this.fetchAndProcessMonthsStatistics(); - break; - case this.periodDay: - this.actualMonth = labelValue; - this.fetchAndProcessDaysStatistics(); - break; - default: - this.fetchAndProcessYearsStatistics(); - break; - } - } - - updateChartMessage(labels) { - const actualPeriodIndex = this.getActualPeriodIndex(); - - this.chartMessage = ''; - // Show years interval - if (actualPeriodIndex === 0) { - // Start year and end year - let lastIndexOfLabels = labels.length; - this.chartMessage += labels[0] + ' - ' + labels[--lastIndexOfLabels]; - } else if (actualPeriodIndex === 1) { - this.chartMessage += this.actualYear; - } else { - this.chartMessage += this.actualMonth + ', ' + this.actualYear; - } - } - - updateChartData(labels, totalDataViews, totalDataDownloads) { - // Update labels - this.removeLabels(); - this.setLabels(labels); - - // Update chart message e.g., `Statistics for years 2022 to 2023`, `Statistics for the year 2022`,.. - this.updateChartMessage(labels); - - if (this.chartLabels.datasets) { - if (this.chartLabels.datasets[0]) { - // Update view data - this.chartLabels.datasets[0].data = totalDataViews; - } - if (this.chartLabels.datasets[1]) { - // Update downloads data - this.chartLabels.datasets[1].data = totalDataDownloads; - } - } - this.chart.update(); - } - - setLabels(labels) { - labels.forEach(label => { - this.chartLabels.labels.push(label); - }); - } - - removeLabels() { - this.chartLabels.labels = []; - } -} diff --git a/src/app/item-page/clarin-statistics-button/clarin-statistics-button.component.html b/src/app/item-page/clarin-statistics-button/clarin-statistics-button.component.html deleted file mode 100644 index fdc68dd4782..00000000000 --- a/src/app/item-page/clarin-statistics-button/clarin-statistics-button.component.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - diff --git a/src/app/item-page/clarin-statistics-button/clarin-statistics-button.component.scss b/src/app/item-page/clarin-statistics-button/clarin-statistics-button.component.scss deleted file mode 100644 index e8b7d689a35..00000000000 --- a/src/app/item-page/clarin-statistics-button/clarin-statistics-button.component.scss +++ /dev/null @@ -1,3 +0,0 @@ -.btn-dark { - background-color: var(--ds-admin-sidebar-bg); -} diff --git a/src/app/item-page/clarin-statistics-button/clarin-statistics-button.component.ts b/src/app/item-page/clarin-statistics-button/clarin-statistics-button.component.ts deleted file mode 100644 index d053311618d..00000000000 --- a/src/app/item-page/clarin-statistics-button/clarin-statistics-button.component.ts +++ /dev/null @@ -1,41 +0,0 @@ -import {Component, Input, OnInit} from '@angular/core'; -import {DSpaceObject} from '../../core/shared/dspace-object.model'; -import {Observable} from 'rxjs'; -import {AuthorizationDataService} from '../../core/data/feature-authorization/authorization-data.service'; -import {FeatureID} from '../../core/data/feature-authorization/feature-id'; - -@Component({ - selector: 'ds-clarin-statistics-button', - templateUrl: './clarin-statistics-button.component.html', - styleUrls: ['./clarin-statistics-button.component.scss'] -}) -export class ClarinStatisticsButtonComponent implements OnInit { - - /** - * The DSpaceObject to display a button to the edit page for - */ - @Input() dso: DSpaceObject; - - /** - * The prefix of the route to the edit page (before the object's UUID, e.g. "items") - */ - @Input() pageRoute: string; - - /** - * A message for the tooltip on the button - * Supports i18n keys - */ - @Input() tooltipMsg: string; - - /** - * Whether or not the current user is authorized to edit the DSpaceObject - */ - isAuthorized$: Observable; - - constructor(protected authorizationService: AuthorizationDataService) { } - - ngOnInit() { - this.isAuthorized$ = this.authorizationService.isAuthorized(FeatureID.CanEditMetadata, this.dso.self); - } - -} diff --git a/src/app/item-page/item-page-routing-paths.ts b/src/app/item-page/item-page-routing-paths.ts index 492381a4cce..0e9f7db7385 100644 --- a/src/app/item-page/item-page-routing-paths.ts +++ b/src/app/item-page/item-page-routing-paths.ts @@ -57,6 +57,4 @@ export const ITEM_EDIT_VERSIONHISTORY_PATH = 'versionhistory'; export const ITEM_VERSION_PATH = 'version'; export const UPLOAD_BITSTREAM_PATH = 'bitstreams/new'; export const ORCID_PATH = 'orcid'; - -export const MATOMO_STATISTICS_PATH = 'matomo-statistics'; export const VIEWS_DOWNLOADS_STATISTICS_PATH = 'views-downloads-statistics'; diff --git a/src/app/item-page/item-page-routing.module.ts b/src/app/item-page/item-page-routing.module.ts index aac0815c073..d6637d6c4a9 100644 --- a/src/app/item-page/item-page-routing.module.ts +++ b/src/app/item-page/item-page-routing.module.ts @@ -9,7 +9,7 @@ import { LinkService } from '../core/cache/builders/link.service'; import { UploadBitstreamComponent } from './bitstreams/upload/upload-bitstream.component'; import { ITEM_EDIT_PATH, - MATOMO_STATISTICS_PATH, ORCID_PATH, + ORCID_PATH, TOMBSTONE_ITEM_PATH, UPLOAD_BITSTREAM_PATH, VIEWS_DOWNLOADS_STATISTICS_PATH @@ -22,7 +22,6 @@ import { MenuItemType } from '../shared/menu/menu-item-type.model'; import { VersionPageComponent } from './version-page/version-page/version-page.component'; import { BitstreamRequestACopyPageComponent } from './bitstreams/request-a-copy/bitstream-request-a-copy-page.component'; import { TombstoneComponent } from './tombstone/tombstone.component'; -import { ClarinMatomoStatisticsComponent } from './clarin-matomo-statistics/clarin-matomo-statistics.component'; import { REQUEST_COPY_MODULE_PATH } from '../app-routing-paths'; import { OrcidPageComponent } from './orcid-page/orcid-page.component'; import { OrcidPageGuard } from './orcid-page/orcid-page.guard'; @@ -84,13 +83,6 @@ import { ViewsDownloadsStatisticsComponent } from './views-downloads-statistics/ path: TOMBSTONE_ITEM_PATH, component: TombstoneComponent }, - { - path: MATOMO_STATISTICS_PATH, - component: ClarinMatomoStatisticsComponent, - resolve: { - dso: ItemPageResolver, - } - }, { path: VIEWS_DOWNLOADS_STATISTICS_PATH, component: ViewsDownloadsStatisticsComponent, diff --git a/src/app/item-page/item-page.module.ts b/src/app/item-page/item-page.module.ts index 31cbb353240..a7f0cb87d98 100644 --- a/src/app/item-page/item-page.module.ts +++ b/src/app/item-page/item-page.module.ts @@ -72,8 +72,6 @@ import { ClarinRefBoxComponent } from './clarin-ref-box/clarin-ref-box.component import { ClarinRefCitationComponent } from './clarin-ref-citation/clarin-ref-citation.component'; import { ClarinRefFeaturedServicesComponent } from './clarin-ref-featured-services/clarin-ref-featured-services.component'; import { ClarinRefCitationModalComponent } from './clarin-ref-citation-modal/clarin-ref-citation-modal.component'; -import { ClarinMatomoStatisticsComponent } from './clarin-matomo-statistics/clarin-matomo-statistics.component'; -import { ClarinStatisticsButtonComponent } from './clarin-statistics-button/clarin-statistics-button.component'; import { NgChartsModule } from 'ng2-charts'; import { ClarinGenericItemFieldComponent } from './simple/field-components/clarin-generic-item-field/clarin-generic-item-field.component'; import { ClarinCollectionsItemFieldComponent } from './simple/field-components/clarin-collections-item-field/clarin-collections-item-field.component'; @@ -150,8 +148,6 @@ const DECLARATIONS = [ ClarinRefCitationComponent, ClarinRefFeaturedServicesComponent, ClarinRefCitationModalComponent, - ClarinMatomoStatisticsComponent, - ClarinStatisticsButtonComponent, ClarinGenericItemFieldComponent, ClarinCollectionsItemFieldComponent, ClarinFilesItemFieldComponent, diff --git a/src/assets/i18n/cs.json5 b/src/assets/i18n/cs.json5 index 937c3706e2a..7d4028d7a66 100644 --- a/src/assets/i18n/cs.json5 +++ b/src/assets/i18n/cs.json5 @@ -9093,12 +9093,6 @@ // "item.page.license.message": ["This item is", "and licensed under:"], "item.page.license.message": ["Tento záznam je", "a je licencován pod licencí:"], - // "item.page.matomo-statistics.views.button": "Views", - "item.page.matomo-statistics.views.button": "Zobrazení", - - // "item.page.matomo-statistics.downloads.button": "Downloads", - "item.page.matomo-statistics.downloads.button": "Stažené", - // "item.page.acknowledgement.project-name": "Project name:", "item.page.acknowledgement.project-name": "Jméno projektu:", @@ -9144,9 +9138,6 @@ // "item.refbox.featured-service.share.message": "Share", "item.refbox.featured-service.share.message": "Sdílet", - // "item.matomo-statistics.info.message": "Click on a data point to summarize by year / month.", - "item.matomo-statistics.info.message": "Kliknutím na datový bod provedete shrnutí podle roku/měsíce.", - // "item.view.box.author.message": "Author(s):", "item.view.box.author.message": "Autoři:", diff --git a/src/assets/i18n/de.json5 b/src/assets/i18n/de.json5 index 041295408d5..50fe3da2e98 100644 --- a/src/assets/i18n/de.json5 +++ b/src/assets/i18n/de.json5 @@ -9161,14 +9161,6 @@ // TODO New key - Add a translation "item.page.license.message": ["This item is", "and licensed under:"], - // "item.page.matomo-statistics.views.button": "Views", - // TODO New key - Add a translation - "item.page.matomo-statistics.views.button": "Views", - - // "item.page.matomo-statistics.downloads.button": "Downloads", - // TODO New key - Add a translation - "item.page.matomo-statistics.downloads.button": "Downloads", - // "item.page.acknowledgement.project-name": "Project name:", // TODO New key - Add a translation "item.page.acknowledgement.project-name": "Project name:", @@ -9229,10 +9221,6 @@ // TODO New key - Add a translation "item.refbox.featured-service.share.message": "Share", - // "item.matomo-statistics.info.message": "Click on a data point to summarize by year / month.", - // TODO New key - Add a translation - "item.matomo-statistics.info.message": "Click on a data point to summarize by year / month.", - // "item.view.box.author.message": "Author(s):", // TODO New key - Add a translation "item.view.box.author.message": "Author(s):", diff --git a/src/assets/i18n/en.json5 b/src/assets/i18n/en.json5 index f2460aa3969..65a46332fb1 100644 --- a/src/assets/i18n/en.json5 +++ b/src/assets/i18n/en.json5 @@ -6026,10 +6026,6 @@ "item.page.license.message": ["This item is", "and licensed under:"], - "item.page.matomo-statistics.views.button": "Views", - - "item.page.matomo-statistics.downloads.button": "Downloads", - "item.page.acknowledgement.project-name": "Project name:", "item.page.acknowledgement.project-code": "Project code:", @@ -6060,8 +6056,6 @@ "item.refbox.featured-service.share.message": "Share", - "item.matomo-statistics.info.message": "Click on a data point to summarize by year / month.", - "item.view.box.author.message": "Author(s):", "item.view.box.publisher.message": "Publisher:", diff --git a/src/assets/i18n/it.json5 b/src/assets/i18n/it.json5 index 8ef2fd9270f..b2b09ce1941 100644 --- a/src/assets/i18n/it.json5 +++ b/src/assets/i18n/it.json5 @@ -9127,14 +9127,6 @@ // TODO New key - Add a translation "item.page.license.message": ["This item is", "and licensed under:"], - // "item.page.matomo-statistics.views.button": "Views", - // TODO New key - Add a translation - "item.page.matomo-statistics.views.button": "Views", - - // "item.page.matomo-statistics.downloads.button": "Downloads", - // TODO New key - Add a translation - "item.page.matomo-statistics.downloads.button": "Downloads", - // "item.page.acknowledgement.project-name": "Project name:", // TODO New key - Add a translation "item.page.acknowledgement.project-name": "Project name:", @@ -9195,10 +9187,6 @@ // TODO New key - Add a translation "item.refbox.featured-service.share.message": "Share", - // "item.matomo-statistics.info.message": "Click on a data point to summarize by year / month.", - // TODO New key - Add a translation - "item.matomo-statistics.info.message": "Click on a data point to summarize by year / month.", - // "item.view.box.author.message": "Author(s):", // TODO New key - Add a translation "item.view.box.author.message": "Author(s):",