diff options
author | 2018-08-23 11:49:12 -0400 | |
---|---|---|
committer | 2018-08-28 12:59:43 +0000 | |
commit | b1ce3d40b0f056a6275ab9ecb48fd0b16b9bb394 (patch) | |
tree | 6ba16bbaa02a24a8bc28612ab51c37d5f193066b /src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.component.html | |
parent | 90018a9d2bb344fa103b123b5f9facc0d3738255 (diff) |
APPC CDT to Support Multiple Templates for VNFCs
APPC CDT Should Support Multiple Templates For Configure and
ConfigModify for VNFs with VNFC level templates.
CDT would be used to create a single reference artifact for a VNF.
For the Configure related actions (Configure and ConfigModify)
vnfc-type to be shown at the top. The user would have a new link
below it, to be able to add each vnfc-type. For each vnfc-type,
the user would create the associated template and PD file as usual.
The fix required to modify several visual elements and variables
related to VNFC Types on MyVNFS page, ReferenceData page, Template
page and Parameters page. Also a number of supporting services were
modified. New Modal window type is now used for VNFC-related dialogs.
Change-Id: Ibbbb50e2ff6f96783c0aea89a6870d7c28021ba0
Issue-ID: APPC-1010
Signed-off-by: od7427 <od7427@att.com>
Diffstat (limited to 'src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.component.html')
-rw-r--r-- | src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.component.html | 46 |
1 files changed, 38 insertions, 8 deletions
diff --git a/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.component.html b/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.component.html index ebcb9c0..6065e6d 100644 --- a/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.component.html +++ b/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.component.html @@ -29,7 +29,7 @@ limitations under the License. <div class="row" style="padding: 15px 25px"> <div class="col-lg-3 col-sm-6 col-md-3 col-xs-12"> <label>Action*</label> - <select class="form-control" required id="cmbAction" [(ngModel)]="referenceDataObject.action" (ngModelChange)="updateSessionValues($event,'action');actionChange($event,content,userForm);" #action="ngModel" name="action"> + <select class="form-control" required id="cmbAction" [(ngModel)]="referenceDataObject.action" (ngModelChange)="updateSessionValues($event,'action');actionChange($event,userForm);handleVMBlockDisplay()" #action="ngModel" name="action"> <option [value]="actionType" [ngClass]="{'selectedAction':selectedActions.indexOf(actionType)>-1}" [selected]="referenceDataObject.action===actionType" @@ -43,9 +43,19 @@ limitations under the License. <input type="text" readonly class="form-control" id="txtVnfType" required [(ngModel)]="referenceDataObject['scope']['vnf-type']" (ngModelChange)="updateSessionValues($event,'vnfType')" #vnftype="ngModel" name="vnftype"> <span class="error-message" [hidden]="vnfParams?.vnfType || vnftype.valid || (vnftype.pristine && !userForm.submitted)">Required Field</span> </div> - <div class="col-lg-3 col-sm-6 col-md-3 col-xs-12"> + + <div class="col-lg-3 col-sm-6 col-md-3 col-xs-12" *ngIf="((displayVnfc=='true') || isVnfcType) && (referenceDataObject['action']=='Configure' || referenceDataObject['action']=='ConfigModify')"> <label>VNFC Type</label> - <input type="text" class="form-control" readonly id="txtVnfcType" [(ngModel)]="referenceDataObject.scope['vnfc-type']" (blur)="setVnfcType($event.target.value)" (ngModelChange)="updateSessionValues($event,'vnfcType')" #vnfcType="ngModel" name="vnfcType"> + <input *ngIf="isVnfcType" type="text" class="form-control" readonly id="txtVnfcType" [(ngModel)]="referenceDataObject.scope['vnfc-type']" (blur)="setVnfcType($event.target.value)" (ngModelChange)="updateSessionValues($event,'vnfcType')" #vnfcType="ngModel" + name="vnfcType"> + <select *ngIf="isVnfcTypeList" class="form-control" id="vnfcType" (ngModelChange)="vnfcChanged($event,content,userForm)" [ngModel]="vnfcIdentifier" #deviceProtocol="ngModel" name="templateIdentifier"> + <option [value]="val" *ngFor="let val of referenceDataObject.scope['vnfc-type-list']">{{val}} + </option> + </select> + <a *ngIf="isVnfcTypeList" style=" color: blue;" href="javascript:void(0)" (click)="vnfcModal.open()">Add New VNFC Type</a> + </div> + + <div class="col-lg-3 col-sm-6 col-md-3 col-xs-12" *ngIf="displayVnfc!='true' || (referenceDataObject['action']!='Configure' && referenceDataObject['action']!='ConfigModify')"> </div> <div class="col-lg-3 col-sm-6 col-md-3 col-xs-12"> <label>Device Protocol*</label> @@ -58,11 +68,11 @@ limitations under the License. </div> <div class="col-lg-3 col-sm-6 col-md-3 col-xs-12" *ngIf="isConfigScaleOut"> <label>Template Identifier</label> - <select class="form-control" required id="tempIdentifier" (ngModelChange)="dataModified();idChange($event,content,userForm)" [(ngModel)]="templateIdentifier" #deviceProtocol="ngModel" name="templateIdentifier"> + <select class="form-control" required id="tempIdentifier" (ngModelChange)="dataModified();idChange($event,userForm)" [(ngModel)]="templateIdentifier" #deviceProtocol="ngModel" name="templateIdentifier"> <option [value]="val" *ngFor="let val of referenceDataObject['template-id-list']">{{val}} </option> </select> - <span class="error-message" [hidden]="deviceProtocol.valid || (deviceProtocol.pristine && !userForm.submitted)">Required Field</span> + <!-- <span class="error-message" [hidden]="deviceProtocol.valid || (deviceProtocol.pristine && !userForm.submitted)">Required Field</span> --> </div> <div class="col-lg-3 col-sm-6 col-md-3 col-xs-12" *ngIf="referenceDataObject['action']== 'ConfigScaleOut'" style="margin-top: 30px"> @@ -141,7 +151,7 @@ limitations under the License. <div class="row" *ngIf="(( referenceDataObject.action =='ConfigScaleOut' ||referenceDataObject.action =='Configure'|| referenceDataObject.action =='' || referenceDataObject.action ==undefined ) && isCollapsedContent) "> <div class="col-lg-2 col-sm-6 col-md-2 col-xs-12"> <label style="font-size:12px;">VNFC Type</label> - <input type="text" class="form-control" id="txtVnfcTypeInColl" [(ngModel)]="Sample['vnfc-type']" #vnfcType="ngModel" name="samplevnfcType"> + <input type="text" class="form-control" id="txtVnfcTypeInColl" [(ngModel)]="Sample['vnfc-type']" (blur)="checkVnfcTypeEqual(vnfcType.value)" #vnfcType="ngModel" name="samplevnfcType"> </div> <div class="col-lg-2 col-sm-6 col-md-2 col-xs-12"> <label style="font-size:12px">VNFC Function Code</label> @@ -201,7 +211,7 @@ limitations under the License. </div> <div class="col-lg-2 col-sm-6 col-md-2 col-xs-12"> <label style="font-size:12px;">VNFC Type</label> - <input type="text" class="form-control" id="txtVnfcTypeInColl" required [(ngModel)]="item['vnfc-type']" #vnfcType{{j}}="ngModel" name="vnfcType{{j}}"> + <input type="text" class="form-control" id="txtVnfcTypeInColl" required [(ngModel)]="item['vnfc-type']" #vnfcType="ngModel" name="vnfcType{{j}}"> <span class="error-message" [hidden]="vnfcType.valid || (vnfcType.pristine && !userForm.submitted)">Required Field</span> </div> <div class="col-lg-2 col-sm-6 col-md-2 col-xs-12"> @@ -298,6 +308,26 @@ limitations under the License. </div> </div> </div> + +<!-- Modal for Vnfc Identifier --> +<modal #vnfcModal> + <modal-header [show-close]="true"> + <h4 class="modal-title">Enter New VNFC Type</h4> + </modal-header> + <modal-body> + <div> + <input pattern=".*[^ ].*" name="test" type="text" class="" (ngModelChange)="validateVnfcName($event)" [(ngModel)]="newVnfcType" placeholder="vnfctype"> + <span class="error-message">{{errorMessage}}</span> + </div> + </modal-body> + <modal-footer [show-default-buttons]="false"> + <div> + <button class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent" (click)="templateId=''" data-dismiss="modal">cancel</button> + <button class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary" data-dismiss="modal" (click)="addVnfc()" [disabled]="invalid">Add</button> + </div> + </modal-footer> +</modal> + <div id="identifierModal" class="modal fade" role="dialog"> <div class="modal-dialog"> <!-- Modal content--> @@ -339,4 +369,4 @@ limitations under the License. <button type="button" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary" (click)="c('yes')">Yes </button> </div> -</ng-template>
\ No newline at end of file +</ng-template> |