You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by an...@apache.org on 2019/11/14 13:24:12 UTC

[incubator-dlab] branch DLAB-1214 created (now 60bdc0e)

This is an automated email from the ASF dual-hosted git repository.

ankovalyshyn pushed a change to branch DLAB-1214
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git.


      at 60bdc0e  [DLAB-1214]: added request parameters to get project list per user

This branch includes the following new commits:

     new 9286ffd  [DLAB-1214]: added request parameters to get project list per user
     new 60bdc0e  [DLAB-1214]: added request parameters to get project list per user

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org


[incubator-dlab] 02/02: [DLAB-1214]: added request parameters to get project list per user

Posted by an...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ankovalyshyn pushed a commit to branch DLAB-1214
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git

commit 60bdc0e9171f173c0b36dd15c6f621c27f481802
Author: Andriana Kovalyshyn <An...@epam.com>
AuthorDate: Thu Nov 14 15:23:56 2019 +0200

    [DLAB-1214]: added request parameters to get project list per user
---
 .../exploratory/create-environment/create-environment.component.ts    | 4 ++--
 .../main/resources/webapp/src/app/resources/resources.component.ts    | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.ts
index b5c2a76..e42ea92 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.ts
@@ -69,7 +69,7 @@ export class ExploratoryEnvironmentCreateComponent implements OnInit {
   }
 
   public getUserProjects() {
-    this.projectService.getUserProjectsList().subscribe((projects: any) => {
+    this.projectService.getUserProjectsList(true).subscribe((projects: any) => {
       this.projects = projects;
       const activeProject = projects.find(item => item.name === this.resourceGrid.activeProject);
       if (this.resourceGrid.activeProject && activeProject) {
@@ -131,7 +131,7 @@ export class ExploratoryEnvironmentCreateComponent implements OnInit {
 
   private getImagesList() {
     this.userResourceService.getUserImages(this.currentTemplate.image, this.createExploratoryForm.controls['project'].value,
-    this.createExploratoryForm.controls['endpoint'].value)
+      this.createExploratoryForm.controls['endpoint'].value)
       .subscribe((res: any) => this.images = res.filter(el => el.status === 'CREATED'),
         error => this.toastr.error(error.message || 'Images list loading failed!', 'Oops!'));
   }
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.ts
index a31e129..bab05a7 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.ts
@@ -90,7 +90,7 @@ export class ResourcesComponent implements OnInit {
   }
 
   private getProjects() {
-    this.projectService.getProjectsList().subscribe((projects: any) => this.projects = projects);
+    this.projectService.getUserProjectsList().subscribe((projects: any) => this.projects = projects);
   }
 
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org


[incubator-dlab] 01/02: [DLAB-1214]: added request parameters to get project list per user

Posted by an...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ankovalyshyn pushed a commit to branch DLAB-1214
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git

commit 9286ffdc05c291e7cb590da11f6bc9250c69571b
Author: Andriana Kovalyshyn <An...@epam.com>
AuthorDate: Thu Nov 14 15:23:25 2019 +0200

    [DLAB-1214]: added request parameters to get project list per user
---
 .../src/app/core/services/applicationServiceFacade.service.ts       | 6 +++---
 .../main/resources/webapp/src/app/core/services/project.service.ts  | 5 +++--
 2 files changed, 6 insertions(+), 5 deletions(-)

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 67c7010..cffcf03 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 USER_PROJECT = 'project/me';
+  private static readonly USER_PROJECT = 'user_project';
   private static readonly ENDPOINT = 'endpoint';
 
   private requestRegistry: Dictionary<string>;
@@ -545,9 +545,9 @@ export class ApplicationServiceFacade {
       null);
   }
 
-  public buildGetUserProjectsList(): Observable<any> {
+  public buildGetUserProjectsList(params?): Observable<any> {
     return this.buildRequest(HTTPMethod.GET,
-      this.requestRegistry.Item(ApplicationServiceFacade.USER_PROJECT),
+      this.requestRegistry.Item(ApplicationServiceFacade.USER_PROJECT) + params,
       null);
   }
 
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/project.service.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/project.service.ts
index d623f52..0d03ec3 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/services/project.service.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/services/project.service.ts
@@ -52,9 +52,10 @@ export class ProjectService {
         catchError(ErrorUtils.handleServiceError));
   }
 
-  public getUserProjectsList(): Observable<{}> {
+  public getUserProjectsList(isActive?): Observable<{}> {
+    const params = isActive ? '?active=true' : '';
     return this.applicationServiceFacade
-      .buildGetUserProjectsList()
+      .buildGetUserProjectsList(params)
       .pipe(
         map(response => response),
         catchError(ErrorUtils.handleServiceError));


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org