diff options
author | cyuamber <xuranyjy@chinamobile.com> | 2020-11-23 18:56:49 +0800 |
---|---|---|
committer | cyuamber <xuranyjy@chinamobile.com> | 2020-11-23 18:56:55 +0800 |
commit | df74e8f2ace7cb77afdd48c7c5edc800ba95ab4f (patch) | |
tree | 70f21b73f09c4f78ecf76609a0d0f2962aa68dff /usecaseui-portal/src | |
parent | 1eee79ef143d6133918cbc82febe90baef064b23 (diff) |
feat: change tn params
Change-Id: Id98dca1004ae1a3b1ce41e9e46a05b5f5835a143
Issue-ID: USECASEUI-444
Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src')
5 files changed, 44 insertions, 40 deletions
diff --git a/usecaseui-portal/src/app/mock/json/slicing_subnet_instance.json b/usecaseui-portal/src/app/mock/json/slicing_subnet_instance.json index 24914c3f..542e203f 100644 --- a/usecaseui-portal/src/app/mock/json/slicing_subnet_instance.json +++ b/usecaseui-portal/src/app/mock/json/slicing_subnet_instance.json @@ -6,8 +6,8 @@ "result_body": {
"an_suggest_nssi_id": "46da8cf8-0878-48ac-bea3-f2200959411a",
"an_suggest_nssi_name": "eMBB AN instance1",
- "tn_suggest_nssi_id": "46da8cf8-0878-48ac-bea3-f2200959411b",
- "tn_suggest_nssi_name": "eMBB TN instance2",
+ "tn_bh_suggest_nssi_id": "46da8cf8-0878-48ac-bea3-f2200959411b",
+ "tn_bh_suggest_nssi_name": "eMBB TN instance2",
"cn_suggest_nssi_id": "46da8cf8-0878-48ac-bea3-f2200959411c",
"cn_suggest_nssi_name": "eMBB CN instance3"
}
diff --git a/usecaseui-portal/src/app/mock/json/slicing_task_auditInfo.json b/usecaseui-portal/src/app/mock/json/slicing_task_auditInfo.json index 0db434df..1828367d 100644 --- a/usecaseui-portal/src/app/mock/json/slicing_task_auditInfo.json +++ b/usecaseui-portal/src/app/mock/json/slicing_task_auditInfo.json @@ -60,14 +60,16 @@ "sliceProfile_AN_nextHopInfo":"sliceProfile_AN_nextHopInfo",
"an_script_name":"test_an_01",
"an_coverage_area_ta_list": ["北京;北京市;海淀区", "北京;北京市;西城区", "北京;北京市;昌平区"],
- "tn_suggest_nssi_id": "46da8cf8-0878-48ac-bea3-f2200959411b",
- "tn_suggest_nssi_name": "eMBB TNinstance2",
- "tn_latency": "10",
- "tn_bandwidth": "300",
- "tn_script_name":"test_tn_01",
- "sliceProfile_TN_jitte":"test_tn_jitter_01",
- "sliceProfile_TN_sNSSAI":"test_tn_service_snssai_01",
- "tn_enableNSSISelection":false,
+ "tn_bh_suggest_nssi_id": "46da8cf8-0878-48ac-bea3-f2200959411b",
+ "tn_bh_suggest_nssi_name": "eMBB TNinstance2",
+ "tn_bh_latency": "10",
+ "tn_bh_bandwidth": "300",
+ "tn_bh_script_name":"test_tn_01",
+ "sliceProfile_TN_BH_jitte":"test_tn_jitter_01",
+ "sliceProfile_TN_BH _pLMNIdList": "test_sliceProfile_TN_BH _pLMNIdList",
+ "sliceProfile_TN_BH _sST": "test_sliceProfile_TN_BH _sST",
+ "sliceProfile_TN_BH _sNSSAI":"test_tn_service_snssai_01",
+ "tn_bh_enableNSSISelection":false,
"cn_suggest_nssi_id": "46da8cf8-0878-48ac-bea3-f2200959411c",
"cn_suggest_nssi_name": "eMBB CNinstance3",
"cn_service_snssai": "cn_1-010101",
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.ts index e902cda3..93ed9ae3 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.ts +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.ts @@ -135,7 +135,7 @@ export class SlicingTaskModelComponent implements OnInit { this.selectedServiceId = nsi_nssi_info.suggest_nsi_id; this.selectedServiceName = nsi_nssi_info.suggest_nsi_name; // an/tn/cn 3 select box switches parameters of Matching Shared NSSI - this.enableNSSISelectionList = [nsi_nssi_info.an_enableNSSISelection,nsi_nssi_info.tn_enableNSSISelection,nsi_nssi_info.cn_enableNSSISelection]; + this.enableNSSISelectionList = [nsi_nssi_info.an_enableNSSISelection,nsi_nssi_info.tn_bh_enableNSSISelection,nsi_nssi_info.cn_enableNSSISelection]; if (!this.selectedServiceId || !this.selectedServiceName) { this.isDisabled.map((item,index)=>{ this.isDisabled[index] = false @@ -158,7 +158,7 @@ export class SlicingTaskModelComponent implements OnInit { }] } // 子网实例 - let subnetData = this.pick(nsi_nssi_info, ['an_suggest_nssi_id', 'an_suggest_nssi_name', 'tn_suggest_nssi_id', 'tn_suggest_nssi_name', 'cn_suggest_nssi_id', 'cn_suggest_nssi_name']); + let subnetData = this.pick(nsi_nssi_info, ['an_suggest_nssi_id', 'an_suggest_nssi_name', 'tn_bh_suggest_nssi_id', 'tn_bh_suggest_nssi_name', 'cn_suggest_nssi_id', 'cn_suggest_nssi_name']); this.subnetDataFormatting(subnetData, 0); // 前端模拟数据 let area = ["Beijing;Beijing;Haidian District", "Beijing;Beijing;Xicheng District", "Beijing;Beijing;Changping District"]; @@ -181,7 +181,7 @@ export class SlicingTaskModelComponent implements OnInit { 'sliceProfile_AN_logicInterfaceId', 'sliceProfile_AN_nextHopInfo' ]), an_coverage_area_ta_list: area}; - this.slicingSubnet[1].params = this.pick(nsi_nssi_info, ['tn_latency', 'tn_bandwidth', 'tn_script_name', 'sliceProfile_TN_jitte', 'sliceProfile_TN_sNSSAI',"tn_enableNSSISelection"]); + this.slicingSubnet[1].params = this.pick(nsi_nssi_info, ['tn_bh_latency', 'tn_bh_bandwidth', 'tn_bh_script_name', 'sliceProfile_TN_BH_jitte', 'sliceProfile_TN_BH _sNSSAI',"tn_bh_enableNSSISelection"]); this.slicingSubnet[2].params = {...this.pick(nsi_nssi_info, [ 'cn_service_snssai', 'cn_resource_sharing_level', @@ -265,7 +265,7 @@ export class SlicingTaskModelComponent implements OnInit { } subnetDataFormatting ( subnetData?: any, total?: number): void{ - const { an_suggest_nssi_id, an_suggest_nssi_name, tn_suggest_nssi_id, tn_suggest_nssi_name, cn_suggest_nssi_id, cn_suggest_nssi_name } = subnetData; + const { an_suggest_nssi_id, an_suggest_nssi_name, tn_bh_suggest_nssi_id, tn_bh_suggest_nssi_name, cn_suggest_nssi_id, cn_suggest_nssi_name } = subnetData; this.slicingSubnet[0].slicingId = an_suggest_nssi_id; this.slicingSubnet[0].slicingName = an_suggest_nssi_name; this.slicingSubnet[0].total = total; @@ -275,13 +275,13 @@ export class SlicingTaskModelComponent implements OnInit { service_instance_name: an_suggest_nssi_name }]; - this.slicingSubnet[1].slicingId = tn_suggest_nssi_id; - this.slicingSubnet[1].slicingName = tn_suggest_nssi_name; + this.slicingSubnet[1].slicingId = tn_bh_suggest_nssi_id; + this.slicingSubnet[1].slicingName = tn_bh_suggest_nssi_name; this.slicingSubnet[1].total = total; this.slicingSubnet[1].currentPage = '1'; this.slicingSubnet[1].instances = [{ - service_instance_id: tn_suggest_nssi_id, - service_instance_name: tn_suggest_nssi_name + service_instance_id: tn_bh_suggest_nssi_id, + service_instance_name: tn_bh_suggest_nssi_name }]; this.slicingSubnet[2].slicingId = cn_suggest_nssi_id; @@ -383,8 +383,8 @@ export class SlicingTaskModelComponent implements OnInit { an_suggest_nssi_id: slicingSubnet[0].slicingId, an_suggest_nssi_name: slicingSubnet[0].slicingName, ...slicingSubnet[0].params, - tn_suggest_nssi_id: slicingSubnet[1].slicingId, - tn_suggest_nssi_name: slicingSubnet[1].slicingName, + tn_bh_suggest_nssi_id: slicingSubnet[1].slicingId, + tn_bh_suggest_nssi_name: slicingSubnet[1].slicingName, ...slicingSubnet[1].params, cn_suggest_nssi_id: slicingSubnet[2].slicingId, cn_suggest_nssi_name: slicingSubnet[2].slicingName, diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/subnet-params-model/subnet-params-model.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/subnet-params-model/subnet-params-model.component.ts index 9d1ee34d..e71b459f 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/subnet-params-model/subnet-params-model.component.ts +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/subnet-params-model/subnet-params-model.component.ts @@ -40,22 +40,24 @@ export class SubnetParamsModelComponent implements OnInit { ngOnChanges() { if(this.title){ - this.coreFormItems = this.title === 'An'?CORE_FORM_ITEMS.An:this.title === 'Cn'?CORE_FORM_ITEMS.Cn:[]; - this.formData = JSON.parse(JSON.stringify(this.detailData)); - this.keyList = this.coreFormItems.find((item) => {return item.title === 'Endpoint'}).options.map((val) => {return val.key}); - if(this.formData !==undefined && Object.keys(this.formData).length!==0){ - this.EndpointEnable = this.keyList.every((item) => {return this.formData.hasOwnProperty(item)}) - } - // -------> 2020.08.17 Add 3 parameters for Endpoint, Comment: The following code - if(this.EndpointEnable){ - this.EndpointInputs = this.Util.pick(this.formData, this.keyList)// no? - }else{ - this.coreFormItems.map((item,index)=>{ - if(item.title === 'Endpoint'){ - this.coreFormItems.splice(index,1) - } - }) - } + this.formData = JSON.parse(JSON.stringify(this.detailData)); + if (this.title === 'An' || this.title === 'Cn') { + this.coreFormItems = this.title === 'An'?CORE_FORM_ITEMS.An:this.title === 'Cn'?CORE_FORM_ITEMS.Cn:[]; + this.keyList = this.coreFormItems.find((item) => {return item.title === 'Endpoint'}).options.map((val) => {return val.key}); + if(this.formData !==undefined && Object.keys(this.formData).length!==0){ + this.EndpointEnable = this.keyList.every((item) => {return this.formData.hasOwnProperty(item)}) + } + if(this.EndpointEnable){ + this.EndpointInputs = this.Util.pick(this.formData, this.keyList)// no? + }else{ + this.coreFormItems.map((item,index)=>{ + if(item.title === 'Endpoint'){ + this.coreFormItems.splice(index,1) + } + }) + } + } + } //-------> Comment: Above code if (this.title === 'An') { @@ -210,7 +212,7 @@ export class SubnetParamsModelComponent implements OnInit { endCheckBeforeSubmit () : Array<any>{ // check params of Endpoint let result: Array<any> = [true, '']; - const endPointList = this.coreFormItems.find((item) => {return item.title === 'Endpoint'}).options; + const endPointList = this.coreFormItems&&this.coreFormItems.length!==0?this.coreFormItems.find((item) => {return item.title === 'Endpoint'}).options:{}; let ipKey = ''; let logicalKey = ''; for (let item of endPointList) { diff --git a/usecaseui-portal/src/constants/constants.ts b/usecaseui-portal/src/constants/constants.ts index 0ddb23b3..61030d55 100644 --- a/usecaseui-portal/src/constants/constants.ts +++ b/usecaseui-portal/src/constants/constants.ts @@ -137,17 +137,17 @@ export const TRANSFRER_FORM_ITEMS = [ },
{
title: 'Latency (ms)',
- key: 'tn_latency',
+ key: 'tn_bh_latency',
required: true
},
{
title: 'Jitter',
- key: 'sliceProfile_TN_jitte',
+ key: 'sliceProfile_TN_BH_jitte',
required: false,
},
{
title: 'MaxBandwidth',
- key: 'tn_bandwidth',
+ key: 'tn_bh_bandwidth',
required: true
},
]
|