This is an automated email from the ASF dual-hosted git repository. ankovalyshyn pushed a commit to branch project_grid in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
commit f7ffeff2b8bc33407d479bc1e017b145d5f16713 Author: Andriana Kovalyshyn <andriana_kovalys...@epam.com> AuthorDate: Thu May 23 17:04:24 2019 +0300 mock dource data to render data grid --- .../project/project-list/project-list.component.html | 4 ++-- .../project/project-list/project-list.component.ts | 20 +++++++++----------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-list/project-list.component.html b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-list/project-list.component.html index f3cbe38..267343d 100644 --- a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-list/project-list.component.html +++ b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-list/project-list.component.html @@ -25,9 +25,9 @@ <td mat-cell *matCellDef="let element"> {{element.project_name}} </td> </ng-container> - <ng-container matColumnDef="endpoint_name"> + <ng-container matColumnDef="endpoints_list"> <th mat-header-cell *matHeaderCellDef> Endpoint name </th> - <td mat-cell *matCellDef="let element"> {{element.endpoint_name}} </td> + <td mat-cell *matCellDef="let element"> {{element.endpoints_list}} </td> </ng-container> <ng-container matColumnDef="project_tag"> diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-list/project-list.component.ts b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-list/project-list.component.ts index 1f238f3..04c59c8 100644 --- a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-list/project-list.component.ts +++ b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-list/project-list.component.ts @@ -19,13 +19,12 @@ import { Component, OnInit } from '@angular/core'; import { ToastrService } from 'ngx-toastr'; - import {MatTableDataSource} from '@angular/material'; + import { MatTableDataSource } from '@angular/material'; + import { ProjectDataService } from '../project-data.service'; import { ProjectService } from '../../../core/services'; import { Project } from '../project.component'; - import { data } from './data'; - @Component({ selector: 'project-list', templateUrl: './project-list.component.html', @@ -33,12 +32,14 @@ }) export class ProjectListComponent implements OnInit { - displayedColumns: string[] = ['project_name', 'endpoint_name', 'project_tag', 'actions']; - dataSource: any; + displayedColumns: string[] = ['project_name', 'endpoints_list', 'project_tag', 'actions']; + dataSource: Project[] | any; constructor( public toastr: ToastrService, - private projectService: ProjectService) { } + private projectDataService: ProjectDataService, + private projectService: ProjectService + ) { } ngOnInit() { @@ -55,10 +56,7 @@ export class ProjectListComponent implements OnInit { private getProjectsList() { // Project[] type - this.dataSource = new MatTableDataSource(data.projects); - - this.projectService.getProjectsList().subscribe( - (response: any) => this.dataSource = response, - error => this.toastr.error(error.message || 'Receiving list failed!', 'Oops!')); + debugger; + this.dataSource = new MatTableDataSource(this.projectDataService.getProjects) } } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org