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 cac09f9059d95422460bcd882d1158dd66a4a29a Author: Andriana Kovalyshyn <[email protected]> AuthorDate: Thu May 23 16:57:01 2019 +0300 added endpoint.service to get list --- .../resources/webapp/src/app/core/core.module.ts | 2 ++ .../src/app/core/services/endpoint.service.ts | 42 ++++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/services/self-service/src/main/resources/webapp/src/app/core/core.module.ts b/services/self-service/src/main/resources/webapp/src/app/core/core.module.ts index afb2ce1..0280665 100644 --- a/services/self-service/src/main/resources/webapp/src/app/core/core.module.ts +++ b/services/self-service/src/main/resources/webapp/src/app/core/core.module.ts @@ -38,6 +38,7 @@ import { RolesGroupsService } from './services/rolesManagement.service'; import { DataengineConfigurationService } from './services/dataengineConfiguration.service'; import { StorageService } from './services/storage.service'; import { ProjectService } from './services/project.service'; +import { EndpointService } from './services/endpoint.service'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material'; @@ -73,6 +74,7 @@ export class CoreModule { DataengineConfigurationService, StorageService, ProjectService, + EndpointService, { provide: MatDialogRef, useValue: {} }, { provide: MAT_DIALOG_DATA, useValue: [] } diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/endpoint.service.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/endpoint.service.ts new file mode 100644 index 0000000..91caed7 --- /dev/null +++ b/services/self-service/src/main/resources/webapp/src/app/core/services/endpoint.service.ts @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs'; +import { catchError, map } from 'rxjs/operators'; + +import { ErrorUtils } from '../util'; +import { ApplicationServiceFacade } from './applicationServiceFacade.service'; + +@Injectable() +export class EndpointService { + + constructor( + private applicationServiceFacade: ApplicationServiceFacade + ) { } + + public getEndpointsData(): Observable<{}> { + return this.applicationServiceFacade + .buildGetEndpointsData() + .pipe( + map(response => response), + catchError(ErrorUtils.handleServiceError)); + } +} + --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
