added new querry params for release 5 reports
This commit is contained in:
parent
1d1963aeb6
commit
3f5919b2df
|
@ -74,7 +74,7 @@ export class ReportItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class ReportResponse {
|
export class ReportResponse {
|
||||||
"@Created": string;
|
'@Created': string;
|
||||||
Exception: ReportException[];
|
Exception: ReportException[];
|
||||||
Requestor: Requestor;
|
Requestor: Requestor;
|
||||||
ReportDefinition: ReportDefinition;
|
ReportDefinition: ReportDefinition;
|
||||||
|
|
|
@ -33,10 +33,10 @@
|
||||||
<div class="uk-width-4-5@m">
|
<div class="uk-width-4-5@m">
|
||||||
<h3>{{ repoResponse.ReportDefinition['@Name'] }} Report Results
|
<h3>{{ repoResponse.ReportDefinition['@Name'] }} Report Results
|
||||||
<!--<span *ngIf="repoResponse.Report &&-->
|
<!--<span *ngIf="repoResponse.Report &&-->
|
||||||
<!--repoResponse.Report.Report &&-->
|
<!--repoResponse.Report.Report &&-->
|
||||||
<!--repoResponse.Report.Report.Customer &&-->
|
<!--repoResponse.Report.Report.Customer &&-->
|
||||||
<!--repoResponse.Report.Report.Customer.ReportItems &&-->
|
<!--repoResponse.Report.Report.Customer.ReportItems &&-->
|
||||||
<!--repoResponse.Report.Report.Customer.ReportItems.length > 0">for {{ repoResponse.Report.Report.Customer.ReportItems[0].ItemPlatform }}</span>-->
|
<!--repoResponse.Report.Report.Customer.ReportItems.length > 0">for {{ repoResponse.Report.Report.Customer.ReportItems[0].ItemPlatform }}</span>-->
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-width-1-5@m">
|
<div class="uk-width-1-5@m">
|
||||||
|
@ -137,75 +137,6 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!--<div>-->
|
|
||||||
<!--<div>-->
|
|
||||||
<!--<div class="uk-overflow-auto uk-scrollspy-inview uk-animation-slide-top-medium uk-margin-top uk-margin-bottom">-->
|
|
||||||
|
|
||||||
<!--<table class="uk-table uk-table-middle uk-table-striped" style="vertical-align: top !important;">-->
|
|
||||||
<!--<thead>-->
|
|
||||||
<!--<tr>-->
|
|
||||||
<!--<th *ngIf="chosenReport !== 'RR1'">Title</th>-->
|
|
||||||
<!--<th *ngIf="chosenReport !== 'RR1'">Publisher</th>-->
|
|
||||||
<!--<th *ngIf="chosenReport === 'RR1'">Platform name</th>-->
|
|
||||||
<!--<th>{{ (chosenReport !== 'RR1') ? 'Item Urls' : 'Url' }}</th>-->
|
|
||||||
<!--<th>Type</th>-->
|
|
||||||
<!--<th colspan="2">Downloads/Views</th>-->
|
|
||||||
<!--</tr>-->
|
|
||||||
<!--</thead>-->
|
|
||||||
<!--<td colspan="6" *ngIf="infoMessage">{{ infoMessage }}</td>-->
|
|
||||||
<!--<tbody *ngFor="let item of repoResponse.Report.Report.Customer.ReportItems; let item_i = index"-->
|
|
||||||
<!--style="border-bottom: 1px solid whitesmoke;">-->
|
|
||||||
<!--<tr>-->
|
|
||||||
<!--<td *ngIf="chosenReport !== 'RR1'">{{ item.ItemName }}</td>-->
|
|
||||||
<!--<td *ngIf="chosenReport !== 'RR1'">{{ item.ItemPublisher }}</td>-->
|
|
||||||
<!--<td *ngIf="chosenReport === 'RR1'">{{ item.ItemPlatform }}</td>-->
|
|
||||||
<!--<td style="min-width: 300px;">-->
|
|
||||||
<!--<span *ngFor="let url of transformItem(item.ItemIdentifier); let i = index">-->
|
|
||||||
<!--<br *ngIf="i>0">{{ url }}-->
|
|
||||||
<!--</span>-->
|
|
||||||
<!--</td>-->
|
|
||||||
<!--<td>{{ item.ItemDataType }}</td>-->
|
|
||||||
<!--<td class="uk-text-center"-->
|
|
||||||
<!--*ngIf="repoResponse.ReportDefinition.Filters.ReportAttribute[0].Value === 'Monthly'" colspan="2">-->
|
|
||||||
<!--<a *ngIf="item.ItemPerformance && (item.ItemPerformance.length > 0)"-->
|
|
||||||
<!--(click)="displayItemPerformance(item_i)">{{ (selectedItemIndex === item_i) ? 'Hide' : 'See' }} results</a>-->
|
|
||||||
<!--</td>-->
|
|
||||||
<!--<td class="uk-text-center"-->
|
|
||||||
<!--*ngIf="repoResponse.ReportDefinition.Filters.ReportAttribute[0].Value === 'Totals'">-->
|
|
||||||
<!--{{ item.ItemPerformance[0].Instance[0].Count }}-->
|
|
||||||
<!--</td>-->
|
|
||||||
<!--<td class="uk-text-center"-->
|
|
||||||
<!--*ngIf="repoResponse.ReportDefinition.Filters.ReportAttribute[0].Value === 'Totals'">-->
|
|
||||||
<!--{{ item.ItemPerformance[0].Instance[1].Count }}-->
|
|
||||||
<!--</td>-->
|
|
||||||
<!--</tr>-->
|
|
||||||
<!--<tr *ngIf="(selectedItemIndex === item_i)">-->
|
|
||||||
<!--<td colspan="6">-->
|
|
||||||
<!--<div class="uk-animation-slide-top-medium uk-margin-small-top">-->
|
|
||||||
<!--<table class="uk-table uk-table-middle uk-table-striped innerTable">-->
|
|
||||||
<!--<tr>-->
|
|
||||||
<!--<th>Month</th>-->
|
|
||||||
<!--<th>Downloads</th>-->
|
|
||||||
<!--<th>Views</th>-->
|
|
||||||
<!--</tr>-->
|
|
||||||
<!--<tr *ngFor="let month of item.ItemPerformance">-->
|
|
||||||
<!--<td>{{ month.Period.Begin | date: "MMM yyyy" }}</td>-->
|
|
||||||
<!--<td>{{ month.Instance[0].Count }}</td>-->
|
|
||||||
<!--<td>{{ month.Instance[1].Count }}</td>-->
|
|
||||||
<!--</tr>-->
|
|
||||||
<!--</table>-->
|
|
||||||
<!--</div>-->
|
|
||||||
<!--</td>-->
|
|
||||||
<!--</tr>-->
|
|
||||||
<!--</tbody>-->
|
|
||||||
<!--</table>-->
|
|
||||||
|
|
||||||
<!--</div>-->
|
|
||||||
<!--</div>-->
|
|
||||||
<!--</div>-->
|
|
||||||
|
|
||||||
<!-- BOTTOM PAGINATION LINKS -->
|
<!-- BOTTOM PAGINATION LINKS -->
|
||||||
<ul class="uk-pagination uk-margin-medium-top">
|
<ul class="uk-pagination uk-margin-medium-top">
|
||||||
<li class="uk-pagination-previous"><a (click)="goToPreviousPage()"><i class="uk-icon-angle-left"></i><span class="uk-margin-left">Previous</span></a></li>
|
<li class="uk-pagination-previous"><a (click)="goToPreviousPage()"><i class="uk-icon-angle-left"></i><span class="uk-margin-left">Previous</span></a></li>
|
||||||
|
|
|
@ -37,11 +37,11 @@ export class MetricsUsagestatsReportResultsComponent implements OnInit {
|
||||||
this.pageSize = 10;
|
this.pageSize = 10;
|
||||||
this.readParams();
|
this.readParams();
|
||||||
this.pageSizeSelect = this.fb.group({selectPageSize: ['']});
|
this.pageSizeSelect = this.fb.group({selectPageSize: ['']});
|
||||||
let body = document.getElementsByTagName('body')[0];
|
const body = document.getElementsByTagName('body')[0];
|
||||||
body.classList.remove("top_bar_active"); //remove the class
|
body.classList.remove('top_bar_active'); // remove the class
|
||||||
body.classList.remove("page_heading_active");
|
body.classList.remove('page_heading_active');
|
||||||
body.classList.remove("landing");
|
body.classList.remove('landing');
|
||||||
body.classList.add("dashboard");
|
body.classList.add('dashboard');
|
||||||
}
|
}
|
||||||
|
|
||||||
readParams() {
|
readParams() {
|
||||||
|
@ -49,14 +49,19 @@ export class MetricsUsagestatsReportResultsComponent implements OnInit {
|
||||||
|
|
||||||
this.route.queryParams.subscribe( qparams => {
|
this.route.queryParams.subscribe( qparams => {
|
||||||
this.params.append('Report', qparams['report']);
|
this.params.append('Report', qparams['report']);
|
||||||
this.params.append('Release', '4');
|
this.params.append('Release', qparams['release']);
|
||||||
this.params.append('RequestorID', this.authService.getUserEmail());
|
this.params.append('RequestorID', this.authService.getUserEmail());
|
||||||
this.params.append('BeginDate', qparams['beginDate']);
|
this.params.append('BeginDate', qparams['beginDate']);
|
||||||
this.params.append('EndDate', qparams['endDate']);
|
this.params.append('EndDate', qparams['endDate']);
|
||||||
this.params.append('RepositoryIdentifier', qparams['repoId']);
|
this.params.append('RepositoryIdentifier', qparams['repoId']);
|
||||||
this.params.append('ItemIdentifier', qparams['itemIdentifier']);
|
this.params.append('ItemIdentifier', qparams['itemIdentifier']);
|
||||||
|
this.params.append('DatasetIdentifier', qparams['datasetIdentifier']);
|
||||||
this.params.append('ItemDataType', qparams['itemIdentifier']);
|
this.params.append('ItemDataType', qparams['itemIdentifier']);
|
||||||
this.params.append('Granularity', qparams['granularity']);
|
this.params.append('Granularity', qparams['granularity']);
|
||||||
|
this.params.append('MetricType', qparams['totalItemRequests']);
|
||||||
|
this.params.append('MetricType', qparams['totalItemInvestigations']);
|
||||||
|
this.params.append('MetricType', qparams['uniqueItemRequests']);
|
||||||
|
this.params.append('MetricType', qparams['uniqueItemInvestigations']);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.chosenReport = this.params.get('Report');
|
this.chosenReport = this.params.get('Report');
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
|
|
||||||
<div class="md-input-wrapper md-input-filled uk-margin-bottom">
|
<div class="md-input-wrapper md-input-filled uk-margin-bottom">
|
||||||
<label>Release</label>
|
<label>Release</label>
|
||||||
<input class="md-input label-fixed" type="text" value="{{reportType}}" disabled>
|
<input class="md-input label-fixed" type="text" value="{{release}}" disabled>
|
||||||
<span class="md-input-bar "></span>
|
<span class="md-input-bar "></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -112,16 +112,27 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div *ngIf="chosen_report != 'JR1' && chosen_report != 'RR1'" class="">
|
<div *ngIf="chosen_report != 'JR1' && chosen_report != 'RR1' && chosen_report != 'PR'
|
||||||
|
&& chosen_report != 'PR_P1' && chosen_report != 'DSR'">
|
||||||
<div class="md-input-wrapper md-input-filled uk-margin-bottom">
|
<div class="md-input-wrapper md-input-filled uk-margin-bottom">
|
||||||
<label>Item Identifier</label>
|
<label>Item Identifier</label>
|
||||||
<input class="md-input label-fixed" name="ItemIdentifier" placeholder="e.g. openaire:od_________::fb90de6f20d79783d05749d8f60417d5"
|
<input class="md-input label-fixed" name="ItemIdentifier" placeholder="e.g. doi:10.xyz/12345"
|
||||||
type="text" (blur)="updateItemIdentifier($event)">
|
type="text" (blur)="updateItemIdentifier($event)">
|
||||||
<span class="md-input-bar "></span>
|
<span class="md-input-bar "></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="chosen_report == 'DSR'">
|
||||||
|
<div class="md-input-wrapper md-input-filled uk-margin-bottom">
|
||||||
|
<label>Dataset Identifier</label>
|
||||||
|
<input class="md-input label-fixed" name="DatasetIdentifier" placeholder="e.g. doi:10.xyz/12345"
|
||||||
|
type="text" (blur)="updateDatasetIdentifier($event)">
|
||||||
|
<span class="md-input-bar "></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<div *ngIf="chosen_report == 'PR' || chosen_report == 'IR' || chosen_report == 'DSR'">
|
<div *ngIf="chosen_report == 'PR' || chosen_report == 'IR' || chosen_report == 'DSR'">
|
||||||
<h5>Metric Type</h5>
|
<h5>Metric Type</h5>
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { RepositoryService } from '../../../services/repository.service';
|
import { RepositoryService } from '../../../services/repository.service';
|
||||||
import { AuthenticationService } from '../../../services/authentication.service';
|
import { AuthenticationService } from '../../../services/authentication.service';
|
||||||
import { loadingRepoMessage } from '../../../domain/shared-messages';
|
import { loadingRepoMessage } from '../../../domain/shared-messages';
|
||||||
import { SharedService } from "../../../services/shared.service";
|
import { SharedService } from '../../../services/shared.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'metrics-usagestats-report',
|
selector: 'metrics-usagestats-report',
|
||||||
|
@ -26,10 +26,11 @@ export class MetricsUsagestatsReportComponent implements OnInit {
|
||||||
chosen_report: string;
|
chosen_report: string;
|
||||||
|
|
||||||
userEmail: string;
|
userEmail: string;
|
||||||
reportType: string;
|
release: string;
|
||||||
beginDate = '';
|
beginDate = '';
|
||||||
endDate = '';
|
endDate = '';
|
||||||
itemIdentifier = '';
|
itemIdentifier = '';
|
||||||
|
datasetIdentifier = null;
|
||||||
totalItemRequests = null;
|
totalItemRequests = null;
|
||||||
totalItemInvestigations = null;
|
totalItemInvestigations = null;
|
||||||
uniqueItemRequests = null;
|
uniqueItemRequests = null;
|
||||||
|
@ -45,7 +46,7 @@ export class MetricsUsagestatsReportComponent implements OnInit {
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
if(this.sharedService.getRepository()) {
|
if (this.sharedService.getRepository()) {
|
||||||
this.repo = this.sharedService.getRepository();
|
this.repo = this.sharedService.getRepository();
|
||||||
this.getInfo();
|
this.getInfo();
|
||||||
}
|
}
|
||||||
|
@ -57,11 +58,11 @@ export class MetricsUsagestatsReportComponent implements OnInit {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
let body = document.getElementsByTagName('body')[0];
|
const body = document.getElementsByTagName('body')[0];
|
||||||
body.classList.remove("top_bar_active"); //remove the class
|
body.classList.remove('top_bar_active'); // remove the class
|
||||||
body.classList.remove("page_heading_active");
|
body.classList.remove('page_heading_active');
|
||||||
body.classList.remove("landing");
|
body.classList.remove('landing');
|
||||||
body.classList.add("dashboard");
|
body.classList.add('dashboard');
|
||||||
}
|
}
|
||||||
|
|
||||||
getInfo() {
|
getInfo() {
|
||||||
|
@ -78,7 +79,7 @@ export class MetricsUsagestatsReportComponent implements OnInit {
|
||||||
|
|
||||||
getParams() {
|
getParams() {
|
||||||
// this.repoId = this.route.snapshot.paramMap.get('id');
|
// this.repoId = this.route.snapshot.paramMap.get('id');
|
||||||
this.reportType = this.route.snapshot.paramMap.get('reportType').slice(1, 2);
|
this.release = this.route.snapshot.paramMap.get('reportType').slice(1, 2);
|
||||||
this.chosen_report = this.route.snapshot.paramMap.get('reportID');
|
this.chosen_report = this.route.snapshot.paramMap.get('reportID');
|
||||||
this.shownRepoId = this.convertToDisplayedFormat(this.repo.id);
|
this.shownRepoId = this.convertToDisplayedFormat(this.repo.id);
|
||||||
console.log(`shownRepoId is ${this.repo.id}`);
|
console.log(`shownRepoId is ${this.repo.id}`);
|
||||||
|
@ -135,6 +136,10 @@ export class MetricsUsagestatsReportComponent implements OnInit {
|
||||||
this.itemIdentifier = event.target.value;
|
this.itemIdentifier = event.target.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateDatasetIdentifier(event: any) {
|
||||||
|
this.datasetIdentifier = event.target.value;
|
||||||
|
}
|
||||||
|
|
||||||
updateGranularity(event: any) {
|
updateGranularity(event: any) {
|
||||||
this.granularity = event.target.value;
|
this.granularity = event.target.value;
|
||||||
}
|
}
|
||||||
|
@ -181,12 +186,18 @@ export class MetricsUsagestatsReportComponent implements OnInit {
|
||||||
relativeTo: this.route.parent,
|
relativeTo: this.route.parent,
|
||||||
queryParams: {
|
queryParams: {
|
||||||
report: this.chosen_report,
|
report: this.chosen_report,
|
||||||
|
release: this.release,
|
||||||
beginDate: this.beginDate,
|
beginDate: this.beginDate,
|
||||||
endDate: this.endDate,
|
endDate: this.endDate,
|
||||||
repoId: this.shownRepoId,
|
repoId: this.shownRepoId,
|
||||||
itemDataType: this.itemDataType,
|
itemDataType: this.itemDataType,
|
||||||
itemIdentifier: this.itemIdentifier,
|
itemIdentifier: this.itemIdentifier,
|
||||||
granularity: this.granularity
|
datasetIdentifier: this.datasetIdentifier,
|
||||||
|
granularity: this.granularity,
|
||||||
|
totalItemRequests: this.totalItemRequests,
|
||||||
|
totalItemInvestigations: this.totalItemInvestigations,
|
||||||
|
uniqueItemRequests: this.uniqueItemRequests,
|
||||||
|
uniqueItemInvestigations: this.uniqueItemInvestigations
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue