mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-19 17:14:57 +00:00
Add default metric
This commit is contained in:
parent
d58b2f4837
commit
bff9adc6eb
@ -37,7 +37,7 @@ export class AnalyticsReportHeatMapComponent implements OnInit {
|
||||
field: any = {};
|
||||
|
||||
metricForm: FormGroup;
|
||||
currentMetric: any;
|
||||
currentMetric: string;
|
||||
|
||||
constructor(private translate: AlfrescoTranslationService,
|
||||
private analyticsService: AnalyticsService,
|
||||
@ -50,6 +50,7 @@ export class AnalyticsReportHeatMapComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
this.initForm();
|
||||
this.field.id = 'metrics';
|
||||
this.field.value = 'totalCount';
|
||||
|
||||
this.analyticsService.getMetricValues().subscribe(
|
||||
(opts: any[]) => {
|
||||
@ -80,4 +81,10 @@ export class AnalyticsReportHeatMapComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
hasMetric() {
|
||||
return (this.report.totalCountsPercentages ||
|
||||
this.report.totalTimePercentages ||
|
||||
this.report.avgTimePercentages) ? true : false;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user