summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/views
diff options
context:
space:
mode:
authorcyuamber <xuranyjy@chinamobile.com>2020-11-23 18:56:49 +0800
committercyuamber <xuranyjy@chinamobile.com>2020-11-23 18:56:55 +0800
commitdf74e8f2ace7cb77afdd48c7c5edc800ba95ab4f (patch)
tree70f21b73f09c4f78ecf76609a0d0f2962aa68dff /usecaseui-portal/src/app/views
parent1eee79ef143d6133918cbc82febe90baef064b23 (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/app/views')
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.ts20
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/subnet-params-model/subnet-params-model.component.ts36
2 files changed, 29 insertions, 27 deletions
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) {