[DATALAB-1952]: Added language key to billing export
diff --git a/services/self-service/src/main/resources/webapp/src/app/reports/reporting/reporting.component.ts b/services/self-service/src/main/resources/webapp/src/app/reports/reporting/reporting.component.ts
index 5447c6f..d408383 100644
--- a/services/self-service/src/main/resources/webapp/src/app/reports/reporting/reporting.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/reports/reporting/reporting.component.ts
@@ -27,6 +27,7 @@
import { FileUtils } from '../../core/util';
import { DICTIONARY, ReportingConfigModel } from '../../../dictionary/global.dictionary';
import {ProgressBarService} from '../../core/services/progress-bar.service';
+import {LocalizationService} from '../../core/services/localization.service';
@Component({
selector: 'datalab-reporting',
@@ -79,7 +80,7 @@
private healthStatusService: HealthStatusService,
public toastr: ToastrService,
private progressBarService: ProgressBarService,
- private applicationSecurityService: ApplicationSecurityService,
+ private localizationService: LocalizationService,
) { }
ngOnInit() {
@@ -131,6 +132,7 @@
}
exportBillingReport(): void {
+ this.reportData.locale = this.localizationService.locale;
this.billingReportService.downloadReport(this.reportData)
.subscribe(
data => FileUtils.downloadFile(data),
diff --git a/services/self-service/src/main/resources/webapp/src/dictionary/global.dictionary.ts b/services/self-service/src/main/resources/webapp/src/dictionary/global.dictionary.ts
index db47698..4ce4121 100644
--- a/services/self-service/src/main/resources/webapp/src/dictionary/global.dictionary.ts
+++ b/services/self-service/src/main/resources/webapp/src/dictionary/global.dictionary.ts
@@ -35,18 +35,6 @@
return new ReportingConfigModel([], [], [], [], [], '', '', '', []);
}
- constructor(
- public users: Array<string>,
- public products: Array<string>,
- public resource_type: Array<string>,
- public statuses: Array<string>,
- public shapes: Array<string>,
- public date_start: string,
- public date_end: string,
- public datalabId: string,
- public projects: Array<string>
- ) { }
-
defaultConfigurations(): void {
this.users = [];
this.products = [];
@@ -58,6 +46,19 @@
this.datalabId = '';
this.projects = [];
}
+
+ constructor(
+ public users: Array<string>,
+ public products: Array<string>,
+ public resource_type: Array<string>,
+ public statuses: Array<string>,
+ public shapes: Array<string>,
+ public date_start: string,
+ public date_end: string,
+ public datalabId: string,
+ public projects: Array<string>,
+ public locale?: string
+ ) { }
}