This is an automated email from the ASF dual-hosted git repository.
dgnatyshyn pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/develop by this push:
new 30045cd [DLAB-1609]: Conveyed 'Resource Type' value to UI (#635)
30045cd is described below
commit 30045cdadc7628eae97f7eacfe6f9459c947b722
Author: Dmytro Gnatyshyn <[email protected]>
AuthorDate: Wed Mar 4 15:23:13 2020 +0200
[DLAB-1609]: Conveyed 'Resource Type' value to UI (#635)
[DLAB-1609]: Conveyed 'Resource Type' value to UI
---
.../src/app/administration/project/project-data.service.ts | 9 ++++++---
.../resources/webapp/src/app/reporting/reporting.component.ts | 8 ++++----
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git
a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-data.service.ts
b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-data.service.ts
index f60fb56..014c89b 100644
---
a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-data.service.ts
+++
b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-data.service.ts
@@ -26,9 +26,12 @@ import { Project } from './project.component';
@Injectable()
export class ProjectDataService {
- _projects = new BehaviorSubject<any>(null);
- endpointsList: any;
- constructor(private projectService: ProjectService, private endpointService:
EndpointService) {
+ public _projects = new BehaviorSubject<any>(null);
+ private endpointsList: any = [];
+ constructor(
+ private projectService: ProjectService,
+ private endpointService: EndpointService
+ ) {
this.getProjectsList();
}
diff --git
a/services/self-service/src/main/resources/webapp/src/app/reporting/reporting.component.ts
b/services/self-service/src/main/resources/webapp/src/app/reporting/reporting.component.ts
index 51cca06..b6fbc26 100644
---
a/services/self-service/src/main/resources/webapp/src/app/reporting/reporting.component.ts
+++
b/services/self-service/src/main/resources/webapp/src/app/reporting/reporting.component.ts
@@ -79,7 +79,7 @@ export class ReportingComponent implements OnInit, OnDestroy {
) { }
ngOnInit() {
- this.getBillingProvider();
+ this.getEnvironmentHealthStatus();
}
ngOnDestroy() {
@@ -87,14 +87,13 @@ export class ReportingComponent implements OnInit,
OnDestroy {
}
getBillingProvider() {
- this.getEnvironmentHealthStatus();
if (this.admin) {
this.endpointService.getEndpointsData().subscribe(list => {
- // @ts-ignore
- const endpoints = [...list];
+ const endpoints = JSON.parse(JSON.stringify(list));
const localEndpoint = endpoints.filter(endpoint => endpoint.name ===
'local');
if (localEndpoint.length) {
this.PROVIDER = localEndpoint[0].cloudProvider.toLowerCase();
+ console.log(this.PROVIDER);
if (this.PROVIDER) {
this.rebuildBillingReport();
}
@@ -227,6 +226,7 @@ export class ReportingComponent implements OnInit,
OnDestroy {
.subscribe((result: any) => {
this.billingEnabled = result.billingEnabled;
this.admin = result.admin;
+ this.getBillingProvider();
});
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]