Merge "Template Option Component"
diff --git a/cds-ui/client/src/app/common/constants/app-constants.ts b/cds-ui/client/src/app/common/constants/app-constants.ts
index a00e25f..0efabeb 100644
--- a/cds-ui/client/src/app/common/constants/app-constants.ts
+++ b/cds-ui/client/src/app/common/constants/app-constants.ts
@@ -22,13 +22,73 @@
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'}]
+ // }
+ // }
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'}]
- }
- }
+ stepsRequired:
+ {
+ stepCount: 4,
+ steps: [{
+ name: 'CBA Metadata',
+ componentURL: '/controllerBlueprint/selectTemplate',
+ label: 'CBA Metadata',
+ link: '/blueprint/selectTemplate',
+ index: 0,
+ component: 'SelectTemplateComponent'
+ },
+ {
+ name: 'Controller Blueprint Designer',
+ componentURL: '/controllerBlueprint/modifyTemplate',
+ label: 'Controller Blueprint Designer',
+ link: '/blueprint/modifyTemplate',
+ index: 1,
+ component: 'ModifyTemplateComponent'
+ },
+ {
+ name: 'Test',
+ componentURL: '/controllerBlueprint/testTemplate',
+ label: 'Test',
+ link: '/blueprint/testTemplate',
+ index: 2,
+ component: 'TestTemplateComponent'
+ },
+ {
+ name: 'Deploy',
+ componentURL: '/controllerBlueprint/deployTemplate',
+ label: 'Deploy',
+ link: '/blueprint/deployTemplate',
+ index: 3,
+ component: 'DeployTemplateComponent'
+ }]
+ }
+ },
+ datadictionary: {
+ stepsRequired:
+ {
+ stepCount: 3,
+ steps: [{
+ name: 'Resource Creation', componentURL: '/dataDictionary/selectTemplate',
+ label: 'Resource Creation',
+ component: 'ResourceCreationComponent'
+ },
+ {
+ name: 'Edit/Validate', componentURL: '/dataDictionary/modifyTemplate',
+ label: 'Edit/Validate',
+ component: 'ResourceEditComponent'
+ },
+ {
+ name: 'Save', componentURL: '/dataDictionary/saveTemplate',
+ label: 'Save Resource',
+ component: 'SaveResourceComponent'
+ }]
+ }
+
+ }
};
\ 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
index a925b45..b7c59b2 100644
--- 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
@@ -31,7 +31,7 @@
</mat-card-content>
</mat-card> -->
-<mat-card class="CBAform">
+<!-- <mat-card class="CBAform">
<mat-card-content>
<mat-horizontal-stepper [linear]=true #stepper (selectionChange)="changeRoute($event)">
<a *ngFor="let routeLink of stepsRequired; let i = index;">
@@ -42,4 +42,21 @@
</a>
</mat-horizontal-stepper>
</mat-card-content>
-</mat-card>
+</mat-card> -->
+
+<mat-card class="CBAform">
+ <!-- <label>{{appName}}</label> -->
+ <mat-card-content>
+ <mat-horizontal-stepper [linear]=true #stepper >
+ <!-- <mat-step style="display: none;" *ngFor="let routeLink of stepsRequired; let i = index;"> -->
+ <mat-step style="display: none;" *ngFor="let routeLink of steps">
+ <ng-template matStepLabel>{{routeLink.label}}</ng-template>
+ <!-- {{appToLoad.component}} -->
+ <template #steppercontainer> </template>
+ </mat-step>
+ <div style="position:relative">
+ <button mat-button matStepperNext style="color:white;background:gray; right: 20px; position: absolute;bottom:5px; ">Next</button>
+ </div>
+ </mat-horizontal-stepper>
+ </mat-card-content>
+</mat-card>
\ No newline at end of file
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
index 9373fac..fc284b3 100644
--- 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
@@ -30,34 +30,36 @@
styleUrls: ['./cbawizard.component.scss']
})
export class CBAWizardComponent implements OnInit {
- @Input() stepsRequired: any[];
+ // @Input() stepsRequired: any[];
+ @Input() appName: any;
@ViewChild('stepper') stepper: MatStepper;
@Output() stepChanged = new EventEmitter();
public stepDetails = GlobalContants.cbawizard.stepsRequired.steps;
private routeLinks : any[];
activeLinkIndex = -1;
-
-
+ stepsRequired: any;
+ steps: any[];
+
constructor(private router: Router) {
- this.routeLinks = [
- {
- label: 'CBA Metadata',
- link: '/blueprint/selectTemplate',
- index: 0
- }, {
- label: 'Controller Blueprint Designer',
- link: '/blueprint/modifyTemplate',
- index: 1
- }, {
- label: 'Test',
- link: '/blueprint/testTemplate',
- index: 2
- }, {
- label: 'Deploy',
- link: '/blueprint/deployTemplate',
- index: 3
- }
- ];
+ // this.routeLinks = [
+ // {
+ // label: 'CBA Metadata',
+ // link: '/blueprint/selectTemplate',
+ // index: 0
+ // }, {
+ // label: 'Controller Blueprint Designer',
+ // link: '/blueprint/modifyTemplate',
+ // index: 1
+ // }, {
+ // label: 'Test',
+ // link: '/blueprint/testTemplate',
+ // index: 2
+ // }, {
+ // label: 'Deploy',
+ // link: '/blueprint/deployTemplate',
+ // index: 3
+ // }
+ // ];
}
@@ -66,11 +68,21 @@
// this.activeLinkIndex = this.routeLinks.indexOf(this.routeLinks.find(tab => tab.link === this.router.url));
// this.stepper.selectedIndex = this.activeLinkIndex;
// });
- this.stepsRequired.forEach((step, index)=>{
- if(step.link == this.router.url) {
- this.stepper.selectedIndex = step.index
- }
- });
+ // this.stepsRequired.forEach((step, index)=>{
+ // if(step.link == this.router.url) {
+ // this.stepper.selectedIndex = step.index
+ // }
+ // });
+ if (this.appName == "cba") {
+ this.stepsRequired = GlobalContants.cbawizard.stepsRequired.stepCount;
+ this.steps = GlobalContants.cbawizard.stepsRequired.steps;
+ // this.createComponent();
+ }
+ if (this.appName == "datadict") {
+ this.stepsRequired = GlobalContants.datadictionary.stepsRequired.stepCount;
+ this.steps = GlobalContants.datadictionary.stepsRequired.steps;
+ // this.createComponent();
+ }
}
changeRoute(event){
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/blueprint.component.html b/cds-ui/client/src/app/feature-modules/blueprint/blueprint.component.html
index 8778de4..68d0ade 100644
--- a/cds-ui/client/src/app/feature-modules/blueprint/blueprint.component.html
+++ b/cds-ui/client/src/app/feature-modules/blueprint/blueprint.component.html
@@ -16,5 +16,5 @@
See the License for the specific language governing permissions and
limitations under the License.
============LICENSE_END============================================ -->
-<app-cbawizard></app-cbawizard>
+<app-cbawizard [appName]="appName"></app-cbawizard>
<router-outlet></router-outlet>
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/blueprint.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/blueprint.component.ts
index 59cbb45..4612499 100644
--- a/cds-ui/client/src/app/feature-modules/blueprint/blueprint.component.ts
+++ b/cds-ui/client/src/app/feature-modules/blueprint/blueprint.component.ts
@@ -27,8 +27,11 @@
styleUrls: ['./blueprint.component.scss']
})
export class BlueprintComponent implements OnInit {
+ appName: String;
- constructor() { }
+ constructor() {
+ this.appName="cba";
+ }
ngOnInit() {
}
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.html b/cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.html
index b4aca6b..81c6349 100644
--- a/cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.html
+++ b/cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.html
@@ -19,6 +19,20 @@
============LICENSE_END============================================
-->
-<p>
- metadata works!
-</p>
+<form [formGroup]="CBAMetadata">
+ <mat-form-field class="form-field">
+ <input matInput placeholder="CBA File Name" formControlName="CBA_File_Name">
+ </mat-form-field>
+ <mat-form-field class="form-field">
+ <input matInput placeholder="CBA Version" formControlName="CBA_Version">
+ </mat-form-field>
+ <mat-form-field class="form-field">
+ <input matInput placeholder="CSAR Version" formControlName="CSAR_Version">
+ </mat-form-field>
+ <mat-form-field class="form-field">
+ <input matInput placeholder="Entry Definition" formControlName="entry_Definition">
+ </mat-form-field>
+ <mat-form-field class="form-field">
+ <input matInput placeholder="Author" formControlName="author">
+ </mat-form-field>
+ </form>
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.scss b/cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.scss
index 22941b5..fa7f2bf 100644
--- a/cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.scss
+++ b/cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.scss
@@ -17,4 +17,8 @@
See the License for the specific language governing permissions and
limitations under the License.
============LICENSE_END============================================
-*/
\ No newline at end of file
+*/
+.form-field{
+ width: 50%;
+ margin: 10px;
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.ts
index e20dde1..b8f57cb 100644
--- a/cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.ts
+++ b/cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.ts
@@ -19,7 +19,8 @@
============LICENSE_END============================================
*/
-import { Component, OnInit } from '@angular/core';
+import { Component, OnInit} from '@angular/core';
+import {FormBuilder, FormGroup, Validators} from '@angular/forms';
@Component({
selector: 'app-metadata',
@@ -27,10 +28,18 @@
styleUrls: ['./metadata.component.scss']
})
export class MetadataComponent implements OnInit {
+ CBAMetadata: FormGroup;
- constructor() { }
+ constructor(private _formBuilder: FormBuilder) { }
ngOnInit() {
+ this.CBAMetadata = this._formBuilder.group({
+ CBA_File_Name: ['', Validators.required],
+ CBA_Version: ['', Validators.required],
+ CSAR_Version: ['', Validators.required],
+ entry_Definition: ['', Validators.required],
+ author: ['', Validators.required]
+ });
}
-}
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.html b/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.html
index 5be6979..fbf0baa 100644
--- a/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.html
+++ b/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.html
@@ -18,6 +18,4 @@
limitations under the License.
============LICENSE_END============================================
-->
-<p>
- search-template works!
-</p>
+<app-file-upload></app-file-upload>
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.html b/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.html
index 2b8b74b..bcd7832 100644
--- a/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.html
+++ b/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.html
@@ -18,8 +18,31 @@
limitations under the License.
============LICENSE_END============================================
-->
-<p>
- select-template works!
-</p>
+<mat-vertical-stepper linear>
+ <mat-step [stepControl]="step1FormGroup">
+ <ng-template matStepLabel>Choose CBA Template file</ng-template>
+ <app-template-options></app-template-options>
+ <br>
+ <div>
+ <button mat-button matStepperNext class="matStepNextBtn">Proceed</button>
+ </div>
+ </mat-step>
+ <mat-step [stepControl]="step2FormGroup">
+ <ng-template matStepLabel>Browse CBA Template file</ng-template>
+ <app-search-template (change)="fileChange(fileupload.files)"></app-search-template>
+ <br>
+ <div>
+ <button mat-button matStepperNext class="matStepNextBtn">Upload</button>
+ </div>
+ </mat-step>
+ <mat-step [stepControl]="step3FormGroup">
+ <ng-template matStepLabel>Enter Metadata details</ng-template>
+ <app-metadata></app-metadata>
+ <br>
+ </mat-step>
+</mat-vertical-stepper>
+<button mat-button matStepperNext class="matStepNextBtn">Next</button>
<!-- <router-outlet></router-outlet> -->
+
+<!-- </form> -->
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.scss b/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.scss
index 22941b5..47ae92a 100644
--- a/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.scss
+++ b/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.scss
@@ -17,4 +17,12 @@
See the License for the specific language governing permissions and
limitations under the License.
============LICENSE_END============================================
-*/
\ No newline at end of file
+*/
+
+.matStepNextBtn{
+ color:white;
+ background:gray;
+ margin-top: 10px;
+ position: absolute;
+
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.ts
index 78a0d1b..b4356a6 100644
--- a/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.ts
+++ b/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.ts
@@ -19,7 +19,7 @@
============LICENSE_END============================================
*/
import { Component, OnInit } from '@angular/core';
-import { Observable} from 'rxjs';
+import { Observable } from 'rxjs';
import { Store } from '@ngrx/store';
@Component({
@@ -29,10 +29,18 @@
})
export class SelectTemplateComponent implements OnInit {
blueprint: any
- constructor() {
- }
+ myFile: File; /* property of File type */
- ngOnInit() {
+ constructor() {
}
+ ngOnInit() {
+ }
+ fileChange(files: any) {
+ console.log(files);
+ this.myFile = files[0].nativeElement;
+ }
+ upload(){
+
+ }
}
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-definition.component.html b/cds-ui/client/src/app/feature-modules/resource-definition/resource-definition.component.html
index 199ddf9..df6cc73 100644
--- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-definition.component.html
+++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-definition.component.html
@@ -18,6 +18,6 @@
* ============LICENSE_END=========================================================
*/-->
-<app-cbawizard></app-cbawizard>
+<app-cbawizard [appName]="appName"></app-cbawizard>
<router-outlet></router-outlet>
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-definition.component.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-definition.component.ts
index 65ac90b..c2f3dad 100644
--- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-definition.component.ts
+++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-definition.component.ts
@@ -26,8 +26,11 @@
styleUrls: ['./resource-definition.component.scss']
})
export class ResourceDefinitionComponent implements OnInit {
+ appName: String;
- constructor() { }
+ constructor() {
+ this.appName="datadict";
+ }
ngOnInit() {
}
diff --git a/docs/index.rst b/docs/index.rst
new file mode 100644
index 0000000..f6b2491
--- /dev/null
+++ b/docs/index.rst
@@ -0,0 +1,8 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. Copyright (C) 2019 IBM.
+
+CONTROLLER DESIGN STUDIO DOCUMENTATION REPOSITORY
+-------------------------------------------------
+.. toctree::
+ :maxdepth: 1
\ No newline at end of file