summaryrefslogtreecommitdiffstats
path: root/cds-ui/client/src
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2019-01-04 13:45:43 +0000
committerGerrit Code Review <gerrit@onap.org>2019-01-04 13:45:43 +0000
commitc9baafbd5cafa524a4b857d92db2a28246ae9697 (patch)
tree16b8ef5a01c34d0fb123141152bf1f180798d2d6 /cds-ui/client/src
parentc510a1afd1fb3f8c1005fac80db3bf667e55d2b2 (diff)
parent7845541c1390b4c31a58abe88e672be9bbd75fd5 (diff)
Merge "Common module"
Diffstat (limited to 'cds-ui/client/src')
-rw-r--r--cds-ui/client/src/app/common/constants/app-constants.ts34
-rw-r--r--cds-ui/client/src/app/common/core/README.md22
-rw-r--r--cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.html32
-rw-r--r--cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.scss23
-rw-r--r--cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.spec.ts45
-rw-r--r--cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.ts49
-rw-r--r--cds-ui/client/src/app/common/shared/directives/README.md22
-rw-r--r--cds-ui/client/src/app/common/shared/pipes/README.md22
-rw-r--r--cds-ui/client/src/app/common/store/README.md22
-rw-r--r--cds-ui/client/src/app/common/utility/README.md22
10 files changed, 293 insertions, 0 deletions
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 @@
+<!--
+============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-card class="CBAform">
+ <mat-card-content>
+ <mat-horizontal-stepper [linear]=true #stepper (selectionChange)="changeRoute($event)">
+ <div *ngFor="let step of stepDetails">
+ <mat-step>
+ <ng-template matStepLabel>{{step.name}}
+ </ng-template>
+ </mat-step>
+ </div>
+ </mat-horizontal-stepper>
+ </mat-card-content>
+</mat-card>
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<CBAWizardComponent>;
+
+ 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