summaryrefslogtreecommitdiffstats
path: root/cds-ui/client/src/app/feature-modules/controller-catalog/search-catalog/search-catalog.component.ts
diff options
context:
space:
mode:
authorswapnalipode <sp00501638@techmahindra.com>2020-03-02 12:57:20 +0530
committerDan Timoney <dtimoney@att.com>2020-04-08 15:43:01 +0000
commitd7d2b0657b18a96bc1889f8404d7b212f28922e6 (patch)
treefcb92e05f1a6c74bd0e8291f7cbcbb14da9485c4 /cds-ui/client/src/app/feature-modules/controller-catalog/search-catalog/search-catalog.component.ts
parentf541226907489eb1eac619b5b6b72a1c2eefa4f9 (diff)
Adding delete catalog
Adding delete catalog functionality in client ui Change-Id: I56bcba1c09d949b80155b3ac9368203e85eb4f99 Issue-ID: CCSDK-815 Signed-off-by: swapnalipode <sp00501638@techmahindra.com> (cherry picked from commit 7cc92c22ac6172d6b51425d8628e431350593bca)
Diffstat (limited to 'cds-ui/client/src/app/feature-modules/controller-catalog/search-catalog/search-catalog.component.ts')
-rw-r--r--cds-ui/client/src/app/feature-modules/controller-catalog/search-catalog/search-catalog.component.ts37
1 files changed, 10 insertions, 27 deletions
diff --git a/cds-ui/client/src/app/feature-modules/controller-catalog/search-catalog/search-catalog.component.ts b/cds-ui/client/src/app/feature-modules/controller-catalog/search-catalog/search-catalog.component.ts
index efafe5e8f..7c379599f 100644
--- a/cds-ui/client/src/app/feature-modules/controller-catalog/search-catalog/search-catalog.component.ts
+++ b/cds-ui/client/src/app/feature-modules/controller-catalog/search-catalog/search-catalog.component.ts
@@ -82,37 +82,20 @@ export class SearchCatalogComponent implements OnInit {
}, error=>{
window.alert('Catalog not matching the search tag' + error);
})
-
-// this.options=[ {
-// "modelName": "tosca.nodes.Artifact",
-// "derivedFrom": "tosca.nodes.Root",
-// "definitionType": "node_type",
-// "definition": {
-// "description": "This is Deprecated Artifact Node Type.",
-// "version": "1.0.0",
-// "derived_from": "tosca.nodes.Root"
-// },
-// "description": "This is Deprecated Artifact Node Type.",
-// "version": "1.0.0",
-// "tags": "tosca.nodes.Artifact,tosca.nodes.Root,node_type",
-// "creationDate": "2019-09-16T07:35:24.000Z",
-// "updatedBy": "System"
-// }];
}
editInfo(item: ICatalog, option: string) {
- if(option == 'Delete'){
-// this.catalogCreateService.deleteCatalog(item.modelName)
-// .subscribe(response=>{
-// this.alertService.success("Delete Success"+ response)
-// },
-// error=>{
-// console.log(error);
-// this.alertService.error('Error while deleting catalog'+ error);
-//
-// })
- }
+ if(option == 'Delete'){
+ this.searchCatalogService.deleteCatalog(item.modelName)
+ .subscribe(response=>{
+ this.alertService.success("Delete Success"+ response)
+ },
+ error=>{
+ console.log(error);
+ this.alertService.error('Error while deleting catalog'+ error);
+ })
+ }
else{
this.dialogRef = this.dialog.open(CatalogDataDialogComponent, {
height: '500px',