diff options
author | 2022-10-24 16:09:54 +0800 | |
---|---|---|
committer | 2022-10-24 16:10:05 +0800 | |
commit | 31d35a25cfad803de8b4272d47b01f8b5ed2af03 (patch) | |
tree | d357bd5e16ac23e23608eebfe2592b989b3c4125 /usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line-modal/cloud-leased-line-modal.component.ts | |
parent | 3fca60b65da1e9ef14f0d31a4b989320a8ec5f93 (diff) |
feat:When creating a ccvpn instance, the bandwidth is selected from the drop-down box
Issue-ID: REQ-1214
Signed-off-by: zhaoyh6 <zhaoyh6@asiainfo.com>
Change-Id: I912e0c9164b1ac64db433d9d7db8024fc1134f46
Diffstat (limited to 'usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line-modal/cloud-leased-line-modal.component.ts')
-rw-r--r-- | usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line-modal/cloud-leased-line-modal.component.ts | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line-modal/cloud-leased-line-modal.component.ts b/usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line-modal/cloud-leased-line-modal.component.ts index 4299ba83..31053159 100644 --- a/usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line-modal/cloud-leased-line-modal.component.ts +++ b/usecaseui-portal/src/app/views/services/intent-based-services/cloud-leased-line-modal/cloud-leased-line-modal.component.ts @@ -22,6 +22,7 @@ export class CloudLeasedLineModalComponent implements OnInit { @Output() cancelEmitter = new EventEmitter<any>(); comunicationFormItems = COMMUNICATION_FORM_ITEMS; isUpdateFlag: boolean = false; + bandWidthLists: any[] = []; nodeLists: any[] = []; cloudPointOptions: any[] = []; cloud_leased_line_info = { @@ -41,11 +42,23 @@ export class CloudLeasedLineModalComponent implements OnInit { if (this.cloudLeasedLineShowFlag) { if (this.modelParams) { this.isUpdateFlag = this.modelParams.isUpdateFlag; + if (this.modelParams.accessPointOne && this.modelParams.accessPointOne.bandwidth) { + if (this.modelParams.accessPointOne.bandwidth > 4000) { + this.modelParams.accessPointOne.bandwidth = 4000; + } else if (this.modelParams.accessPointOne.bandwidth > 3750) { + this.modelParams.accessPointOne.bandwidth = 3750; + } else if (this.modelParams.accessPointOne.bandwidth > 2500) { + this.modelParams.accessPointOne.bandwidth = 2500; + } else { + this.modelParams.accessPointOne.bandwidth = 1250; + } + } this.cloud_leased_line_info = { ...this.modelParams }; } else { this.getInstanceId(); } this.queryAccessNodeInfo(); + this.initBandWidth(); } } @@ -65,6 +78,27 @@ export class CloudLeasedLineModalComponent implements OnInit { ) } + initBandWidth() { + this.bandWidthLists = [ + { + value:1250, + label:"1.25 - 10" + }, + { + value:2500, + label:"2.50 - 20" + }, + { + value:3750, + label:"3.75 - 30" + }, + { + value:4000, + label:"4.00 - 40" + } + ]; + } + getInstanceId() { this.myHttp.getInstanceId().subscribe( (response) => { |