summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/mock
diff options
context:
space:
mode:
authorcyuamber <xuranyjy@chinamobile.com>2020-02-06 21:37:44 +0800
committercyuamber <xuranyjy@chinamobile.com>2020-02-06 21:37:54 +0800
commit2d44bd74a9f3f621532542775ba42c3149e54101 (patch)
tree7f0bb6120303c969c08ad735749e890616231de7 /usecaseui-portal/src/app/mock
parent67e32a3411851851185bdc22320687c317ea35bf (diff)
feat: add Activate & Terminate & progress of CSMF Slicing page
Change-Id: I2f0db61addd34cd90978b5f9e41793b1d1b4f63e Issue-ID: USECASEUI-368 Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/mock')
-rw-r--r--usecaseui-portal/src/app/mock/json/csmfActivate.json9
-rw-r--r--usecaseui-portal/src/app/mock/json/csmfSlicingProgress.json11
-rw-r--r--usecaseui-portal/src/app/mock/json/csmfTerminate.json9
-rw-r--r--usecaseui-portal/src/app/mock/routes.js3
-rw-r--r--usecaseui-portal/src/app/mock/server.js15
5 files changed, 47 insertions, 0 deletions
diff --git a/usecaseui-portal/src/app/mock/json/csmfActivate.json b/usecaseui-portal/src/app/mock/json/csmfActivate.json
new file mode 100644
index 00000000..7b9810a4
--- /dev/null
+++ b/usecaseui-portal/src/app/mock/json/csmfActivate.json
@@ -0,0 +1,9 @@
+{
+ "result_header": {
+ "result_code": "200",
+ "result_message": "Activate slicing service processing succeeded."
+ },
+ "result_body": {
+ "operation_id": "3b74758c-4a23-4c44-88bf-e5ed3baa395f"
+ }
+} \ No newline at end of file
diff --git a/usecaseui-portal/src/app/mock/json/csmfSlicingProgress.json b/usecaseui-portal/src/app/mock/json/csmfSlicingProgress.json
new file mode 100644
index 00000000..d9370a42
--- /dev/null
+++ b/usecaseui-portal/src/app/mock/json/csmfSlicingProgress.json
@@ -0,0 +1,11 @@
+{
+ "result_header": {
+ "result_code": "200",
+ "result_message": "Query operation process processing succeeded."
+ },
+ "result_body": {
+ "operation_id": "3b74758c-4a23-4c44-88bf-e5ed3baa395f",
+ "operation_type": "activation",
+ "operation_progress": 66
+ }
+} \ No newline at end of file
diff --git a/usecaseui-portal/src/app/mock/json/csmfTerminate.json b/usecaseui-portal/src/app/mock/json/csmfTerminate.json
new file mode 100644
index 00000000..5c6d3e2a
--- /dev/null
+++ b/usecaseui-portal/src/app/mock/json/csmfTerminate.json
@@ -0,0 +1,9 @@
+{
+ "result_header": {
+ "result_code": "200",
+ "result_message": "Terminate slicing service processing succeeded."
+ },
+ "result_body": {
+ "operation_id": "e227846c-daca-487a-9750-5d0ddb8a95d0"
+ }
+} \ No newline at end of file
diff --git a/usecaseui-portal/src/app/mock/routes.js b/usecaseui-portal/src/app/mock/routes.js
index 420f017c..c454d5ba 100644
--- a/usecaseui-portal/src/app/mock/routes.js
+++ b/usecaseui-portal/src/app/mock/routes.js
@@ -121,6 +121,9 @@ module.exports =
"/uui-slicing/nsmf/resource/nssi/:nssiId/details":"/getSlicingNssiDetail",
///////<-------------CSMF slicing_business--------->/////
"/5gSlicing/services/status/:status/pageNo/:pageNo/pageSize/:pageSize": "/csmf_slicing_businessData",
+ "/PUT/usecaseui/csmf/5gSlicing/service/:serviceId/activate": "/csmfActivate",
+ "/DELETE/usecaseui/csmf/5gSlicing/service/:serviceId": "/csmfTerminate",
+ "/5gSlicing/service/:serviceId/progress": "/csmfSlicingProgress",
///////<-------------monitor 5G--------->/////
"/POST/uui-slicing/nsmf/monitoring/queryTimestamp/:queryTimestamp/trafficData": "/fetchTrafficData",
"/POST/uui-slicing/nsmf/monitoring/queryTimestamp/:queryTimestamp/onlineUsers": "/fetchOnlineusersData",
diff --git a/usecaseui-portal/src/app/mock/server.js b/usecaseui-portal/src/app/mock/server.js
index 3c49777d..6dc00815 100644
--- a/usecaseui-portal/src/app/mock/server.js
+++ b/usecaseui-portal/src/app/mock/server.js
@@ -119,6 +119,21 @@ server.delete(`${nsmfBaseUrl}/*`, (req, res, next) => {
req.url = '/DELETE'+req.url;
next();
})
+server.put(`${csmfBaseUrl}/*`, (req, res, next) => {
+ req.method = 'GET';
+ req.url = '/PUT'+req.url;
+ next();
+})
+server.post(`${csmfBaseUrl}/*`, (req, res, next) => {
+ req.method = 'GET';
+ req.url = '/POST'+req.url;
+ next();
+})
+server.delete(`${csmfBaseUrl}/*`, (req, res, next) => {
+ req.method = 'GET';
+ req.url = '/DELETE'+req.url;
+ next();
+})
server.listen(3002, () => {
console.log('Mock Server is successfully running on port 3002 😁')