diff options
Diffstat (limited to 'cds-ui/client/src/app/feature-modules')
13 files changed, 106 insertions, 29 deletions
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 8778de4ce..68d0ade67 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 @@ 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============================================ --> -<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 59cbb4593..4612499ac 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 @@ import { Component, OnInit } from '@angular/core'; 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 b4aca6bcf..81c634970 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 @@ limitations under the License. ============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 22941b5fa..fa7f2bf83 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 @@ 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============================================ -*/
\ 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 e20dde13b..b8f57cb5f 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 @@ limitations under the License. ============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 @@ import { Component, OnInit } from '@angular/core'; 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 5be69791f..fbf0baa77 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 @@ See the License for the specific language governing permissions and 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 2b8b74be1..bcd78323e 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 @@ See the License for the specific language governing permissions and 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 22941b5fa..47ae92a20 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 @@ 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============================================ -*/
\ 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 78a0d1b1f..b4356a601 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 @@ limitations under the License. ============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 @@ import { Store } from '@ngrx/store'; }) 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/blueprint/select-template/template-options/template-options.component.html b/cds-ui/client/src/app/feature-modules/blueprint/select-template/template-options/template-options.component.html index 7f520ff9d..9c2d721e0 100644 --- a/cds-ui/client/src/app/feature-modules/blueprint/select-template/template-options/template-options.component.html +++ b/cds-ui/client/src/app/feature-modules/blueprint/select-template/template-options/template-options.component.html @@ -18,7 +18,8 @@ See the License for the specific language governing permissions and limitations under the License. ============LICENSE_END============================================ --> -<p> - template-options works! -</p> -<button (click)="loadTemplateData()">Load Template Data</button>
\ No newline at end of file +<mat-radio-group> + <mat-radio-button value="1" (click)="selected(1)">Upload Template file</mat-radio-button><br><br> + <mat-radio-button value="2" (click)="selected(2)">Starter Template</mat-radio-button><br><br> + <mat-radio-button value="3" (click)="selected(3)">Existing Model File</mat-radio-button> +</mat-radio-group> diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/template-options/template-options.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/select-template/template-options/template-options.component.ts index b9a7fa362..3b598b24e 100644 --- a/cds-ui/client/src/app/feature-modules/blueprint/select-template/template-options/template-options.component.ts +++ b/cds-ui/client/src/app/feature-modules/blueprint/select-template/template-options/template-options.component.ts @@ -19,7 +19,7 @@ limitations under the License. ============LICENSE_END============================================ */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, Output, EventEmitter} from '@angular/core'; import { HttpClient } from '@angular/common/http'; @Component({ selector: 'app-template-options', @@ -27,13 +27,19 @@ import { HttpClient } from '@angular/common/http'; styleUrls: ['./template-options.component.scss'] }) export class TemplateOptionsComponent implements OnInit { + selectedOption: string; + @Output() option = new EventEmitter(); constructor() { } ngOnInit() { } - loadTemplateData() { - // to do + selected(value){ + console.log(value); + this.option.emit(value); } + // loadTemplateData() { + // // to do + // } } 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 199ddf907..df6cc7363 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 65ac90b4b..c2f3dad7f 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 @@ import { Component, OnInit } from '@angular/core'; styleUrls: ['./resource-definition.component.scss'] }) export class ResourceDefinitionComponent implements OnInit { + appName: String; - constructor() { } + constructor() { + this.appName="datadict"; + } ngOnInit() { } |