Merge "update vLB CDS CBA"
authorDan Timoney <dtimoney@att.com>
Thu, 10 Oct 2019 14:29:53 +0000 (14:29 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 10 Oct 2019 14:29:53 +0000 (14:29 +0000)
44 files changed:
cds-ui/client/src/app/app-routing.module.ts
cds-ui/client/src/app/common/constants/app-constants.ts
cds-ui/client/src/app/common/core/core.module.ts
cds-ui/client/src/app/common/core/store/actions/catalog.action.ts [new file with mode: 0644]
cds-ui/client/src/app/common/core/store/effects/catalog.effect.ts [new file with mode: 0644]
cds-ui/client/src/app/common/core/store/models/catalog-http.model.ts [new file with mode: 0644]
cds-ui/client/src/app/common/core/store/models/catalog.model.ts [new file with mode: 0644]
cds-ui/client/src/app/common/core/store/models/catalogState.model.ts [new file with mode: 0644]
cds-ui/client/src/app/common/core/store/reducers/app.reducer.ts
cds-ui/client/src/app/common/core/store/reducers/catalog.reducer.ts [new file with mode: 0644]
cds-ui/client/src/app/common/core/store/selectors/catalog.selectors.ts [new file with mode: 0644]
cds-ui/client/src/app/common/core/store/state/app.state.ts
cds-ui/client/src/app/common/core/store/state/catalog.state.ts [new file with mode: 0644]
cds-ui/client/src/app/common/shared/components/home/home.component.html
cds-ui/client/src/app/feature-modules/controller-catalog/controller-catalog-routing.module.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/controller-catalog/controller-catalog.component.html [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/controller-catalog/controller-catalog.component.scss [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/controller-catalog/controller-catalog.component.spec.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/controller-catalog/controller-catalog.component.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/controller-catalog/controller-catalog.module.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/controller-catalog/create-catalog/create-catalog-routing.module.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/controller-catalog/create-catalog/create-catalog.component.html [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/controller-catalog/create-catalog/create-catalog.component.scss [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/controller-catalog/create-catalog/create-catalog.component.spec.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/controller-catalog/create-catalog/create-catalog.component.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/controller-catalog/create-catalog/create-catalog.module.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/controller-catalog/create-catalog/create-catalog.service.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/controller-catalog/search-catalog/search-catalog-routing.module.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/controller-catalog/search-catalog/search-catalog.component.html [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/controller-catalog/search-catalog/search-catalog.component.scss [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/controller-catalog/search-catalog/search-catalog.component.spec.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/controller-catalog/search-catalog/search-catalog.component.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/controller-catalog/search-catalog/search-catalog.module.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/controller-catalog/search-catalog/search-catalog.service.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/controller-catalog/select-template/select-template-routing.module.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/controller-catalog/select-template/select-template.component.html [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/controller-catalog/select-template/select-template.component.scss [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/controller-catalog/select-template/select-template.component.spec.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/controller-catalog/select-template/select-template.component.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/controller-catalog/select-template/select-template.module.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/controller-catalog/select-template/template-options/template-options.component.html [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/controller-catalog/select-template/template-options/template-options.component.scss [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/controller-catalog/select-template/template-options/template-options.component.spec.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/controller-catalog/select-template/template-options/template-options.component.ts [new file with mode: 0644]

index 96dfce1..01ecfe4 100644 (file)
@@ -2,6 +2,8 @@
 ============LICENSE_START==========================================
 ===================================================================
 Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+
+Modifications Copyright (C) 2019 TechMahindra
 ===================================================================
 
 Unless otherwise specified, all software contained herein is licensed
@@ -36,6 +38,10 @@ const routes: Routes = [
     {
       path: 'resource-definition',
       loadChildren: './feature-modules/resource-definition/resource-definition.module#ResourceDefinitionModule'
+    },
+    {
+        path: 'controller-catalog',
+        loadChildren: './feature-modules/controller-catalog/controller-catalog.module#ControllerCatalogModule'
     }
   ]
 }
index 78fefd8..5beb6af 100644 (file)
@@ -2,6 +2,8 @@
 ============LICENSE_START==========================================
 ===================================================================
 Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+
+Modifications Copyright (C) 2019 TechMahindra
 ===================================================================
 
 Unless otherwise specified, all software contained herein is licensed
@@ -110,4 +112,11 @@ export const ResourceDictionaryURLs = {
     getSources: '/resourcedictionary/source-mapping',
     getModelType: '/resourcedictionary/model-type',
     getDataType: '/resourcedictionary/model-type/by-definition/data_type'
+}
+
+export const ControllerCatalogURLs = {
+                searchControllerCatalogByTags: '/controllercatalog/search',
+                saveControllerCatalog: '/controllercatalog/save',
+                getDefinition: '/controllercatalog/model-type/by-definition',
+                getDerivedFrom: '/controllercatalog/model-type/by-derivedfrom'
 }
\ No newline at end of file
index 7207178..3743ab3 100644 (file)
@@ -25,13 +25,13 @@ import { StoreModule, Store } from '@ngrx/store';
 import { EffectsModule } from '@ngrx/effects';
 import { StoreRouterConnectingModule } from '@ngrx/router-store';
 import { HttpClientModule } from '@angular/common/http';
-
 import { appReducers } from './store/reducers/app.reducer';
 import { BlueprintEffects } from './store/effects/blueprint.effects';
 import { ResourcesEffects } from './store/effects/resources.effects';
 import { ApiService } from './services/api.service';
 import { NotificationHandlerService } from './services/notification-handler.service';
 import { LoaderService } from './services/loader.service';
+import { CatalogEffects } from './store/effects/catalog.effect';
 // import { BlueprintService } from './services/blueprint.service';
 
 @NgModule({
@@ -40,7 +40,7 @@ import { LoaderService } from './services/loader.service';
   imports: [
     CommonModule,
     StoreModule.forRoot(appReducers),
-    EffectsModule.forRoot([BlueprintEffects, ResourcesEffects]),
+    EffectsModule.forRoot([BlueprintEffects, ResourcesEffects, CatalogEffects]),
     StoreRouterConnectingModule.forRoot({ stateKey: 'router' }),
     HttpClientModule
   ],
diff --git a/cds-ui/client/src/app/common/core/store/actions/catalog.action.ts b/cds-ui/client/src/app/common/core/store/actions/catalog.action.ts
new file mode 100644 (file)
index 0000000..938cdb1
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* Licensed 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { Injectable } from '@angular/core';
+import { Action, Store } from '@ngrx/store';
+import { ICatalog } from '../models/catalog.model';
+import { ICatalogState } from '../models/catalogState.model';
+
+export const LOAD_CATALOG = 'LOAD_CATALOG';
+export const LOAD_CATALOG_SUCCESS = 'LOAD_CATALOG_SUCCESS';
+export const LOAD_CATALOG_FAILURE = 'LOAD_CATALOG_FAILURE';
+export const UPDATE_CATALOG ='UPDATE_CATALOG';
+export const UPDATE_CATALOG_SUCCESS = 'UPDATE_CATALOG_SUCCESS';
+export const UPDATE_CATALOG_FAILURE = 'UPDATE_CATALOG_FAILURE';
+export const SAVE_CATALOG = 'SAVE_CATALOG';
+export const SAVE_CATALOG_SUCCESS = 'SAVE_CATALOG_SUCCESS';
+export const SAVE_CATALOG_FAILURE = 'SAVE_CATALOG_FAILURE';
+
+export const SET_CATALOG = 'SET CATALOG';
+export const REMOVE_CATALOG = 'Remove CATALOG';
+
+export const SET_CATALOG_STATE = 'SET CATALOG state';
+
+
+export class LoadCatalog implements Action {
+    readonly type = LOAD_CATALOG;
+    constructor(public startLoadSuccess?: boolean) {}
+}
+
+export class LoadCatalogSuccess implements Action {
+    readonly type = LOAD_CATALOG_SUCCESS;
+    constructor(public payload: ICatalog) {}
+}
+
+export class LoadCatalogFailure implements Action {
+    readonly type = LOAD_CATALOG_FAILURE;
+    constructor(public error: any) {}
+}
+
+export class SetCatalogState implements Action {
+    readonly type = SET_CATALOG_STATE;
+    constructor(public payload: ICatalogState) {}
+}
+
+// export class SetCatalog implements Action {
+//     readonly type = SET_CATALOG;
+//     constructor(public payload: Catalog) {}
+// }
+
+// export class RemoveCatalog implements Action {
+//     readonly type = REMOVE_CATALOG;
+//     constructor(public payload: Catalog) {}
+// }
+
+export class UpdateCatalog implements Action {
+    readonly type = UPDATE_CATALOG;
+    constructor(public payload: ICatalog) {}
+}
+
+export type Actions = LoadCatalog | LoadCatalogSuccess | LoadCatalogFailure | SetCatalogState;
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/core/store/effects/catalog.effect.ts b/cds-ui/client/src/app/common/core/store/effects/catalog.effect.ts
new file mode 100644 (file)
index 0000000..db2296e
--- /dev/null
@@ -0,0 +1,37 @@
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : CDS\r
+* ================================================================================\r
+* Copyright (C) 2019 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+*     http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+\r
+import { Injectable } from '@angular/core';\r
+import { Effect, ofType, Actions } from '@ngrx/effects';\r
+import { Store, select } from '@ngrx/store';\r
+import { of } from 'rxjs';\r
+import { switchMap, map, withLatestFrom, catchError } from 'rxjs/operators';\r
+\r
+import { IAppState } from '../state/app.state';\r
+import * as CatalogActions from '../actions/catalog.action';\r
+\r
+@Injectable()\r
+export class CatalogEffects {\r
+\r
+  constructor(\r
+    private _actions$: Actions,\r
+    private _store: Store<IAppState>\r
+  ) {}\r
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/core/store/models/catalog-http.model.ts b/cds-ui/client/src/app/common/core/store/models/catalog-http.model.ts
new file mode 100644 (file)
index 0000000..dde1f97
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* Licensed 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { ICatalog } from './catalog.model';
+
+export interface ICatalogHttp {
+  catalog: ICatalog;
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/core/store/models/catalog.model.ts b/cds-ui/client/src/app/common/core/store/models/catalog.model.ts
new file mode 100644 (file)
index 0000000..2344f33
--- /dev/null
@@ -0,0 +1,29 @@
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : CDS\r
+* ================================================================================\r
+* Copyright (C) 2019 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+*     http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+\r
+export interface ICatalog { \r
+      Model_Name: string;\r
+      User_id: string;\r
+      _tags: string;\r
+      _type: string;\r
+      Derived_From: string;\r
+      _description : string;\r
+      definition: object[];\r
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/core/store/models/catalogState.model.ts b/cds-ui/client/src/app/common/core/store/models/catalogState.model.ts
new file mode 100644 (file)
index 0000000..937dd87
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* Licensed 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { ICatalog } from './catalog.model';
+
+export interface ICatalogState {
+    catalog: ICatalog,
+    isLoadSuccess?: boolean;
+    isUpdateSuccess?: boolean;
+    isSaveSuccess?: boolean;
+}
\ No newline at end of file
index 6f58320..7859390 100644 (file)
@@ -21,13 +21,14 @@ limitations under the License.
 
 import { ActionReducerMap } from '@ngrx/store';
 import { routerReducer } from '@ngrx/router-store';
-
 import { IAppState } from '../state/app.state';
 import { blueprintReducer } from '../reducers/blueprint.reducer';
 import { resourcesReducer } from '../reducers/resources.reducer';
+import { catalogReducer } from '../reducers/catalog.reducer';
 
 export const appReducers: ActionReducerMap<IAppState, any> = {
     router: routerReducer,
     blueprint: blueprintReducer,
-    resources:resourcesReducer
+    resources:resourcesReducer,
+    catalog: catalogReducer
 };
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/core/store/reducers/catalog.reducer.ts b/cds-ui/client/src/app/common/core/store/reducers/catalog.reducer.ts
new file mode 100644 (file)
index 0000000..ae5ca4e
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* Licensed 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { Action } from '@ngrx/store';
+import { initialCatalogState } from '../state/catalog.state';
+import * as CatalogActions from '../actions/catalog.action';
+import { ICatalogState } from '../models/catalogState.model';
+
+export function catalogReducer(state: ICatalogState = initialCatalogState, action: CatalogActions.Actions) : ICatalogState {
+    switch(action.type) {
+        case CatalogActions.LOAD_CATALOG_SUCCESS:
+            return {...state,
+                    catalog: action.payload
+                    }
+        case CatalogActions.SET_CATALOG_STATE:
+            return {...state,
+                    catalog: action.payload.catalog
+                    }
+        default:
+            return state;
+    }
+}
diff --git a/cds-ui/client/src/app/common/core/store/selectors/catalog.selectors.ts b/cds-ui/client/src/app/common/core/store/selectors/catalog.selectors.ts
new file mode 100644 (file)
index 0000000..172448f
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* Licensed 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { createSelector } from '@ngrx/store';
+
+import { IAppState } from '../state/app.state';
+import { ICatalogState } from '../models/catalogState.model';
+
+const selectCatalogFromAppState = (state: IAppState) => state.catalog;
+
+export const selectCatalog = createSelector(
+    selectCatalogFromAppState,
+  (state: ICatalogState) => state.catalog
+);
\ No newline at end of file
index 052eb2c..c08edce 100644 (file)
@@ -24,14 +24,17 @@ import { IBlueprintState } from '../models/blueprintState.model';
 import { initialBlueprintState } from './blueprint.state';
 import { IResourcesState } from '../models/resourcesState.model';
 import { initialResourcesState } from './resources.state';
+import { ICatalogState } from '../models/catalogState.model';
+import { initialCatalogState } from './catalog.state';
 
 export interface IAppState {
     router? : RouterReducerState,
     blueprint: IBlueprintState,
-    resources: IResourcesState
+    resources: IResourcesState,
+    catalog: ICatalogState
 }
-
 export const initialAppState: IAppState = {
     blueprint: initialBlueprintState,
-    resources: initialResourcesState
+    resources: initialResourcesState,
+    catalog: initialCatalogState
 }
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/core/store/state/catalog.state.ts b/cds-ui/client/src/app/common/core/store/state/catalog.state.ts
new file mode 100644 (file)
index 0000000..a780269
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* Licensed 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { ICatalogState } from '../models/catalogState.model';
+import { ICatalog } from '../models/catalog.model';
+
+export const initialCatalogState : ICatalogState = {
+    catalog : {} as ICatalog,
+    isLoadSuccess: false,
+    isUpdateSuccess: false,
+    isSaveSuccess: false,
+}
\ No newline at end of file
index f73f0e8..beff353 100644 (file)
@@ -1,6 +1,8 @@
 <!-- ============LICENSE_START==========================================
 ===================================================================
 Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+
+Modifications Copyright (C) 2019 TechMahindra
 ===================================================================
 
 Unless otherwise specified, all software contained herein is licensed
@@ -50,6 +52,7 @@ limitations under the License.
                 </ul>
             </nav> -->
             <a mat-list-item [routerLink]="['/resource-definition']">Resource Definition</a>
+            <a mat-list-item [routerLink]="['/controller-catalog']">Controller Catalog</a>
         </mat-nav-list>
     </mat-sidenav>
 
diff --git a/cds-ui/client/src/app/feature-modules/controller-catalog/controller-catalog-routing.module.ts b/cds-ui/client/src/app/feature-modules/controller-catalog/controller-catalog-routing.module.ts
new file mode 100644 (file)
index 0000000..e8bf86c
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* Licensed 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { NgModule } from '@angular/core';
+import { ControllerCatalogComponent } from './controller-catalog.component';
+import { Routes, RouterModule } from '@angular/router';
+
+const routes: Routes = [
+    {
+        path: '',
+        component: ControllerCatalogComponent
+    }
+];
+@NgModule({
+       imports: [RouterModule.forChild(routes)],
+       exports: [RouterModule]
+})
+export class ControllerCatalogRoutingModule { }
diff --git a/cds-ui/client/src/app/feature-modules/controller-catalog/controller-catalog.component.html b/cds-ui/client/src/app/feature-modules/controller-catalog/controller-catalog.component.html
new file mode 100644 (file)
index 0000000..06dfade
--- /dev/null
@@ -0,0 +1,41 @@
+<!--/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* Licensed 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.
+* ============LICENSE_END=========================================================
+*/-->
+
+<mat-card class="RDform">
+  <mat-card-content>
+    <mat-horizontal-stepper [linear]="isLinear" #stepper>
+      <mat-step [stepControl]="firstFormGroup">
+        <ng-template matStepLabel>Catalog Creation  Method</ng-template>
+       <app-select-template (option)="selectedOption($event)"></app-select-template><br><br>
+        <div>
+          <button mat-button matStepperNext class="matStepNextBtn">Proceed</button>
+        </div>
+      </mat-step>
+      <mat-step [stepControl]="secondFormGroup">
+        <ng-template matStepLabel>Catalog Create/Search</ng-template>
+        <app-create-catalog *ngIf="selectedValue == 1"></app-create-catalog><br>
+        <app-search-catalog *ngIf="selectedValue == 2"></app-search-catalog><br>
+        <div>
+          <button mat-button matStepperPrevious class="matStepNextBtn">Back</button>
+        </div>
+      </mat-step>
+    </mat-horizontal-stepper>
+  </mat-card-content>
+</mat-card>
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/controller-catalog/controller-catalog.component.scss b/cds-ui/client/src/app/feature-modules/controller-catalog/controller-catalog.component.scss
new file mode 100644 (file)
index 0000000..ea304fb
--- /dev/null
@@ -0,0 +1,32 @@
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : CDS\r
+* ================================================================================\r
+* Copyright (C) 2019 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+*     http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+\r
+.mat-card {\r
+    padding: 0px !important;\r
+}\r
+\r
+.matStepNextBtn{\r
+    color:white;\r
+    background:#3f51b5;\r
+    margin-top: 10px;\r
+    position: absolute;\r
+    margin-bottom: 5px;\r
+    border-radius: 4px;\r
+}\r
diff --git a/cds-ui/client/src/app/feature-modules/controller-catalog/controller-catalog.component.spec.ts b/cds-ui/client/src/app/feature-modules/controller-catalog/controller-catalog.component.spec.ts
new file mode 100644 (file)
index 0000000..69b7027
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* Licensed 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.
+* ============LICENSE_END=========================================================
+*/
+
+
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { ControllerCatalogComponent } from './controller-catalog.component';
+
+describe('ControllerCatalogComponent', () => {
+  let component: ControllerCatalogComponent;
+  let fixture: ComponentFixture<ControllerCatalogComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ ControllerCatalogComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(ControllerCatalogComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/cds-ui/client/src/app/feature-modules/controller-catalog/controller-catalog.component.ts b/cds-ui/client/src/app/feature-modules/controller-catalog/controller-catalog.component.ts
new file mode 100644 (file)
index 0000000..ed08869
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* Licensed 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.
+* ============LICENSE_END=========================================================
+*/
+
+
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+  selector: 'app-controller-catalog',
+  templateUrl: './controller-catalog.component.html',
+  styleUrls: ['./controller-catalog.component.scss']
+})
+export class ControllerCatalogComponent implements OnInit {
+
+  selectedValue: any;
+  constructor() { }
+
+  ngOnInit() {
+  }
+  
+  selectedOption(value){
+    this.selectedValue=value;
+    console.log(this.selectedValue);        
+ }
+
+}
diff --git a/cds-ui/client/src/app/feature-modules/controller-catalog/controller-catalog.module.ts b/cds-ui/client/src/app/feature-modules/controller-catalog/controller-catalog.module.ts
new file mode 100644 (file)
index 0000000..9f5e140
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* Licensed 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { ControllerCatalogRoutingModule } from './controller-catalog-routing.module';
+import { ControllerCatalogComponent } from './controller-catalog.component';
+import { SharedModule } from '../../../app/common/shared/shared.module';
+import { MatToolbarModule, MatButtonModule, MatSidenavModule,  MatListModule, MatGridListModule, MatCardModule, MatMenuModule, MatTableModule, MatPaginatorModule, MatSortModule, MatInputModule, MatSelectModule, MatRadioModule, MatFormFieldModule, MatStepperModule, MatAutocompleteModule} from '@angular/material';
+import { MatIconModule } from '@angular/material/icon';
+import { SelectTemplateComponent } from './select-template/select-template.component';
+import { TemplateOptionsComponent } from './select-template/template-options/template-options.component';
+import { SearchCatalogComponent } from './search-catalog/search-catalog.component';
+import { CreateCatalogComponent } from './create-catalog/create-catalog.component';
+import { CreateCatalogModule } from './create-catalog/create-catalog.module';
+import { SearchCatalogModule } from './search-catalog/search-catalog.module';
+import { FormsModule,ReactiveFormsModule } from '@angular/forms';
+import { NgJsonEditorModule } from 'ang-jsoneditor';
+
+@NgModule({
+  declarations: [ ControllerCatalogComponent, SelectTemplateComponent, TemplateOptionsComponent, SearchCatalogComponent, CreateCatalogComponent ],
+  imports: [
+    CommonModule,
+    ControllerCatalogRoutingModule,
+    CreateCatalogModule,
+    SearchCatalogModule,
+    SharedModule,
+    MatToolbarModule,
+    MatButtonModule,
+    MatSidenavModule,
+    MatIconModule,
+    MatListModule,
+    MatGridListModule,
+    MatCardModule,
+    MatMenuModule,
+    MatTableModule,
+    MatPaginatorModule,
+    MatSortModule,
+    MatInputModule,
+    MatSelectModule, 
+    MatRadioModule, 
+    MatFormFieldModule, 
+    MatStepperModule,
+    MatAutocompleteModule,
+    FormsModule,
+    ReactiveFormsModule,
+    NgJsonEditorModule
+  ]
+})
+export class ControllerCatalogModule { }
diff --git a/cds-ui/client/src/app/feature-modules/controller-catalog/create-catalog/create-catalog-routing.module.ts b/cds-ui/client/src/app/feature-modules/controller-catalog/create-catalog/create-catalog-routing.module.ts
new file mode 100644 (file)
index 0000000..68d13b2
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* Licensed 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.
+* ============LICENSE_END=========================================================
+*/
+import { NgModule } from '@angular/core';
+import { RouterModule, Routes } from '@angular/router';
+import { CreateCatalogComponent } from './create-catalog.component';
+
+const routes: Routes = [
+  {
+      path: '',
+      component: CreateCatalogComponent
+  }
+];
+@NgModule({
+imports: [RouterModule.forChild(routes)],
+exports: [RouterModule]
+})
+export class CreateCatalogRoutingModule { }
diff --git a/cds-ui/client/src/app/feature-modules/controller-catalog/create-catalog/create-catalog.component.html b/cds-ui/client/src/app/feature-modules/controller-catalog/create-catalog/create-catalog.component.html
new file mode 100644 (file)
index 0000000..8c71edf
--- /dev/null
@@ -0,0 +1,56 @@
+<!--/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* Licensed 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.
+* ============LICENSE_END=========================================================
+*/-->
+<mat-card class="ver-card">
+  <mat-card-header><div class="mat-card-header">Create Catalog</div>
+  </mat-card-header>
+  <mat-card-content>
+<form [formGroup]="CatalogFormData" (ngSubmit)="CreateCatalog()">
+  <mat-form-field class="form-field">
+   <input matInput placeholder="Model Name" formControlName="Model_Name">
+ </mat-form-field>
+ <mat-form-field class="form-field" >
+  <input matInput placeholder="User Id" formControlName="User_id">
+</mat-form-field>
+ <mat-form-field class="form-field">
+   <input matInput placeholder="Tags" formControlName="_tags">
+ </mat-form-field>
+ <mat-form-field class="form-field">
+   <mat-select matInput placeholder="Definition Type" formControlName="_type">
+     <mat-option [value]="item" *ngFor="let item of definitionType">{{item.definitionType}}</mat-option>
+   </mat-select>
+ </mat-form-field>
+ <mat-form-field class="form-field" >
+   <mat-select matInput placeholder="Derived From" formControlName="Derived_From">
+    <mat-option [value]="item" *ngFor="let item of derivedFrom">{{item.derivedFrom}}</mat-option>
+   </mat-select>
+ </mat-form-field>
+ <mat-form-field class="form-field" >
+   <textarea matInput placeholder="Description" formControlName="_description"></textarea>
+ </mat-form-field>
+  <br>
+  <div >
+      <json-editor  placeholder="Definition" class="jsoneditor" [options]="options" [data]="resources" on-change="onChange($event)"></json-editor>
+  </div>
+ <div>
+   <button mat-button class="matStepNextBtn" type="submit">Save</button>
+ </div>  
+</form>
+</mat-card-content>
+</mat-card>
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/controller-catalog/create-catalog/create-catalog.component.scss b/cds-ui/client/src/app/feature-modules/controller-catalog/create-catalog/create-catalog.component.scss
new file mode 100644 (file)
index 0000000..cc8e292
--- /dev/null
@@ -0,0 +1,60 @@
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : CDS\r
+* ================================================================================\r
+* Copyright (C) 2019 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+*     http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+.matStepNextBtn{\r
+    color:white;\r
+    background:#3f51b5;\r
+    margin-top: 10px;\r
+    position: absolute;\r
+    margin-bottom: 5px;\r
+    border-radius: 4px;\r
+}\r
+.meta-form {\r
+  width: 100%;\r
+}\r
+\r
+.form-field {\r
+  width: 40%;\r
+  padding:20px;\r
+}\r
+\r
+.form-table {\r
+  width: 100%;\r
+}\r
+.ver-card {\r
+    width: 100%;  \r
+    background-color: #f1f1f1;\r
+     padding: 0.01em 16px;\r
+      margin: 20px 0;\r
+      box-shadow: 0 2px 2px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12)!important;\r
+      height: 800px;\r
+  }\r
+  .mat-card-header{\r
+      height:35px;  \r
+      padding-top: 4px;\r
+  }\r
+  .mat-card-content{\r
+      width: auto;\r
+      background-color: #fff;\r
+      padding: 8px 8px;\r
+      // border-left: 4px solid #4CAF50;\r
+      word-wrap: break-word;\r
+      min-height:350px;\r
+      height: auto;\r
+  }
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/controller-catalog/create-catalog/create-catalog.component.spec.ts b/cds-ui/client/src/app/feature-modules/controller-catalog/create-catalog/create-catalog.component.spec.ts
new file mode 100644 (file)
index 0000000..8a96b6d
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* Licensed 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { CreateCatalogComponent } from './create-catalog.component';
+
+describe('CreateCatalogComponent', () => {
+  let component: CreateCatalogComponent;
+  let fixture: ComponentFixture<CreateCatalogComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ CreateCatalogComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(CreateCatalogComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/cds-ui/client/src/app/feature-modules/controller-catalog/create-catalog/create-catalog.component.ts b/cds-ui/client/src/app/feature-modules/controller-catalog/create-catalog/create-catalog.component.ts
new file mode 100644 (file)
index 0000000..91c6f28
--- /dev/null
@@ -0,0 +1,114 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* Licensed 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { Component, OnInit, ViewChild, ÉµConsole } from '@angular/core';
+import { FormBuilder, FormGroup, Validators } from '@angular/forms';
+import { JsonEditorComponent, JsonEditorOptions } from 'ang-jsoneditor';
+import { Observable } from 'rxjs';
+import { ICatalogState } from 'src/app/common/core/store/models/catalogState.model';
+import { ICatalog } from 'src/app/common/core/store/models/catalog.model';
+import { Store } from '@ngrx/store';
+import { IAppState } from 'src/app/common/core/store/state/app.state';
+import { SetCatalogState } from 'src/app/common/core/store/actions/catalog.action';
+import { CreateCatalogService } from './create-catalog.service';
+import { NotificationHandlerService } from 'src/app/common/core/services/notification-handler.service';
+
+@Component({
+  selector: 'app-create-catalog',
+  templateUrl: './create-catalog.component.html',
+  styleUrls: ['./create-catalog.component.scss']
+})
+export class CreateCatalogComponent implements OnInit {
+  
+  CatalogFormData: FormGroup;
+  @ViewChild(JsonEditorComponent) editor: JsonEditorComponent;
+  options = new JsonEditorOptions();
+  data:any;
+  derivedFrom: any[] = [{derivedFrom: 'tosca.nodes.Component'},{derivedFrom:'tosca.nodes.VNF'},{derivedFrom:'tosca.nodes.Artifact'},{derivedFrom:'tosca.nodes.ResourceSource'}, {derivedFrom:'tosca.nodes.Workflow'},{derivedFrom:'tosca.nodes.Root'}];
+  definitionType: any[] = [{definitionType: 'node_type'}];
+  ccState: Observable<ICatalogState>;
+  catalog: ICatalog;
+
+  constructor(private formBuilder: FormBuilder, private store: Store<IAppState>, private catalogCreateService: CreateCatalogService, private alertService: NotificationHandlerService) { 
+    this.ccState = this.store.select('catalog');
+    this.CatalogFormData = this.formBuilder.group({
+      Model_Name: ['', Validators.required],
+      User_id: ['', Validators.required],
+      _tags: ['', Validators.required],
+      _type: ['', Validators.required],
+      Derived_From: ['', Validators.required],
+      _description : ['', Validators.required]
+    });   
+  }
+  ngOnInit() {
+    this.options.mode = 'text';
+    this.options.modes = [ 'text', 'tree', 'view'];
+    this.options.statusBar = false; 
+
+    this.ccState.subscribe(
+      catalogdata => {
+        var catalogState: ICatalogState = { catalog: catalogdata.catalog, isLoadSuccess: catalogdata.isLoadSuccess, isSaveSuccess: catalogdata.isSaveSuccess, isUpdateSuccess: catalogdata.isUpdateSuccess };
+        this.catalog = catalogState.catalog;
+        console.log( this.catalog );
+      });
+
+//    this.catalogCreateService.getDefinition()
+//    .subscribe(data=>{
+//        console.log(data);
+//        data.forEach(element => {
+//          this.definitionType.push(element)
+//        });          
+//    }, error=>{
+//      window.alert('error' + error);
+//    })
+//
+//    this.catalogCreateService.getDerivedFrom()
+//    .subscribe(data=>{
+//        console.log(data);
+//        data.forEach(element => {
+//          this.derivedFrom.push(element)
+//        });          
+//    }, error=>{
+//      window.alert('error' + error);
+//    })
+  }
+  CreateCatalog(){
+    this.catalog = Object.assign({}, this.CatalogFormData.value);
+    this.catalog.definition=this.data;
+    let catalogState = {
+      catalog: this.catalog
+    }
+    this.store.dispatch(new SetCatalogState(catalogState));
+    
+      this.catalogCreateService.saveCatalog(this.catalog)
+      .subscribe(response=>{
+        this.alertService.success("save success")
+      },
+      error=>{
+        this.alertService.error('Error saving resources');
+      })
+  }
+
+  onChange($event) {
+    this.data=JSON.parse($event.srcElement.value); 
+    console.log(this.data);
+  };
+}
diff --git a/cds-ui/client/src/app/feature-modules/controller-catalog/create-catalog/create-catalog.module.ts b/cds-ui/client/src/app/feature-modules/controller-catalog/create-catalog/create-catalog.module.ts
new file mode 100644 (file)
index 0000000..e0ae0dc
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* Licensed 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { CreateCatalogRoutingModule } from './create-catalog-routing.module';
+import { MatToolbarModule, MatButtonModule, MatSidenavModule,  MatListModule, MatGridListModule, MatCardModule, MatMenuModule, MatTableModule, MatPaginatorModule, MatSortModule, MatInputModule, MatSelectModule, MatRadioModule, MatFormFieldModule, MatStepperModule} from '@angular/material';
+import { MatIconModule } from '@angular/material/icon';
+import { SharedModule } from 'src/app/common/shared/shared.module';
+import { NgJsonEditorModule } from 'ang-jsoneditor';
+import { CreateCatalogService } from './create-catalog.service';
+
+@NgModule({
+  declarations: [],
+  imports: [
+    CommonModule,
+    CreateCatalogRoutingModule,
+    SharedModule,
+    MatToolbarModule,
+    MatButtonModule,
+    MatSidenavModule,
+    MatIconModule,
+    MatListModule,
+    MatGridListModule,
+    MatCardModule,
+    MatMenuModule,
+    MatTableModule,
+    MatPaginatorModule,
+    MatSortModule,
+    MatInputModule,
+    MatSelectModule, 
+    MatRadioModule, 
+    MatFormFieldModule, 
+    MatStepperModule,
+    NgJsonEditorModule
+  ],
+  providers: [ CreateCatalogService ]
+})
+
+export class CreateCatalogModule { }
diff --git a/cds-ui/client/src/app/feature-modules/controller-catalog/create-catalog/create-catalog.service.ts b/cds-ui/client/src/app/feature-modules/controller-catalog/create-catalog/create-catalog.service.ts
new file mode 100644 (file)
index 0000000..fd582cc
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* Licensed 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { Injectable } from '@angular/core';
+import { HttpClient } from '@angular/common/http';
+import { ApiService } from 'src/app/common/core/services/api.service';
+import { ControllerCatalogURLs } from 'src/app/common/constants/app-constants';
+
+@Injectable()
+export class CreateCatalogService {
+  
+
+  constructor(private _http: HttpClient, private api: ApiService) {
+  }
+
+  saveCatalog(catalog) {
+     return this.api.post(ControllerCatalogURLs.saveControllerCatalog, catalog);
+  }
+
+  getDefinition() {
+    return this.api.get(ControllerCatalogURLs.getDefinition);
+  }
+  getDerivedFrom() {
+    return this.api.get(ControllerCatalogURLs.getDerivedFrom);
+  }
+}
+
diff --git a/cds-ui/client/src/app/feature-modules/controller-catalog/search-catalog/search-catalog-routing.module.ts b/cds-ui/client/src/app/feature-modules/controller-catalog/search-catalog/search-catalog-routing.module.ts
new file mode 100644 (file)
index 0000000..1785ef8
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* Licensed 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { NgModule } from '@angular/core';
+import { RouterModule, Routes } from '@angular/router';
+import { SearchCatalogComponent } from './search-catalog.component';
+
+const routes: Routes = [
+  {
+      path: '',
+      component: SearchCatalogComponent
+  }
+];
+@NgModule({
+imports: [RouterModule.forChild(routes)],
+exports: [RouterModule]
+})
+export class SearchCatalogRoutingModule { }
diff --git a/cds-ui/client/src/app/feature-modules/controller-catalog/search-catalog/search-catalog.component.html b/cds-ui/client/src/app/feature-modules/controller-catalog/search-catalog/search-catalog.component.html
new file mode 100644 (file)
index 0000000..4781382
--- /dev/null
@@ -0,0 +1,41 @@
+<!-- /*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* Licensed 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.
+* ============LICENSE_END=========================================================
+*/--> 
+<form class="search-form" [formGroup]="myControl">
+  <mat-form-field class="search-full-width">
+      <input matInput type="text" [(ngModel)]="searchText" placeholder="Search Resources" formControlName="search_input">
+      <button matSuffix mat-icon-button (click)="fetchCatalogByName()">
+    <mat-icon>search</mat-icon>
+  </button>
+  </mat-form-field>
+</form>
+<div class="searchcontainer">
+  <div class="flexBox">
+      <div *ngFor="let option of options" style="position: relative !important;width:20% !important">
+          <mat-card class="example-card">
+              <mat-card-content class="card-content">
+                  {{option.modelName}}
+              </mat-card-content>
+              <mat-card-actions class="flexBox">
+                  <button matStepperNext mat-menu-item (click)="editInfo(option.blueprintModel.artifactName,option.blueprintModel.artifactVersion,3)">Info</button>
+              </mat-card-actions>
+          </mat-card>
+      </div>
+  </div>
+</div>
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/controller-catalog/search-catalog/search-catalog.component.scss b/cds-ui/client/src/app/feature-modules/controller-catalog/search-catalog/search-catalog.component.scss
new file mode 100644 (file)
index 0000000..a24aebe
--- /dev/null
@@ -0,0 +1,78 @@
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : CDS\r
+* ================================================================================\r
+* Copyright (C) 2019 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+*     http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+\r
+.example-card {\r
+  // min-width: 300px;\r
+  max-height: 200px;\r
+  background-color: #ebebeb;\r
+  position: relative;\r
+  width: 250px;\r
+  margin: 5px;\r
+}\r
+\r
+.mat-grid-tile {\r
+  position: absolute;\r
+  width: 240px !important;\r
+}\r
+\r
+.mat-grid-list div {\r
+  position: relative;\r
+}\r
+\r
+button.mat-menu-item {\r
+  width: auto;\r
+  float: left;\r
+  border-radius: 4px;\r
+  background-color: #3f51b5;\r
+  margin: 5px;\r
+  cursor: pointer;\r
+  color: white;\r
+}\r
+\r
+.flexBox {\r
+  display: flex;\r
+  flex-flow: row;\r
+  flex-wrap: wrap;\r
+}\r
+\r
+.card-deck-container {\r
+  position: relative;\r
+  border-radius: 1px;\r
+  padding: 2px;\r
+  margin: 2px;\r
+  // background-color: #f5f5f5;\r
+}\r
+\r
+.searchcontainer {\r
+  // min-height: 300px;\r
+  overflow-x: hidden;\r
+  overflow-y: scroll;\r
+}\r
+\r
+.card-content {\r
+  text-align: center;\r
+  margin: 5px;\r
+}\r
+\r
+.mat-card-actions {\r
+  margin-left: 0px !important;\r
+  margin-right: 0px !important;\r
+  padding: 0px 0 !important;\r
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/controller-catalog/search-catalog/search-catalog.component.spec.ts b/cds-ui/client/src/app/feature-modules/controller-catalog/search-catalog/search-catalog.component.spec.ts
new file mode 100644 (file)
index 0000000..661246e
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* Licensed 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { SearchCatalogComponent } from './search-catalog.component';
+
+describe('SearchCatalogComponent', () => {
+  let component: SearchCatalogComponent;
+  let fixture: ComponentFixture<SearchCatalogComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ SearchCatalogComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(SearchCatalogComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
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
new file mode 100644 (file)
index 0000000..b30fc3a
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* Licensed 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { Component, OnInit, ViewChild } from '@angular/core';
+import { FormBuilder, FormGroup, Validators } from '@angular/forms';
+import { SearchCatalogService } from './search-catalog.service';
+import { MatAutocompleteTrigger } from '@angular/material';
+
+@Component({
+  selector: 'app-search-catalog',
+  templateUrl: './search-catalog.component.html',
+  styleUrls: ['./search-catalog.component.scss']
+})
+export class SearchCatalogComponent implements OnInit {
+  myControl: FormGroup;
+  searchText: string = '';
+  options: any[]   = [];
+  @ViewChild('catalogSelect', { read: MatAutocompleteTrigger }) catalogSelect: MatAutocompleteTrigger;
+  constructor(private _formBuilder: FormBuilder, private searchCatalogService: SearchCatalogService)  { }
+  
+ ngOnInit() {
+    this.myControl = this._formBuilder.group({
+      search_input: ['', Validators.required]
+    });
+  }
+  fetchCatalogByName() {
+    this.searchCatalogService.searchByTags(this.searchText)
+    .subscribe(data=>{
+        console.log(data);
+        data.forEach(element => {
+          this.options.push(element)
+        });          
+      this.catalogSelect.openPanel();
+    }, error=>{
+      window.alert('Catalog not matching the search tag' + error);
+    })
+   }
+
+   editInfo(artifactName: string, artifactVersion: string, option: string) {
+  }
+}
diff --git a/cds-ui/client/src/app/feature-modules/controller-catalog/search-catalog/search-catalog.module.ts b/cds-ui/client/src/app/feature-modules/controller-catalog/search-catalog/search-catalog.module.ts
new file mode 100644 (file)
index 0000000..2aa1a50
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* Licensed 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { SearchCatalogRoutingModule } from './search-catalog-routing.module';
+import { MatToolbarModule, MatButtonModule, MatSidenavModule,  MatListModule, MatGridListModule, MatCardModule, MatMenuModule, MatTableModule, MatPaginatorModule, MatSortModule, MatInputModule, MatSelectModule, MatRadioModule, MatFormFieldModule, MatStepperModule, MatAutocompleteModule} from '@angular/material';
+import { MatIconModule } from '@angular/material/icon';
+import { SharedModule } from 'src/app/common/shared/shared.module';
+import { FormsModule,ReactiveFormsModule } from '@angular/forms';
+import { SearchCatalogService } from './search-catalog.service';
+
+@NgModule({
+  declarations: [],
+  imports: [
+    CommonModule,
+    SearchCatalogRoutingModule,
+    FormsModule,
+    ReactiveFormsModule,
+    SharedModule,
+    MatToolbarModule,
+    MatButtonModule,
+    MatSidenavModule,
+    MatIconModule,
+    MatListModule,
+    MatGridListModule,
+    MatCardModule,
+    MatMenuModule,
+    MatTableModule,
+    MatPaginatorModule,
+    MatSortModule,
+    MatInputModule,
+    MatSelectModule, 
+    MatRadioModule, 
+    MatFormFieldModule, 
+    MatStepperModule,
+    MatAutocompleteModule
+  ],
+  providers: [ SearchCatalogService ]
+})
+export class SearchCatalogModule { }
diff --git a/cds-ui/client/src/app/feature-modules/controller-catalog/search-catalog/search-catalog.service.ts b/cds-ui/client/src/app/feature-modules/controller-catalog/search-catalog/search-catalog.service.ts
new file mode 100644 (file)
index 0000000..4789605
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* Licensed 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { Injectable } from '@angular/core';
+import { HttpClient } from '@angular/common/http';
+import { Observable, observable } from 'rxjs';
+import { ControllerCatalogURLs } from 'src/app/common/constants/app-constants';
+import { ApiService } from 'src/app/common/core/services/api.service';
+
+@Injectable()
+export class SearchCatalogService {
+
+  constructor(private _http: HttpClient, private api: ApiService) {
+  }
+
+  searchByTags(tag) {
+    return this.api.get(ControllerCatalogURLs.searchControllerCatalogByTags + '/' + tag);
+  }
+}
diff --git a/cds-ui/client/src/app/feature-modules/controller-catalog/select-template/select-template-routing.module.ts b/cds-ui/client/src/app/feature-modules/controller-catalog/select-template/select-template-routing.module.ts
new file mode 100644 (file)
index 0000000..0da5b16
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* Licensed 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { NgModule } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+import { SelectTemplateComponent } from './select-template.component';
+import { TemplateOptionsComponent } from './template-options/template-options.component';
+
+const routes: Routes = [
+    {
+        path: '',
+        component: SelectTemplateComponent
+    }
+];
+
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule]
+})
+
+export class SelectTemplateRoutingModule { }
diff --git a/cds-ui/client/src/app/feature-modules/controller-catalog/select-template/select-template.component.html b/cds-ui/client/src/app/feature-modules/controller-catalog/select-template/select-template.component.html
new file mode 100644 (file)
index 0000000..8a51b4e
--- /dev/null
@@ -0,0 +1,33 @@
+<!--/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* Licensed 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.
+* ============LICENSE_END=========================================================
+*/-->
+
+<mat-card class="ver-card">
+<mat-card-header>
+</mat-card-header>
+<mat-card-content>
+<mat-vertical-stepper linear>
+  <mat-step [stepControl]="step1FormGroup">
+    <ng-template matStepLabel>Choose Option</ng-template>
+    <br>
+    <app-template-options (option)="selectedOption($event)"></app-template-options>
+  </mat-step>
+ </mat-vertical-stepper>
+ </mat-card-content>
+</mat-card>
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/controller-catalog/select-template/select-template.component.scss b/cds-ui/client/src/app/feature-modules/controller-catalog/select-template/select-template.component.scss
new file mode 100644 (file)
index 0000000..62b6f5d
--- /dev/null
@@ -0,0 +1,52 @@
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : CDS\r
+* ================================================================================\r
+* Copyright (C) 2019 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+*     http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+.matStepNextBtn{\r
+    color:white;\r
+    background:#3f51b5; \r
+    margin-top: 10px; \r
+    position: absolute;\r
+    border-radius: 4px;\r
+}\r
+.ver-card {\r
+  width: 100%;  \r
+  background-color: #f1f1f1;\r
+   padding: 0.01em 16px;\r
+    margin: 20px 0;\r
+    box-shadow: 0 2px 2px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12)!important;\r
+    height: auto;\r
+}\r
+.mat-card-header{\r
+    height:35px;\r
+}\r
+.mat-card-content{\r
+    width: auto;\r
+    background-color: #fff;\r
+    padding: 8px 8px;\r
+    // border-left: 4px solid #4CAF50;\r
+    word-wrap: break-word;\r
+    min-height:350px;\r
+    height: auto;\r
+}\r
+.success{\r
+color:green;\r
+}\r
+.comp-disabled {\r
+    display: none;\r
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/controller-catalog/select-template/select-template.component.spec.ts b/cds-ui/client/src/app/feature-modules/controller-catalog/select-template/select-template.component.spec.ts
new file mode 100644 (file)
index 0000000..c0c7b50
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* Licensed 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { SelectTemplateComponent } from './select-template.component';
+
+describe('SelectTemplateComponent', () => {
+  let component: SelectTemplateComponent;
+  let fixture: ComponentFixture<SelectTemplateComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ SelectTemplateComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(SelectTemplateComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/cds-ui/client/src/app/feature-modules/controller-catalog/select-template/select-template.component.ts b/cds-ui/client/src/app/feature-modules/controller-catalog/select-template/select-template.component.ts
new file mode 100644 (file)
index 0000000..ed44e0c
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* Licensed 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { Component, OnInit, Output, EventEmitter } from '@angular/core';
+
+@Component({
+  selector: 'app-select-template',
+  templateUrl: './select-template.component.html',
+  styleUrls: ['./select-template.component.scss']
+})
+export class SelectTemplateComponent implements OnInit {
+
+  selectedValue: any;
+  @Output() option = new EventEmitter();
+  
+  constructor() { }
+
+  ngOnInit() {
+  }
+
+  selectedOption(value){
+    this.selectedValue=value;
+    this.option.emit(value);      
+ }
+}
diff --git a/cds-ui/client/src/app/feature-modules/controller-catalog/select-template/select-template.module.ts b/cds-ui/client/src/app/feature-modules/controller-catalog/select-template/select-template.module.ts
new file mode 100644 (file)
index 0000000..8853b5b
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+* ============LICENSE_START=======================================================
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* Licensed 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { TemplateOptionsComponent } from './template-options/template-options.component';
+import { SelectTemplateComponent } from './select-template.component';
+import { SelectTemplateRoutingModule } from './select-template-routing.module';
+import { AppMaterialModule } from 'src/app/common/modules/app-material.module';
+import { MatAutocompleteModule,MatToolbarModule,MatIconModule, MatButtonModule, MatSidenavModule,  MatCheckboxModule, MatListModule, MatGridListModule, MatCardModule, MatMenuModule, MatTableModule, MatPaginatorModule, MatSortModule, MatInputModule, MatSelectModule, MatRadioModule, MatFormFieldModule, MatStepperModule} from '@angular/material';
+import { SharedModule } from '../../../../app/common/shared/shared.module';
+import { FormsModule,ReactiveFormsModule } from '@angular/forms';
+
+@NgModule({
+  declarations: [
+    TemplateOptionsComponent,
+    SelectTemplateComponent
+  ],
+  exports: [
+    TemplateOptionsComponent,
+    SelectTemplateComponent
+  ],
+  imports: [
+    CommonModule,
+    SelectTemplateRoutingModule,
+    ReactiveFormsModule,
+    AppMaterialModule,
+    FormsModule,
+    ReactiveFormsModule,
+    MatToolbarModule,
+    MatIconModule, 
+    MatButtonModule, 
+    MatSidenavModule,  
+    MatCheckboxModule, 
+    MatListModule, 
+    MatGridListModule, 
+    MatCardModule, 
+    MatMenuModule, 
+    MatTableModule, 
+    MatPaginatorModule, 
+    MatSortModule, 
+    MatInputModule, 
+    MatSelectModule, 
+    MatRadioModule, 
+    MatFormFieldModule, 
+    MatStepperModule,
+    MatAutocompleteModule
+  ],
+  providers: [
+  ]
+})
+export class SelectTemplateModule { }
diff --git a/cds-ui/client/src/app/feature-modules/controller-catalog/select-template/template-options/template-options.component.html b/cds-ui/client/src/app/feature-modules/controller-catalog/select-template/template-options/template-options.component.html
new file mode 100644 (file)
index 0000000..185a112
--- /dev/null
@@ -0,0 +1,24 @@
+<!--/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* Licensed 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.
+* ============LICENSE_END=========================================================
+*/-->
+
+<mat-radio-group>
+  <mat-radio-button value="1" (click)="selected(1)">Create New Catalog</mat-radio-button><br><br>
+  <mat-radio-button value="2" (click)="selected(2)">Search existing catalog</mat-radio-button><br><br>
+</mat-radio-group>
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/controller-catalog/select-template/template-options/template-options.component.scss b/cds-ui/client/src/app/feature-modules/controller-catalog/select-template/template-options/template-options.component.scss
new file mode 100644 (file)
index 0000000..d0f182d
--- /dev/null
@@ -0,0 +1,19 @@
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : CDS\r
+* ================================================================================\r
+* Copyright (C) 2019 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+*     http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/controller-catalog/select-template/template-options/template-options.component.spec.ts b/cds-ui/client/src/app/feature-modules/controller-catalog/select-template/template-options/template-options.component.spec.ts
new file mode 100644 (file)
index 0000000..03e7998
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* Licensed 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { TemplateOptionsComponent } from './template-options.component';
+
+describe('TemplateOptionsComponent', () => {
+  let component: TemplateOptionsComponent;
+  let fixture: ComponentFixture<TemplateOptionsComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ TemplateOptionsComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(TemplateOptionsComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/cds-ui/client/src/app/feature-modules/controller-catalog/select-template/template-options/template-options.component.ts b/cds-ui/client/src/app/feature-modules/controller-catalog/select-template/template-options/template-options.component.ts
new file mode 100644 (file)
index 0000000..dc9513b
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* Licensed 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { Component, OnInit, Output, EventEmitter } from '@angular/core';
+
+@Component({
+  selector: 'app-template-options',
+  templateUrl: './template-options.component.html',
+  styleUrls: ['./template-options.component.scss']
+})
+export class TemplateOptionsComponent implements OnInit {
+
+  @Output() option = new EventEmitter();
+
+  constructor() { }
+
+  ngOnInit() {
+  }
+
+  selected(value){
+           this.option.emit(value);
+  }
+}