You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by dg...@apache.org on 2020/10/22 12:14:19 UTC
[incubator-datalab] branch DATALAB-2089 updated: [DATALAB-1952]:
Added language key to billing export
This is an automated email from the ASF dual-hosted git repository.
dgnatyshyn pushed a commit to branch DATALAB-2089
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
The following commit(s) were added to refs/heads/DATALAB-2089 by this push:
new 5fead25 [DATALAB-1952]: Added language key to billing export
5fead25 is described below
commit 5fead253445c71aa789fbee9ce11983354644fa7
Author: Dmytro_Gnatyshyn <di...@ukr.net>
AuthorDate: Thu Oct 22 15:13:49 2020 +0300
[DATALAB-1952]: Added language key to billing export
---
.../app/reports/reporting/reporting.component.ts | 4 +++-
.../webapp/src/dictionary/global.dictionary.ts | 25 +++++++++++-----------
2 files changed, 16 insertions(+), 13 deletions(-)
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 { ToolbarComponent } from './toolbar/toolbar.component';
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 @@ export class ReportingComponent implements OnInit, OnDestroy {
private healthStatusService: HealthStatusService,
public toastr: ToastrService,
private progressBarService: ProgressBarService,
- private applicationSecurityService: ApplicationSecurityService,
+ private localizationService: LocalizationService,
) { }
ngOnInit() {
@@ -131,6 +132,7 @@ export class ReportingComponent implements OnInit, OnDestroy {
}
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 @@ export class ReportingConfigModel {
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 @@ export class ReportingConfigModel {
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
+ ) { }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org