From ae3240b5de33f5dc462d9313afc894fce433b52c Mon Sep 17 00:00:00 2001 From: Ezhilarasi Date: Tue, 2 Jul 2019 19:44:37 +0530 Subject: Search service for Controller Blueprint Search service for controller blueprint creation and Search capability Change-Id: I20b7f60aa357af2785c6209003429d83b34c4342 Issue-ID: CCSDK-1269 Signed-off-by: Ezhilarasi --- .../search-template/search-template.service.spec.ts | 12 ++++++++++++ .../search-template/search-template.service.ts | 16 ++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.service.spec.ts create mode 100644 cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.service.ts (limited to 'cds-ui') diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.service.spec.ts b/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.service.spec.ts new file mode 100644 index 000000000..418b7e9ca --- /dev/null +++ b/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.service.spec.ts @@ -0,0 +1,12 @@ +import { TestBed } from '@angular/core/testing'; + +import { SearchTemplateService } from './search-template.service'; + +describe('SearchTemplateService', () => { + beforeEach(() => TestBed.configureTestingModule({})); + + it('should be created', () => { + const service: SearchTemplateService = TestBed.get(SearchTemplateService); + expect(service).toBeTruthy(); + }); +}); diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.service.ts b/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.service.ts new file mode 100644 index 000000000..fdb261d52 --- /dev/null +++ b/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.service.ts @@ -0,0 +1,16 @@ +import { Injectable } from '@angular/core'; +import { HttpClient } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { ApiService } from '../../../../common/core/services/api.service'; + +@Injectable({ + providedIn: 'root' +}) +export class SearchTemplateService { + + constructor(private _http: HttpClient, private api: ApiService) { } + + searchByTags(uri: string, searchText: String): Observable{ + return this.api.post(uri, searchText); + } +} -- cgit 1.2.3-korg