diff options
author | 2019-03-06 12:11:34 -0800 | |
---|---|---|
committer | 2019-03-06 12:12:36 -0800 | |
commit | eedac3e312c66499ca5ff9d72388c31b25813225 (patch) | |
tree | 4cc2f22a0a36ba97823b70fe27ed667383173f0a /src/app/vnfs/myvnfs | |
parent | 611c9da62c2e266f9facd97dc9f340ce311060a3 (diff) |
Revert "multiple asible servers support"
Some functionality was accidentally removed
This reverts commit 611c9da62c2e266f9facd97dc9f340ce311060a3.
Change-Id: I1aefbbc0ede8cdda59acc8bdf7b047e506aad813
Signed-off-by: Patrick Brady <patrick.brady@att.com>
Issue-ID: APPC-1510
Diffstat (limited to 'src/app/vnfs/myvnfs')
-rw-r--r-- | src/app/vnfs/myvnfs/myvnfs.component.css | 5 | ||||
-rw-r--r-- | src/app/vnfs/myvnfs/myvnfs.component.html | 28 | ||||
-rw-r--r-- | src/app/vnfs/myvnfs/myvnfs.component.ts | 67 |
3 files changed, 38 insertions, 62 deletions
diff --git a/src/app/vnfs/myvnfs/myvnfs.component.css b/src/app/vnfs/myvnfs/myvnfs.component.css index f105a7d..c1b1169 100644 --- a/src/app/vnfs/myvnfs/myvnfs.component.css +++ b/src/app/vnfs/myvnfs/myvnfs.component.css @@ -32,7 +32,4 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property. table.table th, table.table td { padding: 0rem; -} -.error-message { - color: red; -} +}
\ No newline at end of file diff --git a/src/app/vnfs/myvnfs/myvnfs.component.html b/src/app/vnfs/myvnfs/myvnfs.component.html index 097cf1e..3bfabc3 100644 --- a/src/app/vnfs/myvnfs/myvnfs.component.html +++ b/src/app/vnfs/myvnfs/myvnfs.component.html @@ -34,7 +34,7 @@ limitations under the License. </div> <div class="row"> <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> - <div class="table-responsive" style="height:600px; overflow: auto;"> + <div class="table-responsive" style="height:auto; overflow: auto;"> <table class="table"> <thead> <tr> @@ -54,7 +54,6 @@ limitations under the License. <tr *ngFor="let item of vnfData | orderBy:sortBy:sortOrder | tableFilter:filterQuery:filter"> <td>{{item['vnf-type']}}</td> <td>{{item['vnfc-type']}}</td> - <!--td>{{defineData(item)}}</td--> <!-- <td>{{item.incart}}</td> --> <!-- <td>{{item.protocol}}</td> <td>{{item.action}}</td> --> @@ -85,9 +84,6 @@ limitations under the License. </div> </div> <div class="col-lg-12-ln2"> - <!-- <button type="button" (click)="buildNewDesign(content)" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary">Create New - VNF Type - </button> --> <button type="button" (click)="createVnfcModal.open()" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary"> Create New VNF Type </button> @@ -97,7 +93,7 @@ limitations under the License. <!-- <ng-template #content let-c="close" let-d="dismiss"> <form ngNativeValidate (ngSubmit)="c('yes')"> <div class="modal-header"> - <h4 class="modal-title">Enter VNF Type</h4> + <h4 class="modal-title">Enter VNF type and VNFC to proceed</h4> <button type="button" class="close" aria-label="Close" (click)="d('Cross click')"> <span aria-hidden="true">×</span> </button> @@ -107,25 +103,29 @@ limitations under the License. <div class="form-group row"> <label for="example-text-input" class="col-12 col-form-label">Enter Vnf Type</label> <div class="col-12"> - <input pattern=".*[^ ].*" required name="vnfType" class="form-control" (ngModelChange)="validateVnfName($event)" [(ngModel)]="vnfType" type="text" id="vnfType"> - <span class="error-message">{{errorMessage}}</span> + <input required name="vnfType" class="form-control" [(ngModel)]="vnfType" type="text" id="vnfType"> </div> - </div> <div class="form-check"> <label class="form-check-label"> - <input name="vnfcRequired" class="form-check-input" [(ngModel)]="vnfcRequired" type="checkbox" + <input name="vnfcRequired" class="form-check-input" [(ngModel)]="vnfcRequired" type="checkbox" id="vnfcRequired"> - This VNF has VNFC templates + Enter vnfc info </label> </div> + <div class="form-group row" *ngIf="vnfcRequired"> + <label for="example-search-input" class="col-12 col-form-label">Enter Vnfc Type</label> + <div class="col-12"> + <input required name="vnfcType" class="form-control" [(ngModel)]="vnfcType" type="text" id="vnfcType"> + </div> + </div> </div> <div class="modal-footer"> <button type="button" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent - " (click)="c('no')">Proceed To Upload + " (click)="c('yes')">Proceed anyway </button> - <button type="submit" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary" [disabled]="invalid">Next + <button type="submit" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary">Next </button> </div> @@ -164,4 +164,4 @@ limitations under the License. </button> </modal-footer> </form> -</modal>
\ No newline at end of file +</modal> diff --git a/src/app/vnfs/myvnfs/myvnfs.component.ts b/src/app/vnfs/myvnfs/myvnfs.component.ts index 49f4f42..a124705 100644 --- a/src/app/vnfs/myvnfs/myvnfs.component.ts +++ b/src/app/vnfs/myvnfs/myvnfs.component.ts @@ -55,8 +55,8 @@ export class MyvnfsComponent implements OnInit, OnDestroy { } subscription: Subscription; - constructor (private paramShareService: ParamShareService, private ngProgress: NgProgress, private httpUtil: HttpUtilService, private router: Router, private activeROute: ActivatedRoute, - private mappingEditorService: MappingEditorService, private modalService: NgbModal) { + constructor(private paramShareService: ParamShareService, private ngProgress: NgProgress, private httpUtil: HttpUtilService, private router: Router, private activeROute: ActivatedRoute, + private mappingEditorService: MappingEditorService, private modalService: NgbModal, private nService: NotificationsService) { } ngOnInit() { @@ -89,22 +89,28 @@ export class MyvnfsComponent implements OnInit, OnDestroy { getArtifacts(data) { let tempObj: any; this.ngProgress.start(); + //this.subscription = this.httpUtil.post({ this.httpUtil.post({ url: environment.getDesigns, data: data }) - .subscribe(resp => { + .subscribe( resp => { if (resp.output.data.block !== undefined && resp.output.data.block !== null && resp.output.data.block.length !== 0) { - tempObj = JSON.parse(resp.output.data.block); - this.vnfData = tempObj.designInfo; + console.log("getArtifacts: resp:", resp.output.data.block); + tempObj = JSON.parse(resp.output.data.block); + this.vnfData = tempObj.designInfo; } - if (this.vnfData === undefined || this.vnfData === null || this.vnfData.length === 0) { + if (this.vnfData == undefined || this.vnfData == null || this.vnfData.length == 0) { this.noData = true; - // this.noDataMsg = resp.output.status.message; + // this.noDataMsg = resp.output.data.status.message; } else { this.noData = false; } + console.log("getArtifacts: noData:"+this.noData); this.ngProgress.done(); + }, + error => { + this.nService.error(appConstants.errors.error, appConstants.errors.connectionError) }); this.filter = ['vnf-type', 'vnfc-type', 'artifact-name']; @@ -118,25 +124,14 @@ export class MyvnfsComponent implements OnInit, OnDestroy { getData() { } - buildNewDesign(response) { - - // this.modalService.open(content).result.then(res => { - // if(res=='yes'){ - // sessionStorage.setItem('vnfParams', JSON.stringify({ vnfType: this.vnfType})); - // sessionStorage.setItem("vnfcSelectionFlag",''+this.vnfcRequired+'') - // } else{ - // sessionStorage.setItem('vnfParams',"") - // } - - // this.mappingEditorService.referenceNameObjects = undefined; - // this.mappingEditorService.identifier = ''; - // //this.mappingEditorService.newObject = {}; - // this.router.navigate([ - // 'vnfs', 'design', 'references' - // ]); - - // }); - + buildNewDesign( response) { + // this.modalService.open(content).result.then(res => { + // this.mappingEditorService.referenceNameObjects = undefined; + // sessionStorage.setItem('vnfParams', JSON.stringify({ vnfType: this.vnfType, vnfcType: this.vnfcType })); + // this.router.navigate([ + // 'vnfs', 'design', 'references' + // ]); + // }); if (response == 'yes') { sessionStorage.setItem('vnfParams', JSON.stringify({ vnfType: this.vnfType })); sessionStorage.setItem("vnfcSelectionFlag", '' + this.vnfcRequired + '') @@ -203,7 +198,7 @@ export class MyvnfsComponent implements OnInit, OnDestroy { clearCache() { // get the value and save the userid and persist it. - sessionStorage.setItem("vnfcSelectionFlag", '' + this.vnfcRequired + '') + sessionStorage.setItem("vnfcSelectionFlag", '' + this.vnfcRequired + ''); this.mappingEditorService.setTemplateMappingDataFromStore(undefined); localStorage['paramsContent'] = '{}'; this.mappingEditorService.setParamContent(undefined); @@ -217,20 +212,4 @@ export class MyvnfsComponent implements OnInit, OnDestroy { this.mappingEditorService.changeNavAppData(appData); this.mappingEditorService.changeNavDownloadData(downloadData); } - defineData(item) { - let artVnfc = item['artifact-name'].substring(this.lastIndexofEnd("AllAction_", item['artifact-name']), item['artifact-name'].lastIndexOf("_")) - if (item['vnf-type'] == artVnfc && item['vnfc-type'] == 'null') { - - return item['vnfc-type'] - } else { - return "" - } - - } - lastIndexofEnd(str, originlStr) { - var io = originlStr.lastIndexOf(str); - return io == -1 ? -1 : io + str.length; - } - - -}
\ No newline at end of file +} |