From 7845541c1390b4c31a58abe88e672be9bbd75fd5 Mon Sep 17 00:00:00 2001 From: Arundathi Patil Date: Fri, 4 Jan 2019 15:59:37 +0530 Subject: Common module This folder contains all the common components, directives,pipes, services, store that will be used across the application. Issue-ID: CCSDK-816 Change-Id: Ied731e4034e1a5ddd86c2e78dc5922e10a05123a Signed-off-by: Arundathi Patil --- .../src/app/common/constants/app-constants.ts | 34 +++++++++++++++ cds-ui/client/src/app/common/core/README.md | 22 ++++++++++ .../components/cbawizard/cbawizard.component.html | 32 ++++++++++++++ .../components/cbawizard/cbawizard.component.scss | 23 ++++++++++ .../cbawizard/cbawizard.component.spec.ts | 45 ++++++++++++++++++++ .../components/cbawizard/cbawizard.component.ts | 49 ++++++++++++++++++++++ .../src/app/common/shared/directives/README.md | 22 ++++++++++ .../client/src/app/common/shared/pipes/README.md | 22 ++++++++++ cds-ui/client/src/app/common/store/README.md | 22 ++++++++++ cds-ui/client/src/app/common/utility/README.md | 22 ++++++++++ 10 files changed, 293 insertions(+) create mode 100644 cds-ui/client/src/app/common/constants/app-constants.ts create mode 100644 cds-ui/client/src/app/common/core/README.md create mode 100644 cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.html create mode 100644 cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.scss create mode 100644 cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.spec.ts create mode 100644 cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.ts create mode 100644 cds-ui/client/src/app/common/shared/directives/README.md create mode 100644 cds-ui/client/src/app/common/shared/pipes/README.md create mode 100644 cds-ui/client/src/app/common/store/README.md create mode 100644 cds-ui/client/src/app/common/utility/README.md (limited to 'cds-ui/client') diff --git a/cds-ui/client/src/app/common/constants/app-constants.ts b/cds-ui/client/src/app/common/constants/app-constants.ts new file mode 100644 index 000000000..a00e25f4b --- /dev/null +++ b/cds-ui/client/src/app/common/constants/app-constants.ts @@ -0,0 +1,34 @@ +/* +============LICENSE_START========================================== +=================================================================== +Copyright (C) 2018 IBM Intellectual Property. All rights reserved. +=================================================================== + +Unless otherwise specified, all software contained herein is licensed +under the Apache License, Version 2.0 (the License); +you may not use this software 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============================================ +*/ +export const GlobalContants = { + endpoints: { + + }, + cbawizard: { + stepsRequired: {stepCount: 3, + steps: [{name:'CBA Metadata', componentURL:'/controllerBlueprint/selectTemplate'}, + {name:'Controller Blueprint Designer', componentURL:'/controllerBlueprint/modifyTemplate'}, + {name:'Test', componentURL:'/controllerBlueprint/testTemplate'}, + {name:'Deploy', componentURL:'/controllerBlueprint/deployTemplate'}] + } + } + +}; \ No newline at end of file diff --git a/cds-ui/client/src/app/common/core/README.md b/cds-ui/client/src/app/common/core/README.md new file mode 100644 index 000000000..6b30b8a64 --- /dev/null +++ b/cds-ui/client/src/app/common/core/README.md @@ -0,0 +1,22 @@ +/* +============LICENSE_START========================================== +=================================================================== +Copyright (C) 2018 IBM Intellectual Property. All rights reserved. +=================================================================== + +Unless otherwise specified, all software contained herein is licensed +under the Apache License, Version 2.0 (the License); +you may not use this software 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============================================ +*/ + +This folder contains Core services. Services which should have single instance across the application. \ No newline at end of file diff --git a/cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.html b/cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.html new file mode 100644 index 000000000..c76be7691 --- /dev/null +++ b/cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.html @@ -0,0 +1,32 @@ + + + + +
+ + {{step.name}} + + +
+
+
+
diff --git a/cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.scss b/cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.scss new file mode 100644 index 000000000..f3c33e823 --- /dev/null +++ b/cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.scss @@ -0,0 +1,23 @@ +/* +============LICENSE_START========================================== +=================================================================== +Copyright (C) 2018 IBM Intellectual Property. All rights reserved. +=================================================================== + +Unless otherwise specified, all software contained herein is licensed +under the Apache License, Version 2.0 (the License); +you may not use this software 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-horizontal-content-container{ + display: none !important; +} \ No newline at end of file diff --git a/cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.spec.ts b/cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.spec.ts new file mode 100644 index 000000000..62aca172f --- /dev/null +++ b/cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.spec.ts @@ -0,0 +1,45 @@ +/* +============LICENSE_START========================================== +=================================================================== +Copyright (C) 2018 IBM Intellectual Property. All rights reserved. +=================================================================== + +Unless otherwise specified, all software contained herein is licensed +under the Apache License, Version 2.0 (the License); +you may not use this software 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 { CBAWizardComponent } from './cbawizard.component'; + +describe('CBAWizardComponent', () => { + let component: CBAWizardComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ CBAWizardComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(CBAWizardComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.ts b/cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.ts new file mode 100644 index 000000000..bbfc11970 --- /dev/null +++ b/cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.ts @@ -0,0 +1,49 @@ +/* +============LICENSE_START========================================== +=================================================================== +Copyright (C) 2018 IBM Intellectual Property. All rights reserved. +=================================================================== + +Unless otherwise specified, all software contained herein is licensed +under the Apache License, Version 2.0 (the License); +you may not use this software 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, Input, Output, EventEmitter } from '@angular/core'; +import { Router } from '@angular/router'; + +import { GlobalContants } from '../../../constants/app-constants'; + +@Component({ + selector: 'app-cbawizard', + templateUrl: './cbawizard.component.html', + styleUrls: ['./cbawizard.component.scss'] +}) +export class CBAWizardComponent implements OnInit { + @Input() stepsRequired: any; + @Output() stepChanged = new EventEmitter(); + public stepDetails = GlobalContants.cbawizard.stepsRequired.steps; + + constructor(private router: Router) { } + + ngOnInit() { + } + + changeRoute(event){ + this.stepDetails.forEach((step, index)=>{ + if(index == event.selectedIndex) { + this.router.navigate([step.componentURL]); + } + }); + } + +} diff --git a/cds-ui/client/src/app/common/shared/directives/README.md b/cds-ui/client/src/app/common/shared/directives/README.md new file mode 100644 index 000000000..d82b915d7 --- /dev/null +++ b/cds-ui/client/src/app/common/shared/directives/README.md @@ -0,0 +1,22 @@ +/* +============LICENSE_START========================================== +=================================================================== +Copyright (C) 2018 IBM Intellectual Property. All rights reserved. +=================================================================== + +Unless otherwise specified, all software contained herein is licensed +under the Apache License, Version 2.0 (the License); +you may not use this software 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============================================ +*/ + +This folder contains common directives used across the application. diff --git a/cds-ui/client/src/app/common/shared/pipes/README.md b/cds-ui/client/src/app/common/shared/pipes/README.md new file mode 100644 index 000000000..8470fee4e --- /dev/null +++ b/cds-ui/client/src/app/common/shared/pipes/README.md @@ -0,0 +1,22 @@ +/* +============LICENSE_START========================================== +=================================================================== +Copyright (C) 2018 IBM Intellectual Property. All rights reserved. +=================================================================== + +Unless otherwise specified, all software contained herein is licensed +under the Apache License, Version 2.0 (the License); +you may not use this software 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============================================ +*/ + +This folder contains common pipes used across the application \ No newline at end of file diff --git a/cds-ui/client/src/app/common/store/README.md b/cds-ui/client/src/app/common/store/README.md new file mode 100644 index 000000000..c9584c84a --- /dev/null +++ b/cds-ui/client/src/app/common/store/README.md @@ -0,0 +1,22 @@ +/* +============LICENSE_START========================================== +=================================================================== +Copyright (C) 2018 IBM Intellectual Property. All rights reserved. +=================================================================== + +Unless otherwise specified, all software contained herein is licensed +under the Apache License, Version 2.0 (the License); +you may not use this software 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============================================ +*/ + +This folder contains the code related to ngrx/store, for application state management. \ No newline at end of file diff --git a/cds-ui/client/src/app/common/utility/README.md b/cds-ui/client/src/app/common/utility/README.md new file mode 100644 index 000000000..e4b0cce96 --- /dev/null +++ b/cds-ui/client/src/app/common/utility/README.md @@ -0,0 +1,22 @@ +/* +============LICENSE_START========================================== +=================================================================== +Copyright (C) 2018 IBM Intellectual Property. All rights reserved. +=================================================================== + +Unless otherwise specified, all software contained herein is licensed +under the Apache License, Version 2.0 (the License); +you may not use this software 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============================================ +*/ + +This folder contains utility files \ No newline at end of file -- cgit 1.2.3-korg