Added R5 report titles

This commit is contained in:
TheQuaker 2023-03-22 15:30:25 +02:00
parent 3f5919b2df
commit 2259b7b701
4 changed files with 48 additions and 33 deletions

View File

@ -58,10 +58,11 @@ export class MetricsUsagestatsReportResultsComponent implements OnInit {
this.params.append('DatasetIdentifier', qparams['datasetIdentifier']); 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['metricTypes']);
this.params.append('MetricType', qparams['totalItemInvestigations']); // this.params.append('MetricType', qparams['totalItemRequests']);
this.params.append('MetricType', qparams['uniqueItemRequests']); // this.params.append('MetricType', qparams['totalItemInvestigations']);
this.params.append('MetricType', qparams['uniqueItemInvestigations']); // this.params.append('MetricType', qparams['uniqueItemRequests']);
// this.params.append('MetricType', qparams['uniqueItemInvestigations']);
}); });
this.chosenReport = this.params.get('Report'); this.chosenReport = this.params.get('Report');

View File

@ -137,22 +137,22 @@
<h5>Metric Type</h5> <h5>Metric Type</h5>
<div> <div>
<label> <label>
<input type="checkbox" class="uk-checkbox" value="Total_Item_Requests" (change)="updateTotalItemRequests($event)"> Total Item Requests <input type="checkbox" class="uk-checkbox" value="Total_Item_Requests" checked (change)="updateTotalItemRequests($event)"> Total Item Requests
</label> </label>
</div> </div>
<div> <div>
<label> <label>
<input type="checkbox" class="uk-checkbox" value="Total_Item_Investigations" (change)="updateTotalItemInvestigations($event)"> Total Item Investigations <input type="checkbox" class="uk-checkbox" value="Total_Item_Investigations" checked (change)="updateTotalItemInvestigations($event)"> Total Item Investigations
</label> </label>
</div> </div>
<div> <div>
<label> <label>
<input type="checkbox" class="uk-checkbox" value="Unique_Item_Requests" (change)="updateUniqueItemRequests($event)"> UniqueItem Requests <input type="checkbox" class="uk-checkbox" value="Unique_Item_Requests" checked (change)="updateUniqueItemRequests($event)"> UniqueItem Requests
</label> </label>
</div> </div>
<div> <div>
<label> <label>
<input type="checkbox" class="uk-checkbox" value="Unique_Item_Investigations" (change)="updateUniqueItemInvestigations($event)"> Unique Item Investigations <input type="checkbox" class="uk-checkbox" value="Unique_Item_Investigations" checked (change)="updateUniqueItemInvestigations($event)"> Unique Item Investigations
</label> </label>
</div> </div>
</div> </div>

View File

