fix: add eror tip and mock data 20/119220/1
authorliuwh7 <liuwh7@asiainfo.com>
Fri, 12 Mar 2021 02:40:27 +0000 (10:40 +0800)
committerliuwh7 <liuwh7@asiainfo.com>
Fri, 12 Mar 2021 02:42:34 +0000 (10:42 +0800)
Change-Id: Ib80f8b0fb9e57e7f3271c498fa4669c98aa32db1
Signed-off-by: liuwh7 <liuwh7@asiainfo.com>
Issue-ID: USECASEUI-525

usecaseui-portal/src/app/mock/json/POST_intent_predict.json [new file with mode: 0644]
usecaseui-portal/src/app/mock/routes.js
usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/input-business-order/input-business-order.component.ts

diff --git a/usecaseui-portal/src/app/mock/json/POST_intent_predict.json b/usecaseui-portal/src/app/mock/json/POST_intent_predict.json
new file mode 100644 (file)
index 0000000..a0ccf86
--- /dev/null
@@ -0,0 +1,10 @@
+{
+  "maxNumberofUEs": "10",
+  "latency": "10",
+  "name": "exclusive slicing service",
+  "uEMobilityLevel": "stationary",
+  "expDataRateUL": "1000",
+  "expDataRateDL": "1000",
+  "resourceSharingLevel": "non-shared",
+  "coverageArea": "Beijing Beijing Haiding Wanshoulu"
+}
\ No newline at end of file
index 30c96b9..8c59104 100644 (file)
@@ -105,9 +105,10 @@ module.exports = {
                "/DELETE_uui-lcm_deleteVnfPackage",
        "/DELETE/uui-lcm/deletePnfPackage?pnfdInfoId:id":
                "/DELETE_uui-lcm_deletePnfPackage",
-       "/POST/uui-lcm/ns-packages": "/POST_uui-lcm_ns-packages",
+  "/POST/uui-lcm/ns-packages": "/POST_uui-lcm_ns-packages",
        "/POST/uui-lcm/vf-packages": "/POST_uui-lcm_vf-packages",
-       "/POST/uui-lcm/:jsonData": "/POST_uui-lcm_create",
+  "/POST/uui-lcm/:jsonData": "/POST_uui-lcm_create",
+  "/POST/intent/predict": "/POST_intent_predict",
 
        ///////<-------------slicing--------->/////
        "/uui-slicing/nsmf/task/business/pageNo/:pageNo/pageSize/:pageSize":
index 3196bbb..15e8b1b 100644 (file)
@@ -1,4 +1,5 @@
 import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
+import { NzMessageService } from 'ng-zorro-antd';
 import { Util } from '../../../../../shared/utils/utils';
 import { onboardService } from '../../../../../core/services/onboard.service';
 import { Recorder } from '../../../../../shared/utils/recorder';
@@ -10,7 +11,12 @@ import { Recorder } from '../../../../../shared/utils/recorder';
 })
 export class InputBusinessOrderComponent implements OnInit {
 
-  constructor(private Util: Util, private Recorder: Recorder, private myhttp: onboardService) { }
+  constructor(
+    private Util: Util,
+    private Recorder: Recorder,
+    private myhttp: onboardService,
+    private msg: NzMessageService
+  ) { }
 
   @Input() showModel: boolean;
   @Output() modalOpreation = new EventEmitter();
@@ -83,7 +89,7 @@ export class InputBusinessOrderComponent implements OnInit {
         this.modalOpreation.emit({ "cancel": false, "param": orderForm });
       }, (err) => {
         this.clickRepeat = false;
-        console.log(err);
+        this.msg.error(`Error: Request failed with status code ${err.status}`);
       })
   }
   startAudio(): void {