From 4619a9655e4054008f8060aef95622262d2210a1 Mon Sep 17 00:00:00 2001 From: Arundathi Patil Date: Tue, 23 Apr 2019 20:02:33 +0530 Subject: Resource creation - save new resource to backend Integrated UI with loopback to save new resource dictionary to backend Issue-ID: CCSDK-1217 Change-Id: I200b7b53cd62910a6c3661ef86a62398c5ea8cfc Signed-off-by: Arundathi Patil --- .../search-resource/search-resource.component.html | 2 +- .../search-resource/search-resource.component.ts | 10 ++++++---- .../resource-creation/resource-creation.component.html | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) (limited to 'cds-ui/client') diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.html b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.html index d02cef429..a2e0a7c05 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.html +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.html @@ -20,7 +20,7 @@
- + diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.ts index 1850549aa..5aac51bed 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.ts +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.ts @@ -21,6 +21,7 @@ import { Component, OnInit, ViewChild, EventEmitter, Output } from '@angular/core'; import {FormBuilder, FormGroup, Validators} from '@angular/forms'; import { ExsistingModelService } from '../exsisting-model.service'; +import { MatAutocompleteTrigger } from '@angular/material' @Component({ selector: 'app-search-resource', @@ -31,8 +32,9 @@ export class SearchResourceComponent implements OnInit { myControl: FormGroup; @Output() resourcesData = new EventEmitter(); - options: any[] = [] ; - // = ['One','One1', 'Two', 'Three']; + options: any[] = ['One','One1', 'Two', 'Three']; + // @ViewChild('resourceSelect') resourceSelect; + @ViewChild('resourceSelect', { read: MatAutocompleteTrigger }) resourceSelect: MatAutocompleteTrigger; searchText: string = ''; constructor(private _formBuilder: FormBuilder, @@ -53,8 +55,8 @@ export class SearchResourceComponent implements OnInit { console.log(data); data.forEach(element => { this.options.push(element) - }); - // this.options = data. + }); + this.resourceSelect.openPanel(); }, error=>{ window.alert('error' + error); }) diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-creation.component.html b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-creation.component.html index 9b4dbe5e1..afb2b9d55 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-creation.component.html +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-creation.component.html @@ -29,10 +29,10 @@
- +
- + Browse or Search Resources

-- cgit 1.2.3-korg