Skip to content

Commit 91f14e3

Browse files
author
Andrea Barbasso
committed
[DSC-2050] fix missing queryParam in url from download metric
only embedded-download was working before this
1 parent 7f87b2b commit 91f14e3

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/app/shared/metric/metric-default/metric-default.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Component, OnInit } from '@angular/core';
22
import { BaseMetricComponent } from '../metric-loader/base-metric.component';
3+
import { METRIC_TYPE_DOWNLOAD } from '../metric-embedded/metric-embedded-download/metric-embedded-download.component';
34

45
@Component({
56
selector: 'ds-metric-default',
@@ -16,5 +17,8 @@ export class MetricDefaultComponent extends BaseMetricComponent implements OnIni
1617

1718
ngOnInit(): void {
1819
this.url = this.getDetailUrl();
20+
if (this.metric.metricType === 'download') {
21+
this.url += (this.url.includes('?') ? '&' : '?') + 'reportType=' + METRIC_TYPE_DOWNLOAD;
22+
}
1923
}
2024
}

0 commit comments

Comments
 (0)