summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal
diff options
context:
space:
mode:
authorwangyuerg <wangyuerg@chinamobile.com>2020-12-07 19:18:44 +0800
committerwangyuerg <wangyuerg@chinamobile.com>2020-12-07 19:20:19 +0800
commit0c91d09baac3c4749f4aad4ec40f278240a11bf1 (patch)
treebfc63f681bd8e79b916496260446262ee0306c78 /usecaseui-portal
parentd8f2792db89ec0e20751be2bf6be04a2f8382b1a (diff)
fix the bug of create-model
Signed-off-by: wangyuerg <wangyuerg@chinamobile.com> Change-Id: Ic74397429fa99ed477b9ccdfe154f0453cb7d743 Issue-ID: USECASEUI-505
Diffstat (limited to 'usecaseui-portal')
-rw-r--r--usecaseui-portal/src/app/core/models/dataInterface.ts2
-rw-r--r--usecaseui-portal/src/app/views/services/services-list/create-model/create-model.component.ts7
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/subnet-params-model/subnet-params-model.component.ts13
-rw-r--r--usecaseui-portal/src/constants/constants.ts16
4 files changed, 27 insertions, 11 deletions
diff --git a/usecaseui-portal/src/app/core/models/dataInterface.ts b/usecaseui-portal/src/app/core/models/dataInterface.ts
index 0017a600..d367fe14 100644
--- a/usecaseui-portal/src/app/core/models/dataInterface.ts
+++ b/usecaseui-portal/src/app/core/models/dataInterface.ts
@@ -1,6 +1,6 @@
enum baseUrl{
baseUrl = '/api/usecaseui-server/v1' //online
- // baseUrl = 'https://192.168.235.77:30283' //local two
+ // baseUrl = 'https://192.168.235.25:30283/api/usecaseui-server/v1' //local two
}
interface servicesTableData {
diff --git a/usecaseui-portal/src/app/views/services/services-list/create-model/create-model.component.ts b/usecaseui-portal/src/app/views/services/services-list/create-model/create-model.component.ts
index 48b2061c..9d0dd610 100644
--- a/usecaseui-portal/src/app/views/services/services-list/create-model/create-model.component.ts
+++ b/usecaseui-portal/src/app/views/services/services-list/create-model/create-model.component.ts
@@ -145,7 +145,12 @@ export class CreateModelComponent implements OnInit {
this.http.getTemplateParameters(types, chosedtemplates)
.subscribe((data) => {
this.loadingAnimateShow = false;
- if (data.status == "FAILED") {
+ if (!data || !data.status) {
+ this.temParametersTips = true;
+ this.isVisible = true;
+ this.msg.error('Back end data format error')
+ }
+ else if (data.status == "FAILED") {
this.temParametersTips = true;
this.isVisible = true;
} else {
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 649b5eb1..119f87d4 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
@@ -283,7 +283,18 @@ export class SubnetParamsModelComponent implements OnInit {
params = {...this.formData};
}
// Verify that each item is not empty, include special handeling of area_list
- if (this.Util.deepCheck(params) && this.areaCheckBeforeSubmit(params)) {
+ console.log(params)
+ let checkParams = params
+ if (this.title === 'An' || this.title === 'Cn') {
+ checkParams = this.coreFormItems.filter((item) => {
+ return item.required === true
+ })
+ } else if (this.title = 'Tn') {
+ checkParams = this.transferFormItems.filter((item) => {
+ return item.required === true
+ })
+ }
+ if (this.Util.deepCheck(checkParams) && this.areaCheckBeforeSubmit(params)) {
this.paramsDataChange.emit(params);
this.handleCancel();
} else {
diff --git a/usecaseui-portal/src/constants/constants.ts b/usecaseui-portal/src/constants/constants.ts
index 951af262..48f9aeb8 100644
--- a/usecaseui-portal/src/constants/constants.ts
+++ b/usecaseui-portal/src/constants/constants.ts
@@ -230,22 +230,22 @@ export const CORE_FORM_ITEMS = {
{
title: 'Downlink Regional Traffic Density(Mbps/km )',
key: 'sliceProfile_AN_areaTrafficCapDL',
- required: true
+ required: false
},
{
title: 'Uplink Regional Traffic Density(Mbps/km )',
key: 'sliceProfile_AN_areaTrafficCapUL',
- required: true,
+ required: false
},
{
title: 'Script Name',
key: 'an_script_name',
- required: true
+ required: false
},
{
title: 'Overall User Density',
key: 'sliceProfile_AN_overallUserDensity',
- required: true
+ required: false
},
{
title:'Endpoint',
@@ -365,17 +365,17 @@ export const CORE_FORM_ITEMS = {
{
title: 'Downlink Regional Traffic Density(Mbps/km )',
key: 'cn_area_traffic_cap_dl',
- required: true
+ required: false
},
{
title: 'Uplink Regional Traffic Density(Mbps/km )',
key: 'cn_area_traffic_cap_ul',
- required: true
+ required: false
},
{
title: 'Script Name',
key: 'cn_script_name',
- required: true
+ required: false
},
{
title: 'Max Number of PUD Session',
@@ -385,7 +385,7 @@ export const CORE_FORM_ITEMS = {
{
title: 'OverAll User Density',
key: 'sliceProfile_CN_overallUserDensity',
- required: true
+ required: false
},
// {
// title: 'ip-address',