Revision 58098
Added by Stefania Martziou about 4 years ago
modules/uoa-repository-dashboard-gui/branches/new-ui/src/app/pages/metrics/metrics-usagestats.component.ts | ||
---|---|---|
1 |
import { Component, OnInit } from '@angular/core'; |
|
2 |
import { Repository } from '../../domain/typeScriptClasses'; |
|
3 |
import { RepositoryService } from '../../services/repository.service'; |
|
4 |
import { AuthenticationService } from '../../services/authentication.service'; |
|
5 |
import { ActivatedRoute, Router } from '@angular/router'; |
|
6 |
|
|
7 |
@Component({ |
|
8 |
selector: 'metrics-usagestats', |
|
9 |
templateUrl: 'metrics-usagestats.component.html' |
|
10 |
}) |
|
11 |
|
|
12 |
export class MetricsUsagestatsComponent implements OnInit { |
|
13 |
|
|
14 |
errorMessage: string; |
|
15 |
title = 'Get usage statistics report'; |
|
16 |
|
|
17 |
repo: Repository; |
|
18 |
repoId: string; |
|
19 |
|
|
20 |
constructor(private repoService: RepositoryService, |
|
21 |
private authService: AuthenticationService, |
|
22 |
private route: ActivatedRoute, |
|
23 |
private router: Router) {} |
|
24 |
|
|
25 |
ngOnInit() { |
|
26 |
this.getRepo(); |
|
27 |
let body = document.getElementsByTagName('body')[0]; |
|
28 |
body.classList.remove("top_bar_active"); //remove the class |
|
29 |
body.classList.remove("page_heading_active"); |
|
30 |
body.classList.remove("landing"); |
|
31 |
body.classList.add("dashboard"); |
|
32 |
} |
|
33 |
|
|
34 |
getRepo() { |
|
35 |
this.repoId = this.route.snapshot.paramMap.get('id'); |
|
36 |
|
|
37 |
if (this.repoId) { |
|
38 |
this.repoService.getRepositoryById(this.repoId).subscribe( |
|
39 |
repo => this.repo = repo, |
|
40 |
error => { |
|
41 |
console.log(error); |
|
42 |
this.errorMessage = 'The repository could not be retrieved'; |
|
43 |
}, |
|
44 |
() => { |
|
45 |
this.title = this.title + ' for ' + this.repo.officialName; |
|
46 |
console.log(this.authService.getUserEmail(), this.repo.registeredBy); |
|
47 |
} |
|
48 |
); |
|
49 |
} |
|
50 |
} |
|
51 |
|
|
52 |
} |
|
53 | 0 |
modules/uoa-repository-dashboard-gui/branches/new-ui/src/app/pages/metrics/metrics.module.ts | ||
---|---|---|
1 |
/** |
|
2 |
* Created by myrto on 11/27/17. |
|
3 |
*/ |
|
4 |
import { NgModule } from '@angular/core'; |
|
5 |
import { TabsModule } from 'ngx-bootstrap'; |
|
6 |
import { CommonModule } from '@angular/common'; |
|
7 |
import { MetricsRouting } from './metrics.routing'; |
|
8 |
import { ReusableComponentsModule } from '../../shared/reusablecomponents/reusable-components.module'; |
|
9 |
import { ReactiveFormsModule } from '@angular/forms'; |
|
10 |
import { MetricsComponent } from './metrics.component'; |
|
11 |
import { MetricsEnableComponent } from './metrics-enable.component'; |
|
12 |
import { MetricsInstructionsComponent } from './metrics-instructions.component'; |
|
13 |
import { MetricsShowComponent } from './metrics-show.component'; |
|
14 |
import { MetricsUsagestatsComponent } from './metrics-usagestats.component'; |
|
15 |
import { MetricsUsagestatsReportComponent } from './metrics-usagestats-report.component'; |
|
16 |
import { MetricsUsagestatsReportResultsComponent } from './metrics-usagestats-report-results.component'; |
|
17 |
|
|
18 |
@NgModule ({ |
|
19 |
imports: [ |
|
20 |
CommonModule, |
|
21 |
TabsModule.forRoot(), |
|
22 |
MetricsRouting, |
|
23 |
ReusableComponentsModule, |
|
24 |
ReactiveFormsModule |
|
25 |
], |
|
26 |
declarations: [ |
|
27 |
MetricsComponent, |
|
28 |
MetricsEnableComponent, |
|
29 |
MetricsInstructionsComponent, |
|
30 |
MetricsShowComponent, |
|
31 |
MetricsUsagestatsComponent, |
|
32 |
MetricsUsagestatsReportComponent, |
|
33 |
MetricsUsagestatsReportResultsComponent |
|
34 |
] |
|
35 |
}) |
|
36 |
|
|
37 |
export class MetricsModule { } |
|
38 | 0 |
modules/uoa-repository-dashboard-gui/branches/new-ui/src/app/pages/metrics/metrics-enable.component.ts | ||
---|---|---|
1 |
import { Component, OnInit, ViewChild } from '@angular/core'; |
|
2 |
import { ActivatedRoute, Router } from '@angular/router'; |
|
3 |
import { ConfirmationDialogComponent } from '../../shared/reusablecomponents/confirmation-dialog.component'; |
|
4 |
import { PiwikService } from '../../services/piwik.service'; |
|
5 |
import { RepositoryService } from '../../services/repository.service'; |
|
6 |
import { PiwikInfo, Repository } from '../../domain/typeScriptClasses'; |
|
7 |
import { enabledMetricsError, enabledMetricsSuccess, enablingMetrics, |
|
8 |
loadingRepoError, loadingRepoMessage } from '../../domain/shared-messages'; |
|
9 |
import { AuthenticationService } from '../../services/authentication.service'; |
|
10 |
|
|
11 |
@Component ({ |
|
12 |
selector: 'metrics-enable', |
|
13 |
templateUrl: 'metrics-enable.component.html' |
|
14 |
}) |
|
15 |
|
|
16 |
export class MetricsEnableComponent implements OnInit { |
|
17 |
successMessage: string; |
|
18 |
errorMessage: string; |
|
19 |
loadingMessage: string; |
|
20 |
|
|
21 |
readonly analyticsUrl = 'https://analytics.openaire.eu/addsite.php?'; |
|
22 |
readonly authenticationToken = '32846584f571be9b57488bf4088f30ea'; /* THE ACTUAL TOKEN WILL BE NEEDED EVENTUALLY!! */ |
|
23 |
repo: Repository; |
|
24 |
oaId: string; |
|
25 |
|
|
26 |
modalTitle = 'Confirmation'; |
|
27 |
modalButton = 'Yes, enable it'; |
|
28 |
isModalShown: boolean; |
|
29 |
|
|
30 |
@ViewChild('confirmEnablingModal') |
|
31 |
public confirmEnablingModal: ConfirmationDialogComponent; |
|
32 |
|
|
33 |
|
|
34 |
constructor ( |
|
35 |
private route: ActivatedRoute, |
|
36 |
private router: Router, |
|
37 |
private authService: AuthenticationService, |
|
38 |
private piwikService: PiwikService, |
|
39 |
private repoService: RepositoryService |
|
40 |
) {} |
|
41 |
|
|
42 |
ngOnInit() { |
|
43 |
this.getRepo(); |
|
44 |
this.isModalShown = false; |
|
45 |
let body = document.getElementsByTagName('body')[0]; |
|
46 |
body.classList.remove("top_bar_active"); //remove the class |
|
47 |
body.classList.remove("page_heading_active"); |
|
48 |
body.classList.remove("landing"); |
|
49 |
body.classList.add("dashboard"); |
|
50 |
} |
|
51 |
|
|
52 |
getRepo(): void { |
|
53 |
const id = this.route.snapshot.paramMap.get('id'); |
|
54 |
this.loadingMessage = loadingRepoMessage; |
|
55 |
this.repoService.getRepositoryById(id).subscribe( |
|
56 |
repo => { |
|
57 |
this.repo = repo; |
|
58 |
}, |
|
59 |
error => { |
|
60 |
console.log(error); |
|
61 |
this.errorMessage = loadingRepoError; |
|
62 |
this.loadingMessage = ''; |
|
63 |
}, () => { |
|
64 |
if (this.repo) { |
|
65 |
this.getOAid(); |
|
66 |
} |
|
67 |
this.loadingMessage = ''; |
|
68 |
} |
|
69 |
); |
|
70 |
} |
|
71 |
|
|
72 |
getOAid () { |
|
73 |
this.piwikService.getOpenaireId(this.repo.id).subscribe( |
|
74 |
id => { |
|
75 |
this.oaId = id; |
|
76 |
console.log(`getOpenaireId responded: ${this.oaId}`); |
|
77 |
}, |
|
78 |
error => console.log(`ERROR is ${error}`) |
|
79 |
); |
|
80 |
} |
|
81 |
|
|
82 |
confirmEnabling() { |
|
83 |
if (this.repo) { |
|
84 |
this.confirmEnablingModal.showModal(); |
|
85 |
} |
|
86 |
} |
|
87 |
|
|
88 |
confirmedEnabling(event: any) { |
|
89 |
if (this.repo) { |
|
90 |
this.loadingMessage = enablingMetrics; |
|
91 |
const piwik: PiwikInfo = { |
|
92 |
repositoryId: this.repo.id, |
|
93 |
openaireId: this.oaId, |
|
94 |
repositoryName: this.repo.officialName, |
|
95 |
country: this.repo.countryName, |
|
96 |
siteId: '', |
|
97 |
authenticationToken: this.authenticationToken, |
|
98 |
creationDate: null, |
|
99 |
requestorName: this.authService.getUserName(), |
|
100 |
requestorEmail: this.authService.getUserEmail(), |
|
101 |
validated: false, |
|
102 |
validationDate: null, |
|
103 |
comment: '' |
|
104 |
}; |
|
105 |
|
|
106 |
this.piwikService.enableMetricsForRepository(this.repo.officialName, this.repo.websiteUrl, piwik).subscribe( |
|
107 |
response => { |
|
108 |
console.log(`enableMetrics answered: ${response}`); |
|
109 |
this.successMessage = enabledMetricsSuccess; |
|
110 |
this.loadingMessage = ''; |
|
111 |
}, |
|
112 |
error => { |
|
113 |
console.log(error); |
|
114 |
this.errorMessage = enabledMetricsError; |
|
115 |
this.loadingMessage = ''; |
|
116 |
}, |
|
117 |
() => { |
|
118 |
this.router.navigate([`/getImpact/instructions/${this.repo.id}`]); |
|
119 |
} |
|
120 |
); |
|
121 |
} |
|
122 |
} |
|
123 |
} |
|
124 | 0 |
modules/uoa-repository-dashboard-gui/branches/new-ui/src/app/pages/metrics/metrics.routing.ts | ||
---|---|---|
1 |
/** |
|
2 |
* Created by myrto on 11/27/17. |
|
3 |
*/ |
|
4 |
import { RouterModule, Routes } from '@angular/router'; |
|
5 |
import { MetricsComponent } from './metrics.component'; |
|
6 |
import { MetricsEnableComponent } from './metrics-enable.component'; |
|
7 |
import { MetricsShowComponent } from './metrics-show.component'; |
|
8 |
import { MetricsInstructionsComponent } from './metrics-instructions.component'; |
|
9 |
import { MetricsUsagestatsComponent } from './metrics-usagestats.component'; |
|
10 |
import { MetricsUsagestatsReportComponent } from './metrics-usagestats-report.component'; |
|
11 |
import { MetricsUsagestatsReportResultsComponent } from './metrics-usagestats-report-results.component'; |
|
12 |
import { NgModule } from '@angular/core'; |
|
13 |
|
|
14 |
const metricsRoutes: Routes = [ |
|
15 |
{ |
|
16 |
path: '', |
|
17 |
component: MetricsComponent |
|
18 |
}, |
|
19 |
{ |
|
20 |
path: 'enable/:id', |
|
21 |
component: MetricsEnableComponent |
|
22 |
}, |
|
23 |
{ |
|
24 |
path: 'show_metrics/:id', |
|
25 |
component: MetricsShowComponent |
|
26 |
}, |
|
27 |
{ |
|
28 |
path: 'instructions/:id', |
|
29 |
component: MetricsInstructionsComponent |
|
30 |
}, |
|
31 |
{ |
|
32 |
path: 'usagestats/:id', |
|
33 |
component: MetricsUsagestatsComponent |
|
34 |
}, |
|
35 |
{ |
|
36 |
path: 'usagestats/:id/:reportID', |
|
37 |
component: MetricsUsagestatsReportComponent |
|
38 |
}, |
|
39 |
{ |
|
40 |
path: 'usagestats-report-results', |
|
41 |
component: MetricsUsagestatsReportResultsComponent |
|
42 |
} |
|
43 |
]; |
|
44 |
|
|
45 |
|
|
46 |
@NgModule ({ |
|
47 |
imports: [RouterModule.forChild(metricsRoutes)], |
|
48 |
exports: [RouterModule] |
|
49 |
}) |
|
50 |
|
|
51 |
export class MetricsRouting {} |
|
52 |
|
|
53 | 0 |
modules/uoa-repository-dashboard-gui/branches/new-ui/src/app/pages/metrics/metrics-usagestats-report-results.component.ts | ||
---|---|---|
1 |
import { Component, OnInit } from '@angular/core'; |
|
2 |
import { ActivatedRoute } from '@angular/router'; |
|
3 |
import { AuthenticationService } from '../../services/authentication.service'; |
|
4 |
import { UsagestatsService } from '../../services/usagestats.service'; |
|
5 |
import { ReportResponse } from '../../domain/usageStatsClasses'; |
|
6 |
import { FormBuilder, FormGroup } from '@angular/forms'; |
|
7 |
|
|
8 |
@Component({ |
|
9 |
selector: 'metrics-usagestats-report-results', |
|
10 |
templateUrl: 'metrics-usagestats-report-results.component.html', |
|
11 |
styleUrls: ['metrics-usagestats-report-results.component.css'] |
|
12 |
}) |
|
13 |
export class MetricsUsagestatsReportResultsComponent implements OnInit { |
|
14 |
|
|
15 |
loadingMessage: string; |
|
16 |
errorMessage: string; |
|
17 |
infoMessage: string; |
|
18 |
|
|
19 |
repoResponse: ReportResponse; |
|
20 |
coveredPeriod: string; |
|
21 |
params: URLSearchParams; |
|
22 |
page: number; |
|
23 |
pageSize: number; |
|
24 |
totalPages: number; |
|
25 |
selectedItemIndex: number; |
|
26 |
|
|
27 |
pageSizeSelect: FormGroup; |
|
28 |
chosenReport: string; |
|
29 |
|
|
30 |
constructor(private route: ActivatedRoute, |
|
31 |
private authService: AuthenticationService, |
|
32 |
private usageService: UsagestatsService, |
|
33 |
private fb: FormBuilder) {} |
|
34 |
|
|
35 |
ngOnInit() { |
|
36 |
this.page = 0; |
|
37 |
this.pageSize = 10; |
|
38 |
this.readParams(); |
|
39 |
this.pageSizeSelect = this.fb.group({selectPageSize: ['']}); |
|
40 |
let body = document.getElementsByTagName('body')[0]; |
|
41 |
body.classList.remove("top_bar_active"); //remove the class |
|
42 |
body.classList.remove("page_heading_active"); |
|
43 |
body.classList.remove("landing"); |
|
44 |
body.classList.add("dashboard"); |
|
45 |
} |
|
46 |
|
|
47 |
readParams() { |
|
48 |
this.params = new URLSearchParams(); |
|
49 |
|
|
50 |
this.route.queryParams.subscribe( qparams => { |
|
51 |
this.params.append('Report', qparams['report']); |
|
52 |
this.params.append('Release', '4'); |
|
53 |
this.params.append('RequestorID', this.authService.getUserEmail()); |
|
54 |
this.params.append('BeginDate', qparams['beginDate']); |
|
55 |
this.params.append('EndDate', qparams['endDate']); |
|
56 |
this.params.append('RepositoryIdentifier', qparams['repoId']); |
|
57 |
this.params.append('ItemIdentifier', qparams['itemIdentifier']); |
|
58 |
this.params.append('ItemDataType', qparams['itemIdentifier']); |
|
59 |
this.params.append('Granularity', qparams['granularity']); |
|
60 |
}); |
|
61 |
|
|
62 |
this.chosenReport = this.params.get('Report'); |
|
63 |
this.getReportResponse(); |
|
64 |
} |
|
65 |
|
|
66 |
getReportResponse() { |
|
67 |
this.errorMessage = ''; |
|
68 |
this.loadingMessage = 'Loading results...'; |
|
69 |
this.infoMessage = ''; |
|
70 |
this.selectedItemIndex = null; |
|
71 |
this.repoResponse = null; |
|
72 |
|
|
73 |
this.usageService.getReportResponse(this.page.toString(), this.pageSize.toString(), this.params).subscribe( |
|
74 |
responseWrapper => { |
|
75 |
this.repoResponse = responseWrapper.ReportResponse; |
|
76 |
}, |
|
77 |
error => { |
|
78 |
this.errorMessage = 'Failed to load the report results!'; |
|
79 |
this.loadingMessage = ''; |
|
80 |
}, |
|
81 |
() => { |
|
82 |
this.errorMessage = ''; |
|
83 |
this.loadingMessage = ''; |
|
84 |
|
|
85 |
this.pageSizeSelect.get('selectPageSize').setValue(this.pageSize); |
|
86 |
this.pageSizeSelect.get('selectPageSize').updateValueAndValidity(); |
|
87 |
|
|
88 |
this.totalPages = Math.ceil( |
|
89 |
+this.repoResponse.ReportDefinition.Filters |
|
90 |
.ReportAttribute.filter(x => x['Name'] === 'ReportItemCount')[0].Value / this.pageSize); |
|
91 |
if ( this.totalPages === 0 ) { |
|
92 |
this.infoMessage = 'No results were found'; |
|
93 |
} |
|
94 |
|
|
95 |
if (this.repoResponse.ReportDefinition && this.repoResponse.ReportDefinition.Filters && |
|
96 |
this.repoResponse.ReportDefinition.Filters.ReportAttribute) { |
|
97 |
|
|
98 |
if (this.repoResponse.Report && this.repoResponse.ReportDefinition.Filters.UsageDateRange && |
|
99 |
this.repoResponse.ReportDefinition.Filters.UsageDateRange.Begin && |
|
100 |
this.repoResponse.ReportDefinition.Filters.UsageDateRange.End) { |
|
101 |
this.coveredPeriod = this.repoResponse.ReportDefinition.Filters.UsageDateRange.Begin + ' to '; |
|
102 |
this.coveredPeriod = this.coveredPeriod + this.repoResponse.ReportDefinition.Filters.UsageDateRange.End; |
|
103 |
} else { |
|
104 |
const defaultDatePeriod = this.repoResponse.Exception.filter(x => x['Message'] === 'Unspecified Date Arguments'); |
|
105 |
|
|
106 |
this.coveredPeriod = defaultDatePeriod[0].Data.split(':')[1].trim() + ' to '; |
|
107 |
this.coveredPeriod = this.coveredPeriod + defaultDatePeriod[1].Data.split(':')[1].trim() + ' (default)'; |
|
108 |
} |
|
109 |
|
|
110 |
} else { |
|
111 |
this.repoResponse = null; |
|
112 |
} |
|
113 |
} |
|
114 |
); |
|
115 |
|
|
116 |
} |
|
117 |
|
|
118 |
|
|
119 |
getPageSize() { |
|
120 |
this.pageSize = +(this.pageSizeSelect.get('selectPageSize').value); |
|
121 |
this.page = 0; |
|
122 |
this.getReportResponse(); |
|
123 |
} |
|
124 |
|
|
125 |
goToNextPage() { |
|
126 |
if ( (this.page + 1) < this.totalPages) { |
|
127 |
this.page++; |
|
128 |
console.log(`Get me page ${this.page}!`); |
|
129 |
this.getReportResponse(); |
|
130 |
} |
|
131 |
} |
|
132 |
|
|
133 |
goToPreviousPage() { |
|
134 |
if (this.page > 0) { |
|
135 |
this.page--; |
|
136 |
console.log(`Get me page ${this.page}!`); |
|
137 |
this.getReportResponse(); |
|
138 |
} |
|
139 |
} |
|
140 |
|
|
141 |
displayItemPerformance(i: number) { |
|
142 |
if (this.selectedItemIndex === i) { |
|
143 |
this.selectedItemIndex = null; |
|
144 |
} else { |
|
145 |
this.selectedItemIndex = i; |
|
146 |
} |
|
147 |
} |
|
148 |
|
|
149 |
transformItem(itemIdentifiers: any[]) { |
|
150 |
let field: string; |
|
151 |
if (this.chosenReport === 'RR1') { |
|
152 |
field = 'URL'; |
|
153 |
} else { |
|
154 |
field = 'URLs'; |
|
155 |
} |
|
156 |
const i = itemIdentifiers.findIndex(x => x['Type'] === field); |
|
157 |
if ( i > -1 ) { |
|
158 |
const urls = itemIdentifiers[i]['Value']; |
|
159 |
return urls.split(';'); |
|
160 |
} |
|
161 |
return ''; |
|
162 |
} |
|
163 |
|
|
164 |
} |
|
165 | 0 |
modules/uoa-repository-dashboard-gui/branches/new-ui/src/app/pages/metrics/metrics-usagestats-report.component.ts | ||
---|---|---|
1 |
import { Component, OnInit } from '@angular/core'; |
|
2 |
import { Repository } from '../../domain/typeScriptClasses'; |
|
3 |
import { ActivatedRoute, Router } from '@angular/router'; |
|
4 |
import { RepositoryService } from '../../services/repository.service'; |
|
5 |
import { AuthenticationService } from '../../services/authentication.service'; |
|
6 |
import { loadingRepoMessage } from '../../domain/shared-messages'; |
|
7 |
|
|
8 |
@Component({ |
|
9 |
selector: 'metrics-usagestats-report', |
|
10 |
templateUrl: './metrics-usagestats-report.component.html' |
|
11 |
}) |
|
12 |
|
|
13 |
export class MetricsUsagestatsReportComponent implements OnInit { |
|
14 |
|
|
15 |
errorMessage: string; |
|
16 |
loadingMessage: string; |
|
17 |
title: string; |
|
18 |
|
|
19 |
repo: Repository; |
|
20 |
repoId: string; |
|
21 |
shownRepoId: string; |
|
22 |
shownOpenaireId: string; |
|
23 |
useCurrentRepo: boolean; |
|
24 |
issnToShow = ''; |
|
25 |
chosen_report: string; |
|
26 |
|
|
27 |
userEmail: string; |
|
28 |
beginDate = ''; |
|
29 |
endDate = ''; |
|
30 |
itemIdentifier = ''; |
|
31 |
itemDataType = ''; |
|
32 |
granularity = 'Monthly'; |
|
33 |
|
|
34 |
constructor(private repoService: RepositoryService, |
|
35 |
private route: ActivatedRoute, |
|
36 |
private router: Router, |
|
37 |
private authService: AuthenticationService) {} |
|
38 |
|
|
39 |
ngOnInit() { |
|
40 |
this.getParams(); |
|
41 |
this.getUserEmail(); |
|
42 |
this.getRepo(); |
|
43 |
let body = document.getElementsByTagName('body')[0]; |
|
44 |
body.classList.remove("top_bar_active"); //remove the class |
|
45 |
body.classList.remove("page_heading_active"); |
|
46 |
body.classList.remove("landing"); |
|
47 |
body.classList.add("dashboard"); |
|
48 |
} |
|
49 |
|
|
50 |
getParams() { |
|
51 |
this.repoId = this.route.snapshot.paramMap.get('id'); |
|
52 |
this.chosen_report = this.route.snapshot.paramMap.get('reportID'); |
|
53 |
this.shownRepoId = this.convertToDisplayedFormat(this.repoId); |
|
54 |
console.log(`shownRepoId is ${this.repoId}`); |
|
55 |
this.title = `${this.chosen_report} report`; |
|
56 |
if (this.chosen_report !== 'RR1') { |
|
57 |
this.useCurrentRepo = true; |
|
58 |
} |
|
59 |
} |
|
60 |
|
|
61 |
convertToDisplayedFormat(input: string) { |
|
62 |
const tempArray = this.repoId.split('____::'); |
|
63 |
return tempArray[0] + ':' + tempArray[1]; |
|
64 |
} |
|
65 |
|
|
66 |
getUserEmail() { |
|
67 |
this.userEmail = this.authService.getUserEmail(); |
|
68 |
} |
|
69 |
|
|
70 |
getRepo() { |
|
71 |
this.loadingMessage = loadingRepoMessage; |
|
72 |
this.repoService.getRepositoryById(this.repoId).subscribe( |
|
73 |
repo => this.repo = repo, |
|
74 |
error => { |
|
75 |
console.log(error); |
|
76 |
this.loadingMessage = ''; |
|
77 |
this.errorMessage = 'The repository could not be retrieved'; |
|
78 |
}, |
|
79 |
() => { |
|
80 |
this.loadingMessage = ''; |
|
81 |
if (this.repo.piwikInfo) { |
|
82 |
this.shownOpenaireId = this.convertToDisplayedFormat(this.repo.piwikInfo.openaireId); |
|
83 |
} |
|
84 |
if (this.repo.issn && this.repo.issn !== 'null') { |
|
85 |
this.shownRepoId = this.repo.issn.slice(0, 4) + '-' + this.repo.issn.toString().slice(4); |
|
86 |
} |
|
87 |
this.title = `${this.chosen_report} report for ${this.repo.officialName}`; |
|
88 |
} |
|
89 |
); |
|
90 |
} |
|
91 |
|
|
92 |
updateBeginDate(event: any) { |
|
93 |
this.beginDate = event.target.value; |
|
94 |
} |
|
95 |
|
|
96 |
updateEndDate(event: any) { |
|
97 |
this.endDate = event.target.value; |
|
98 |
} |
|
99 |
|
|
100 |
updateItemDataType(event: any) { |
|
101 |
this.itemDataType = event.target.value; |
|
102 |
} |
|
103 |
|
|
104 |
updateItemIdentifier(event: any) { |
|
105 |
this.itemIdentifier = event.target.value; |
|
106 |
} |
|
107 |
|
|
108 |
updateGranularity(event: any) { |
|
109 |
this.granularity = event.target.value; |
|
110 |
} |
|
111 |
|
|
112 |
updateUseCurrentRepo(event: any) { |
|
113 |
this.useCurrentRepo = event.target.value; |
|
114 |
} |
|
115 |
|
|
116 |
goToReport() { |
|
117 |
if (!this.useCurrentRepo) { this.shownRepoId = ''; } |
|
118 |
this.router.navigate(['/getImpact/usagestats-report-results'], { |
|
119 |
queryParams: { |
|
120 |
report: this.chosen_report, |
|
121 |
beginDate: this.beginDate, |
|
122 |
endDate: this.endDate, |
|
123 |
repoId: this.shownRepoId, |
|
124 |
itemDataType: this.itemDataType, |
|
125 |
itemIdentifier: this.itemIdentifier, |
|
126 |
granularity: this.granularity |
|
127 |
} |
|
128 |
}); |
|
129 |
|
|
130 |
/*const params = new URLSearchParams(); |
|
131 |
|
|
132 |
params.append('Report', this.chosen_report); |
|
133 |
params.append('Release', '4'); |
|
134 |
params.append('RequestorID', this.authService.getUserEmail()); |
|
135 |
params.append('BeginDate', this.beginDate); |
|
136 |
params.append('EndDate', this.endDate); |
|
137 |
params.append('RepositoryIdentifier', this.shownRepoId); |
|
138 |
if (this.itemIdentifier) { |
|
139 |
params.append('ItemIdentifier', this.itemIdentifier); |
|
140 |
} |
|
141 |
if (this.itemDataType) { |
|
142 |
params.append('ItemDataType', this.itemDataType); |
|
143 |
} |
|
144 |
params.append('Pretty', 'Pretty'); |
|
145 |
|
|
146 |
let url = `http://beta.services.openaire.eu/usagestats/sushilite/GetReport/?${params}`; |
|
147 |
console.log(`going to: ${url}`); |
|
148 |
|
|
149 |
window.location.href = url;*/ |
|
150 |
} |
|
151 |
|
|
152 |
} |
|
153 | 0 |
modules/uoa-repository-dashboard-gui/branches/new-ui/src/app/pages/metrics/metrics-usagestats-report-results.component.css | ||
---|---|---|
1 |
.innerTable { |
|
2 |
padding: 50px; |
|
3 |
} |
|
4 |
|
|
5 |
.innerTable th, .innerTable td { |
|
6 |
padding: 11px 12px; |
|
7 |
} |
|
8 | 0 |
modules/uoa-repository-dashboard-gui/branches/new-ui/src/app/pages/metrics/metrics-show.component.html | ||
---|---|---|
1 |
<div id="page_content"> |
|
2 |
<div id="page_content_inner"> |
|
3 |
<h2 class="heading_b uk-margin-bottom">{{ piwik ? piwik.repositoryName : 'Metrics'}}</h2> |
|
4 |
|
|
5 |
<!-- TOP HELP CONTENT --> |
|
6 |
<help-content #topHelperContent [position]="'top'" |
|
7 |
[ngClass]="topHelperContent.isPresent()?'uk-margin-medium-top uk-margin-medium-bottom':'clear-style'"> |
|
8 |
</help-content> |
|
9 |
|
|
10 |
<div class="uk-grid"> |
|
11 |
|
|
12 |
<!-- LEFT HELP CONTENT --> |
|
13 |
<aside-help-content #leftHelperContent [position]="'left'" |
|
14 |
[ngClass]="leftHelperContent.isPresent()?'tm-sidebar uk-width-1-4@m uk-first-column':'clear-style'"> |
|
15 |
</aside-help-content> |
|
16 |
|
|
17 |
<!-- MIDDLE --> |
|
18 |
<div class=" uk-width-expand@m"> |
|
19 |
|
|
20 |
<div *ngIf="errorMessage" class="uk-alert uk-alert-danger">{{ errorMessage }}</div> |
|
21 |
<div *ngIf="loadingMessage" class="loading-big"> |
|
22 |
<div class="loader-big" style="text-align: center; padding-top: 170px; color: rgb(47, 64, 80); font-weight: bold;"> |
|
23 |
{{ loadingMessage }} |
|
24 |
</div> |
|
25 |
<div class="transparentFilm"></div> |
|
26 |
</div> |
|
27 |
<div *ngIf="repoMetrics"> |
|
28 |
|
|
29 |
<div class="uk-grid"> |
|
30 |
<div class="uk-width-1-1"> |
|
31 |
<div class="uk-float-right"> |
|
32 |
<a class="uk-button uk-button-primary" |
|
33 |
[routerLink]="['/getImpact/usagestats',repoId]" title="">Get statistics report</a> |
|
34 |
</div> |
|
35 |
</div> |
|
36 |
</div> |
|
37 |
|
|
38 |
<div class="uk-grid uk-grid-match uk-child-width-1-3@l uk-child-width-1-3@m uk-grid-medium uk-sortable sortable-handler" data-uk-sortable="" data-uk-grid-margin=""> |
|
39 |
<div class="uk-row-first" style=""> |
|
40 |
<div class="md-card"> |
|
41 |
<div class="md-card-content"> |
|
42 |
<div class="uk-float-right uk-margin-top uk-margin-small-right"><span class="peity_sale peity_data" style="display: none;">5,3,9,6,5,9,7,3,5,2</span><svg class="peity" height="28" width="64"><polygon fill="#d1e4f6" points="0 27.5 0 12.5 7.111111111111111 18.5 14.222222222222221 0.5 21.333333333333332 9.5 28.444444444444443 12.5 35.55555555555556 0.5 42.666666666666664 6.5 49.77777777777777 18.5 56.888888888888886 12.5 64 21.5 64 27.5"></polygon><polyline fill="none" points="0 12.5 7.111111111111111 18.5 14.222222222222221 0.5 21.333333333333332 9.5 28.444444444444443 12.5 35.55555555555556 0.5 42.666666666666664 6.5 49.77777777777777 18.5 56.888888888888886 12.5 64 21.5" stroke="#0288d1" stroke-width="1" stroke-linecap="square"></polyline></svg></div> |
|
43 |
<span class="uk-text-muted uk-text-small">views in OpenAIRE</span> |
|
44 |
<h2 class="uk-margin-remove"><span class="countUpMe">{{ pageViews | number }}</span></h2> |
|
45 |
</div> |
|
46 |
</div> |
|
47 |
</div> |
|
48 |
<div style=""> |
|
49 |
<div class="md-card"> |
|
50 |
<div class="md-card-content"> |
|
51 |
<div class="uk-float-right uk-margin-top uk-margin-small-right"><span class="peity_live peity_data" style="display: none;">3,5,2,10,2,7,0,2,8,8,7,2,4,8,0,6,6,7,9,5</span><svg class="peity" height="28" width="64"><polygon fill="#efebe9" points="0 27.5 0 19.4 3.3684210526315788 14 6.7368421052631575 22.1 10.105263157894736 0.5 13.473684210526315 22.1 16.842105263157894 8.600000000000001 20.210526315789473 27.5 23.57894736842105 22.1 26.94736842105263 5.899999999999999 30.31578947368421 5.899999999999999 33.68421052631579 8.600000000000001 37.05263157894737 22.1 40.421052631578945 16.7 43.78947368421052 5.899999999999999 47.1578947368421 27.5 50.526315789473685 11.3 53.89473684210526 11.3 57.263157894736835 8.600000000000001 60.63157894736842 3.1999999999999993 64 14 64 27.5"></polygon><polyline fill="none" points="0 19.4 3.3684210526315788 14 6.7368421052631575 22.1 10.105263157894736 0.5 13.473684210526315 22.1 16.842105263157894 8.600000000000001 20.210526315789473 27.5 23.57894736842105 22.1 26.94736842105263 5.899999999999999 30.31578947368421 5.899999999999999 33.68421052631579 8.600000000000001 37.05263157894737 22.1 40.421052631578945 16.7 43.78947368421052 5.899999999999999 47.1578947368421 27.5 50.526315789473685 11.3 53.89473684210526 11.3 57.263157894736835 8.600000000000001 60.63157894736842 3.1999999999999993 64 14" stroke="#5d4037" stroke-width="1" stroke-linecap="square"></polyline></svg></div> |
|
52 |
<span class="uk-text-muted uk-text-small">views in local repository</span> |
|
53 |
<h2 class="uk-margin-remove" id="peity_live_text">{{ totalViews | number }} |
|
54 |
<span *ngIf="repoMetrics.metricsNumbers.total_openaire_views" class="comment">( {{ repoMetrics.metricsNumbers.total_openaire_views | number }} from OpenAIRE )</span></h2> |
|
55 |
</div> |
|
56 |
</div> |
|
57 |
</div> |
|
58 |
<div class="" style=""> |
|
59 |
<div class="md-card"> |
|
60 |
<div class="md-card-content"> |
|
61 |
<div class="uk-float-right uk-margin-top uk-margin-small-right"><span class="peity_visitors peity_data" style="display: none;">5,3,9,6,5,9,7</span><svg class="peity" height="28" width="48"><rect data-value="5" fill="#d84315" x="1.3714285714285717" y="12.444444444444443" width="4.114285714285715" height="15.555555555555557"></rect><rect data-value="3" fill="#d84315" x="8.228571428571428" y="18.666666666666668" width="4.114285714285716" height="9.333333333333332"></rect><rect data-value="9" fill="#d84315" x="15.085714285714287" y="0" width="4.1142857142857086" height="28"></rect><rect data-value="6" fill="#d84315" x="21.942857142857147" y="9.333333333333336" width="4.114285714285707" height="18.666666666666664"></rect><rect data-value="5" fill="#d84315" x="28.800000000000004" y="12.444444444444443" width="4.114285714285707" height="15.555555555555557"></rect><rect data-value="9" fill="#d84315" x="35.65714285714286" y="0" width="4.114285714285707" height="28"></rect><rect data-value="7" fill="#d84315" x="42.51428571428572" y="6.222222222222221" width="4.114285714285707" height="21.77777777777778"></rect></svg></div> |
|
62 |
<span class="uk-text-muted uk-text-small">downloads in local repository</span> |
|
63 |
<h2 class="uk-margin-remove">{{ totalDownloads | number }} |
|
64 |
<span *ngIf="repoMetrics.metricsNumbers.total_openaire_downloads" class="comment">( {{ repoMetrics.metricsNumbers.total_openaire_downloads | number }} from OpenAIRE )</span></h2> |
|
65 |
</div> |
|
66 |
</div> |
|
67 |
</div> |
|
68 |
</div> |
|
69 |
|
|
70 |
<div class="uk-grid"> |
|
71 |
<div class="uk-width-1-1"> |
|
72 |
<div class="md-card"> |
|
73 |
<div class="md-card-content"> |
|
74 |
<iframe class="statsFrame" [src]="viewsUrl"></iframe> |
|
75 |
</div> |
|
76 |
</div> |
|
77 |
</div> |
|
78 |
<div class="uk-width-1-1 uk-margin-medium-top"> |
|
79 |
<div class="md-card"> |
|
80 |
<div class="md-card-content"> |
|
81 |
<iframe class="statsFrame" [src]="downloadsUrl"></iframe> |
|
82 |
</div> |
|
83 |
</div> |
|
84 |
</div> |
|
85 |
</div> |
|
86 |
</div> |
|
87 |
|
|
88 |
</div> |
|
89 |
|
|
90 |
<!-- RIGHT HELP CONTENT --> |
|
91 |
<aside-help-content #rightHelperContent [position]="'right'" |
|
92 |
[ngClass]="rightHelperContent.isPresent()?'tm-sidebar uk-width-1-4@m uk-first-column':'clear-style'"> |
|
93 |
</aside-help-content> |
|
94 |
|
|
95 |
</div> |
|
96 |
|
|
97 |
<!-- BOTTOM HELP CONTENT --> |
|
98 |
<help-content #bottomHelperContent [position]="'bottom'" |
|
99 |
[ngClass]="bottomHelperContent.isPresent()?'uk-margin-medium-top uk-margin-medium-bottom':'clear-style'"> |
|
100 |
</help-content> |
|
101 |
|
|
102 |
</div> |
|
103 |
</div> |
|
104 |
|
|
105 | 0 |
modules/uoa-repository-dashboard-gui/branches/new-ui/src/app/pages/metrics/metrics-usagestats.component.html | ||
---|---|---|
1 |
<div id="page_content"> |
|
2 |
<div id="page_content_inner"> |
|
3 |
<h2 class="heading_b uk-margin-bottom">{{ title }}</h2> |
|
4 |
|
|
5 |
<!-- TOP HELP CONTENT --> |
|
6 |
<help-content #topHelperContent [position]="'top'" |
|
7 |
[ngClass]="topHelperContent.isPresent()?'uk-margin-medium-top uk-margin-medium-bottom':'clear-style'"> |
|
8 |
</help-content> |
|
9 |
|
|
10 |
<div class="uk-grid"> |
|
11 |
|
|
12 |
<!-- LEFT HELP CONTENT --> |
|
13 |
<aside-help-content #leftHelperContent [position]="'left'" |
|
14 |
[ngClass]="leftHelperContent.isPresent()?'tm-sidebar uk-width-1-4@m uk-first-column':'clear-style'"> |
|
15 |
</aside-help-content> |
|
16 |
|
|
17 |
<!-- MIDDLE --> |
|
18 |
<div class=" uk-width-expand@m"> |
|
19 |
|
|
20 |
<div *ngIf="errorMessage" class="uk-alert uk-alert-warning">{{ errorMessage }}</div> |
|
21 |
<div *ngIf="repo"> |
|
22 |
|
|
23 |
<h3>Supported Reports</h3> |
|
24 |
|
|
25 |
<div class="uk-grid uk-grid-match repositoryTypeSelection" data-uk-grid-margin=""> |
|
26 |
<div class="uk-width-1-3@m uk-row-first"> |
|
27 |
<div class="uk-text-center md-card md-card-default md-card-hover uk-scrollspy-inview uk-animation-slide-top-medium" uk-scrollspy-class=""> |
|
28 |
<a [routerLink]="['AR1']" class="el-link uk-position-cover uk-margin-remove-adjacent"></a> |
|
29 |
<div class="uk-card-media-top"> |
|
30 |
<img class="el-image" src="../../../assets/imgs/Icons_Reports_wide_AR1.png" alt="" style="width: 100%;"> |
|
31 |
</div> |
|
32 |
<div class="uk-card-body"> |
|
33 |
<h3 class="el-title uk-margin uk-card-title uk-margin-remove-adjacent uk-margin-small-bottom"> |
|
34 |
Article Report 1, number of successful article download requests by month and repository. |
|
35 |
</h3> |
|
36 |
</div> |
|
37 |
</div> |
|
38 |
</div> |
|
39 |
<div class="uk-width-1-3@m"> |
|
40 |
<div class="uk-margin uk-text-center md-card md-card-default md-card-hover uk-scrollspy-inview uk-animation-slide-top-medium" uk-scrollspy-class="" data-id="" style=""> |
|
41 |
<a [routerLink]="['IR1']" class="el-link uk-position-cover uk-margin-remove-adjacent" href=""></a> |
|
42 |
<div class="uk-card-media-top"> |
|
43 |
<img class="el-image" src="../../../assets/imgs/Icons_Reports_wide_IR1.png" alt="" style="width:100%;"> |
|
44 |
</div> |
|
45 |
<div class="uk-card-body"> |
|
46 |
<h3 class="el-title uk-margin uk-card-title uk-margin-remove-adjacent uk-margin-small-bottom" > |
|
47 |
Item Report 1, number of successful item download requests by month and repository. |
|
48 |
</h3> |
|
49 |
</div> |
|
50 |
</div> |
|
51 |
</div> |
|
52 |
<div class="uk-width-1-3@m"> |
|
53 |
<div class="uk-margin uk-text-center md-card md-card-default md-card-hover uk-scrollspy-inview uk-animation-slide-top-medium" uk-scrollspy-class="" data-id="" style=""> |
|
54 |
<a [routerLink]="['RR1']" class="el-link uk-position-cover uk-margin-remove-adjacent"></a> |
|
55 |
<div class="uk-card-media-top"> |
|
56 |
<img class="el-image" src="../../../assets/imgs/Icons_Reports_wide_RR1.png" alt="" style="width:100%;"> |
|
57 |
</div> |
|
58 |
<div class="uk-card-body"> |
|
59 |
<h3 class="el-title uk-margin uk-card-title uk-margin-remove-adjacent uk-margin-small-bottom"> |
|
60 |
Repository Report 1, number of successful item downloads for all repositories participating in the usage statistics service. |
|
61 |
</h3> |
|
62 |
</div> |
|
63 |
</div> |
|
64 |
</div> |
|
65 |
</div> |
|
66 |
<div class="uk-grid uk-grid-match repositoryTypeSelection" data-uk-grid-margin=""> |
|
67 |
<div class="uk-width-1-3@m uk-row-first"> |
|
68 |
<div class="uk-text-center md-card md-card-default md-card-hover uk-scrollspy-inview uk-animation-slide-top-medium" uk-scrollspy-class=""> |
|
69 |
<a [routerLink]="['BR1']" class="el-link uk-position-cover uk-margin-remove-adjacent"></a> |
|
70 |
<div class="uk-card-media-top"> |
|
71 |
<img class="el-image" src="../../../assets/imgs/Icons_Reports_wide_BR1.png" alt="" style="width: 100%;"> |
|
72 |
</div> |
|
73 |
<div class="uk-card-body"> |
|
74 |
<h3 class="el-title uk-margin uk-card-title uk-margin-remove-adjacent uk-margin-small-bottom"> |
|
75 |
Book Report 1, number of successful title requests by month and title. |
|
76 |
</h3> |
|
77 |
</div> |
|
78 |
</div> |
|
79 |
</div> |
|
80 |
<div class="uk-width-1-3@m"> |
|
81 |
<div class="uk-margin uk-text-center md-card md-card-default md-card-hover uk-scrollspy-inview uk-animation-slide-top-medium" uk-scrollspy-class="" data-id="" style=""> |
|
82 |
<a [routerLink]="['BR2']" class="el-link uk-position-cover uk-margin-remove-adjacent" href=""></a> |
|
83 |
<div class="uk-card-media-top"> |
|
84 |
<img class="el-image" src="../../../assets/imgs/Icons_Reports_wide_BR2.png" alt="" style="width:100%;"> |
|
85 |
</div> |
|
86 |
<div class="uk-card-body"> |
|
87 |
<h3 class="el-title uk-margin uk-card-title uk-margin-remove-adjacent uk-margin-small-bottom" > |
|
88 |
Book Report 2, number of successful section requests by month and title. |
|
89 |
</h3> |
|
90 |
</div> |
|
91 |
</div> |
|
92 |
</div> |
|
93 |
<div *ngIf="repo.datasourceType === 'journal'" class="uk-width-1-3@m"> |
|
94 |
<div class="uk-margin uk-text-center md-card md-card-default md-card-hover uk-scrollspy-inview uk-animation-slide-top-medium" uk-scrollspy-class="" data-id="" style=""> |
|
95 |
<a [routerLink]="['JR1']" class="el-link uk-position-cover uk-margin-remove-adjacent"></a> |
|
96 |
<div class="uk-card-media-top"> |
|
97 |
<img class="el-image" src="../../../assets/imgs/Icons_Reports_wide_JR1.png" alt="" style="width:100%;"> |
|
98 |
</div> |
|
99 |
<div class="uk-card-body"> |
|
100 |
<h3 class="el-title uk-margin uk-card-title uk-margin-remove-adjacent uk-margin-small-bottom"> |
|
101 |
Journal Report 1, number of successful full-text article requests by month and journal. |
|
102 |
</h3> |
|
103 |
</div> |
|
104 |
</div> |
|
105 |
</div> |
|
106 |
</div> |
|
107 |
|
|
108 |
</div> |
|
109 |
|
|
110 |
</div> |
|
111 |
|
|
112 |
<!-- RIGHT HELP CONTENT --> |
|
113 |
<aside-help-content #rightHelperContent [position]="'right'" |
|
114 |
[ngClass]="rightHelperContent.isPresent()?'tm-sidebar uk-width-1-4@m uk-first-column':'clear-style'"> |
|
115 |
</aside-help-content> |
|
116 |
|
|
117 |
</div> |
|
118 |
|
|
119 |
<!-- BOTTOM HELP CONTENT --> |
|
120 |
<help-content #bottomHelperContent [position]="'bottom'" |
|
121 |
[ngClass]="bottomHelperContent.isPresent()?'uk-margin-medium-top uk-margin-medium-bottom':'clear-style'"> |
|
122 |
</help-content> |
|
123 |
|
|
124 |
</div> |
|
125 |
</div> |
|
126 |
|
|
127 |
|
|
128 | 0 |
modules/uoa-repository-dashboard-gui/branches/new-ui/src/app/pages/metrics/metrics.component.ts | ||
---|---|---|
1 |
/** |
|
2 |
* Created by myrto on 11/27/17. |
|
3 |
*/ |
|
4 |
import { Component, OnInit } from '@angular/core'; |
|
5 |
|
|
6 |
@Component ({ |
|
7 |
selector: 'app-metrics', |
|
8 |
templateUrl: 'metrics.component.html' |
|
9 |
}) |
|
10 |
|
|
11 |
export class MetricsComponent implements OnInit { |
|
12 |
|
|
13 |
tilesView: boolean = true; |
|
14 |
|
|
15 |
constructor() {} |
|
16 |
|
|
17 |
ngOnInit() { |
|
18 |
let body = document.getElementsByTagName('body')[0]; |
|
19 |
body.classList.add("top_bar_active"); //add the class |
|
20 |
body.classList.remove("page_heading_active"); |
|
21 |
body.classList.remove("landing"); |
|
22 |
body.classList.add("dashboard"); |
|
23 |
} |
|
24 |
|
|
25 |
changeView(view: string) { |
|
26 |
this.tilesView = (view == 'tiles'); |
|
27 |
} |
|
28 |
} |
|
29 | 0 |
modules/uoa-repository-dashboard-gui/branches/new-ui/src/app/pages/metrics/metrics-enable.component.html | ||
---|---|---|
1 |
<div id="page_content"> |
|
2 |
<div id="page_content_inner"> |
|
3 |
<h2 class="heading_b uk-margin-bottom">Metrics for {{repo.officialName}}</h2> |
|
4 |
|
|
5 |
<!-- TOP HELP CONTENT --> |
|
6 |
<help-content #topHelperContent [position]="'top'" |
|
7 |
[ngClass]="topHelperContent.isPresent()?'uk-margin-medium-top uk-margin-medium-bottom':'clear-style'"> |
|
8 |
</help-content> |
|
9 |
|
|
10 |
<div class="uk-grid"> |
|
11 |
|
|
12 |
<!-- LEFT HELP CONTENT --> |
|
13 |
<aside-help-content #leftHelperContent [position]="'left'" |
|
14 |
[ngClass]="leftHelperContent.isPresent()?'tm-sidebar uk-width-1-4@m uk-first-column':'clear-style'"> |
|
15 |
</aside-help-content> |
|
16 |
|
|
17 |
<!-- MIDDLE --> |
|
18 |
<div class=" uk-width-expand@m"> |
|
19 |
|
|
20 |
<div> |
|
21 |
<div *ngIf="successMessage" class="uk-alert uk-alert-success">{{ successMessage }}</div> |
|
22 |
<div *ngIf="errorMessage" class="uk-alert uk-alert-danger">{{ errorMessage }}</div> |
|
23 |
<div *ngIf="loadingMessage" class="loading-big"> |
|
24 |
<div class="loader-big" style="text-align: center; padding-top: 170px; color: rgb(47, 64, 80); font-weight: bold;"> |
|
25 |
{{ loadingMessage }} |
|
26 |
</div> |
|
27 |
<div class="transparentFilm"></div> |
|
28 |
</div> |
|
29 |
<div *ngIf="repo && !loadingMessage"> |
|
30 |
|
|
31 |
<div class="md-card"> |
|
32 |
<div class="md-card-content large-padding"> |
|
33 |
<div class="uk-article"> |
|
34 |
|
|
35 |
<p class="uk-article-lead uk-margin-bottom">You don't have metrics enabled for this repository yet. Would you like to enable them?</p> |
|
36 |
|
|
37 |
<div class="uk-grid uk-margin-medium-top uk-margin-medium-bottom"> |
|
38 |
<figure class="uk-width-1-3 uk-first-column"> |
|
39 |
<img src="../../../assets/imgs/metricsWorkflow-new.svg" alt="" data-dense-cap="2" class="dense-image dense-ready"> |
|
40 |
<figcaption class="uk-thumbnail-caption">Usage stats enable workflow</figcaption> |
|
41 |
</figure> |
|
42 |
|
|
43 |
<div class="info uk-width-2-3"> |
|
44 |
<p>Once you select to enable metrics for your repository, the following steps need to be performed:</p> |
|
45 |
<p><i>On your side</i><br> |
|
46 |
1. Download the tracking code for your repository platform<br> |
|
47 |
2. Configure the tracking code according to the instructions<br> |
|
48 |
3. Deploy the tracking code in your repository platform |
|
49 |
</p> |
|
50 |
<p><i>On the OpenAIRE's side</i><br> |
|
51 |
4. Validate the installation of the tracking code and inform the repository manager accordingly<br> |
|
52 |
</p> |
|
53 |
</div> |
|
54 |
</div> |
|
55 |
|
|
56 |
<blockquote> |
|
57 |
For more details about the workflows and tools please consult the |
|
58 |
<a target="_blank" href="https://openaire.github.io/usage-statistics-guidelines/"> |
|
59 |
“Guidelines for Collecting Usage Events and Provision of Usage Statistics” |
|
60 |
</a> |
|
61 |
. |
|
62 |
</blockquote> |
|
63 |
|
|
64 |
<button class="uk-button uk-button-primary uk-margin-top" (click)="confirmEnabling()">Enable Metrics</button> |
|
65 |
|
|
66 |
</div> |
|
67 |
</div> |
|
68 |
</div> |
|
69 |
|
|
70 |
</div> |
|
71 |
</div> |
|
72 |
|
|
73 |
</div> |
|
74 |
|
|
75 |
<!-- RIGHT HELP CONTENT --> |
|
76 |
<aside-help-content #rightHelperContent [position]="'right'" |
|
77 |
[ngClass]="rightHelperContent.isPresent()?'tm-sidebar uk-width-1-4@m uk-first-column':'clear-style'"> |
|
78 |
</aside-help-content> |
|
79 |
|
|
80 |
</div> |
|
81 |
|
|
82 |
<!-- BOTTOM HELP CONTENT --> |
|
83 |
<help-content #bottomHelperContent [position]="'bottom'" |
|
84 |
[ngClass]="bottomHelperContent.isPresent()?'uk-margin-medium-top uk-margin-medium-bottom':'clear-style'"> |
|
85 |
</help-content> |
|
86 |
|
|
87 |
</div> |
|
88 |
</div> |
|
89 |
|
|
90 |
<confirmation-dialog #confirmEnablingModal [title]="modalTitle" [isModalShown]="isModalShown" |
|
91 |
[confirmActionButton]="modalButton" (emitObject)="confirmedEnabling($event)"> |
|
92 |
Are you sure you want to enable metrics for this repository? |
|
93 |
</confirmation-dialog> |
|
94 | 0 |
modules/uoa-repository-dashboard-gui/branches/new-ui/src/app/pages/metrics/metrics-instructions.component.ts | ||
---|---|---|
1 |
/** |
|
2 |
* Created by myrto on 11/24/17. |
|
3 |
*/ |
|
4 |
import { Component, OnInit } from '@angular/core'; |
|
5 |
import { PiwikInfo } from '../../domain/typeScriptClasses'; |
|
6 |
import { ActivatedRoute, Router } from '@angular/router'; |
|
7 |
import { PiwikService } from '../../services/piwik.service'; |
|
8 |
import { AuthenticationService } from '../../services/authentication.service'; |
|
9 |
|
|
10 |
@Component ({ |
|
11 |
selector: 'app-metrics-instructions', |
|
12 |
templateUrl: 'metrics-instructions.component.html' |
|
13 |
}) |
|
14 |
|
|
15 |
export class MetricsInstructionsComponent implements OnInit { |
|
16 |
piwik: PiwikInfo; |
|
17 |
errorMessage: string; |
|
18 |
|
|
19 |
constructor( |
|
20 |
private route: ActivatedRoute, |
|
21 |
private router: Router, |
|
22 |
private piwikService: PiwikService, |
|
23 |
private authService: AuthenticationService) {} |
|
24 |
|
|
25 |
ngOnInit() { |
|
26 |
this.getPiwik(); |
|
27 |
let body = document.getElementsByTagName('body')[0]; |
|
28 |
body.classList.remove("top_bar_active"); //remove the class |
|
29 |
body.classList.remove("page_heading_active"); |
|
30 |
body.classList.remove("landing"); |
|
31 |
body.classList.add("dashboard"); |
|
32 |
} |
|
33 |
|
|
34 |
getPiwik(): void { |
|
35 |
const id = this.route.snapshot.paramMap.get('id'); |
|
36 |
this.piwikService.getPiwikInfo(id).subscribe( |
|
37 |
piwik => this.piwik = piwik, |
|
38 |
error => console.log(error), |
|
39 |
() => {} |
|
40 |
); |
|
41 |
} |
|
42 |
|
|
43 |
} |
|
44 | 0 |
modules/uoa-repository-dashboard-gui/branches/new-ui/src/app/pages/metrics/metrics-usagestats-report-results.component.html | ||
---|---|---|
1 |
<div id="page_content"> |
|
2 |
<div id="page_content_inner"> |
|
3 |
<h2 class="heading_b uk-margin-bottom">Get usage statistics report</h2> |
|
4 |
|
|
5 |
<!-- TOP HELP CONTENT --> |
|
6 |
<help-content #topHelperContent [position]="'top'" |
|
7 |
[ngClass]="topHelperContent.isPresent()?'uk-margin-medium-top uk-margin-medium-bottom':'clear-style'"> |
|
8 |
</help-content> |
|
9 |
|
|
10 |
<div class="uk-grid"> |
|
11 |
|
|
12 |
<!-- LEFT HELP CONTENT --> |
|
13 |
<aside-help-content #leftHelperContent [position]="'left'" |
|
14 |
[ngClass]="leftHelperContent.isPresent()?'tm-sidebar uk-width-1-4@m uk-first-column':'clear-style'"> |
|
15 |
</aside-help-content> |
|
16 |
|
|
17 |
<!-- MIDDLE --> |
|
18 |
<div class=" uk-width-expand@m"> |
|
19 |
|
|
20 |
<div *ngIf="errorMessage" class="uk-alert uk-alert-warning">{{errorMessage}}</div> |
|
21 |
<div *ngIf="loadingMessage" class="loading-big"> |
|
22 |
<div class="loader-big" style="text-align: center; padding-top: 170px; color: rgb(47, 64, 80); font-weight: bold;"> |
|
23 |
{{ loadingMessage }} |
|
24 |
</div> |
|
25 |
<div class="transparentFilm"></div> |
|
26 |
</div> |
|
27 |
|
|
28 |
<div *ngIf="repoResponse" class="md-card"> |
|
29 |
<div class="md-card-content large-padding"> |
|
30 |
|
|
31 |
<div class="uk-margin-bottom" data-uk-margin=""> |
|
32 |
|
|
33 |
<div class="uk-grid"> |
|
34 |
<div class="uk-width-4-5@m"> |
|
35 |
<h3>{{ repoResponse.ReportDefinition['@Name'] }} Report Results |
|
36 |
<span *ngIf="repoResponse.Report && |
|
37 |
repoResponse.Report.Report && |
|
38 |
repoResponse.Report.Report.Customer && |
|
39 |
repoResponse.Report.Report.Customer.ReportItems && |
|
40 |
repoResponse.Report.Report.Customer.ReportItems.length > 0">for {{ repoResponse.Report.Report.Customer.ReportItems[0].ItemPlatform }}</span> |
|
41 |
</h3> |
|
42 |
</div> |
|
43 |
<div class="uk-width-1-5@m"> |
|
44 |
<div [formGroup]="pageSizeSelect" class="md-input-wrapper md-input-filled"> |
|
45 |
<label class="">Results per page</label> |
|
46 |
<select class="md-input" formControlName="selectPageSize" (change)="getPageSize()"> |
|
47 |
<option value="10" selected>10</option> |
|
48 |
<option value="25">25</option> |
|
49 |
<option value="50">50</option> |
|
50 |
<option value="100">100</option> |
|
51 |
</select> |
|
52 |
<span class="md-input-bar"></span> |
|
53 |
</div> |
|
54 |
</div> |
|
55 |
</div> |
|
56 |
|
|
57 |
</div> |
|
58 |
|
|
59 |
<hr> |
|
60 |
|
|
61 |
<div class="uk-grid uk-grid-divider" data-uk-grid-margin=""> |
|
62 |
|
|
63 |
<div class="uk-width-3-4@m uk-row-first"> |
|
64 |
|
|
65 |
<!-- RESULTS TABLE --> |
|
66 |
<div class="uk-overflow-container"> |
|
67 |
<table class="uk-table table_check" style="overflow-wrap: anywhere;"> |
|
68 |
<thead> |
|
69 |
<tr> |
|
70 |
<th class="uk-width-1-6" *ngIf="chosenReport !== 'RR1'">Title</th> |
|
71 |
<th class="uk-width-1-6" *ngIf="chosenReport !== 'RR1'">Publisher</th> |
|
72 |
<th class="uk-width-1-6" *ngIf="chosenReport === 'RR1'">Platform name</th> |
|
73 |
<th class="uk-width-1-6">{{ (chosenReport !== 'RR1') ? 'Item Urls' : 'Url' }}</th> |
|
74 |
<th class="uk-width-1-6">Type</th> |
|
75 |
<th class="uk-width-1-6" colspan="2">Downloads/Views</th> |
|
76 |
<!--<th class="uk-width-2-10">Repository</th>--> |
|
77 |
<!--<th class="uk-width-1-10">Validation Type</th>--> |
|
78 |
<!--<th class="uk-width-1-10">Status</th>--> |
|
79 |
<!--<th class="uk-width-1-10">Score</th>--> |
|
80 |
<!--<th class="uk-width-1-10">Started</th>--> |
|
81 |
<!--<th class="uk-width-2-10">Guidelines</th>--> |
|
82 |
<!--<th class="uk-width-1-10">Actions</th>--> |
|
83 |
<!--<th class="uk-width-1-10"></th>--> |
|
84 |
</tr> |
|
85 |
</thead> |
|
86 |
<tbody> |
|
87 |
<tr *ngIf="infoMessage"> |
|
88 |
<td colspan="6">{{ infoMessage }}</td> |
|
89 |
</tr> |
|
90 |
<ng-container *ngIf="repoResponse?.Report?.Report?.Customer?.ReportItems"> |
|
91 |
<ng-container *ngFor="let item of repoResponse.Report.Report.Customer.ReportItems; let item_i = index"> |
|
92 |
<tr> |
|
93 |
<td *ngIf="chosenReport !== 'RR1'">{{ item.ItemName }}</td> |
|
94 |
<td *ngIf="chosenReport !== 'RR1'">{{ item.ItemPublisher }}</td> |
|
95 |
<td *ngIf="chosenReport === 'RR1'">{{ item.ItemPlatform }}</td> |
|
96 |
<td> |
|
97 |
<div *ngFor="let url of transformItem(item.ItemIdentifier); let i = index" class="uk-margin-small-bottom"> |
|
98 |
<!--<br *ngIf="i>0">--> |
|
99 |
{{ url }} |
|
100 |
</div> |
|
101 |
</td> |
|
102 |
<td>{{ item.ItemDataType }}</td> |
|
103 |
<td class="uk-text-center" |
|
104 |
*ngIf="repoResponse.ReportDefinition.Filters.ReportAttribute[0].Value === 'Monthly'" colspan="2"> |
|
105 |
<a *ngIf="item.ItemPerformance && (item.ItemPerformance.length > 0)" |
|
106 |
(click)="displayItemPerformance(item_i)">{{ (selectedItemIndex === item_i) ? 'Hide' : 'See' }} results</a> |
|
107 |
</td> |
|
108 |
<td class="uk-text-center" |
|
109 |
*ngIf="repoResponse.ReportDefinition.Filters.ReportAttribute[0].Value === 'Totals'"> |
|
110 |
{{ item.ItemPerformance[0].Instance[0].Count }} |
|
111 |
</td> |
|
112 |
<td class="uk-text-center" |
|
113 |
*ngIf="repoResponse.ReportDefinition.Filters.ReportAttribute[0].Value === 'Totals'"> |
|
114 |
{{ item.ItemPerformance[0].Instance[1].Count }} |
|
115 |
</td> |
|
116 |
</tr> |
|
117 |
<tr *ngIf="(selectedItemIndex === item_i)"> |
|
118 |
<td colspan="6"> |
|
119 |
<div class="uk-animation-slide-top-medium uk-margin-small-top"> |
|
120 |
<table class="uk-table uk-table-middle uk-table-striped innerTable uk-margin-small-top uk-margin-small-bottom"> |
|
121 |
<tr> |
|
122 |
<th>Month</th> |
|
123 |
<th>Downloads</th> |
|
124 |
<th>Views</th> |
|
125 |
</tr> |
|
126 |
<tr *ngFor="let month of item.ItemPerformance"> |
|
127 |
<td>{{ month.Period.Begin | date: "MMM yyyy" }}</td> |
|
128 |
<td>{{ month.Instance[0].Count }}</td> |
|
129 |
<td>{{ month.Instance[1].Count }}</td> |
|
130 |
</tr> |
|
131 |
</table> |
|
132 |
</div> |
|
133 |
</td> |
|
134 |
</tr> |
|
135 |
</ng-container> |
|
136 |
</ng-container> |
|
137 |
</tbody> |
|
138 |
</table> |
|
139 |
</div> |
|
140 |
|
|
141 |
|
|
142 |
|
|
143 |
<!--<div>--> |
|
144 |
<!--<div>--> |
|
145 |
<!--<div class="uk-overflow-auto uk-scrollspy-inview uk-animation-slide-top-medium uk-margin-top uk-margin-bottom">--> |
|
146 |
|
|
147 |
<!--<table class="uk-table uk-table-middle uk-table-striped" style="vertical-align: top !important;">--> |
|
148 |
<!--<thead>--> |
|
149 |
<!--<tr>--> |
|
150 |
<!--<th *ngIf="chosenReport !== 'RR1'">Title</th>--> |
|
151 |
<!--<th *ngIf="chosenReport !== 'RR1'">Publisher</th>--> |
|
152 |
<!--<th *ngIf="chosenReport === 'RR1'">Platform name</th>--> |
|
153 |
<!--<th>{{ (chosenReport !== 'RR1') ? 'Item Urls' : 'Url' }}</th>--> |
|
154 |
<!--<th>Type</th>--> |
|
155 |
<!--<th colspan="2">Downloads/Views</th>--> |
|
156 |
<!--</tr>--> |
|
157 |
<!--</thead>--> |
|
158 |
<!--<td colspan="6" *ngIf="infoMessage">{{ infoMessage }}</td>--> |
|
159 |
<!--<tbody *ngFor="let item of repoResponse.Report.Report.Customer.ReportItems; let item_i = index"--> |
|
160 |
<!--style="border-bottom: 1px solid whitesmoke;">--> |
|
161 |
<!--<tr>--> |
|
162 |
<!--<td *ngIf="chosenReport !== 'RR1'">{{ item.ItemName }}</td>--> |
|
163 |
<!--<td *ngIf="chosenReport !== 'RR1'">{{ item.ItemPublisher }}</td>--> |
|
164 |
<!--<td *ngIf="chosenReport === 'RR1'">{{ item.ItemPlatform }}</td>--> |
|
165 |
<!--<td style="min-width: 300px;">--> |
|
166 |
<!--<span *ngFor="let url of transformItem(item.ItemIdentifier); let i = index">--> |
|
167 |
<!--<br *ngIf="i>0">{{ url }}--> |
|
168 |
<!--</span>--> |
|
169 |
<!--</td>--> |
|
170 |
<!--<td>{{ item.ItemDataType }}</td>--> |
|
171 |
<!--<td class="uk-text-center"--> |
|
172 |
<!--*ngIf="repoResponse.ReportDefinition.Filters.ReportAttribute[0].Value === 'Monthly'" colspan="2">--> |
|
173 |
<!--<a *ngIf="item.ItemPerformance && (item.ItemPerformance.length > 0)"--> |
|
174 |
<!--(click)="displayItemPerformance(item_i)">{{ (selectedItemIndex === item_i) ? 'Hide' : 'See' }} results</a>--> |
|
175 |
<!--</td>--> |
|
176 |
<!--<td class="uk-text-center"--> |
|
177 |
<!--*ngIf="repoResponse.ReportDefinition.Filters.ReportAttribute[0].Value === 'Totals'">--> |
|
178 |
<!--{{ item.ItemPerformance[0].Instance[0].Count }}--> |
|
179 |
<!--</td>--> |
|
180 |
<!--<td class="uk-text-center"--> |
|
181 |
<!--*ngIf="repoResponse.ReportDefinition.Filters.ReportAttribute[0].Value === 'Totals'">--> |
|
182 |
<!--{{ item.ItemPerformance[0].Instance[1].Count }}--> |
|
183 |
<!--</td>--> |
|
184 |
<!--</tr>--> |
|
185 |
<!--<tr *ngIf="(selectedItemIndex === item_i)">--> |
|
186 |
<!--<td colspan="6">--> |
|
187 |
<!--<div class="uk-animation-slide-top-medium uk-margin-small-top">--> |
|
188 |
<!--<table class="uk-table uk-table-middle uk-table-striped innerTable">--> |
|
189 |
<!--<tr>--> |
|
190 |
<!--<th>Month</th>--> |
|
191 |
<!--<th>Downloads</th>--> |
|
192 |
<!--<th>Views</th>--> |
|
193 |
<!--</tr>--> |
|
194 |
<!--<tr *ngFor="let month of item.ItemPerformance">--> |
|
195 |
<!--<td>{{ month.Period.Begin | date: "MMM yyyy" }}</td>--> |
|
196 |
<!--<td>{{ month.Instance[0].Count }}</td>--> |
|
197 |
<!--<td>{{ month.Instance[1].Count }}</td>--> |
|
198 |
<!--</tr>--> |
|
199 |
<!--</table>--> |
|
200 |
<!--</div>--> |
|
201 |
<!--</td>--> |
|
202 |
<!--</tr>--> |
|
203 |
<!--</tbody>--> |
|
204 |
<!--</table>--> |
|
205 |
|
|
206 |
<!--</div>--> |
|
207 |
<!--</div>--> |
|
208 |
<!--</div>--> |
|
209 |
|
|
210 |
<!-- BOTTOM PAGINATION LINKS --> |
|
211 |
<ul class="uk-pagination uk-margin-medium-top"> |
|
212 |
<li class="uk-pagination-previous"><a (click)="goToPreviousPage()"><i class="uk-icon-angle-left"></i><span class="uk-margin-left">Previous</span></a></li> |
|
213 |
<li class=""><span>page {{ (totalPages > 0) ? page+1 : 0 }} of {{ totalPages }}</span></li> |
|
214 |
<li class="uk-pagination-next"><a (click)="goToNextPage()"><span class="uk-margin-right">Next</span><i class="uk-icon-angle-right"></i></a></li> |
|
215 |
</ul> |
|
216 |
|
|
217 |
</div> |
|
218 |
|
|
219 |
<div class="uk-width-1-4@m"> |
|
220 |
|
|
221 |
<div class="uk-margin-medium-bottom"> |
|
222 |
<p> |
|
223 |
Number of results: |
|
224 |
<span class="uk-badge uk-badge-success uk-text-upper uk-margin-small-left">{{ repoResponse.ReportDefinition.Filters.ReportAttribute[1].Value }}</span> |
|
225 |
</p> |
|
226 |
<p> |
|
227 |
Filters: |
|
228 |
<span *ngFor="let filter of repoResponse.ReportDefinition.Filters.Filter; let i = index" class="uk-badge uk-badge-outline uk-text-upper uk-margin-small-left"> |
|
229 |
{{ filter.Name }}: {{ filter.Value }} |
|
230 |
</span> |
|
231 |
</p> |
|
232 |
</div> |
|
233 |
<h2 class="heading_c uk-margin-small-bottom">Details</h2> |
|
234 |
<ul class="md-list md-list-addon"> |
|
235 |
<li> |
|
236 |
<div class="md-list-addon-element"> |
|
237 |
<i class="md-list-addon-icon material-icons"></i> |
|
238 |
</div> |
|
239 |
<div class="md-list-content"> |
|
240 |
<span class="md-list-heading">{{ repoResponse.Report.Report['@Created'] | date: "yyyy-MM-dd HH:mm:ss" }}</span> |
|
241 |
<span class="uk-text-small uk-text-muted">Date run</span> |
|
242 |
</div> |
|
243 |
</li> |
|
244 |
<li> |
|
245 |
<div class="md-list-addon-element"> |
|
246 |
<i class="md-list-addon-icon material-icons"></i> |
|
247 |
</div> |
|
248 |
<div class="md-list-content"> |
|
249 |
<span class="md-list-heading">{{ coveredPeriod }}</span> |
|
250 |
<span class="uk-text-small uk-text-muted">Period covered</span> |
|
251 |
</div> |
|
252 |
</li> |
|
253 |
</ul> |
|
254 |
</div> |
|
255 |
|
|
256 |
</div> |
|
257 |
|
|
258 |
</div> |
|
259 |
</div> |
|
260 |
|
|
261 |
|
|
262 |
|
|
263 |
<!--<div *ngIf="repoResponse" class="uk-margin-top">--> |
|
264 |
<!--<h3>{{ repoResponse.ReportDefinition['@Name'] }} Report Results--> |
|
265 |
<!--<span *ngIf="repoResponse.Report &&--> |
|
266 |
<!--repoResponse.Report.Report &&--> |
|
267 |
<!--repoResponse.Report.Report.Customer &&--> |
|
268 |
<!--repoResponse.Report.Report.Customer.ReportItems &&--> |
|
269 |
<!--repoResponse.Report.Report.Customer.ReportItems.length > 0">for {{ repoResponse.Report.Report.Customer.ReportItems[0].ItemPlatform }}</span>--> |
|
270 |
<!--</h3>--> |
|
271 |
<!--<div class="uk-width-1-2">--> |
|
272 |
<!--<table class="uk-table">--> |
|
273 |
<!--<tr>--> |
|
274 |
<!--<th>Period covered</th>--> |
|
275 |
<!--<td>{{ coveredPeriod }}</td>--> |
|
276 |
<!--</tr>--> |
|
277 |
<!--<tr>--> |
|
278 |
<!--<th>Filters</th>--> |
|
279 |
<!--<td>--> |
|
280 |
<!--<span *ngFor="let filter of repoResponse.ReportDefinition.Filters.Filter; let i = index">--> |
|
281 |
<!--<br *ngIf="i>0">--> |
|
282 |
<!--{{ filter.Name }}: {{ filter.Value }}--> |
|
283 |
<!--</span>--> |
|
284 |
<!--</td>--> |
|
285 |
<!--</tr>--> |
|
286 |
<!--<tr>--> |
|
287 |
<!--<th>Date run</th>--> |
|
288 |
<!--<td>{{ repoResponse.Report.Report['@Created'] | date: "yyyy-MM-dd HH:mm:ss" }}</td>--> |
|
289 |
<!--</tr>--> |
|
290 |
<!--<tr>--> |
|
291 |
<!--<th>Number of results</th>--> |
|
292 |
<!--<td>{{ repoResponse.ReportDefinition.Filters.ReportAttribute[1].Value }}</td>--> |
|
293 |
<!--</tr>--> |
|
294 |
<!--</table>--> |
|
295 |
<!--</div>--> |
|
296 |
<!--<div *ngIf="repoResponse.Report.Report.Customer &&--> |
|
297 |
<!--repoResponse.Report.Report.Customer.ReportItems">--> |
|
298 |
<!--<div>--> |
|
299 |
<!--<div class="show-options uk-inline" style="float: right;">--> |
|
300 |
<!--<div class="filterLabel" style="display: inline;">Results per page:</div>--> |
|
301 |
<!--<div [formGroup]="pageSizeSelect" class="inlineBlock">--> |
|
302 |
<!--<select class="form-control" formControlName="selectPageSize" (change)="getPageSize()">--> |
|
303 |
<!--<option value="10" selected>10</option>--> |
|
304 |
<!--<option value="25">25</option>--> |
|
305 |
<!--<option value="50">50</option>--> |
|
306 |
<!--<option value="100">100</option>--> |
|
307 |
<!--</select>--> |
|
308 |
<!--</div>--> |
|
309 |
<!--</div>--> |
|
310 |
<!--</div><br>--> |
|
311 |
<!--<div class="contentAndPagerPanel">--> |
|
312 |
|
|
313 |
<!--<!– TOP PAGINATION LINKS –>--> |
|
314 |
<!--<div>--> |
|
315 |
<!--<ul class="uk-pagination">--> |
|
316 |
<!--<li>--> |
|
317 |
<!--<a class="uk-link uk-link-muted" (click)="goToPreviousPage()">--> |
|
318 |
<!--<span class="uk-margin-small-right uk-pagination-previous uk-icon" uk-pagination-previous="">--> |
|
319 |
<!--<svg width="7" height="12" viewBox="0 0 7 12" xmlns="http://www.w3.org/2000/svg"--> |
|
320 |
<!--icon="pagination-previous" ratio="1"></svg>--> |
|
321 |
<!--</span>--> |
|
322 |
<!--Previous--> |
|
323 |
<!--</a>--> |
|
324 |
<!--</li>--> |
|
325 |
<!--<li class="uk-margin-auto-left">--> |
|
326 |
<!--<a class="uk-link uk-link-muted" (click)="goToNextPage()">--> |
|
327 |
<!--Next--> |
|
328 |
<!--<span class="uk-margin-small-left uk-pagination-next uk-icon" uk-pagination-next="">--> |
|
329 |
<!--<svg width="7" height="12" viewBox="0 0 7 12" xmlns="http://www.w3.org/2000/svg"--> |
|
330 |
<!--icon="pagination-next" ratio="1"></svg>--> |
|
331 |
<!--</span>--> |
|
332 |
<!--</a>--> |
|
333 |
<!--</li>--> |
|
334 |
<!--</ul>--> |
|
335 |
<!--<div class="resultsPageLabel">page {{ (totalPages > 0) ? page+1 : 0 }} of {{ totalPages }}</div>--> |
|
336 |
<!--</div>--> |
|
337 |
|
|
338 |
|
|
339 |
<!--<!– RESULTS TABLE –>--> |
|
340 |
<!--<div>--> |
|
341 |
<!--<div>--> |
|
342 |
<!--<div class="uk-overflow-auto uk-scrollspy-inview uk-animation-slide-top-medium uk-margin-top uk-margin-bottom">--> |
|
343 |
|
|
344 |
<!--<table class="uk-table uk-table-middle uk-table-striped" style="vertical-align: top !important;">--> |
|
345 |
<!--<thead>--> |
|
346 |
<!--<tr>--> |
|
347 |
<!--<th *ngIf="chosenReport !== 'RR1'">Title</th>--> |
|
348 |
<!--<th *ngIf="chosenReport !== 'RR1'">Publisher</th>--> |
|
349 |
<!--<th *ngIf="chosenReport === 'RR1'">Platform name</th>--> |
|
350 |
<!--<th>{{ (chosenReport !== 'RR1') ? 'Item Urls' : 'Url' }}</th>--> |
|
351 |
<!--<th>Type</th>--> |
|
352 |
<!--<th colspan="2">Downloads/Views</th>--> |
|
353 |
<!--</tr>--> |
|
354 |
<!--</thead>--> |
|
355 |
<!--<td colspan="6" *ngIf="infoMessage" class="uk-alert">{{ infoMessage }}</td>--> |
|
356 |
<!--<tbody *ngFor="let item of repoResponse.Report.Report.Customer.ReportItems; let item_i = index"--> |
|
357 |
<!--style="border-bottom: 1px solid whitesmoke;">--> |
|
358 |
<!--<tr>--> |
|
359 |
<!--<td *ngIf="chosenReport !== 'RR1'">{{ item.ItemName }}</td>--> |
|
360 |
<!--<td *ngIf="chosenReport !== 'RR1'">{{ item.ItemPublisher }}</td>--> |
|
361 |
<!--<td *ngIf="chosenReport === 'RR1'">{{ item.ItemPlatform }}</td>--> |
|
362 |
<!--<td style="min-width: 300px;">--> |
|
363 |
<!--<span *ngFor="let url of transformItem(item.ItemIdentifier); let i = index">--> |
|
364 |
<!--<br *ngIf="i>0">{{ url }}--> |
|
365 |
<!--</span>--> |
|
366 |
<!--</td>--> |
|
367 |
<!--<td>{{ item.ItemDataType }}</td>--> |
|
368 |
<!--<td class="uk-text-center"--> |
|
369 |
<!--*ngIf="repoResponse.ReportDefinition.Filters.ReportAttribute[0].Value === 'Monthly'" colspan="2">--> |
|
370 |
<!--<a *ngIf="item.ItemPerformance && (item.ItemPerformance.length > 0)"--> |
Also available in: Unified diff
Second commit for the new layout provided by the UX team