You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by dg...@apache.org on 2020/01/27 16:33:08 UTC
[incubator-dlab] 03/04: [DLAB-1357]: Started to add connection with
backend
This is an automated email from the ASF dual-hosted git repository.
dgnatyshyn pushed a commit to branch DLAB-1357
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
commit f2c3da141886027ac5d2e3cb33c4ccda03b6184e
Author: Dmytro Gnatyshyn <di...@ukr.net>
AuthorDate: Mon Jan 27 18:32:10 2020 +0200
[DLAB-1357]: Started to add connection with backend
---
.../legion-deployment-data.service.ts | 7 +++--
.../legion-deployment.component.ts | 2 +-
.../legion-list/legion-list.component.html | 2 +-
.../legion-list/legion-list.component.ts | 1 +
.../services/applicationServiceFacade.service.ts | 30 +++-------------------
.../app/core/services/legion-deployment.service.ts | 18 ++++++-------
6 files changed, 20 insertions(+), 40 deletions(-)
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-deployment-data.service.ts b/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-deployment-data.service.ts
index 4163802..e379aa7 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-deployment-data.service.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-deployment-data.service.ts
@@ -19,7 +19,10 @@ export class LegionDeploymentDataService {
}
private getClastersList(): void {
- this.legionDeploymentService.getLegionClasters().subscribe(
- (response: any ) => this._legionClasters.next(response.clasters));
+ this.legionDeploymentService.getOduhuClustersList().subscribe(
+ (response: any ) => {
+ console.log(response);
+ return this._legionClasters.next(response.clasters)
+ });
}
}
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-deployment.component.ts b/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-deployment.component.ts
index 8421921..3f0cbbd 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-deployment.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-deployment.component.ts
@@ -47,7 +47,7 @@ export class LegionDeploymentComponent implements OnInit {
}
private createLegionCluster(value): void{
- this.legionDeploymentService.addLegionCluster(value);
+ this.legionDeploymentService.createOduhuNewCluster(value);
}
private getEnvironmentHealthStatus(): void {
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-list/legion-list.component.html b/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-list/legion-list.component.html
index e0ac85c..6fe5e32 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-list/legion-list.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-list/legion-list.component.html
@@ -89,7 +89,7 @@
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
- <tr [hidden]="legionClustersList.length" mat-footer-row *matFooterRowDef="['placeholder']"></tr>-->
+ <!--<tr [hidden]="legionClustersList.length" mat-footer-row *matFooterRowDef="['placeholder']"></tr>–>-->
</table>
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-list/legion-list.component.ts b/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-list/legion-list.component.ts
index c6ede82..49cedb9 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-list/legion-list.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-list/legion-list.component.ts
@@ -22,6 +22,7 @@ export class LegionListComponent implements OnInit {
this.subscriptions.add(this.legionDeploymentDataService._legionClasters.subscribe(
(value) => {
if (value) {
+ console.log(value)
this.legionClustersList = value;
this.dataSource = new MatTableDataSource(value);
}
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/applicationServiceFacade.service.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/applicationServiceFacade.service.ts
index 573c05f..894be97 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/services/applicationServiceFacade.service.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/services/applicationServiceFacade.service.ts
@@ -74,7 +74,7 @@ export class ApplicationServiceFacade {
private static readonly DOWNLOAD_REPORT = 'download_report';
private static readonly SETTINGS = 'settings';
private static readonly PROJECT = 'project';
- private static readonly ODAHU = 'oduhu';
+ private static readonly ODAHU = 'odahu';
private static readonly ENDPOINT = 'endpoint';
private static readonly ENDPOINT_CONNECTION = 'endpoint_connection';
@@ -529,6 +529,7 @@ export class ApplicationServiceFacade {
}
public buildCreateProject(data): Observable<any> {
+ console.log(data)
return this.buildRequest(HTTPMethod.POST,
this.requestRegistry.Item(ApplicationServiceFacade.PROJECT),
data);
@@ -613,31 +614,6 @@ export class ApplicationServiceFacade {
null);
}
- // public buildGetUserProjectsList(params?): Observable<any> {
- // return this.buildRequest(HTTPMethod.GET,
- // this.requestRegistry.Item(ApplicationServiceFacade.PROJECT) + params,
- // null);
- // }
- //
- // public buildDeleteProject(param): Observable<any> {
- // return this.buildRequest(HTTPMethod.DELETE,
- // this.requestRegistry.Item(ApplicationServiceFacade.PROJECT) + param,
- // null);
- // }
- //
- // public buildToggleProjectStatus(param, data): Observable<any> {
- // return this.buildRequest(HTTPMethod.POST,
- // this.requestRegistry.Item(ApplicationServiceFacade.PROJECT) + param,
- // data);
- // }
- //
- // public buildUpdateProjectsBudget(param, data): Observable<any> {
- // return this.buildRequest(HTTPMethod.PUT,
- // this.requestRegistry.Item(ApplicationServiceFacade.PROJECT) + param,
- // data,
- // { observe: 'response' });
- // }
-
private setupRegistry(): void {
this.requestRegistry = new Dictionary<string>();
@@ -717,7 +693,7 @@ export class ApplicationServiceFacade {
this.requestRegistry.Add(ApplicationServiceFacade.ENDPOINT_CONNECTION, '/api/endpoint/url/');
// odahu
- this.requestRegistry.Add(ApplicationServiceFacade.ODAHU, '/api/oduhu');
+ this.requestRegistry.Add(ApplicationServiceFacade.ODAHU, '/api/odahu');
}
private buildRequest(method: HTTPMethod, url_path: string, body: any, opt?) {
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/legion-deployment.service.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/legion-deployment.service.ts
index 89cfe80..0d43969 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/services/legion-deployment.service.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/services/legion-deployment.service.ts
@@ -27,16 +27,16 @@ export class LegionDeploymentService {
]}];
constructor(private applicationServiceFacade: ApplicationServiceFacade) { }
- public getLegionClasters(){
- const obsList = from(this.list);
- return obsList;
- }
-
- public addLegionCluster(cluster) {
- this.list[0].clasters.push(cluster);
- }
+ // public getLegionClasters(){
+ // const obsList = from(this.list);
+ // return obsList;
+ // }
+ //
+ // public addLegionCluster(cluster) {
+ // this.list[0].clasters.push(cluster);
+ // }
- public createOduhuCluster(data): Observable<{}> {
+ public createOduhuNewCluster(data): Observable<{}> {
return this.applicationServiceFacade
.createOdahuCluster(data)
.pipe(
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org