From 82ff35f629b05d57b9ec9f24f7189af4a10fceca Mon Sep 17 00:00:00 2001 From: cyuamber Date: Thu, 12 Sep 2019 09:14:45 +0800 Subject: feat:optimize mock api & routes.js for customer page Change-Id: I89990f82c176471b918c297e82eaec628a1c3fa7 Issue-ID: USECASEUI-307 Signed-off-by: cyuamber --- .../json/getServiceInstanceById_customerId.json | 26 ++++++++++++++++++++++ .../src/app/mock/json/services_scaleServices.json | 4 ++++ .../src/app/mock/json/uui-lcm_VnfInfo.json | 12 ++++++++++ .../json/uui-lcm_healNetworkServiceInstance.json | 3 +++ .../mock/json/uui-lcm_jobs_getNsLcmJobStatus.json | 19 ++++++++++++++++ usecaseui-portal/src/app/mock/routes.js | 25 +++++++++++++++------ 6 files changed, 82 insertions(+), 7 deletions(-) create mode 100644 usecaseui-portal/src/app/mock/json/getServiceInstanceById_customerId.json create mode 100644 usecaseui-portal/src/app/mock/json/services_scaleServices.json create mode 100644 usecaseui-portal/src/app/mock/json/uui-lcm_VnfInfo.json create mode 100644 usecaseui-portal/src/app/mock/json/uui-lcm_healNetworkServiceInstance.json create mode 100644 usecaseui-portal/src/app/mock/json/uui-lcm_jobs_getNsLcmJobStatus.json (limited to 'usecaseui-portal/src/app/mock') diff --git a/usecaseui-portal/src/app/mock/json/getServiceInstanceById_customerId.json b/usecaseui-portal/src/app/mock/json/getServiceInstanceById_customerId.json new file mode 100644 index 00000000..a85e718a --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/getServiceInstanceById_customerId.json @@ -0,0 +1,26 @@ +[ + { + "netWorkServiceName": "vepc_service_addmml_vepc_ete_mml1", + "netWorkServiceId": "e05ac9b7-8011-438a-888c-116fe57e55bb", + "scaleType": "", + "aspectId": "", + "numberOfSteps": "", + "scalingDirection": "" + }, + { + "netWorkServiceName": "vepc_spgw_cmri_ns_vepc_service_test9", + "netWorkServiceId": "c1b43312-f97f-4af1-be2d-b2506cf2ea41", + "scaleType": "", + "aspectId": "", + "numberOfSteps": "", + "scalingDirection": "" + }, + { + "netWorkServiceName": "vepc_spgw_cmri_ns_vepc_service_test7", + "netWorkServiceId": "d7dc1f6c-9da0-43b3-9c51-f983ddaad707", + "scaleType": "", + "aspectId": "", + "numberOfSteps": "", + "scalingDirection": "" + } +] \ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/services_scaleServices.json b/usecaseui-portal/src/app/mock/json/services_scaleServices.json new file mode 100644 index 00000000..605b36f7 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/services_scaleServices.json @@ -0,0 +1,4 @@ + +{ + "operationId":"1e606677-7864-4bec-b50c-adcd858e4cd8" +} \ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/uui-lcm_VnfInfo.json b/usecaseui-portal/src/app/mock/json/uui-lcm_VnfInfo.json new file mode 100644 index 00000000..950c1645 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-lcm_VnfInfo.json @@ -0,0 +1,12 @@ + +{ + "vnfInstId":"xxxxxxx", + "vnfName":"vnf1", + "vnfStatus":"ACTIVE", + "vnfVms":[ + {"vmId":"1","vmName":"vm1"}, + {"vmId":"2","vmName":"vm2"}, + {"vmId":"3","vmName":"vm3"}, + {"vmId":"4","vmName":"vm4"} + ] +} diff --git a/usecaseui-portal/src/app/mock/json/uui-lcm_healNetworkServiceInstance.json b/usecaseui-portal/src/app/mock/json/uui-lcm_healNetworkServiceInstance.json new file mode 100644 index 00000000..f1fcc0d5 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-lcm_healNetworkServiceInstance.json @@ -0,0 +1,3 @@ +{ + "jobId": "jobid_xxxxxxxxx" +} \ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/uui-lcm_jobs_getNsLcmJobStatus.json b/usecaseui-portal/src/app/mock/json/uui-lcm_jobs_getNsLcmJobStatus.json new file mode 100644 index 00000000..c08dcc36 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-lcm_jobs_getNsLcmJobStatus.json @@ -0,0 +1,19 @@ +{ + "jobId": "string", + "responseDescriptor": { + "status": "string", + "progress": 90, + "statusDescription": "string", + "errorCode": "string", + "responseId": "string", + "responseHistoryList": [ + { + "status": "string", + "progress": "string", + "statusDescription": "string", + "errorCode": "string", + "responseId": "string" + } + ] + } +} diff --git a/usecaseui-portal/src/app/mock/routes.js b/usecaseui-portal/src/app/mock/routes.js index cb3cc17e..07bbe3c8 100644 --- a/usecaseui-portal/src/app/mock/routes.js +++ b/usecaseui-portal/src/app/mock/routes.js @@ -35,17 +35,28 @@ module.exports = ///////////////////////// ///////<-------------managemence services--------->///// - "/uui-lcm/customers/:customer": "/serviceType", - "/PUT/uui-lcm/customers/:name/service-subscriptions/:id": "/PUT_uui-lcm_customers_service-subscriptions", - "/PUT/uui-lcm/customers/:customer": "/PUT_uui-lcm_customers", - "/uui-lcm/customers/:customer/service-subscriptions/:id": "/language", "/uui-lcm/customers/:customer/service-subscriptions": "/serviceType", - "/uui-lcm/serviceNumByServiceType/:customer": "/CustomersColumn", - + "/uui-lcm/serviceNumByServiceType/:customer":"/CustomersColumn", + "/PUT/uui-lcm/customers/:customer": "/PUT_uui-lcm_customers", + "/PUT/uui-lcm/customers/:name/service-subscriptions/:id": "/PUT_uui-lcm_customers_service-subscriptions", + "/uui-lcm/customers/:customer":"/getCustomerresourceVersion", + "/DELETE/uui-lcm/customers":"/DELETE_uui-lcm_customers", + "/uui-lcm/customers/:customer/service-subscriptions/:id":"/getServiceTypeResourceVersion", + "/DELETE/uui-lcm/customers/:customer/service-subscriptions/:id": "/DELETE_uui-lcm_customers_service-subscriptions", ///////////////////////// ///////<-------------myhttp services--------->///// - + "/uui-lcm/services/:serviceId/operations/:operations":"/uui-lcm_services_progress", + "/uui-lcm/fetchCCVPNTemplateData/:uuid":"/uui-lcm_fetchCCVPNTemplateData", + "/uui-lcm/service-templates/:uuid":"/uui-lcm_e2e_service-templates", + "/uui-lcm/services/:serviceInstanceId":"/uui-lcm_delete_services", + "/uui-lcm/VnfInfo/:id":"/uui-lcm_VnfInfo", + "/uui-lcm/jobs/getNsLcmJobStatus/:jobId":"/uui-lcm_jobs_getNsLcmJobStatus", + "/services/scaleServices/:id":"/services_scaleServices", + "/uui-lcm/services/updateService/:id":"/uui-lcm_services_updateService", + "/uui-sotn/getPnfInfo/:name":"/uui-sotn_getPnfInfo", + "/uui-sotn/getConnectivityInfo/:id":"/uui-sotn_getConnectivityInfo", + "/uui-sotn/getPinterfaceByVpnId/:id":"/uui-sotn_getPinterfaceByVpnId", ///////////////////////// ///////<-------------networkhttp services--------->///// -- cgit 1.2.3-korg