From 5b5f8262baaf9aa07d7218e5a92b8a6cbf444be4 Mon Sep 17 00:00:00 2001 From: Ezhilarasi Date: Mon, 5 Aug 2019 17:18:30 +0530 Subject: Search from db components change Added notification alert and method for edit Change-Id: Iab4763956ea4a4c9fc96753b32e405ba1715e707 Issue-ID: CCSDK-1275 Signed-off-by: Ezhilarasi --- .../search-from-database.component.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'cds-ui/client') diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-from-database/search-from-database.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-from-database/search-from-database.component.ts index 1c3630649..df3aafb73 100644 --- a/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-from-database/search-from-database.component.ts +++ b/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-from-database/search-from-database.component.ts @@ -23,7 +23,9 @@ import { Component, OnInit, ViewChild, EventEmitter, Output } from '@angular/cor import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { SearchTemplateService } from '../search-template.service'; import { MatAutocompleteTrigger } from '@angular/material'; +import { NotificationHandlerService } from 'src/app/common/core/services/notification-handler.service'; import { SearchPipe } from 'src/app/common/shared/pipes/search.pipe'; + @Component({ selector: 'app-search-from-database', templateUrl: './search-from-database.component.html', @@ -38,7 +40,7 @@ export class SearchFromDatabaseComponent implements OnInit { searchText: string = ''; constructor(private _formBuilder: FormBuilder, - private searchService: SearchTemplateService) { } + private searchService: SearchTemplateService, private alertService: NotificationHandlerService, ) { } ngOnInit() { this.myControl = this._formBuilder.group({ @@ -50,18 +52,21 @@ export class SearchFromDatabaseComponent implements OnInit { } fetchResourceByName() { + this.options = []; this.searchService.searchByTags(this.searchText) .subscribe(data => { - // console.log(data); data.forEach(element => { this.options.push(element) }); - // this.resourceSelect.openPanel(); }, error => { - window.alert('error' + error); + this.alertService.error('Blueprint not matching the search tag' + error); }) - console.log(this.options) - // this.options=['test','vns','capability','hello','hi','hoi','dfagfagshdgfashdf','adsfhksd']; } + editCBA(artifactname: string,option : string) { + + } + + + } -- cgit 1.2.3-korg