@ -30,11 +30,11 @@ export class MetricsUsagestatsReportComponent implements OnInit {
beginDate = ''; beginDate = '';
endDate = ''; endDate = '';
itemIdentifier = ''; itemIdentifier = '';
datasetIdentifier = null; datasetIdentifier = '';
totalItemRequests = null; totalItemRequests = 'Total_Item_Requests';
totalItemInvestigations = null; totalItemInvestigations = 'Total_Item_Investigations';
uniqueItemRequests = null; uniqueItemRequests = 'Unique_Item_Requests';
uniqueItemInvestigations = null; uniqueItemInvestigations = 'Unique_Item_Investigations';
itemDataType = ''; itemDataType = '';
granularity = 'Monthly'; granularity = 'Monthly';
@ -182,6 +182,19 @@ export class MetricsUsagestatsReportComponent implements OnInit {
goToReport() { goToReport() {
if (!this.useCurrentRepo) { this.shownRepoId = ''; } if (!this.useCurrentRepo) { this.shownRepoId = ''; }
const metricTypes: string[] = [];
if (this.totalItemRequests !== null) {
metricTypes.push(this.totalItemRequests);
}
if (this.totalItemInvestigations !== null) {
metricTypes.push(this.totalItemRequests);
}
if (this.uniqueItemRequests !== null) {
metricTypes.push(this.uniqueItemRequests);
}
if (this.uniqueItemInvestigations !== null) {
metricTypes.push(this.uniqueItemInvestigations);
}
this.router.navigate(['usagestats-report-results'], { this.router.navigate(['usagestats-report-results'], {
relativeTo: this.route.parent, relativeTo: this.route.parent,
queryParams: { queryParams: {
@ -194,10 +207,11 @@ export class MetricsUsagestatsReportComponent implements OnInit {
itemIdentifier: this.itemIdentifier, itemIdentifier: this.itemIdentifier,
datasetIdentifier: this.datasetIdentifier, datasetIdentifier: this.datasetIdentifier,
granularity: this.granularity, granularity: this.granularity,
totalItemRequests: this.totalItemRequests, metricTypes: metricTypes,
totalItemInvestigations: this.totalItemInvestigations, // totalItemRequests: this.totalItemRequests,
uniqueItemRequests: this.uniqueItemRequests, // totalItemInvestigations: this.totalItemInvestigations,
uniqueItemInvestigations: this.uniqueItemInvestigations // uniqueItemRequests: this.uniqueItemRequests,
// uniqueItemInvestigations: this.uniqueItemInvestigations
} }
}); });

View File

@ -27,11 +27,11 @@
<div class="uk-width-1-3"> <div class="uk-width-1-3">
<div class="uk-text-center md-card md-card-hover"> <div class="uk-text-center md-card md-card-hover">
<a [routerLink]="['R5','PR']" class="uk-position-cover"></a> <a [routerLink]="['R5','PR']" class="uk-position-cover"></a>
<div class="uk-card-media-top"> <div class="uk-card-media-top " style="background-color: #001a6e">
<img class="" src="../../../../assets/imgs/Icons_Reports_wide_AR1.png" alt="" style="width: 100%;"> <h1 class="uk-padding-large font-weight-bolder md-color-white">PR</h1>
</div> </div>
<div class="uk-card-body"> <div class="uk-card-body uk-padding-small">
<h3 class="uk-margin uk-card-title uk-margin-small-bottom"> <h3 class="uk-card-title uk-margin-small-bottom">
A report summarizing usage activity for the repository by month, metric type and item type A report summarizing usage activity for the repository by month, metric type and item type
</h3> </h3>
</div> </div>
@ -40,11 +40,11 @@
<div class="uk-width-1-3"> <div class="uk-width-1-3">
<div class="uk-text-center md-card md-card-hover"> <div class="uk-text-center md-card md-card-hover">
<a [routerLink]="['R5','PR_1']" class="uk-position-cover"></a> <a [routerLink]="['R5','PR_1']" class="uk-position-cover"></a>
<div class="uk-card-media-top"> <div class="uk-card-media-top " style="background-color: #001a6e">
<img class="" src="../../../../assets/imgs/Icons_Reports_wide_AR1.png" alt="" style="width: 100%;"> <h1 class="uk-padding-large font-weight-bolder md-color-white">PR_1</h1>
</div> </div>
<div class="uk-card-body"> <div class="uk-card-body uk-padding-small">
<h3 class="uk-margin uk-card-title uk-margin-small-bottom"> <h3 class="uk-card-title uk-margin-small-bottom">
A report summarizing usage activity for the repository by month, broken down by metric type A report summarizing usage activity for the repository by month, broken down by metric type
</h3> </h3>
</div> </div>
@ -53,11 +53,11 @@
<div class="uk-width-1-3"> <div class="uk-width-1-3">
<div class="uk-text-center md-card md-card-hover"> <div class="uk-text-center md-card md-card-hover">
<a [routerLink]="['R5','IR']" class="uk-position-cover"></a> <a [routerLink]="['R5','IR']" class="uk-position-cover"></a>
<div class="uk-card-media-top"> <div class="uk-card-media-top " style="background-color: #001a6e">
<img class="" src="../../../../assets/imgs/Icons_Reports_wide_AR1.png" alt="" style="width: 100%;"> <h1 class="uk-padding-large font-weight-bolder md-color-white">IR</h1>
</div> </div>
<div class="uk-card-body"> <div class="uk-card-body uk-padding-small">
<h3 class="uk-margin uk-card-title uk-margin-small-bottom"> <h3 class="uk-card-title uk-margin-small-bottom">
A report for items requests by month metric_type, item type and repository A report for items requests by month metric_type, item type and repository
</h3> </h3>
</div> </div>
@ -69,11 +69,11 @@
<div class="uk-width-1-3"> <div class="uk-width-1-3">
<div class="uk-text-center md-card md-card-hover"> <div class="uk-text-center md-card md-card-hover">
<a [routerLink]="['R5','DSR']" class="uk-position-cover"></a> <a [routerLink]="['R5','DSR']" class="uk-position-cover"></a>
<div class="uk-card-media-top"> <div class="uk-card-media-top " style="background-color: #001a6e">
<img class="" src="../../../../assets/imgs/Icons_Reports_wide_AR1.png" alt="" style="width: 100%;"> <h1 class="uk-padding-large font-weight-bolder md-color-white">DSR</h1>
</div> </div>
<div class="uk-card-body"> <div class="uk-card-body uk-padding-small">
<h3 class="uk-margin uk-card-title uk-margin-small-bottom"> <h3 class="uk-card-title uk-margin-small-bottom">
A report for datasets requests by month metric type and repository A report for datasets requests by month metric type and repository
</h3> </h3>
</div> </div>