diff options
Diffstat (limited to 'usecaseui-portal/src/app')
127 files changed, 5759 insertions, 2212 deletions
diff --git a/usecaseui-portal/src/app/app-routing.module.ts b/usecaseui-portal/src/app/app-routing.module.ts index f47cf11b..55a2c5ba 100644 --- a/usecaseui-portal/src/app/app-routing.module.ts +++ b/usecaseui-portal/src/app/app-routing.module.ts @@ -20,7 +20,6 @@ import { RouterModule, Routes } from '@angular/router'; import { HomeComponent } from './views/home/home.component'; import { ManagementComponent } from './views/management/management.component'; import { FcapsComponent } from './views/fcaps/fcaps.component'; -import { ServicesComponent } from './views/services/services.component'; import { ServicesListComponent } from './views/services/services-list/services-list.component'; import { OnboardVnfVmComponent } from './views/services/onboard-vnf-vm/onboard-vnf-vm.component'; import { AlarmComponent } from './views/alarm/alarm.component'; @@ -46,7 +45,6 @@ const routes: Routes = [ { path: 'home', component: HomeComponent }, { path: 'management', component: ManagementComponent }, { path: 'fcaps', component: FcapsComponent }, - // { path: 'services', component: ServicesComponent, children:ServicesChildRoutes}, //Temporarily not a sub-routing structure { path: 'services/services-list', component: ServicesListComponent }, { path: 'services/onboard-vnf-vm', component: OnboardVnfVmComponent }, { path: 'alarm', component: AlarmComponent }, diff --git a/usecaseui-portal/src/app/app.component.less b/usecaseui-portal/src/app/app.component.less index ed7ad4f1..d86fb853 100644 --- a/usecaseui-portal/src/app/app.component.less +++ b/usecaseui-portal/src/app/app.component.less @@ -45,6 +45,7 @@ nz-layout { position: fixed; left: 0; z-index: 100; + min-height: 937px; height: 100vh; background: #313449 url('assets/images/UUIMenuBar.png') no-repeat; background-size: 100%; diff --git a/usecaseui-portal/src/app/app.component.ts b/usecaseui-portal/src/app/app.component.ts index 8e3b41e9..d8dad5f9 100644 --- a/usecaseui-portal/src/app/app.component.ts +++ b/usecaseui-portal/src/app/app.component.ts @@ -15,7 +15,7 @@ */ import {Component} from '@angular/core'; import {TranslateService} from '@ngx-translate/core'; -import {MyhttpService} from "./core/services/myhttp.service"; +import {ServiceListService} from "./core/services/serviceList.service"; import {HomesService} from "./core/services/homes.service"; import {NavigationEnd, Router} from '@angular/router'; import 'rxjs/add/operator/map'; diff --git a/usecaseui-portal/src/app/app.module.ts b/usecaseui-portal/src/app/app.module.ts index 3f750bfb..17804649 100644 --- a/usecaseui-portal/src/app/app.module.ts +++ b/usecaseui-portal/src/app/app.module.ts @@ -40,7 +40,6 @@ registerLocaleData(en); import { AppComponent } from './app.component'; import { HomeComponent } from './views/home/home.component'; import { ManagementComponent } from './views/management/management.component'; -import { ServicesComponent } from './views/services/services.component'; import { ServicesListComponent } from './views/services/services-list/services-list.component'; import { OnboardVnfVmComponent } from './views/services/onboard-vnf-vm/onboard-vnf-vm.component'; import { AlarmComponent } from './views/alarm/alarm.component'; @@ -48,12 +47,12 @@ import { PerformanceComponent } from './views/performance/performance.component' import { PerformanceVnfComponent } from './views/performance/performance-vnf/performance-vnf.component'; import { PerformanceVmComponent } from './views/performance/performance-vm/performance-vm.component'; import { CcvpnNetworkComponent } from './views/ccvpn-network/ccvpn-network.component'; -import { CcvpnDetailComponent } from './views/ccvpn-detail/ccvpn-detail.component'; -import { CcvpnCreationComponent } from './views/ccvpn-creation/ccvpn-creation.component'; +import { CcvpnDetailComponent } from './views/services/services-list/ccvpn-detail/ccvpn-detail.component'; +import { CcvpnCreationComponent } from './views/services/services-list/ccvpn-creation/ccvpn-creation.component'; import { DetailsComponent } from './shared/components/details/details.component'; import { GraphiclistComponent } from './shared/components/graphiclist/graphiclist.component'; -import { E2eCreationComponent } from './shared/components/e2e-creation/e2e-creation.component'; +import { E2eCreationComponent } from './views/services/services-list/e2e-creation/e2e-creation.component'; import { BarComponent } from './shared/components/charts/bar/bar.component'; import { LineComponent } from './shared/components/charts/line/line.component'; @@ -63,24 +62,30 @@ import { PathLocationStrategy, LocationStrategy, HashLocationStrategy } from '@a // common function util import { Util } from './shared/utils/utils'; // Custom service -import { MyhttpService } from './core/services/myhttp.service'; +import { ServiceListService } from './core/services/serviceList.service'; import { HomesService } from './core/services/homes.service'; import { onboardService } from './core/services/onboard.service'; import { networkHttpservice } from './core/services/networkHttpservice.service'; import { PerformanceDetailsComponent } from './shared/components/performance-details/performance-details.component'; -import { E2eDetailComponent } from './shared/components/e2e-detail/e2e-detail.component'; -import { CustomerComponent } from './shared/components/customer/customer.component'; +import { E2eDetailComponent } from './views/services/services-list/e2e-detail/e2e-detail.component'; +import { CustomerComponent } from './views/management/customer/customer.component'; import { ManagemencsService } from './core/services/managemencs.service'; import { FcapsComponent } from './views/fcaps/fcaps.component'; import { TestComponent } from './test/test.component'; import { TextService } from './core/services/text.service'; +import { TopCardComponent } from './views/services/services-list/top-card/top-card.component'; +import { CreateModelComponent } from './views/services/services-list/create-model/create-model.component'; +import { DeleteModelComponent } from './views/services/services-list/delete-model/delete-model.component'; +import { NotificationComponent } from './shared/components/notification/notification.component'; +import { ScaleModelComponent } from './views/services/services-list/scale-model/scale-model.component'; +import { HealModelComponent } from './views/services/services-list/heal-model/heal-model.component'; @NgModule({ providers: [ { provide: LocationStrategy, useClass: HashLocationStrategy }, { provide: NZ_I18N, useValue: en_US }, Util, - MyhttpService, + ServiceListService, HomesService, onboardService, networkHttpservice, @@ -91,7 +96,6 @@ import { TextService } from './core/services/text.service'; AppComponent, HomeComponent, ManagementComponent, - ServicesComponent, ServicesListComponent, OnboardVnfVmComponent, @@ -114,7 +118,13 @@ import { TextService } from './core/services/text.service'; CustomerComponent, PerformanceDetailsComponent, FcapsComponent, - TestComponent + TestComponent, + TopCardComponent, + CreateModelComponent, + DeleteModelComponent, + NotificationComponent, + ScaleModelComponent, + HealModelComponent ], imports: [ BrowserModule, diff --git a/usecaseui-portal/src/app/core/models/dataInterface.ts b/usecaseui-portal/src/app/core/models/dataInterface.ts index 012b23e6..969651f4 100644 --- a/usecaseui-portal/src/app/core/models/dataInterface.ts +++ b/usecaseui-portal/src/app/core/models/dataInterface.ts @@ -2,55 +2,10 @@ enum baseUrl{ baseUrl = '/api/usecaseui-server/v1' //online // baseUrl = 'http://10.73.191.100:8082' //local two } -interface homeData { - services:{ - number:number, - chartdata:Object[] - }, - performance:{ - per_Vnf:number, - per_VmPm:number - }, - alarm:{ - chartdata:Object[] - }, - Vm_performance:{ - names:string[] - } -}; - -interface homeVmLineData { - CPU:number[], - Memory:number[] -} - -interface servicesSelectData { - customer:string[], - serviceType:string[] -} interface servicesTableData { total:number, tableList:string[] } -interface creatensData { - total:number, - tableList:string[] -} - -interface onboardTableData { - total:number, - tableList:string[] -} - -interface onboardDataVNF { - total:number, - tableList:string[] -} - -interface onboardDataPNF { - total:number, - tableList:string[] -} -export {homeData, homeVmLineData, servicesSelectData, servicesTableData, creatensData, onboardTableData, onboardDataVNF, onboardDataPNF , baseUrl} +export {servicesTableData , baseUrl} diff --git a/usecaseui-portal/src/app/core/services/managemencs.service.ts b/usecaseui-portal/src/app/core/services/managemencs.service.ts index da43b8f5..c8eed218 100644 --- a/usecaseui-portal/src/app/core/services/managemencs.service.ts +++ b/usecaseui-portal/src/app/core/services/managemencs.service.ts @@ -12,18 +12,16 @@ export class ManagemencsService { /* line up */ url = { - // The following APIs are optimizable - customers: this.baseUrl + "/uui-lcm/customers", /* get */ + customers: this.baseUrl + "/uui-lcm/customers", /* get or delete */ CustomersPir: this.baseUrl + "/uui-lcm/serviceNumByCustomer", /* get */ - deleteCustomer: this.baseUrl + "/uui-lcm/customers?customerId=*_*&resourceVersion=*+*", /* delete */ - // The following APIs are not optimizable - serviceType: this.baseUrl + "/uui-lcm/customers/" + "*_*" + "/service-subscriptions", /* get */ + serviceType: this.baseUrl + "/uui-lcm/customers/*_*/service-subscriptions", /* get */ CustomersColumn: this.baseUrl + "/uui-lcm/serviceNumByServiceType/" + "*_*", /* get */ + deleteCustomer: this.baseUrl + "/uui-lcm/customers", /* delete */ createCustomer: this.baseUrl + "/uui-lcm/customers/", /* put */ createServiceType: this.baseUrl + "/uui-lcm/customers/*_*/service-subscriptions/*+*", /* put */ - getCustomerresourceVersion: this.baseUrl + "/uui-lcm/customers/*_*", /* put */ + getCustomerresourceVersion: this.baseUrl + "/uui-lcm/customers/*_*", /* get */ getServiceTypeResourceVersion: this.baseUrl + "/uui-lcm/customers/*_*/service-subscriptions/*+*", - deleteServiceType: this.baseUrl + "/uui-lcm/customers/*_*/service-subscriptions/*+*?resourceVersion=*@* ", + deleteServiceType: this.baseUrl + "/uui-lcm/customers/*_*/service-subscriptions/*+*", }; //The following APIs are optimizable ---------------------------------- @@ -38,11 +36,10 @@ export class ManagemencsService { return this.http.put(url, createParams); } // delete SelectCustomer - deleteSelectCustomer(params) { - let customerId = params.customerId, - version = params.version; - let url = this.url.deleteCustomer.replace("*_*", customerId).replace("*+*", version); - return this.http.delete(url); + deleteSelectCustomer(paramsObj) { + let url = this.url.deleteCustomer; + let params = new HttpParams({ fromObject: paramsObj }); + return this.http.delete(url, { params }); } //The following APIs are not optimizable --------------------------------- @@ -81,11 +78,14 @@ export class ManagemencsService { return this.http.get(url); } // delete Select ServiceType - deleteSelectServiceType(params) { - let customerId = params.customerId.id, - ServiceType = params.ServiceType, - version = params.version; - let url = this.url.deleteServiceType.replace("*_*", customerId).replace("*+*", ServiceType).replace("*@*", version); - return this.http.delete(url); + deleteSelectServiceType(paramsObj) { + let customerId = paramsObj.customerId.id, + ServiceType = paramsObj.ServiceType, + version = { + "resourceVersion": paramsObj.version + }; + let url = this.url.deleteServiceType.replace("*_*", customerId).replace("*+*", ServiceType); + let params = new HttpParams({ fromObject: version }); + return this.http.delete(url, { params }); } } diff --git a/usecaseui-portal/src/app/core/services/networkHttpservice.service.ts b/usecaseui-portal/src/app/core/services/networkHttpservice.service.ts index a3131bb3..00b6e79b 100644 --- a/usecaseui-portal/src/app/core/services/networkHttpservice.service.ts +++ b/usecaseui-portal/src/app/core/services/networkHttpservice.service.ts @@ -23,25 +23,22 @@ export class networkHttpservice { constructor(private http: HttpClient) { } - baseUrl = baseUrl.baseUrl + "/uui-sotn/";//Online environment + baseUrl = baseUrl.baseUrl;//Online environment url = { - // The following APIs are optimizable - "getNetworkD3Data": this.baseUrl + "getNetWorkResources", - "getLogicalLinksData": this.baseUrl + "getLogicalLinks", - "deleteCloud": this.baseUrl + "deleteExtNetWork", - // The following APIs are not optimizable - "getPInterfacesData1": this.baseUrl + "getPinterfaceByPnfName/", - "getPInterfacesData2": this.baseUrl + "getPinterfaceByPnfName/", - "createLink": this.baseUrl + "createLink/", - "querySpecificLinkInfo": this.baseUrl + "getSpecificLogicalLink/", - "queryCloudUrl": this.baseUrl + "getHostUrl/", - "queryExtAAIIdVersion": this.baseUrl + "getExtAaiId/", - "createNetwrok": this.baseUrl + "createTopoNetwork/", - "createPnf": this.baseUrl + "createPnf/", - "createTp": this.baseUrl + "pnf/", - "createCloudLink": this.baseUrl + "createLink/", - "createCloudUrl": this.baseUrl + "createHostUrl/", - "deleteLink": this.baseUrl + "deleteLink/", + "getNetworkD3Data": "/uui-sotn/getNetWorkResources", + "getLogicalLinksData": "/uui-sotn/getLogicalLinks", + "deleteCloud": "/uui-sotn/deleteExtNetWork", + "getPInterfacesData": "/uui-sotn/getPinterfaceByPnfName/", + "createLink": "/uui-sotn/createLink/", + "querySpecificLinkInfo": "/uui-sotn/getSpecificLogicalLink/", + "queryCloudUrl": "/uui-sotn/getHostUrl/", + "queryExtAAIIdVersion": "/uui-sotn/getExtAaiId/", + "createNetwrok": "/uui-sotn/createTopoNetwork/", + "createPnf": "/uui-sotn/createPnf/", + "createTp": "/uui-sotn/pnf/", + "createCloudLink": "/uui-sotn/createLink/", + "createCloudUrl": "/uui-sotn/createHostUrl/", + "deleteLink": "/uui-sotn/deleteLink/", }; @@ -55,17 +52,14 @@ export class networkHttpservice { return this.http.get<any>(this.url["getLogicalLinksData"]); } deleteCloudLink(paramsObj) { - let str = "?extNetworkId=" + paramsObj["aaiId"] + "&resourceVersion=" + paramsObj["version"]; - return this.http.delete<any>((this.url["deleteCloud"] + str)); + let params = new HttpParams({ fromObject: paramsObj }); + return this.http.delete<any>(this.url["deleteCloud"],{params}); } //The following APIs function are not optimizable------------------------ //Query the tp data corresponding to the specified node - getPInterfacesData1(paramsObj) { - return this.http.get<any>(this.url['getPInterfacesData1'] + paramsObj["pnfName"]); - } - getPInterfacesData2(paramsObj) { - return this.http.get<any>(this.url["getPInterfacesData2"] + paramsObj["pnfName"]); + getPInterfacesData(paramsObj) { + return this.http.get<any>(this.url['getPInterfacesData'] + paramsObj["pnfName"]); } //Create a connection interface createLink(paramsObj) { diff --git a/usecaseui-portal/src/app/core/services/onboard.service.ts b/usecaseui-portal/src/app/core/services/onboard.service.ts index ea312d34..e7b1bfc6 100644 --- a/usecaseui-portal/src/app/core/services/onboard.service.ts +++ b/usecaseui-portal/src/app/core/services/onboard.service.ts @@ -22,32 +22,23 @@ import { baseUrl } from '../models/dataInterface'; export class onboardService { constructor(private http: HttpClient) { } - baseUrl = baseUrl.baseUrl + "/uui-lcm/"; + baseUrl = baseUrl.baseUrl; url = { - //The following APIs are optimizable------------------------ - // list Data - onboardTableData: this.baseUrl + "ns-packages", - onboardDataVNF: this.baseUrl + "vnf-packages", - onboardDataPNF: this.baseUrl + "pnf-packages", - //ns sdc - sdc_nsListData: this.baseUrl + "sdc-ns-packages", // GET - // vnf sdc - sdc_vnfListData: this.baseUrl + "sdc-vf-packages", // GET - // onboard ns sdc data - onboardNs: this.baseUrl + "ns-packages", //POST - //onboard VNF sdc data - onboardVNF: this.baseUrl + "vf-packages", //POST - //Delete ns package - deleteNspack: this.baseUrl + "deleteNsdPackage?nsdInfoId=", + onboardTableData: this.baseUrl + "/uui-lcm/ns-packages", + onboardDataVNF: this.baseUrl + "/uui-lcm/vnf-packages", + onboardDataPNF: this.baseUrl + "/uui-lcm/pnf-packages", + sdc_nsListData: this.baseUrl + "/uui-lcm/sdc-ns-packages", // GET + sdc_vnfListData: this.baseUrl + "/uui-lcm/sdc-vf-packages", // GET + onboardNs: this.baseUrl + "/uui-lcm/ns-packages", //POST + + onboardVNF: this.baseUrl + "/uui-lcm/vf-packages", //POST + deleteNspack: this.baseUrl + "/uui-lcm/deleteNsdPackage", // Delete Vnf vfc package - deleteVnfPack: this.baseUrl + "deleteVnfPackage?vnfPkgId=", + deleteVnfPack: this.baseUrl + "/uui-lcm/deleteVnfPackage", // Delete Pnf package - deletePnfPack: this.baseUrl + "deletePnfPackage?pnfdInfoId=", - // The following APIs are not optimizable------------------- - // createnspackages - creatensData: this.baseUrl + "_jsonData", //POST - //Progress interface - progress: this.baseUrl + "jobs/" + "_jobId" + "?responseId=" + deletePnfPack: this.baseUrl + "/uui-lcm/deletePnfPackage", + creatensData: this.baseUrl + "/uui-lcm/_jsonData", //POST + progress: this.baseUrl + "/uui-lcm/jobs/_jobId" , }; //The following APIs function are optimizable------------------------ @@ -83,15 +74,18 @@ export class onboardService { } // Delete ns vfc package deleteNsIdData(paramsObj) { - return this.http.delete<any>(this.url.deleteNspack + paramsObj); + let params = new HttpParams({ fromObject: {"nsdInfoId":paramsObj }}); + return this.http.delete<any>(this.url.deleteNspack,{params}); } // Delete Vnf vfc package deleteVnfIdData(paramsObj) { - return this.http.delete<any>(this.url.deleteVnfPack + paramsObj); + let params = new HttpParams({ fromObject: {"vnfPkgId":paramsObj }}); + return this.http.delete<any>(this.url.deleteVnfPack, {params}); } // Delete Pnf package deletePnfIdData(paramsObj) { - return this.http.delete<any>(this.url.deletePnfPack + paramsObj); + let params = new HttpParams({ fromObject: {"pnfdInfoId":paramsObj }}); + return this.http.delete<any>(this.url.deletePnfPack , {params}); } // The following APIs function are not optimizable------------------- @@ -102,8 +96,9 @@ export class onboardService { } //onboard progress getProgress(jobid, responseId) { + let params = new HttpParams({fromObject: {"responseId": responseId}}) let url = this.url.progress.replace("_jobId", jobid) + responseId; - return this.http.get<any>(url); + return this.http.get<any>(url,{params}); } } diff --git a/usecaseui-portal/src/app/core/services/myhttp.service.ts b/usecaseui-portal/src/app/core/services/serviceList.service.ts index cc9c181a..bde2c253 100644 --- a/usecaseui-portal/src/app/core/services/myhttp.service.ts +++ b/usecaseui-portal/src/app/core/services/serviceList.service.ts @@ -16,40 +16,37 @@ import { Injectable } from '@angular/core'; import { HttpClient, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http'; import { Observable } from 'rxjs/Observable'; -import { homeData, homeVmLineData, servicesSelectData, servicesTableData, creatensData, onboardTableData, onboardDataVNF, onboardDataPNF, baseUrl } from '../models/dataInterface'; +import { servicesTableData,baseUrl } from '../models/dataInterface'; @Injectable() -export class MyhttpService { +export class ServiceListService { constructor(private http: HttpClient) { } baseUrl = baseUrl.baseUrl; url = { - // The following APIs are optimizable - listSortMasters: this.baseUrl + "/listSortMasters", customers: this.baseUrl + "/uui-lcm/customers", + serviceType: this.baseUrl + "/uui-lcm/customers/" + "*_*" + "/service-subscriptions", orchestrators: this.baseUrl + "/uui-lcm/orchestrators", servicesTableData: this.baseUrl + '/uui-lcm/service-instances', serviceTemplates: this.baseUrl + "/uui-lcm/service-templates", - vimInfo: this.baseUrl + "/uui-lcm/locations/", - sdnControllers: this.baseUrl + "/uui-lcm/sdnc-controllers/", + progress: this.baseUrl + "/uui-lcm/services/" + "*_*" + "/operations/", + templateParameters: this.baseUrl + "/uui-lcm/fetchCCVPNTemplateData/*_*", + e2etemplateParameters: this.baseUrl + "/uui-lcm/service-templates/*_*",//no mock Sample Data json + nstemplateParameters: this.baseUrl + "/uui-lcm/fetchNsTemplateData", + vimInfo: this.baseUrl + "/uui-lcm/locations", + sdnControllers: this.baseUrl + "/uui-lcm/sdnc-controllers", createService: this.baseUrl + "/uui-lcm/services", ns_createService: this.baseUrl + "/uui-lcm/createNetworkServiceInstance", ns_createService2: this.baseUrl + "/uui-lcm/instantiateNetworkServiceInstance", - ns_deleteService: this.baseUrl + "/uui-lcm/deleteNetworkServiceInstance?ns_instance_id=", - ns_stopService: this.baseUrl + "/uui-lcm/terminateNetworkServiceInstance?ns_instance_id=", - ns_healService: this.baseUrl + "/uui-lcm/healNetworkServiceInstance?ns_instance_id=", - allottedResource: this.baseUrl + "/uui-sotn/getAllottedResources", - // The following APIs are not optimizable - serviceType: this.baseUrl + "/uui-lcm/customers/" + "*_*" + "/service-subscriptions", - templateParameters: this.baseUrl + "/uui-lcm/fetchCCVPNTemplateData/*_*", - e2etemplateParameters: this.baseUrl + "/uui-lcm/service-templates/" + "*_*" + "?toscaModelPath=", - nstemplateParameters: this.baseUrl + "/uui-lcm/fetchNsTemplateData", deleteService: this.baseUrl + "/uui-lcm/services/", + ns_stopService: this.baseUrl + "/uui-lcm/terminateNetworkServiceInstance", + ns_deleteService: this.baseUrl + "/uui-lcm/deleteNetworkServiceInstance", + ns_healService: this.baseUrl + "/uui-lcm/healNetworkServiceInstance", vnfInfo: this.baseUrl + "/uui-lcm/VnfInfo/", - progress: this.baseUrl + "/uui-lcm/services/" + "*_*" + "/operations/", - nsProgress: this.baseUrl + "/uui-lcm/jobs/getNsLcmJobStatus/" + "*_*" + "?responseId=0&serviceInstanceId=", + nsProgress: this.baseUrl + "/uui-lcm/jobs/getNsLcmJobStatus/*_*", e2eScale: this.baseUrl + "/services/scaleServices/", - e2e_nsdata: this.baseUrl + "/getServiceInstanceById/customerId/", + e2e_nsdata: this.baseUrl + "/getServiceInstanceById/customerId", + allottedResource: this.baseUrl + "/uui-sotn/getAllottedResources", updateccvpn: this.baseUrl + "/uui-lcm/services/updateService/", pnfDetail: this.baseUrl + "/uui-sotn/getPnfInfo/", connectivity: this.baseUrl + "/uui-sotn/getConnectivityInfo/", @@ -75,7 +72,7 @@ export class MyhttpService { // Get all template types getAllServiceTemplates(type) { if (type == "Network Service") { - let nsUrl = this.url.serviceTemplates.replace("service-templates", "listNsTemplates").replace("serviceTemplates2", "serviceTemplates-ns"); + let nsUrl = this.url.serviceTemplates.replace("service-templates", "listNsTemplates"); console.log(nsUrl); return this.http.get<any>(nsUrl); } @@ -102,16 +99,19 @@ export class MyhttpService { return this.http.post<any>(this.url.ns_createService2 + params, requestBody); } //Delete ns Service - nsDeleteInstance(id) { - return this.http.delete<any>(this.url.ns_deleteService + id); + nsDeleteInstance(paramsObj) { + let params = new HttpParams({ fromObject: paramsObj }); + return this.http.delete<any>(this.url.ns_deleteService,{params}); } //stop ns Service - stopNsService(id, requestBody) { //You need to terminate before deleting - return this.http.post<any>(this.url.ns_stopService + id, requestBody); + stopNsService(paramsObj, requestBody) { //You need to terminate before deleting + let params = new HttpParams({ fromObject: paramsObj }); + return this.http.post<any>(this.url.ns_stopService, requestBody,{ params }); } //heal ns Service - healNsService(id, requestBody) { - return this.http.post<any>(this.url.ns_healService + id, requestBody); + healNsService(paramsObj, requestBody) { + let params = new HttpParams({ fromObject: paramsObj }); + return this.http.post<any>(this.url.ns_healService, requestBody,{params}); } //Get allotted-resource to get tp and pnf values getAllottedResource(obj) { @@ -136,8 +136,9 @@ export class MyhttpService { }; return this.http.post<any>(this.url.nstemplateParameters, body); } else if (type == "e2e") { - let url = this.url.e2etemplateParameters.replace("*_*", template.uuid) + template.toscaModelURL; - return this.http.get<any>(url); + let params = new HttpParams({ fromObject: {"toscaModelPath":template.toscaModelURL} }); + let url = this.url.e2etemplateParameters.replace("*_*", template.uuid); + return this.http.get<any>(url,{params}); } else { let body = { csarId: template.uuid, @@ -180,13 +181,15 @@ export class MyhttpService { return this.http.get<any>(this.url.e2e_nsdata, { params }); } // Query progress interface - getProgress(obj) { - let url = this.url.progress.replace("*_*", obj.serviceId) + obj.operationId + "?operationType=" + obj.operationType; - return this.http.get<any>(url); - } - getNsProgress(jobid, serviceId, operationType) { - let url = this.url.nsProgress.replace("*_*", jobid) + serviceId + "&operationType=" + operationType; - return this.http.get<any>(url); + getProgress(obj,operationTypeObj) { + let params = new HttpParams({ fromObject: operationTypeObj }); + let url = this.url.progress.replace("*_*", obj.serviceId) + obj.operationId; + return this.http.get<any>(url,{params}); + } + getNsProgress(jobid,paramsObj) { + let params = new HttpParams({ fromObject: paramsObj }); + let url = this.url.nsProgress.replace("*_*", jobid); + return this.http.get<any>(url,{params}); } //Get the corresponding domain (network-resource) by pnf value diff --git a/usecaseui-portal/src/app/mock/json/CustomersColumn.json b/usecaseui-portal/src/app/mock/json/CustomersColumn.json new file mode 100644 index 00000000..329258d8 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/CustomersColumn.json @@ -0,0 +1,8 @@ +{ + "list":[ + {"name":"SOTN","value":"23"}, + {"name":"CCVPN","value":"67"}, + {"name":"CCVPN1","value":"34"}, + {"name":"SOTN1","value":"12"} + ] +}
\ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/DELETE_uui-lcm_customers.json b/usecaseui-portal/src/app/mock/json/DELETE_uui-lcm_customers.json new file mode 100644 index 00000000..c1cce948 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/DELETE_uui-lcm_customers.json @@ -0,0 +1,6 @@ +{ + "status":"Failed", + "global-customer-id": "gongjie_test", + "subscriber-name": "gongjie_test", + "subscriber-type": "INFRA" +} diff --git a/usecaseui-portal/src/app/mock/json/DELETE_uui-lcm_customers_service-subscriptions.json b/usecaseui-portal/src/app/mock/json/DELETE_uui-lcm_customers_service-subscriptions.json new file mode 100644 index 00000000..74fbf513 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/DELETE_uui-lcm_customers_service-subscriptions.json @@ -0,0 +1,5 @@ +{ + "service-type":"delete_test", + "temp-ub-sub-account-id":"sotnaccount", + "status":"SUCCESS" +}
\ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/DELETE_uui-lcm_deleteNsdPackage.json b/usecaseui-portal/src/app/mock/json/DELETE_uui-lcm_deleteNsdPackage.json new file mode 100644 index 00000000..41c06ec5 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/DELETE_uui-lcm_deleteNsdPackage.json @@ -0,0 +1,5 @@ +{
+ "status": "200",
+ "statusDescription": "success",
+ "errorCode": "1"
+}
\ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/DELETE_uui-lcm_deletePnfPackage.json b/usecaseui-portal/src/app/mock/json/DELETE_uui-lcm_deletePnfPackage.json new file mode 100644 index 00000000..41c06ec5 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/DELETE_uui-lcm_deletePnfPackage.json @@ -0,0 +1,5 @@ +{
+ "status": "200",
+ "statusDescription": "success",
+ "errorCode": "1"
+}
\ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/DELETE_uui-lcm_deleteVnfPackage.json b/usecaseui-portal/src/app/mock/json/DELETE_uui-lcm_deleteVnfPackage.json new file mode 100644 index 00000000..41c06ec5 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/DELETE_uui-lcm_deleteVnfPackage.json @@ -0,0 +1,5 @@ +{
+ "status": "200",
+ "statusDescription": "success",
+ "errorCode": "1"
+}
\ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/POST_uui-lcm_create.json b/usecaseui-portal/src/app/mock/json/POST_uui-lcm_create.json new file mode 100644 index 00000000..65291751 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/POST_uui-lcm_create.json @@ -0,0 +1,44 @@ +{
+ "id": "001",
+ "nsdId": "string",
+ "nsdName": "string",
+ "nsdVersion": "string",
+ "nsdDesigner": "string",
+ "nsdInvariantId": "string",
+ "vnfPkgIds": [
+ "string"
+ ],
+ "pnfdInfoIds": [
+ "string"
+ ],
+ "nestedNsdInfoIds": [
+ "string"
+ ],
+ "nsdOnboardingState": "CREATED",
+ "onboardingFailureDetails": {
+ "type": "string",
+ "title": 0,
+ "detail": "string",
+ "instance": "string",
+ "additional_attributes": {
+ "additionalProp1": "string",
+ "additionalProp2": "string",
+ "additionalProp3": "string"
+ }
+ },
+ "nsdOperationalState": "ENABLED",
+ "nsdUsageState": "IN_USE",
+ "userDefinedData": {
+ "additionalProp1": "string",
+ "additionalProp2": "string",
+ "additionalProp3": "string"
+ },
+ "_links": {
+ "self": {
+ "href": "string"
+ },
+ "nsd_content": {
+ "href": "string"
+ }
+ }
+}
\ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/POST_uui-lcm_ns-packages.json b/usecaseui-portal/src/app/mock/json/POST_uui-lcm_ns-packages.json new file mode 100644 index 00000000..9eb6cf35 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/POST_uui-lcm_ns-packages.json @@ -0,0 +1,5 @@ +{ + "status": "success", + "statusDescription": "onboard ns sdc successfully", + "errorCode": "0" +}
\ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/POST_uui-lcm_vf-packages.json b/usecaseui-portal/src/app/mock/json/POST_uui-lcm_vf-packages.json new file mode 100644 index 00000000..38fdea80 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/POST_uui-lcm_vf-packages.json @@ -0,0 +1,6 @@ +{
+ "status": "success",
+ "statusDescription": "onboard vnf sdc successfully",
+ "errorCode": "0",
+ "jobId": 1.0
+}
\ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/PUT_uui-lcm_customers.json b/usecaseui-portal/src/app/mock/json/PUT_uui-lcm_customers.json new file mode 100644 index 00000000..01492fb9 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/PUT_uui-lcm_customers.json @@ -0,0 +1,6 @@ +{ + "status":"SUCCESS", + "global-customer-id": "tian_test", + "subscriber-name": "tian_test", + "subscriber-type": "INFRA" +}
\ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/PUT_uui-lcm_customers_service-subscriptions.json b/usecaseui-portal/src/app/mock/json/PUT_uui-lcm_customers_service-subscriptions.json new file mode 100644 index 00000000..370366d9 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/PUT_uui-lcm_customers_service-subscriptions.json @@ -0,0 +1,5 @@ +{ + "service-type":"tian_test", + "temp-ub-sub-account-id":"sotnaccount", + "status":"SUCCESS" +}
\ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/getCustomerresourceVersion.json b/usecaseui-portal/src/app/mock/json/getCustomerresourceVersion.json new file mode 100644 index 00000000..d9e2d383 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/getCustomerresourceVersion.json @@ -0,0 +1,9 @@ +{ + "result": { + "global-customer-id": "tian_test", + "subscriber-name": "tian_test", + "subscriber-type": "INFRA", + "resource-version": "100020202" + }, + "status": "SUCCESS" +}
\ No newline at end of file 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/getServiceTypeResourceVersion.json b/usecaseui-portal/src/app/mock/json/getServiceTypeResourceVersion.json new file mode 100644 index 00000000..f37b26b5 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/getServiceTypeResourceVersion.json @@ -0,0 +1,7 @@ +{ + "result": { + "service-type": "CCVPN", + "resource-version": "1542249347284" + }, + "status": "SUCCESS" +}
\ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/nsd_content.json b/usecaseui-portal/src/app/mock/json/nsd_content.json new file mode 100644 index 00000000..3281d222 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/nsd_content.json @@ -0,0 +1,5 @@ +{
+ "status": "200",
+ "statusDescription": "success",
+ "errorCode": "1"
+}
diff --git a/usecaseui-portal/src/app/mock/json/serviceType.json b/usecaseui-portal/src/app/mock/json/serviceType.json new file mode 100644 index 00000000..cda17d57 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/serviceType.json @@ -0,0 +1,21 @@ +[ + { + "service-type": "CCVPN", + "temp-ub-sub-account-id": "sotnaccount", + "resource-version": "1535601345780" + }, + { + "service-type": "SOTN", + "temp-ub-sub-account-id": "sotnaccount", + "resource-version": "1535601333330" + }, + { + "service-type": "E2E Service", + "temp-ub-sub-account-id": "sotnaccount", + "resource-version": "1536111036667" + },{ + "service-type": "Network Service", + "temp-ub-sub-account-id": "sotnaccount", + "resource-version": "1536111036467" +} +]
\ 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_createNetworkServiceData.json b/usecaseui-portal/src/app/mock/json/uui-lcm_createNetworkServiceData.json new file mode 100644 index 00000000..65291751 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-lcm_createNetworkServiceData.json @@ -0,0 +1,44 @@ +{
+ "id": "001",
+ "nsdId": "string",
+ "nsdName": "string",
+ "nsdVersion": "string",
+ "nsdDesigner": "string",
+ "nsdInvariantId": "string",
+ "vnfPkgIds": [
+ "string"
+ ],
+ "pnfdInfoIds": [
+ "string"
+ ],
+ "nestedNsdInfoIds": [
+ "string"
+ ],
+ "nsdOnboardingState": "CREATED",
+ "onboardingFailureDetails": {
+ "type": "string",
+ "title": 0,
+ "detail": "string",
+ "instance": "string",
+ "additional_attributes": {
+ "additionalProp1": "string",
+ "additionalProp2": "string",
+ "additionalProp3": "string"
+ }
+ },
+ "nsdOperationalState": "ENABLED",
+ "nsdUsageState": "IN_USE",
+ "userDefinedData": {
+ "additionalProp1": "string",
+ "additionalProp2": "string",
+ "additionalProp3": "string"
+ },
+ "_links": {
+ "self": {
+ "href": "string"
+ },
+ "nsd_content": {
+ "href": "string"
+ }
+ }
+}
\ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/uui-lcm_createNetworkServiceInstance.json b/usecaseui-portal/src/app/mock/json/uui-lcm_createNetworkServiceInstance.json new file mode 100644 index 00000000..b8c73d59 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-lcm_createNetworkServiceInstance.json @@ -0,0 +1,3 @@ +{ + "nsInstanceId": "nsinstanceid_xxxxxxxxx" +}
\ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/uui-lcm_createPnfData.json b/usecaseui-portal/src/app/mock/json/uui-lcm_createPnfData.json new file mode 100644 index 00000000..90538058 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-lcm_createPnfData.json @@ -0,0 +1,34 @@ +{
+ "id": "003",
+ "pnfdId": "string",
+ "pnfdName": "string",
+ "pnfdVersion": "string",
+ "pnfdProvider": "string",
+ "pnfdInvariantId": "string",
+ "pnfdOnboardingState": "CREATED",
+ "onboardingFailureDetails": {
+ "type": "string",
+ "title": 0,
+ "detail": "string",
+ "instance": "string",
+ "additional_attributes": {
+ "additionalProp1": "string",
+ "additionalProp2": "string",
+ "additionalProp3": "string"
+ }
+ },
+ "pnfdUsageState": "IN_USE",
+ "userDefinedData": {
+ "additionalProp1": "string",
+ "additionalProp2": "string",
+ "additionalProp3": "string"
+ },
+ "_links": {
+ "self": {
+ "href": "string"
+ },
+ "nsd_content": {
+ "href": "string"
+ }
+ }
+}
\ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/uui-lcm_createVnfData.json b/usecaseui-portal/src/app/mock/json/uui-lcm_createVnfData.json new file mode 100644 index 00000000..4dc24217 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-lcm_createVnfData.json @@ -0,0 +1,67 @@ +{
+ "id": "002",
+ "vnfdId": "string",
+ "vnfProvider": "string",
+ "vnfProductName": "string",
+ "vnfSoftwareVersion": "string",
+ "vnfdVersion": "string",
+ "checksum": {
+ "algorithm": "string",
+ "hash": "string"
+ },
+ "softwareImages": [
+ {
+ "id": "string",
+ "name": "string",
+ "provider": "string",
+ "version": "string",
+ "checksum": {
+ "algorithm": "string",
+ "hash": "string"
+ },
+ "containerFormat": "AKI",
+ "diskFormat": "AKI",
+ "createdAt": "2018-10-18T07:07:02.734Z",
+ "minDisk": 0,
+ "minRam": 0,
+ "size": 0,
+ "userMetadata": {
+ "additionalProp1": "string",
+ "additionalProp2": "string",
+ "additionalProp3": "string"
+ },
+ "imagePath": "string"
+ }
+ ],
+ "additionalArtifacts": [
+ {
+ "artifactPath": "string",
+ "checksum": {
+ "algorithm": "string",
+ "hash": "string"
+ },
+ "metadata": {
+ "additionalProp1": "string",
+ "additionalProp2": "string",
+ "additionalProp3": "string"
+ }
+ }
+ ],
+ "onboardingState": "CREATED",
+ "operationalState": "ENABLED",
+ "usageState": "IN_USE",
+ "userDefinedData": {
+ "additionalProp1": "string",
+ "additionalProp2": "string",
+ "additionalProp3": "string"
+ },
+ "_links": {
+ "self": {
+ "href": "string"
+ },
+ "nsd_content": {
+ "href": "string"
+ }
+ }
+ }
+
\ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/uui-lcm_deleteNetworkServiceInstance.json b/usecaseui-portal/src/app/mock/json/uui-lcm_deleteNetworkServiceInstance.json new file mode 100644 index 00000000..19829cc1 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-lcm_deleteNetworkServiceInstance.json @@ -0,0 +1,3 @@ +{ + "status":"SUCCESS" +}
\ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/uui-lcm_delete_services.json b/usecaseui-portal/src/app/mock/json/uui-lcm_delete_services.json new file mode 100644 index 00000000..9d4fe1d3 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-lcm_delete_services.json @@ -0,0 +1,3 @@ +{ + "operationId":"1e606677-7864-4bec-b50c-adcd858e4cd8" +}
\ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/uui-lcm_e2e_service-templates.json b/usecaseui-portal/src/app/mock/json/uui-lcm_e2e_service-templates.json new file mode 100644 index 00000000..785c6881 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-lcm_e2e_service-templates.json @@ -0,0 +1,77 @@ + +{ + "invariantUUID": "538e8673-4e93-4936-9f71-87b7c9b1bbf6", + "uuid": "5ef1e772-5c6d-4b99-a2f8-987759f922b8", + "name": "vIMS_E2E_v2", + "type": "Service", + "version": "null", + "description": "vIMS E2E", + "category": "E2E Service", + "subcategory": "null", + "customizationUuid": "null", + "inputs": [], + "nestedTemplates": [ + { + "invariantUUID": "14c8bafd-f4bc-4bcf-a101-cc6568712c73", + "uuid": "679d00bd-f334-44d7-9105-ee3038865cb8", + "name": "vIMS_NS_v2", + "type": "VF", + "version": "1.0", + "description": "vIMS NS", + "category": "Generic", + "subcategory": "Abstract", + "customizationUuid": "5a485c18-b3f3-4904-a7ff-db64d9226f99", + "inputs": [ + { + "name": "4563686a-a63a-457d-8232-a3d07b314028", + "type": "vf_location", + "description": "SBC Huawei", + "isRequired": "true", + "defaultValue": "" + }, + { + "name": "8612efa5-9df9-43ef-8e76-5a3cca97a15e", + "type": "vf_location", + "description": "CSCF Nokia", + "isRequired": "true", + "defaultValue": "" + }, + { + "name": "sdncontroller", + "type": "sdn_controller", + "description": "location for the service", + "isRequired": "true", + "defaultValue": "" + } + ], + "nestedTemplates": [ + { + "invariantUUID": "d0d43bd0-4088-4b1c-9ac1-c6303d9f923a", + "uuid": "0f93d9d8-a815-4da9-820f-6cc77f670623", + "name": "ext ZTE VL", + "type": "VL", + "version": "2.0", + "description": "Ext ZTE VL", + "category": "Generic", + "subcategory": "Network Elements", + "customizationUuid": "4de4666a-a6bc-4a80-b1b9-f80014b4a847", + "inputs": [], + "nestedTemplates": [] + }, + { + "invariantUUID": "d0d43bd0-4088-4b1c-9ac1-c6303d9f923a", + "uuid": "0f93d9d8-a815-4da9-820f-6cc77f670623", + "name": "ext ZTE VL", + "type": "VL", + "version": "2.0", + "description": "Ext ZTE VL", + "category": "Generic", + "subcategory": "Network Elements", + "customizationUuid": "0705b47f-ad55-4a25-be6d-d90748acb4dd", + "inputs": [], + "nestedTemplates": [] + } + ] + } + ] +}
\ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/uui-lcm_fetchCCVPNTemplateData.json b/usecaseui-portal/src/app/mock/json/uui-lcm_fetchCCVPNTemplateData.json new file mode 100644 index 00000000..b7c8524d --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-lcm_fetchCCVPNTemplateData.json @@ -0,0 +1,479 @@ +{ + "inputs": { + "vpnresourcelist": [ + { + "sdwanvpn_topology": "", + "required": false, + "type": "string", + "description": "full mesh, hub-spoke" + }, + { + "sdwanvpn_name": "", + "required": true, + "type": "string", + "description": "the name of this VPM object" + }, + { + "sitelanlist": [ + { + "deviceName": "", + "required": true, + "type": "string", + "description": "The device name in the site" + }, + { + "portSwitch": "", + "type": "string", + "description": "the port switch of the port.1 layer3-port, 2 layer2-port", + "required": true + }, + { + "type": "string", + "required": true, + "role": "", + "description": "The role of this site that attached to the VPN. it can be hub/spoke for hub-spoke vpn or empty for full-mesh vpn" + }, + { + "portType": "", + "required": true, + "type": "string", + "description": "the port type of the device.1 GE, 2 FE, 3 XGE, 4 LTE, 5 xDSL(ATM), 6 xSDL(PTM)" + }, + { + "type": "string", + "required": true, + "portNumber": "", + "description": "the port number of the device" + }, + { + "type": "string", + "required": true, + "ipAddress": "", + "description": "The subnet of the LAN Port" + }, + { + "required": true, + "type": "string", + "description": "The vlan id of the lan", + "vlanId": "" + } + ] + } + ], + "sitereourcelist": [ + { + "sitewanlist": [ + { + "outputBandwidth": "", + "required": false, + "type": "string", + "description": "The output bandwidth of the WAN port" + }, + { + "required": false, + "type": "string", + "name": "", + "description": "The name of the WAN port" + }, + { + "required": false, + "type": "string", + "description": "The transport network of the WAN port", + "transportNetworkName": "" + }, + { + "deviceName": "", + "required": true, + "type": "string", + "description": "The device name in the site" + }, + { + "portType": "", + "required": true, + "type": "string", + "description": "the port type of the device.1 GE, 2 FE, 3 XGE, 4 LTE, 5 xDSL(ATM), 6 xSDL(PTM)" + }, + { + "type": "string", + "required": true, + "ipMode": "", + "description": "The ipMode of the WAN Port, DHCP/Static" + }, + { + "required": true, + "type": "string", + "providerIpAddress": "", + "description": "The provider IP address of the provider CE" + }, + { + "publicIP": "", + "required": true, + "type": "string", + "description": "The public IP of the WAN Port" + }, + { + "type": "string", + "required": true, + "apn": "", + "description": "the apn name, when the portType is LTE" + }, + { + "inputBandwidth": "", + "required": false, + "type": "string", + "description": "The input bandwidth of the WAN port" + }, + { + "type": "string", + "required": true, + "portNumber": "", + "description": "the port number of the device" + }, + { + "type": "string", + "required": true, + "ipAddress": "", + "description": "The customer IP of the WAN Port" + }, + { + "required": false, + "type": "string", + "description": "The description of the WAN port" + } + ] + }, + { + "type": "string", + "required": true, + "site_name": "", + "description": "the name of this site" + }, + { + "required": false, + "type": "string", + "site_type": "", + "description": "The gateway option is used for SDWAN connectivity" + }, + { + "site_address": "", + "required": true, + "type": "string", + "description": "the address of this site" + }, + { + "site_latitude": "", + "required": false, + "type": "string", + "description": "The latitude of the site" + }, + { + "required": false, + "type": "string", + "site_longitude": "", + "description": "The longitude of the site" + }, + { + "required": false, + "type": "string", + "description": "The control point of the site,only for sd-wan-edge", + "site_controlPoint": "" + }, + { + "deviceList": [ + { + "systemIp": "", + "required": false, + "type": "string", + "description": "The system ip of the device" + }, + { + "version": "", + "type": "string", + "description": "The version of the device", + "required": false + }, + { + "type": "string", + "required": false, + "vendor": "", + "description": "The vendor of the device" + }, + { + "required": false, + "type": "string", + "name": "", + "description": "the name of the device" + }, + { + "esn": "", + "required": false, + "type": "string", + "description": "Device serial number" + }, + { + "required": false, + "type": "string", + "description": "The type of the device" + }, + { + "required": true, + "type": "string", + "class": "", + "description": "The class should be VNF/PNF" + } + ] + }, + { + "site_description": "", + "required": false, + "type": "string", + "description": "The description of the site" + }, + { + "type": "string", + "required": false, + "site_postcode": "", + "description": "The postcode of the site" + }, + { + "required": false, + "type": "string", + "site_role": "", + "description": "This is used for SDWAN only" + }, + { + "type": "string", + "required": true, + "site_emails": "", + "description": "the emails of this site" + } + ] + }, + "pnfs": [], + "description": "", + "service": { + "type": "org.openecomp.service.Ccvpnservice", + "requirements": { + "sdwanvpnresource.sdwanvpn.dependency": [ + "SDWANVPNResource", + "sdwanvpn.dependency" + ], + "sdwanvpnresource.sitelan.device": [ + "SDWANVPNResource", + "sitelan.device" + ], + "sdwanvpnresource.sitelan.dependency": [ + "SDWANVPNResource", + "sitelan.dependency" + ], + "siteresource.site.device": [ + "siteResource", + "site.device" + ], + "siteresource.device.dependency": [ + "siteResource", + "device.dependency" + ], + "siteresource.device.device": [ + "siteResource", + "device.device" + ], + "sdwanvpnresource.sdwanvpn.device": [ + "SDWANVPNResource", + "sdwanvpn.device" + ], + "siteresource.site.dependency": [ + "siteResource", + "site.dependency" + ], + "siteresource.sitewan.dependency": [ + "siteResource", + "sitewan.dependency" + ], + "siteresource.sitewan.device": [ + "siteResource", + "sitewan.device" + ] + }, + "properties": { + "descriptor_id": "317887d3-a4e4-45cb-8971-2a78426fefac", + "designer": "", + "invariant_id": "e43f9b81-3035-44df-b618-a787e1c49427", + "name": "CCVPNService", + "verison": "" + }, + "capabilities": { + "siteresource.siteresource..VfcInstanceGroup..1.vlan_assignment": [ + "siteResource", + "siteresource..VfcInstanceGroup..1.vlan_assignment" + ], + "siteresource.siteresource..VfcInstanceGroup..0.vlan_assignment": [ + "siteResource", + "siteresource..VfcInstanceGroup..0.vlan_assignment" + ], + "sdwanvpnresource.sdwanvpn.feature": [ + "SDWANVPNResource", + "sdwanvpn.feature" + ], + "siteresource.siteresource..VfcInstanceGroup..2.vlan_assignment": [ + "siteResource", + "siteresource..VfcInstanceGroup..2.vlan_assignment" + ], + "sdwanvpnresource.sdwanvpnresource..VfcInstanceGroup..0.vlan_assignment": [ + "SDWANVPNResource", + "sdwanvpnresource..VfcInstanceGroup..0.vlan_assignment" + ], + "siteresource.sitewan.feature": [ + "siteResource", + "sitewan.feature" + ], + "sdwanvpnresource.sitelan.feature": [ + "SDWANVPNResource", + "sitelan.feature" + ], + "sdwanvpnresource.sdwanvpn.link": [ + "SDWANVPNResource", + "sdwanvpn.link" + ], + "sdwanvpnresource.sdwanvpnresource..VfcInstanceGroup..1.vlan_assignment": [ + "SDWANVPNResource", + "sdwanvpnresource..VfcInstanceGroup..1.vlan_assignment" + ], + "siteresource.device.feature": [ + "siteResource", + "device.feature" + ], + "siteresource.site.feature": [ + "siteResource", + "site.feature" + ] + }, + "metadata": { + "category": "E2E Service", + "serviceType": "", + "description": "CCVPN", + "instantiationType": "A-la-carte", + "type": "Service", + "environmentContext": "General_Revenue-Bearing", + "serviceEcompNaming": true, + "UUID": "317887d3-a4e4-45cb-8971-2a78426fefac", + "ecompGeneratedNaming": true, + "serviceRole": "", + "invariantUUID": "e43f9b81-3035-44df-b618-a787e1c49427", + "namingPolicy": "", + "name": "CCVPNService" + } + }, + "graph": { + "siteResource": [ + "SDWANVPNResource" + ], + "SDWANVPNResource": [] + }, + "basepath": "/tmp/tmpN9XQqK/Definitions", + "vnfs": [ + { + "vnf_id": "siteResource", + "description": "", + "properties": { + "sitewanlist": "", + "site_name": "", + "site_type": "", + "multi_stage_design": "false", + "site_address": "", + "site_latitude": "", + "site_longitude": "", + "site_controlPoint": "", + "vnfm_info": "", + "deviceList": "", + "site_description": "", + "site_postcode": "", + "site_role": "", + "nf_naming": { + "ecomp_generated_naming": true + }, + "skip_post_instantiation_configuration": "true", + "site_emails": "", + "id": "97559f05-ede4-4965-a94e-7d96024e9cc5", + "availability_zone_max_count": "1", + "min_instances": "1" + }, + "dependencies": [], + "networks": [], + "metadata": { + "category": "Configuration", + "subcategory": "Configuration", + "UUID": "97559f05-ede4-4965-a94e-7d96024e9cc5", + "invariantUUID": "5338673f-df81-483a-afa4-b9766442ebf1", + "name": "siteResource", + "customizationUUID": "e9e01777-bb2f-42f0-b825-aef0f4c37ccf", + "resourceVendorRelease": "1.0", + "version": "1.0", + "resourceVendor": "onap", + "resourceVendorModelNumber": "", + "type": "VF", + "description": "siteResource" + } + }, + { + "vnf_id": "SDWANVPNResource", + "description": "", + "properties": { + "sdwanvpn_topology": "", + "multi_stage_design": "false", + "min_instances": "1", + "id": "3f4b9058-362c-49e7-8095-d9019082ab54", + "sdwanvpn_name": "", + "nf_naming": { + "ecomp_generated_naming": true + }, + "skip_post_instantiation_configuration": "true", + "vnfm_info": "", + "sitelanlist": "", + "availability_zone_max_count": "1" + }, + "dependencies": [ + { + "key_name": "sdwanvpn.device", + "vl_id": "siteResource" + } + ], + "networks": [ + { + "key_name": "sdwanvpn.device", + "vl_id": "siteResource" + } + ], + "metadata": { + "category": "Configuration", + "subcategory": "Configuration", + "UUID": "3f4b9058-362c-49e7-8095-d9019082ab54", + "invariantUUID": "5ca15886-9990-419c-a4bb-f0229eac0926", + "name": "SDWANVPNResource", + "customizationUUID": "7815f32c-bdbf-41f7-9a18-6f0e6d5a0d0e", + "resourceVendorRelease": "1.0", + "version": "1.0", + "resourceVendor": "onap", + "resourceVendorModelNumber": "", + "type": "VF", + "description": "vpn resource" + } + } + ], + "vls": [], + "metadata": { + "category": "E2E Service", + "serviceType": "", + "description": "CCVPN", + "instantiationType": "A-la-carte", + "type": "Service", + "environmentContext": "General_Revenue-Bearing", + "serviceEcompNaming": true, + "UUID": "317887d3-a4e4-45cb-8971-2a78426fefac", + "ecompGeneratedNaming": true, + "serviceRole": "", + "invariantUUID": "e43f9b81-3035-44df-b618-a787e1c49427", + "namingPolicy": "", + "name": "CCVPNService" + } +}
\ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/uui-lcm_fetchNsTemplateData.json b/usecaseui-portal/src/app/mock/json/uui-lcm_fetchNsTemplateData.json new file mode 100644 index 00000000..c713902c --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-lcm_fetchNsTemplateData.json @@ -0,0 +1,354 @@ +{ + "vnffgs": [ + { + "vnffg_id": "vnffg1", + "description": "", + "members": [ + "path1", + "path2" + ], + "properties": { + "vendor": "zte", + "connection_point": [ + "m6000_data_in", + "m600_tunnel_cp", + "m6000_data_out" + ], + "version": "1.0", + "constituent_vnfs": [ + "VFW", + "VNAT" + ], + "number_of_endpoints": 3, + "dependent_virtual_link": [ + "sfc_data_network", + "ext_datanet_net", + "ext_mnet_net" + ] + } + } + ], + "inputs": { + "sfc_data_network": { + "type": "string", + "value": "sfc_data_network" + }, + "externalDataNetworkName": { + "type": "string", + "value": "vlan_4004_tunnel_net" + }, + "externalManageNetworkName": { + "type": "string", + "value": "vlan_4008_mng_net" + }, + "NatIpRange": { + "type": "string", + "value": "192.167.0.10-192.168.0.20" + }, + "externalPluginManageNetworkName": { + "type": "string", + "value": "vlan_4007_plugin_net" + } + }, + "pnfs": [ + { + "pnf_id": "m6000_s", + "cps": [], + "description": "", + "properties": { + "vendor": "zte", + "request_reclassification": " False", + "pnf_type": "m6000s", + "version": "1.0", + "management_address": "111111", + "id": "m6000_s", + "nsh_aware": "False" + } + } + ], + "fps": [ + { + "properties": { + "symmetric": "False", + "policy": { + "type": "ACL", + "criteria": { + "dest_port_range": "1-100", + "ip_protocol": "tcp", + "source_ip_range": [ + "119.1.1.1-119.1.1.10" + ], + "dest_ip_range": [ + { + "get_input": "NatIpRange" + } + ], + "dscp": 0, + "source_port_range": "1-100" + } + } + }, + "forwarder_list": [ + { + "capability": "", + "type": "cp", + "node_name": "m6000_data_out" + }, + { + "capability": "", + "type": "cp", + "node_name": "m600_tunnel_cp" + }, + { + "capability": "vnat_fw_inout", + "type": "vnf", + "node_name": "VNAT" + } + ], + "description": "", + "fp_id": "path2" + }, + { + "properties": { + "symmetric": "True", + "policy": { + "type": "ACL", + "criteria": { + "dest_port_range": "1-100", + "ip_protocol": "tcp", + "source_ip_range": [ + "1-100" + ], + "dest_ip_range": [ + "1-100" + ], + "dscp": 4, + "source_port_range": "1-100" + } + } + }, + "forwarder_list": [ + { + "capability": "", + "type": "cp", + "node_name": "m6000_data_in" + }, + { + "capability": "", + "type": "cp", + "node_name": "m600_tunnel_cp" + }, + { + "capability": "vfw_fw_inout", + "type": "vnf", + "node_name": "VFW" + }, + { + "capability": "vnat_fw_inout", + "type": "vnf", + "node_name": "VNAT" + }, + { + "capability": "", + "type": "cp", + "node_name": "m600_tunnel_cp" + }, + { + "capability": "", + "type": "cp", + "node_name": "m6000_data_out" + } + ], + "description": "", + "fp_id": "path1" + } + ], + "routers": [], + "vnfs": [ + { + "vnf_id": "VFW", + "description": "", + "properties": { + "plugin_info": "vbrasplugin_1.0", + "vendor": "zte", + "is_shared": "False", + "adjust_vnf_capacity": "True", + "name": "VFW", + "vnf_extend_type": "driver", + "csarVersion": "v1.0", + "csarType": "NFAR", + "csarProvider": "ZTE", + "version": "1.0", + "nsh_aware": "True", + "cross_dc": "False", + "vnf_type": "VFW", + "vmnumber_overquota_alarm": "True", + "vnfd_version": "1.0.0", + "externalPluginManageNetworkName": "vlan_4007_plugin_net", + "id": "vcpe_vfw_zte_1_0", + "request_reclassification": "False" + }, + "dependencies": [ + { + "key_name": "vfw_ctrl_by_manager_cp", + "vl_id": "ext_mnet_net" + }, + { + "key_name": "vfw_data_cp", + "vl_id": "sfc_data_network" + } + ], + "type": "tosca.nodes.nfv.ext.zte.VNF.VFW", + "networks": [] + } + ], + "ns_exposed": { + "external_cps": [], + "forward_cps": [] + }, + "policies": [ + { + "file_url": "policies/abc.drl", + "name": "aaa" + } + ], + "vls": [ + { + "route_id": "", + "vl_id": "ext_mnet_net", + "route_external": "False", + "description": "", + "properties": { + "name": "vlan_4008_mng_net", + "mtu": 1500, + "location_info": { + "tenant": "admin", + "vimid": 2, + "availability_zone": "nova" + }, + "ip_version": 4, + "dhcp_enabled": "True", + "network_name": "vlan_4008_mng_net", + "network_type": "vlan" + } + }, + { + "route_id": "", + "vl_id": "ext_datanet_net", + "route_external": "False", + "description": "", + "properties": { + "name": "vlan_4004_tunnel_net", + "mtu": 1500, + "location_info": { + "tenant": "admin", + "vimid": 2, + "availability_zone": "nova" + }, + "ip_version": 4, + "dhcp_enabled": "True", + "network_name": "vlan_4004_tunnel_net", + "network_type": "vlan" + } + }, + { + "route_id": "", + "vl_id": "sfc_data_network", + "route_external": "False", + "description": "", + "properties": { + "name": "sfc_data_network", + "dhcp_enabled": "True", + "is_predefined": "False", + "location_info": { + "tenant": "admin", + "vimid": 2, + "availability_zone": "nova" + }, + "ip_version": 4, + "mtu": 1500, + "network_name": "sfc_data_network", + "network_type": "vlan" + } + } + ], + "cps": [ + { + "pnf_id": "m6000_s", + "vl_id": "path2", + "description": "", + "cp_id": "m6000_data_out", + "properties": { + "direction": "bidirectional", + "vnic_type": "normal", + "bandwidth": 0, + "mac_address": "11-22-33-22-11-44", + "interface_name": "xgei-0/4/1/5", + "ip_address": "176.1.1.2", + "order": 0, + "sfc_encapsulation": "mac" + } + }, + { + "pnf_id": "m6000_s", + "vl_id": "ext_datanet_net", + "description": "", + "cp_id": "m600_tunnel_cp", + "properties": { + "direction": "bidirectional", + "vnic_type": "normal", + "bandwidth": 0, + "mac_address": "00-11-00-22-33-00", + "interface_name": "gei-0/4/0/13", + "ip_address": "191.167.100.5", + "order": 0, + "sfc_encapsulation": "mac" + } + }, + { + "pnf_id": "m6000_s", + "vl_id": "path2", + "description": "", + "cp_id": "m6000_data_in", + "properties": { + "direction": "bidirectional", + "vnic_type": "normal", + "bandwidth": 0, + "mac_address": "11-22-33-22-11-41", + "interface_name": "gei-0/4/0/7", + "ip_address": "1.1.1.1", + "order": 0, + "sfc_encapsulation": "mac", + "bond": "none" + } + }, + { + "pnf_id": "m6000_s", + "vl_id": "ext_mnet_net", + "description": "", + "cp_id": "m600_mnt_cp", + "properties": { + "direction": "bidirectional", + "vnic_type": "normal", + "bandwidth": 0, + "mac_address": "00-11-00-22-33-11", + "interface_name": "gei-0/4/0/1", + "ip_address": "10.46.244.51", + "order": 0, + "sfc_encapsulation": "mac", + "bond": "none" + } + } + ], + "metadata": { + "invariant_id": "vcpe_ns_sff_1", + "name": "VCPE_NS", + "csarVersion": "v1.0", + "csarType": "NSAR", + "csarProvider": "ZTE", + "version": 1, + "vendor": "ZTE", + "id": "VCPE_NS", + "description": "vcpe_ns" + } +}
\ No newline at end of file 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_instantiateNetworkServiceInstance.json b/usecaseui-portal/src/app/mock/json/uui-lcm_instantiateNetworkServiceInstance.json new file mode 100644 index 00000000..f1fcc0d5 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-lcm_instantiateNetworkServiceInstance.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/json/uui-lcm_jobs_progress.json b/usecaseui-portal/src/app/mock/json/uui-lcm_jobs_progress.json new file mode 100644 index 00000000..b854660c --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-lcm_jobs_progress.json @@ -0,0 +1,5 @@ +{
+ "responseDescriptor":{
+ "progress": "100"
+ }
+}
\ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/uui-lcm_listNsTemplates.json b/usecaseui-portal/src/app/mock/json/uui-lcm_listNsTemplates.json new file mode 100644 index 00000000..0f5e834d --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-lcm_listNsTemplates.json @@ -0,0 +1,67 @@ +[ + { + "csarId":"cab8eb0f-9a89-4f54-ba3d-d76d4b829f52", + "packageInfo":{ + "nsdInvariantId":null, + "csarName":null, + "nsdProvider":null, + "nsdId":null, + "nsPackageId":"cab8eb0f-9a89-4f54-ba3d-d76d4b829f52", + "downloadUrl":"http://msb-iag:8806/static/catalog/cab8eb0f-9a89-4f54-ba3d-d76d4b829f52/None", + "nsdModel":null, + "nsdVersion":null + } + }, + { + "csarId":"d0a6bd37-10dc-4e6f-8153-2cc23be27c81", + "packageInfo":{ + "nsdInvariantId":null, + "csarName":null, + "nsdProvider":null, + "nsdId":null, + "nsPackageId":"d0a6bd37-10dc-4e6f-8153-2cc23be27c81", + "downloadUrl":"http://msb-iag:8806/static/catalog/d0a6bd37-10dc-4e6f-8153-2cc23be27c81/None", + "nsdModel":null, + "nsdVersion":null + } + }, + { + "csarId":"d5d678dc-80ef-461e-8630-d105f43b0a18", + "packageInfo":{ + "nsdInvariantId":"c5ea12d4-1ca6-48d0-9302-a3962c15b536", + "csarName":"/service/vfc/nfvo/catalog/static/catalog/d5d678dc-80ef-461e-8630-d105f43b0a18/ns-vsn.csar", + "nsdProvider":"ONAP", + "nsdId":"2c1d41de-40bd-4580-a834-115df4bbcafd", + "nsPackageId":"d5d678dc-80ef-461e-8630-d105f43b0a18", + "downloadUrl":"http://msb-iag:8806/static/catalog/d5d678dc-80ef-461e-8630-d105f43b0a18//service/vfc/nfvo/catalog/static/catalog/d5d678dc-80ef-461e-8630-d105f43b0a18/ns-vsn.csar", + "nsdModel":".....", + "nsdVersion":"1.0.0" + } + }, + { + "csarId":"e53586ef-f30f-4824-a319-c4070a559341", + "packageInfo":{ + "nsdInvariantId":null, + "csarName":null, + "nsdProvider":null, + "nsdId":null, + "nsPackageId":"e53586ef-f30f-4824-a319-c4070a559341", + "downloadUrl":"http://msb-iag:8806/static/catalog/e53586ef-f30f-4824-a319-c4070a559341/None", + "nsdModel":null, + "nsdVersion":null + } + }, + { + "csarId":"ecb2b6e4-435d-453c-b280-850cf5c2f96a", + "packageInfo":{ + "nsdInvariantId":null, + "csarName":null, + "nsdProvider":null, + "nsdId":null, + "nsPackageId":"ecb2b6e4-435d-453c-b280-850cf5c2f96a", + "downloadUrl":"http://msb-iag:8806/static/catalog/ecb2b6e4-435d-453c-b280-850cf5c2f96a/None", + "nsdModel":null, + "nsdVersion":null + } + } +]
\ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/uui-lcm_locations.json b/usecaseui-portal/src/app/mock/json/uui-lcm_locations.json new file mode 100644 index 00000000..5cce8064 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-lcm_locations.json @@ -0,0 +1,18 @@ +[ + { + "cloud-owner": "City B", + "cloud-region-id": "Edge_TIC01" + }, + { + "cloud-owner": "City A", + "cloud-region-id": "Core_TIC01" + }, + { + "cloud-owner": "City D", + "cloud-region-id": "Edge_TIC01" + }, + { + "cloud-owner": "City C", + "cloud-region-id": "Edge_TIC01" + } +] diff --git a/usecaseui-portal/src/app/mock/json/uui-lcm_orchestrators.json b/usecaseui-portal/src/app/mock/json/uui-lcm_orchestrators.json new file mode 100644 index 00000000..46ff52b9 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-lcm_orchestrators.json @@ -0,0 +1,17 @@ +[ + { + "name": "cmcc" + }, + { + "name": "liantong" + }, + { + "name": "ATT" + }, + { + "name": "huawei" + }, + { + "name": "ZMT" + } +]
\ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/uui-lcm_sdc-ns-packages.json b/usecaseui-portal/src/app/mock/json/uui-lcm_sdc-ns-packages.json new file mode 100644 index 00000000..29f12d5b --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-lcm_sdc-ns-packages.json @@ -0,0 +1,58 @@ +[
+ {
+ "uuid": "u01",
+ "invariantUUID": "01",
+ "name": "sdc",
+ "version": "v01",
+ "toscaModelURL": "ssURL",
+ "category": "sdc_ns"
+ },
+ {
+ "uuid": "u02",
+ "invariantUUID": "02",
+ "name": "sdc",
+ "version": "v02",
+ "toscaModelURL": "ssURL",
+ "category": "sdc_ns"
+ },
+ {
+ "uuid": "u03",
+ "invariantUUID": "03",
+ "name": "sdc",
+ "version": "v03",
+ "toscaModelURL": "ssURL",
+ "category": "sdc_ns"
+ },
+ {
+ "uuid": "u03",
+ "invariantUUID": "04",
+ "name": "sdc",
+ "version": "v03",
+ "toscaModelURL": "ssURL",
+ "category": "sdc_ns"
+ },
+ {
+ "uuid": "u03",
+ "invariantUUID": "05",
+ "name": "sdc",
+ "version": "v03",
+ "toscaModelURL": "ssURL",
+ "category": "sdc_ns"
+ },
+ {
+ "uuid": "u03",
+ "invariantUUID": "06",
+ "name": "sdc",
+ "version": "v03",
+ "toscaModelURL": "ssURL",
+ "category": "sdc_ns"
+ },
+ {
+ "uuid": "u03",
+ "invariantUUID": "03",
+ "name": "sdc",
+ "version": "v03",
+ "toscaModelURL": "ssURL",
+ "category": "sdc_ns"
+ }
+]
\ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/uui-lcm_sdc-vf-packages.json b/usecaseui-portal/src/app/mock/json/uui-lcm_sdc-vf-packages.json new file mode 100644 index 00000000..428bc0ff --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-lcm_sdc-vf-packages.json @@ -0,0 +1,26 @@ +[
+ {
+ "uuid": "vnf01",
+ "invariantUUID": "01",
+ "name": "sdc",
+ "version": "v01",
+ "toscaModelURL": "ssURL",
+ "category": "sdc_vnf"
+ },
+ {
+ "uuid": "vnf02",
+ "invariantUUID": "02",
+ "name": "sdc",
+ "version": "v02",
+ "toscaModelURL": "ssURL",
+ "category": "sdc_vnf"
+ },
+ {
+ "uuid": "vnf03",
+ "invariantUUID": "03",
+ "name": "sdc",
+ "version": "v03",
+ "toscaModelURL": "ssURL",
+ "category": "sdc_vnf"
+ }
+]
\ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/uui-lcm_sdnc-controllers.json b/usecaseui-portal/src/app/mock/json/uui-lcm_sdnc-controllers.json new file mode 100644 index 00000000..fdd71f5e --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-lcm_sdnc-controllers.json @@ -0,0 +1,10 @@ +[ + { + "thirdparty-sdnc-id": "shdhcdfefgegf", + "location":"xxx" + }, + { + "thirdparty-sdnc-id": "ddfgegergegsdfe", + "location":"xxx" + } +] diff --git a/usecaseui-portal/src/app/mock/json/uui-lcm_service-instances.json b/usecaseui-portal/src/app/mock/json/uui-lcm_service-instances.json new file mode 100644 index 00000000..45258409 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-lcm_service-instances.json @@ -0,0 +1,1420 @@ +{ + "total":20, + "tableList":[ + { + "relationship-list":{ + "relationship":[ + { + "related-to":"generic-vnf", + "relationship-data":[ + {"relationship-value":"0d5f0833-fcad-45f3-a18c-8a760f6314dd","relationship-key":"generic-vnf.vnf-id"} + ], + "related-link":"/aai/v13/network/generic-vnfs/generic-vnf/0d5f0833-fcad-45f3-a18c-8a760f6314dd", + "relationship-label":"org.onap.relationships.inventory.ComposedOf", + "related-to-property":[ + {"property-key":"generic-vnf.vnf-name","property-value":"vnf45711f40_3ceb6cee8_7584_41f"} + ] + } + ] + }, + "service-instance-id":"4bffe5f7-fbe1-4601-b4a5-fdcf196df50b", + "resource-version":"1542715122002", + "operationResult":"2002", + "operationType":"1004", + "service-type":"NetworkService", + "operationId":"NS-NS_INST-4bffe5f7-fbe1-4601-b4a5-fdcf196df50b-a01371f2-ecbb-11e8-9815-02bf457d2df2", + "service-role":"NetworkService", + "childServiceInstances":[], + "service-instance-name":"nsService44", + "serviceDomain":"Network Service" + }, + + { + "service-instance-id": "32cd906f-ee7a-4ecf-b1c3-2fce4d59f803", + "service-instance-name": "SOTNVPNInfra", + "operationResult":"2002", + "operationType":"1001", + "operationId":"xxxxxxx", + "serviceDomain":"SOTN", + "childServiceInstances":[ + { + "service-instance-id": "289b87a5-72fe-4197-a307-6929c3831f82", + "service-instance-name": "SiteLondonDC", + "serviceDomain":"SITE", + "service-type": "E2E Service", + "service-role": "E2E Service", + "model-invariant-id": "5c13f3fb-2744-4635-9f1f-c59c92dc8f70", + "model-version-id": "3a76b1f5-fb0d-4b6b-82d5-0e8a4ebc3838", + "resource-version": "1535686481928", + "input-parameters": "{\n \"service\":{\n \"name\":\"SiteService\",\n \"description\":\"SiteService\",\n \"serviceInvariantUuid\":\"5c13f3fb-2744-4635-9f1f-c59c92dc8f70\",\n \"serviceUuid\":\"3a76b1f5-fb0d-4b6b-82d5-0e8a4ebc3838\",\n \"globalSubscriberId\":\"Demonstration\",\n \"serviceType\":\"CCVPN\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n {\n \"resourceName\":\"SiteVF\",\n \"resourceInvariantUuid\":\"0c0e1cbe-6e01-4f9e-8c45-a9700ebc14df\",\n \"resourceUuid\":\"4ad2d390-5c51-45f5-9710-b467a4ec7a73\",\n \"resourceCustomizationUuid\":\"66590e07-0777-415c-af44-36347cf3ddd3\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"mpls\",\n \"resourceInvariantUuid\":\"97a3e552-08c4-4697-aeeb-d8d3e09ce58e\",\n \"resourceUuid\":\"63d8e1af-32dc-4c71-891d-e3f7b6a976d2\",\n \"resourceCustomizationUuid\":\"205456e7-3dc0-40c4-8cb0-28e6c1877042\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"deviceVF\",\n \"resourceInvariantUuid\":\"c726490a-0ce2-4bc7-abea-dade66bfb13d\",\n \"resourceUuid\":\"0e2de9d8-d76b-4134-b5f1-41e79056adbe\",\n \"resourceCustomizationUuid\":\"5bc1373e-9a36-4a00-8c62-784e0bc417ad\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"sdwanvpnattachmentVF\",\n \"resourceInvariantUuid\":\"f714feec-1aef-4890-abba-f8f3a906935f\",\n \"resourceUuid\":\"709919b7-75fd-4e49-8398-67853323ff55\",\n \"resourceCustomizationUuid\":\"debd988f-fe04-4940-a5cb-37f61d84eab4\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"internet\",\n \"resourceInvariantUuid\":\"97a3e552-08c4-4697-aeeb-d8d3e09ce58e\",\n \"resourceUuid\":\"63d8e1af-32dc-4c71-891d-e3f7b6a976d2\",\n \"resourceCustomizationUuid\":\"64b8e8ba-62b9-4db6-b420-1ca7067d63e0\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"sotnvpnattachmentvF\",\n \"resourceInvariantUuid\":\"97c4a3c6-2943-41af-8717-2f3183f944be\",\n \"resourceUuid\":\"44b777ee-9793-465d-8053-d8e86d2e2362\",\n \"resourceCustomizationUuid\":\"37aeb073-c75d-4cf6-a7fa-a1af862ef58a\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"SPPartnerVF\",\n \"resourceInvariantUuid\":\"072f9238-15b0-4bc5-a5f5-f18548739470\",\n \"resourceUuid\":\"81b9430b-8abe-45d6-8bf9-f41a8f5c735f\",\n \"resourceCustomizationUuid\":\"cd0b4b9c-66c6-49c5-b346-7580e4b6c394\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n }\n ],\n \"requestInputs\":{\n \"devicevf_device_class\":\"PNF\",\n \"devicevf_device_esn\":\"2102351BTJ10HB000075\",\n \"devicevf_device_name\":\"50.47\",\n \"devicevf_device_systemIp\":\"192.168.1.47\",\n \"devicevf_device_type\":\"AR161EW\",\n \"devicevf_device_vendor\":\"huawei\",\n \"devicevf_device_version\":\"1.0\",\n \"internet_sitewanport_description\":\"internet\",\n \"internet_sitewanport_deviceName\":\"50.47\",\n \"internet_sitewanport_inputBandwidth\":\"100\",\n \"internet_sitewanport_ipAddress\":\"100.2.30.9\",\n \"internet_sitewanport_name\":\"internet\",\n \"internet_sitewanport_outputBandwidth\":\"100\",\n \"internet_sitewanport_portNumber\":\"0/0/2\",\n \"internet_sitewanport_portType\":\"GE\",\n \"internet_sitewanport_providerIpAddress\":\"100.2.30.10\",\n \"internet_sitewanport_transportNetworkName\":\"internet\",\n \"mpls_sitewanport_description\":\"mpls\",\n \"mpls_sitewanport_deviceName\":\"50.47\",\n \"mpls_sitewanport_inputBandwidth\":\"100\",\n \"mpls_sitewanport_ipAddress\":\"10.2.30.7\",\n \"mpls_sitewanport_name\":\"mpls\",\n \"mpls_sitewanport_outputBandwidth\":\"100\",\n \"mpls_sitewanport_portNumber\":\"0/0/1\",\n \"mpls_sitewanport_portType\":\"GE\",\n \"mpls_sitewanport_providerIpAddress\":\"10.2.30.8\",\n \"mpls_sitewanport_transportNetworkName\":\"internet\",\n \"sdwanvpnattachmentvf_sdwancondition_role\":\"spoke\",\n \"sdwanvpnattachmentvf_sdwancondition_sdwanVpnName\":\"CMCCVPN\",\n \"sitevf_site_address\":\"beijing beiqing road\",\n \"sitevf_site_controlPoint\":\"CMCC_VCPE\",\n \"sitevf_site_description\":\"CMCC_CPE\",\n \"sitevf_site_emails\":\"\",\n \"sitevf_site_latitude\":\"\",\n \"sitevf_site_longitude\":\"\",\n \"sitevf_site_name\":\"CMCC_CPE3\",\n \"sitevf_site_postcode\":\"100095\",\n \"sitevf_site_role\":\"sd-wan-edge\",\n \"sitevf_site_type\":\"single-gateway\",\n \"sotnvpnattachmentvf_sotncondition_clientSignal\":\"\",\n \"sotnvpnattachmentvf_sotncondition_cVLAN\":\"\",\n \"sotnvpnattachmentvf_sotncondition_sotnVpnName\":\"SOTN L2\"\n }\n }\n }\n}", + "relationship-list": { + "relationship": [ + { + "related-to": "sp-partner", + "relationship-label": "org.onap.relationships.inventory.PartOf", + "related-link": "/aai/v13/business/sp-partners/sp-partner/1b9c677d-fddf-4b70-938b-925a7fa57d44", + "relationship-data": [ + { + "relationship-key": "sp-partner.sp-partner-id", + "relationship-value": "1b9c677d-fddf-4b70-938b-925a7fa57d44" + } + ], + "related-to-property": [ + { + "property-key": "sp-partner.sp-partner-id", + "property-value": "1b9c677d-fddf-4b70-938b-925a7fa57d44" + } + ] + } + ] + } + }, + { + "service-instance-id": "389b87a5-72fe-4197-a307-6929c3831f83", + "service-instance-name": "SiteLondon", + "serviceDomain":"SITE", + "service-type": "E2E Service", + "service-role": "E2E Service", + "model-invariant-id": "5c13f3fb-2744-4635-9f1f-c59c92dc8f70", + "model-version-id": "3a76b1f5-fb0d-4b6b-82d5-0e8a4ebc3838", + "resource-version": "1535686521672", + "input-parameters": "{\n \"service\":{\n \"name\":\"SiteService\",\n \"description\":\"SiteService\",\n \"serviceInvariantUuid\":\"5c13f3fb-2744-4635-9f1f-c59c92dc8f70\",\n \"serviceUuid\":\"3a76b1f5-fb0d-4b6b-82d5-0e8a4ebc3838\",\n \"globalSubscriberId\":\"Demonstration\",\n \"serviceType\":\"CCVPN\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n {\n \"resourceName\":\"SiteVF\",\n \"resourceInvariantUuid\":\"0c0e1cbe-6e01-4f9e-8c45-a9700ebc14df\",\n \"resourceUuid\":\"4ad2d390-5c51-45f5-9710-b467a4ec7a73\",\n \"resourceCustomizationUuid\":\"66590e07-0777-415c-af44-36347cf3ddd3\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"mpls\",\n \"resourceInvariantUuid\":\"97a3e552-08c4-4697-aeeb-d8d3e09ce58e\",\n \"resourceUuid\":\"63d8e1af-32dc-4c71-891d-e3f7b6a976d2\",\n \"resourceCustomizationUuid\":\"205456e7-3dc0-40c4-8cb0-28e6c1877042\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"deviceVF\",\n \"resourceInvariantUuid\":\"c726490a-0ce2-4bc7-abea-dade66bfb13d\",\n \"resourceUuid\":\"0e2de9d8-d76b-4134-b5f1-41e79056adbe\",\n \"resourceCustomizationUuid\":\"5bc1373e-9a36-4a00-8c62-784e0bc417ad\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"sdwanvpnattachmentVF\",\n \"resourceInvariantUuid\":\"f714feec-1aef-4890-abba-f8f3a906935f\",\n \"resourceUuid\":\"709919b7-75fd-4e49-8398-67853323ff55\",\n \"resourceCustomizationUuid\":\"debd988f-fe04-4940-a5cb-37f61d84eab4\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"internet\",\n \"resourceInvariantUuid\":\"97a3e552-08c4-4697-aeeb-d8d3e09ce58e\",\n \"resourceUuid\":\"63d8e1af-32dc-4c71-891d-e3f7b6a976d2\",\n \"resourceCustomizationUuid\":\"64b8e8ba-62b9-4db6-b420-1ca7067d63e0\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"sotnvpnattachmentvF\",\n \"resourceInvariantUuid\":\"97c4a3c6-2943-41af-8717-2f3183f944be\",\n \"resourceUuid\":\"44b777ee-9793-465d-8053-d8e86d2e2362\",\n \"resourceCustomizationUuid\":\"37aeb073-c75d-4cf6-a7fa-a1af862ef58a\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"SPPartnerVF\",\n \"resourceInvariantUuid\":\"072f9238-15b0-4bc5-a5f5-f18548739470\",\n \"resourceUuid\":\"81b9430b-8abe-45d6-8bf9-f41a8f5c735f\",\n \"resourceCustomizationUuid\":\"cd0b4b9c-66c6-49c5-b346-7580e4b6c394\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n }\n ],\n \"requestInputs\":{\n \"devicevf_device_class\":\"PNF\",\n \"devicevf_device_esn\":\"2102351BTJ10HB000075\",\n \"devicevf_device_name\":\"50.47\",\n \"devicevf_device_systemIp\":\"192.168.1.47\",\n \"devicevf_device_type\":\"AR161EW\",\n \"devicevf_device_vendor\":\"huawei\",\n \"devicevf_device_version\":\"1.0\",\n \"internet_sitewanport_description\":\"internet\",\n \"internet_sitewanport_deviceName\":\"50.47\",\n \"internet_sitewanport_inputBandwidth\":\"100\",\n \"internet_sitewanport_ipAddress\":\"100.2.30.9\",\n \"internet_sitewanport_name\":\"internet\",\n \"internet_sitewanport_outputBandwidth\":\"100\",\n \"internet_sitewanport_portNumber\":\"0/0/2\",\n \"internet_sitewanport_portType\":\"GE\",\n \"internet_sitewanport_providerIpAddress\":\"100.2.30.10\",\n \"internet_sitewanport_transportNetworkName\":\"internet\",\n \"mpls_sitewanport_description\":\"mpls\",\n \"mpls_sitewanport_deviceName\":\"50.47\",\n \"mpls_sitewanport_inputBandwidth\":\"100\",\n \"mpls_sitewanport_ipAddress\":\"10.2.30.7\",\n \"mpls_sitewanport_name\":\"mpls\",\n \"mpls_sitewanport_outputBandwidth\":\"100\",\n \"mpls_sitewanport_portNumber\":\"0/0/1\",\n \"mpls_sitewanport_portType\":\"GE\",\n \"mpls_sitewanport_providerIpAddress\":\"10.2.30.8\",\n \"mpls_sitewanport_transportNetworkName\":\"internet\",\n \"sdwanvpnattachmentvf_sdwancondition_role\":\"spoke\",\n \"sdwanvpnattachmentvf_sdwancondition_sdwanVpnName\":\"CMCCVPN\",\n \"sitevf_site_address\":\"beijing beiqing road\",\n \"sitevf_site_controlPoint\":\"CMCC_VCPE\",\n \"sitevf_site_description\":\"CMCC_CPE\",\n \"sitevf_site_emails\":\"\",\n \"sitevf_site_latitude\":\"\",\n \"sitevf_site_longitude\":\"\",\n \"sitevf_site_name\":\"CMCC_CPE4\",\n \"sitevf_site_postcode\":\"100095\",\n \"sitevf_site_role\":\"sd-wan-edge\",\n \"sitevf_site_type\":\"single-gateway\",\n \"sotnvpnattachmentvf_sotncondition_clientSignal\":\"\",\n \"sotnvpnattachmentvf_sotncondition_cVLAN\":\"\",\n \"sotnvpnattachmentvf_sotncondition_sotnVpnName\":\"SOTN L2\"\n }\n }\n }\n}", + "relationship-list": { + "relationship": [ + { + "related-to": "sp-partner", + "relationship-label": "org.onap.relationships.inventory.PartOf", + "related-link": "/aai/v13/business/sp-partners/sp-partner/1b9c677d-fddf-4b70-938b-925a7fa57d55", + "relationship-data": [ + { + "relationship-key": "sp-partner.sp-partner-id", + "relationship-value": "1b9c677d-fddf-4b70-938b-925a7fa57d55" + } + ], + "related-to-property": [ + { + "property-key": "sp-partner.sp-partner-id", + "property-value": "1b9c677d-fddf-4b70-938b-925a7fa57d55" + } + ] + } + ] + } + } + ], + "service-type": "E2E Service", + "service-role": "E2E Service", + "model-invariant-id": "21886a96-0664-47a3-beae-766952f2059f", + "model-version-id": "54836196-c411-4690-af98-900c1c3aadd7", + "resource-version": "1535685742159", + "input-parameters": "{\n \"service\":{\n \"name\":\"SOTNVPNInfra\",\n \"description\":\"SOTNVPNInfra\",\n \"serviceInvariantUuid\":\"21886a96-0664-47a3-beae-766952f2059f\",\n \"serviceUuid\":\"54836196-c411-4690-af98-900c1c3aadd7\",\n \"globalSubscriberId\":\"Demonstration\",\n \"serviceType\":\"CCVPN\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n {\n \"resourceName\":\"SOTNConnectivity 0\",\n \"resourceInvariantUuid\":\"1b9c677d-fddf-4b70-938b-925a7fa57d43\",\n \"resourceUuid\":\"218df3c3-50dd-4c26-9e36-4771387bb771\",\n \"resourceCustomizationUuid\":\"b44071c8-04fd-4d6b-b6af-772cbfaa1129\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"SPPartnerVF 0\",\n \"resourceInvariantUuid\":\"072f9238-15b0-4bc5-a5f5-f18548739470\",\n \"resourceUuid\":\"81b9430b-8abe-45d6-8bf9-f41a8f5c735f\",\n \"resourceCustomizationUuid\":\"c3612284-6c67-4d8c-8b41-b699cc90e76d\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n }\n ],\n \"requestInputs\":{\n \"sotnconnectivity0_eir\":\"1000\",\n \"sotnconnectivity0_cir\":\"1000\",\n \"sotnconnectivity0_endTime\":\"2018-8-8 10:00\",\n \"sotnconnectivity0_ebs\":\"1000\",\n \"sotnconnectivity0_startTime\":\"2018-8-1 10:00\",\n \"sotnconnectivity0_dualLink\":\"true\",\n \"sotnconnectivity0_reroute\":\"false\",\n \"sotnconnectivity0_cbs\":\"1000\",\n \"sotnconnectivity0_name\":\"SOTN L2\",\n \"sotnconnectivity0_SLS\":\"\",\n \"sotnconnectivity0_description\":\"\",\n \"sotnconnectivity0_couplingFlag\":\"\",\n \"sotnconnectivity0_colorAware\":\"\",\n \"sotnconnectivity0_COS\":\"standard\"\n }\n }\n }\n}", + "relationship-list": { + "relationship": [ + { + "related-to": "sp-partner", + "relationship-label": "org.onap.relationships.inventory.PartOf", + "related-link": "/aai/v13/business/sp-partners/sp-partner/1b9c677d-fddf-4b70-938b-925a7fa57d99", + "relationship-data": [ + { + "relationship-key": "sp-partner.sp-partner-id", + "relationship-value": "1b9c677d-fddf-4b70-938b-925a7fa57d99" + } + ], + "related-to-property": [ + { + "property-key": "sp-partner.sp-partner-id", + "property-value": "1b9c677d-fddf-4b70-938b-925a7fa57d99" + } + ] + }, + { + "related-to": "connectivity", + "relationship-label": "org.onap.relationships.inventory.PartOf", + "related-link": "/aai/v13/network/connectivities/connectivity/4efe6dff-acfc-4d13-a3fd-1177d3c08e84", + "relationship-data": [ + { + "relationship-key": "connectivity.connectivity-id", + "relationship-value": "4efe6dff-acfc-4d13-a3fd-1177d3c08e84" + } + ], + "related-to-property": [ + { + "property-key": "connectivity.etht-svc-name", + "property-value": "SOTNVPNInfra" + } + ] + }, + { + "related-to": "allotted-resource", + "relationship-label": "org.onap.relationships.inventory.Uses", + "related-link": "/aai/v13/business/customers/customer/Democcy/service-subscriptions/service-subscription/CCVPN/service-instances/service-instance/189b87a5-72fe-4197-a307-6929c3831f81/allotted-resources/allotted-resource/bb14feec-1aef-4890-abba-f8f3a906935f", + "relationship-data": [ + { + "relationship-key": "customer.global-customer-id", + "relationship-value": "Democcy" + }, + { + "relationship-key": "service-subscription.service-type", + "relationship-value": "CCVPN" + }, + { + "relationship-key": "service-instance.service-instance-id", + "relationship-value": "189b87a5-72fe-4197-a307-6929c3831f81" + }, + { + "relationship-key": "allotted-resource.id", + "relationship-value": "bb14feec-1aef-4890-abba-f8f3a906935f" + } + ], + "related-to-property": [ + { + "property-key": "allotted-resource.description", + "property-value": "bb14feec-1aef-4890-abba-f8f3a906935f" + }, + { + "property-key": "allotted-resource.allotted-resource-name", + "property-value": "ston ar" + } + ] + }, + { + "related-to": "allotted-resource", + "relationship-label": "org.onap.relationships.inventory.Uses", + "related-link": "/aai/v13/business/customers/customer/Democcy/service-subscriptions/service-subscription/CCVPN/service-instances/service-instance/089b87a5-72fe-4197-a307-6929c3831f80/allotted-resources/allotted-resource/aa14feec-1aef-4890-abba-f8f3a906935f", + "relationship-data": [ + { + "relationship-key": "customer.global-customer-id", + "relationship-value": "Democcy" + }, + { + "relationship-key": "service-subscription.service-type", + "relationship-value": "CCVPN" + }, + { + "relationship-key": "service-instance.service-instance-id", + "relationship-value": "089b87a5-72fe-4197-a307-6929c3831f80" + }, + { + "relationship-key": "allotted-resource.id", + "relationship-value": "aa14feec-1aef-4890-abba-f8f3a906935f" + } + ], + "related-to-property": [ + { + "property-key": "allotted-resource.description", + "property-value": "aa14feec-1aef-4890-abba-f8f3a906935f" + }, + { + "property-key": "allotted-resource.allotted-resource-name", + "property-value": "ston ar" + } + ] + } + ] + } + }, + + { + "service-instance-id": "32cd906f-ee7a-4ecf-b1c3-2fce4d59f8ad", + "service-instance-name": "SOTNVPNInfra", + "operationResult":"2003", + "operationType":"1001", + "operationId":"xxxxxxx", + "serviceDomain":"SOTN", + "childServiceInstances":[ + { + "service-instance-id": "289b87a5-72fe-4197-a307-6929c3831f82", + "service-instance-name": "SiteLondonDC", + "serviceDomain":"SITE", + "service-type": "E2E Service", + "service-role": "E2E Service", + "model-invariant-id": "5c13f3fb-2744-4635-9f1f-c59c92dc8f70", + "model-version-id": "3a76b1f5-fb0d-4b6b-82d5-0e8a4ebc3838", + "resource-version": "1535686481928", + "input-parameters": "{\n \"service\":{\n \"name\":\"SiteService\",\n \"description\":\"SiteService\",\n \"serviceInvariantUuid\":\"5c13f3fb-2744-4635-9f1f-c59c92dc8f70\",\n \"serviceUuid\":\"3a76b1f5-fb0d-4b6b-82d5-0e8a4ebc3838\",\n \"globalSubscriberId\":\"Demonstration\",\n \"serviceType\":\"CCVPN\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n {\n \"resourceName\":\"SiteVF\",\n \"resourceInvariantUuid\":\"0c0e1cbe-6e01-4f9e-8c45-a9700ebc14df\",\n \"resourceUuid\":\"4ad2d390-5c51-45f5-9710-b467a4ec7a73\",\n \"resourceCustomizationUuid\":\"66590e07-0777-415c-af44-36347cf3ddd3\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"mpls\",\n \"resourceInvariantUuid\":\"97a3e552-08c4-4697-aeeb-d8d3e09ce58e\",\n \"resourceUuid\":\"63d8e1af-32dc-4c71-891d-e3f7b6a976d2\",\n \"resourceCustomizationUuid\":\"205456e7-3dc0-40c4-8cb0-28e6c1877042\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"deviceVF\",\n \"resourceInvariantUuid\":\"c726490a-0ce2-4bc7-abea-dade66bfb13d\",\n \"resourceUuid\":\"0e2de9d8-d76b-4134-b5f1-41e79056adbe\",\n \"resourceCustomizationUuid\":\"5bc1373e-9a36-4a00-8c62-784e0bc417ad\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"sdwanvpnattachmentVF\",\n \"resourceInvariantUuid\":\"f714feec-1aef-4890-abba-f8f3a906935f\",\n \"resourceUuid\":\"709919b7-75fd-4e49-8398-67853323ff55\",\n \"resourceCustomizationUuid\":\"debd988f-fe04-4940-a5cb-37f61d84eab4\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"internet\",\n \"resourceInvariantUuid\":\"97a3e552-08c4-4697-aeeb-d8d3e09ce58e\",\n \"resourceUuid\":\"63d8e1af-32dc-4c71-891d-e3f7b6a976d2\",\n \"resourceCustomizationUuid\":\"64b8e8ba-62b9-4db6-b420-1ca7067d63e0\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"sotnvpnattachmentvF\",\n \"resourceInvariantUuid\":\"97c4a3c6-2943-41af-8717-2f3183f944be\",\n \"resourceUuid\":\"44b777ee-9793-465d-8053-d8e86d2e2362\",\n \"resourceCustomizationUuid\":\"37aeb073-c75d-4cf6-a7fa-a1af862ef58a\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"SPPartnerVF\",\n \"resourceInvariantUuid\":\"072f9238-15b0-4bc5-a5f5-f18548739470\",\n \"resourceUuid\":\"81b9430b-8abe-45d6-8bf9-f41a8f5c735f\",\n \"resourceCustomizationUuid\":\"cd0b4b9c-66c6-49c5-b346-7580e4b6c394\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n }\n ],\n \"requestInputs\":{\n \"devicevf_device_class\":\"PNF\",\n \"devicevf_device_esn\":\"2102351BTJ10HB000075\",\n \"devicevf_device_name\":\"50.47\",\n \"devicevf_device_systemIp\":\"192.168.1.47\",\n \"devicevf_device_type\":\"AR161EW\",\n \"devicevf_device_vendor\":\"huawei\",\n \"devicevf_device_version\":\"1.0\",\n \"internet_sitewanport_description\":\"internet\",\n \"internet_sitewanport_deviceName\":\"50.47\",\n \"internet_sitewanport_inputBandwidth\":\"100\",\n \"internet_sitewanport_ipAddress\":\"100.2.30.9\",\n \"internet_sitewanport_name\":\"internet\",\n \"internet_sitewanport_outputBandwidth\":\"100\",\n \"internet_sitewanport_portNumber\":\"0/0/2\",\n \"internet_sitewanport_portType\":\"GE\",\n \"internet_sitewanport_providerIpAddress\":\"100.2.30.10\",\n \"internet_sitewanport_transportNetworkName\":\"internet\",\n \"mpls_sitewanport_description\":\"mpls\",\n \"mpls_sitewanport_deviceName\":\"50.47\",\n \"mpls_sitewanport_inputBandwidth\":\"100\",\n \"mpls_sitewanport_ipAddress\":\"10.2.30.7\",\n \"mpls_sitewanport_name\":\"mpls\",\n \"mpls_sitewanport_outputBandwidth\":\"100\",\n \"mpls_sitewanport_portNumber\":\"0/0/1\",\n \"mpls_sitewanport_portType\":\"GE\",\n \"mpls_sitewanport_providerIpAddress\":\"10.2.30.8\",\n \"mpls_sitewanport_transportNetworkName\":\"internet\",\n \"sdwanvpnattachmentvf_sdwancondition_role\":\"spoke\",\n \"sdwanvpnattachmentvf_sdwancondition_sdwanVpnName\":\"CMCCVPN\",\n \"sitevf_site_address\":\"beijing beiqing road\",\n \"sitevf_site_controlPoint\":\"CMCC_VCPE\",\n \"sitevf_site_description\":\"CMCC_CPE\",\n \"sitevf_site_emails\":\"\",\n \"sitevf_site_latitude\":\"\",\n \"sitevf_site_longitude\":\"\",\n \"sitevf_site_name\":\"CMCC_CPE3\",\n \"sitevf_site_postcode\":\"100095\",\n \"sitevf_site_role\":\"sd-wan-edge\",\n \"sitevf_site_type\":\"single-gateway\",\n \"sotnvpnattachmentvf_sotncondition_clientSignal\":\"\",\n \"sotnvpnattachmentvf_sotncondition_cVLAN\":\"\",\n \"sotnvpnattachmentvf_sotncondition_sotnVpnName\":\"SOTN L2\"\n }\n }\n }\n}", + "relationship-list": { + "relationship": [ + { + "related-to": "sp-partner", + "relationship-label": "org.onap.relationships.inventory.PartOf", + "related-link": "/aai/v13/business/sp-partners/sp-partner/1b9c677d-fddf-4b70-938b-925a7fa57d44", + "relationship-data": [ + { + "relationship-key": "sp-partner.sp-partner-id", + "relationship-value": "1b9c677d-fddf-4b70-938b-925a7fa57d44" + } + ], + "related-to-property": [ + { + "property-key": "sp-partner.sp-partner-id", + "property-value": "1b9c677d-fddf-4b70-938b-925a7fa57d44" + } + ] + } + ] + } + }, + { + "service-instance-id": "389b87a5-72fe-4197-a307-6929c3831f83", + "service-instance-name": "SiteLondon", + "serviceDomain":"SITE", + "service-type": "E2E Service", + "service-role": "E2E Service", + "model-invariant-id": "5c13f3fb-2744-4635-9f1f-c59c92dc8f70", + "model-version-id": "3a76b1f5-fb0d-4b6b-82d5-0e8a4ebc3838", + "resource-version": "1535686521672", + "input-parameters": "{\n \"service\":{\n \"name\":\"SiteService\",\n \"description\":\"SiteService\",\n \"serviceInvariantUuid\":\"5c13f3fb-2744-4635-9f1f-c59c92dc8f70\",\n \"serviceUuid\":\"3a76b1f5-fb0d-4b6b-82d5-0e8a4ebc3838\",\n \"globalSubscriberId\":\"Demonstration\",\n \"serviceType\":\"CCVPN\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n {\n \"resourceName\":\"SiteVF\",\n \"resourceInvariantUuid\":\"0c0e1cbe-6e01-4f9e-8c45-a9700ebc14df\",\n \"resourceUuid\":\"4ad2d390-5c51-45f5-9710-b467a4ec7a73\",\n \"resourceCustomizationUuid\":\"66590e07-0777-415c-af44-36347cf3ddd3\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"mpls\",\n \"resourceInvariantUuid\":\"97a3e552-08c4-4697-aeeb-d8d3e09ce58e\",\n \"resourceUuid\":\"63d8e1af-32dc-4c71-891d-e3f7b6a976d2\",\n \"resourceCustomizationUuid\":\"205456e7-3dc0-40c4-8cb0-28e6c1877042\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"deviceVF\",\n \"resourceInvariantUuid\":\"c726490a-0ce2-4bc7-abea-dade66bfb13d\",\n \"resourceUuid\":\"0e2de9d8-d76b-4134-b5f1-41e79056adbe\",\n \"resourceCustomizationUuid\":\"5bc1373e-9a36-4a00-8c62-784e0bc417ad\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"sdwanvpnattachmentVF\",\n \"resourceInvariantUuid\":\"f714feec-1aef-4890-abba-f8f3a906935f\",\n \"resourceUuid\":\"709919b7-75fd-4e49-8398-67853323ff55\",\n \"resourceCustomizationUuid\":\"debd988f-fe04-4940-a5cb-37f61d84eab4\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"internet\",\n \"resourceInvariantUuid\":\"97a3e552-08c4-4697-aeeb-d8d3e09ce58e\",\n \"resourceUuid\":\"63d8e1af-32dc-4c71-891d-e3f7b6a976d2\",\n \"resourceCustomizationUuid\":\"64b8e8ba-62b9-4db6-b420-1ca7067d63e0\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"sotnvpnattachmentvF\",\n \"resourceInvariantUuid\":\"97c4a3c6-2943-41af-8717-2f3183f944be\",\n \"resourceUuid\":\"44b777ee-9793-465d-8053-d8e86d2e2362\",\n \"resourceCustomizationUuid\":\"37aeb073-c75d-4cf6-a7fa-a1af862ef58a\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"SPPartnerVF\",\n \"resourceInvariantUuid\":\"072f9238-15b0-4bc5-a5f5-f18548739470\",\n \"resourceUuid\":\"81b9430b-8abe-45d6-8bf9-f41a8f5c735f\",\n \"resourceCustomizationUuid\":\"cd0b4b9c-66c6-49c5-b346-7580e4b6c394\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n }\n ],\n \"requestInputs\":{\n \"devicevf_device_class\":\"PNF\",\n \"devicevf_device_esn\":\"2102351BTJ10HB000075\",\n \"devicevf_device_name\":\"50.47\",\n \"devicevf_device_systemIp\":\"192.168.1.47\",\n \"devicevf_device_type\":\"AR161EW\",\n \"devicevf_device_vendor\":\"huawei\",\n \"devicevf_device_version\":\"1.0\",\n \"internet_sitewanport_description\":\"internet\",\n \"internet_sitewanport_deviceName\":\"50.47\",\n \"internet_sitewanport_inputBandwidth\":\"100\",\n \"internet_sitewanport_ipAddress\":\"100.2.30.9\",\n \"internet_sitewanport_name\":\"internet\",\n \"internet_sitewanport_outputBandwidth\":\"100\",\n \"internet_sitewanport_portNumber\":\"0/0/2\",\n \"internet_sitewanport_portType\":\"GE\",\n \"internet_sitewanport_providerIpAddress\":\"100.2.30.10\",\n \"internet_sitewanport_transportNetworkName\":\"internet\",\n \"mpls_sitewanport_description\":\"mpls\",\n \"mpls_sitewanport_deviceName\":\"50.47\",\n \"mpls_sitewanport_inputBandwidth\":\"100\",\n \"mpls_sitewanport_ipAddress\":\"10.2.30.7\",\n \"mpls_sitewanport_name\":\"mpls\",\n \"mpls_sitewanport_outputBandwidth\":\"100\",\n \"mpls_sitewanport_portNumber\":\"0/0/1\",\n \"mpls_sitewanport_portType\":\"GE\",\n \"mpls_sitewanport_providerIpAddress\":\"10.2.30.8\",\n \"mpls_sitewanport_transportNetworkName\":\"internet\",\n \"sdwanvpnattachmentvf_sdwancondition_role\":\"spoke\",\n \"sdwanvpnattachmentvf_sdwancondition_sdwanVpnName\":\"CMCCVPN\",\n \"sitevf_site_address\":\"beijing beiqing road\",\n \"sitevf_site_controlPoint\":\"CMCC_VCPE\",\n \"sitevf_site_description\":\"CMCC_CPE\",\n \"sitevf_site_emails\":\"\",\n \"sitevf_site_latitude\":\"\",\n \"sitevf_site_longitude\":\"\",\n \"sitevf_site_name\":\"CMCC_CPE4\",\n \"sitevf_site_postcode\":\"100095\",\n \"sitevf_site_role\":\"sd-wan-edge\",\n \"sitevf_site_type\":\"single-gateway\",\n \"sotnvpnattachmentvf_sotncondition_clientSignal\":\"\",\n \"sotnvpnattachmentvf_sotncondition_cVLAN\":\"\",\n \"sotnvpnattachmentvf_sotncondition_sotnVpnName\":\"SOTN L2\"\n }\n }\n }\n}", + "relationship-list": { + "relationship": [ + { + "related-to": "sp-partner", + "relationship-label": "org.onap.relationships.inventory.PartOf", + "related-link": "/aai/v13/business/sp-partners/sp-partner/1b9c677d-fddf-4b70-938b-925a7fa57d55", + "relationship-data": [ + { + "relationship-key": "sp-partner.sp-partner-id", + "relationship-value": "1b9c677d-fddf-4b70-938b-925a7fa57d55" + } + ], + "related-to-property": [ + { + "property-key": "sp-partner.sp-partner-id", + "property-value": "1b9c677d-fddf-4b70-938b-925a7fa57d55" + } + ] + } + ] + } + } + ], + "service-type": "E2E Service", + "service-role": "E2E Service", + "model-invariant-id": "21886a96-0664-47a3-beae-766952f2059f", + "model-version-id": "54836196-c411-4690-af98-900c1c3aadd7", + "resource-version": "1535685742159", + "input-parameters": "{\n \"service\":{\n \"name\":\"SOTNVPNInfra\",\n \"description\":\"SOTNVPNInfra\",\n \"serviceInvariantUuid\":\"21886a96-0664-47a3-beae-766952f2059f\",\n \"serviceUuid\":\"54836196-c411-4690-af98-900c1c3aadd7\",\n \"globalSubscriberId\":\"Demonstration\",\n \"serviceType\":\"CCVPN\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n {\n \"resourceName\":\"SOTNConnectivity 0\",\n \"resourceInvariantUuid\":\"1b9c677d-fddf-4b70-938b-925a7fa57d43\",\n \"resourceUuid\":\"218df3c3-50dd-4c26-9e36-4771387bb771\",\n \"resourceCustomizationUuid\":\"b44071c8-04fd-4d6b-b6af-772cbfaa1129\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"SPPartnerVF 0\",\n \"resourceInvariantUuid\":\"072f9238-15b0-4bc5-a5f5-f18548739470\",\n \"resourceUuid\":\"81b9430b-8abe-45d6-8bf9-f41a8f5c735f\",\n \"resourceCustomizationUuid\":\"c3612284-6c67-4d8c-8b41-b699cc90e76d\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n }\n ],\n \"requestInputs\":{\n \"sotnconnectivity0_eir\":\"1000\",\n \"sotnconnectivity0_cir\":\"1000\",\n \"sotnconnectivity0_endTime\":\"2018-8-8 10:00\",\n \"sotnconnectivity0_ebs\":\"1000\",\n \"sotnconnectivity0_startTime\":\"2018-8-1 10:00\",\n \"sotnconnectivity0_dualLink\":\"true\",\n \"sotnconnectivity0_reroute\":\"false\",\n \"sotnconnectivity0_cbs\":\"1000\",\n \"sotnconnectivity0_name\":\"SOTN L2\",\n \"sotnconnectivity0_SLS\":\"\",\n \"sotnconnectivity0_description\":\"\",\n \"sotnconnectivity0_couplingFlag\":\"\",\n \"sotnconnectivity0_colorAware\":\"\",\n \"sotnconnectivity0_COS\":\"standard\"\n }\n }\n }\n}", + "relationship-list": { + "relationship": [ + { + "related-to": "sp-partner", + "relationship-label": "org.onap.relationships.inventory.PartOf", + "related-link": "/aai/v13/business/sp-partners/sp-partner/1b9c677d-fddf-4b70-938b-925a7fa57d99", + "relationship-data": [ + { + "relationship-key": "sp-partner.sp-partner-id", + "relationship-value": "1b9c677d-fddf-4b70-938b-925a7fa57d99" + } + ], + "related-to-property": [ + { + "property-key": "sp-partner.sp-partner-id", + "property-value": "1b9c677d-fddf-4b70-938b-925a7fa57d99" + } + ] + }, + { + "related-to": "connectivity", + "relationship-label": "org.onap.relationships.inventory.PartOf", + "related-link": "/aai/v13/network/connectivities/connectivity/4efe6dff-acfc-4d13-a3fd-1177d3c08e84", + "relationship-data": [ + { + "relationship-key": "connectivity.connectivity-id", + "relationship-value": "4efe6dff-acfc-4d13-a3fd-1177d3c08e84" + } + ], + "related-to-property": [ + { + "property-key": "connectivity.etht-svc-name", + "property-value": "SOTNVPNInfra" + } + ] + }, + { + "related-to": "allotted-resource", + "relationship-label": "org.onap.relationships.inventory.Uses", + "related-link": "/aai/v13/business/customers/customer/Democcy/service-subscriptions/service-subscription/CCVPN/service-instances/service-instance/189b87a5-72fe-4197-a307-6929c3831f81/allotted-resources/allotted-resource/bb14feec-1aef-4890-abba-f8f3a906935f", + "relationship-data": [ + { + "relationship-key": "customer.global-customer-id", + "relationship-value": "Democcy" + }, + { + "relationship-key": "service-subscription.service-type", + "relationship-value": "CCVPN" + }, + { + "relationship-key": "service-instance.service-instance-id", + "relationship-value": "189b87a5-72fe-4197-a307-6929c3831f81" + }, + { + "relationship-key": "allotted-resource.id", + "relationship-value": "bb14feec-1aef-4890-abba-f8f3a906935f" + } + ], + "related-to-property": [ + { + "property-key": "allotted-resource.description", + "property-value": "bb14feec-1aef-4890-abba-f8f3a906935f" + }, + { + "property-key": "allotted-resource.allotted-resource-name", + "property-value": "ston ar" + } + ] + }, + { + "related-to": "allotted-resource", + "relationship-label": "org.onap.relationships.inventory.Uses", + "related-link": "/aai/v13/business/customers/customer/Democcy/service-subscriptions/service-subscription/CCVPN/service-instances/service-instance/089b87a5-72fe-4197-a307-6929c3831f80/allotted-resources/allotted-resource/aa14feec-1aef-4890-abba-f8f3a906935f", + "relationship-data": [ + { + "relationship-key": "customer.global-customer-id", + "relationship-value": "Democcy" + }, + { + "relationship-key": "service-subscription.service-type", + "relationship-value": "CCVPN" + }, + { + "relationship-key": "service-instance.service-instance-id", + "relationship-value": "089b87a5-72fe-4197-a307-6929c3831f80" + }, + { + "relationship-key": "allotted-resource.id", + "relationship-value": "aa14feec-1aef-4890-abba-f8f3a906935f" + } + ], + "related-to-property": [ + { + "property-key": "allotted-resource.description", + "property-value": "aa14feec-1aef-4890-abba-f8f3a906935f" + }, + { + "property-key": "allotted-resource.allotted-resource-name", + "property-value": "ston ar" + } + ] + } + ] + } + }, + + { + "service-instance-id": "32cd906f-ee7a-4ecf-b1c3-2fce4d59f8c0", + "service-instance-name": "CCVPN_test", + "operationResult":"2001", + "operationType":"1001", + "operationId":"xxxxxxx", + "serviceDomain":"CCVPN", + "childServiceInstances":[ + { + "service-instance-id": "35e88f8e-473f-4d88-92f8-6739a42baa23", + "service-instance-name": "SDWANVPNInfra1", + "serviceDomain":"SDWAN", + "service-type": "E2E Service", + "service-role": "E2E Service", + "model-invariant-id": "88dcb2f0-085b-4548-8b93-0882e37d25d8", + "model-version-id": "462f84e5-f0e5-44c5-ab95-38fb4bf77064", + "resource-version": "1535687551051", + "input-parameters": "{\n \"service\":{\n \"name\":\"SDWANVPNInfra\",\n \"description\":\"SDWANVPNInfra\",\n \"serviceInvariantUuid\":\"88dcb2f0-085b-4548-8b93-0882e37d25d8\",\n \"serviceUuid\":\"462f84e5-f0e5-44c5-ab95-38fb4bf77064\",\n \"globalSubscriberId\":\"Demonstration\",\n \"serviceType\":\"CCVPN\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n {\n \"resourceName\":\"SDWANConnectivity 0\",\n \"resourceInvariantUuid\":\"f99a9a23-c88e-44ff-a4dc-22b88675d278\",\n \"resourceUuid\":\"7baa7742-3a13-4288-8330-868015adc340\",\n \"resourceCustomizationUuid\":\"94ec574b-2306-4cbd-8214-09662b040f73\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"SPPartnerVF 0\",\n \"resourceInvariantUuid\":\"072f9238-15b0-4bc5-a5f5-f18548739470\",\n \"resourceUuid\":\"81b9430b-8abe-45d6-8bf9-f41a8f5c735f\",\n \"resourceCustomizationUuid\":\"a7baba5d-6ac3-42b5-b47d-070841303ab1\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n }\n ],\n \"requestInputs\":{\n \"sdwanconnectivity0_name\":\"CMCCVPN\",\n \"sdwanconnectivity0_topology\":\"hub-spoke\"\n }\n }\n }\n}", + "relationship-list": { + "relationship": [ + { + "related-to": "sdwan-vpn", + "relationship-label": "org.onap.relationships.inventory.PartOf", + "related-link": "/aai/v13/network/sdwan-vpns/sdwan-vpn/4efe6dff-acfc-4d13-a3fd-1177d3c08e89", + "relationship-data": [ + { + "relationship-key": "sdwan-vpn.sdwan-vpn-id", + "relationship-value": "4efe6dff-acfc-4d13-a3fd-1177d3c08e89" + } + ], + "related-to-property": [ + { + "property-key": "sdwan-vpn.sdwan-vpn-name", + "property-value": "vdfvpn" + } + ] + }, + { + "related-to": "sp-partner", + "relationship-label": "org.onap.relationships.inventory.PartOf", + "related-link": "/aai/v13/business/sp-partners/sp-partner/1b9c677d-fddf-4b70-938b-925a7fa57d00", + "relationship-data": [ + { + "relationship-key": "sp-partner.sp-partner-id", + "relationship-value": "1b9c677d-fddf-4b70-938b-925a7fa57d00" + } + ], + "related-to-property": [ + { + "property-key": "sp-partner.sp-partner-id", + "property-value": "1b9c677d-fddf-4b70-938b-925a7fa57d00" + } + ] + }, + { + "related-to": "allotted-resource", + "relationship-label": "org.onap.relationships.inventory.Uses", + "related-link": "/aai/v13/business/customers/customer/Democcy/service-subscriptions/service-subscription/CCVPN/service-instances/service-instance/189b87a5-72fe-4197-a307-6929c3831f81/allotted-resources/allotted-resource/2214feec-1aef-4890-abba-f8f3a906935f", + "relationship-data": [ + { + "relationship-key": "customer.global-customer-id", + "relationship-value": "Democcy" + }, + { + "relationship-key": "service-subscription.service-type", + "relationship-value": "CCVPN" + }, + { + "relationship-key": "service-instance.service-instance-id", + "relationship-value": "189b87a5-72fe-4197-a307-6929c3831f81" + }, + { + "relationship-key": "allotted-resource.id", + "relationship-value": "2214feec-1aef-4890-abba-f8f3a906935f" + } + ], + "related-to-property": [ + { + "property-key": "allotted-resource.description", + "property-value": "2214feec-1aef-4890-abba-f8f3a906935f" + }, + { + "property-key": "allotted-resource.allotted-resource-name", + "property-value": "sdwan ar" + } + ] + }, + { + "related-to": "allotted-resource", + "relationship-label": "org.onap.relationships.inventory.Uses", + "related-link": "/aai/v13/business/customers/customer/Democcy/service-subscriptions/service-subscription/CCVPN/service-instances/service-instance/089b87a5-72fe-4197-a307-6929c3831f80/allotted-resources/allotted-resource/1114feec-1aef-4890-abba-f8f3a906935f", + "relationship-data": [ + { + "relationship-key": "customer.global-customer-id", + "relationship-value": "Democcy" + }, + { + "relationship-key": "service-subscription.service-type", + "relationship-value": "CCVPN" + }, + { + "relationship-key": "service-instance.service-instance-id", + "relationship-value": "089b87a5-72fe-4197-a307-6929c3831f80" + }, + { + "relationship-key": "allotted-resource.id", + "relationship-value": "1114feec-1aef-4890-abba-f8f3a906935f" + } + ], + "related-to-property": [ + { + "property-key": "allotted-resource.description", + "property-value": "1114feec-1aef-4890-abba-f8f3a906935f" + }, + { + "property-key": "allotted-resource.allotted-resource-name", + "property-value": "sdwan ar" + } + ] + } + ] + } + }, + { + "service-instance-id": "15e88f8e-473f-4d88-92f8-6739a42baa2g", + "service-instance-name": "SDWANVPNInfra", + "serviceDomain":"SDWAN", + "service-type": "E2E Service", + "service-role": "E2E Service", + "model-invariant-id": "88dcb2f0-085b-4548-8b93-0882e37d25d8", + "model-version-id": "462f84e5-f0e5-44c5-ab95-38fb4bf77064", + "resource-version": "1535687578298", + "input-parameters": "{\n \"service\":{\n \"name\":\"SDWANVPNInfra\",\n \"description\":\"SDWANVPNInfra\",\n \"serviceInvariantUuid\":\"88dcb2f0-085b-4548-8b93-0882e37d25d8\",\n \"serviceUuid\":\"462f84e5-f0e5-44c5-ab95-38fb4bf77064\",\n \"globalSubscriberId\":\"Demonstration\",\n \"serviceType\":\"CCVPN\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n {\n \"resourceName\":\"SDWANConnectivity 0\",\n \"resourceInvariantUuid\":\"f99a9a23-c88e-44ff-a4dc-22b88675d278\",\n \"resourceUuid\":\"7baa7742-3a13-4288-8330-868015adc340\",\n \"resourceCustomizationUuid\":\"94ec574b-2306-4cbd-8214-09662b040f73\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"SPPartnerVF 0\",\n \"resourceInvariantUuid\":\"072f9238-15b0-4bc5-a5f5-f18548739470\",\n \"resourceUuid\":\"81b9430b-8abe-45d6-8bf9-f41a8f5c735f\",\n \"resourceCustomizationUuid\":\"a7baba5d-6ac3-42b5-b47d-070841303ab1\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n }\n ],\n \"requestInputs\":{\n \"sdwanconnectivity0_name\":\"CMCCVPN\",\n \"sdwanconnectivity0_topology\":\"hub-spoke\"\n }\n }\n }\n}", + "relationship-list": { + "relationship": [ + { + "related-to": "sdwan-vpn", + "relationship-label": "org.onap.relationships.inventory.PartOf", + "related-link": "/aai/v13/network/sdwan-vpns/sdwan-vpn/4efe6dff-acfc-4d13-a3fd-1177d3c08e86", + "relationship-data": [ + { + "relationship-key": "sdwan-vpn.sdwan-vpn-id", + "relationship-value": "4efe6dff-acfc-4d13-a3fd-1177d3c08e86" + } + ], + "related-to-property": [ + { + "property-key": "sdwan-vpn.sdwan-vpn-name", + "property-value": "cmccvpn" + } + ] + }, + { + "related-to": "sp-partner", + "relationship-label": "org.onap.relationships.inventory.PartOf", + "related-link": "/aai/v13/business/sp-partners/sp-partner/1b9c677d-fddf-4b70-938b-925a7fa57d11", + "relationship-data": [ + { + "relationship-key": "sp-partner.sp-partner-id", + "relationship-value": "1b9c677d-fddf-4b70-938b-925a7fa57d11" + } + ], + "related-to-property": [ + { + "property-key": "sp-partner.sp-partner-id", + "property-value": "1b9c677d-fddf-4b70-938b-925a7fa57d11" + } + ] + } + ] + } + }, + { + "service-instance-id": "089b87a5-72fe-4197-a307-6929c3831f80", + "service-instance-name": "SiteBeijing", + "serviceDomain":"SITE", + "service-type": "E2E Service", + "service-role": "E2E Service", + "model-invariant-id": "5c13f3fb-2744-4635-9f1f-c59c92dc8f70", + "model-version-id": "3a76b1f5-fb0d-4b6b-82d5-0e8a4ebc3838", + "resource-version": "1535686434430", + "input-parameters": "{\n \"service\":{\n \"name\":\"SiteService\",\n \"description\":\"SiteService\",\n \"serviceInvariantUuid\":\"5c13f3fb-2744-4635-9f1f-c59c92dc8f70\",\n \"serviceUuid\":\"3a76b1f5-fb0d-4b6b-82d5-0e8a4ebc3838\",\n \"globalSubscriberId\":\"Demonstration\",\n \"serviceType\":\"CCVPN\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n {\n \"resourceName\":\"SiteVF\",\n \"resourceInvariantUuid\":\"0c0e1cbe-6e01-4f9e-8c45-a9700ebc14df\",\n \"resourceUuid\":\"4ad2d390-5c51-45f5-9710-b467a4ec7a73\",\n \"resourceCustomizationUuid\":\"66590e07-0777-415c-af44-36347cf3ddd3\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"mpls\",\n \"resourceInvariantUuid\":\"97a3e552-08c4-4697-aeeb-d8d3e09ce58e\",\n \"resourceUuid\":\"63d8e1af-32dc-4c71-891d-e3f7b6a976d2\",\n \"resourceCustomizationUuid\":\"205456e7-3dc0-40c4-8cb0-28e6c1877042\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"deviceVF\",\n \"resourceInvariantUuid\":\"c726490a-0ce2-4bc7-abea-dade66bfb13d\",\n \"resourceUuid\":\"0e2de9d8-d76b-4134-b5f1-41e79056adbe\",\n \"resourceCustomizationUuid\":\"5bc1373e-9a36-4a00-8c62-784e0bc417ad\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"sdwanvpnattachmentVF\",\n \"resourceInvariantUuid\":\"f714feec-1aef-4890-abba-f8f3a906935f\",\n \"resourceUuid\":\"709919b7-75fd-4e49-8398-67853323ff55\",\n \"resourceCustomizationUuid\":\"debd988f-fe04-4940-a5cb-37f61d84eab4\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"internet\",\n \"resourceInvariantUuid\":\"97a3e552-08c4-4697-aeeb-d8d3e09ce58e\",\n \"resourceUuid\":\"63d8e1af-32dc-4c71-891d-e3f7b6a976d2\",\n \"resourceCustomizationUuid\":\"64b8e8ba-62b9-4db6-b420-1ca7067d63e0\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"sotnvpnattachmentvF\",\n \"resourceInvariantUuid\":\"97c4a3c6-2943-41af-8717-2f3183f944be\",\n \"resourceUuid\":\"44b777ee-9793-465d-8053-d8e86d2e2362\",\n \"resourceCustomizationUuid\":\"37aeb073-c75d-4cf6-a7fa-a1af862ef58a\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"SPPartnerVF\",\n \"resourceInvariantUuid\":\"072f9238-15b0-4bc5-a5f5-f18548739470\",\n \"resourceUuid\":\"81b9430b-8abe-45d6-8bf9-f41a8f5c735f\",\n \"resourceCustomizationUuid\":\"cd0b4b9c-66c6-49c5-b346-7580e4b6c394\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n }\n ],\n \"requestInputs\":{\n \"devicevf_device_class\":\"PNF\",\n \"devicevf_device_esn\":\"2102351BTJ10HB000075\",\n \"devicevf_device_name\":\"50.47\",\n \"devicevf_device_systemIp\":\"192.168.1.47\",\n \"devicevf_device_type\":\"AR161EW\",\n \"devicevf_device_vendor\":\"huawei\",\n \"devicevf_device_version\":\"1.0\",\n \"internet_sitewanport_description\":\"internet\",\n \"internet_sitewanport_deviceName\":\"50.47\",\n \"internet_sitewanport_inputBandwidth\":\"100\",\n \"internet_sitewanport_ipAddress\":\"100.2.30.9\",\n \"internet_sitewanport_name\":\"internet\",\n \"internet_sitewanport_outputBandwidth\":\"100\",\n \"internet_sitewanport_portNumber\":\"0/0/2\",\n \"internet_sitewanport_portType\":\"GE\",\n \"internet_sitewanport_providerIpAddress\":\"100.2.30.10\",\n \"internet_sitewanport_transportNetworkName\":\"internet\",\n \"mpls_sitewanport_description\":\"mpls\",\n \"mpls_sitewanport_deviceName\":\"50.47\",\n \"mpls_sitewanport_inputBandwidth\":\"100\",\n \"mpls_sitewanport_ipAddress\":\"10.2.30.7\",\n \"mpls_sitewanport_name\":\"mpls\",\n \"mpls_sitewanport_outputBandwidth\":\"100\",\n \"mpls_sitewanport_portNumber\":\"0/0/1\",\n \"mpls_sitewanport_portType\":\"GE\",\n \"mpls_sitewanport_providerIpAddress\":\"10.2.30.8\",\n \"mpls_sitewanport_transportNetworkName\":\"internet\",\n \"sdwanvpnattachmentvf_sdwancondition_role\":\"spoke\",\n \"sdwanvpnattachmentvf_sdwancondition_sdwanVpnName\":\"CMCCVPN\",\n \"sitevf_site_address\":\"beijing beiqing road\",\n \"sitevf_site_controlPoint\":\"CMCC_VCPE\",\n \"sitevf_site_description\":\"CMCC_CPE\",\n \"sitevf_site_emails\":\"\",\n \"sitevf_site_latitude\":\"\",\n \"sitevf_site_longitude\":\"\",\n \"sitevf_site_name\":\"CMCC_CPE1\",\n \"sitevf_site_postcode\":\"100095\",\n \"sitevf_site_role\":\"sd-wan-edge\",\n \"sitevf_site_type\":\"single-gateway\",\n \"sotnvpnattachmentvf_sotncondition_clientSignal\":\"\",\n \"sotnvpnattachmentvf_sotncondition_cVLAN\":\"\",\n \"sotnvpnattachmentvf_sotncondition_sotnVpnName\":\"SOTN L2\"\n }\n }\n }\n}", + "relationship-list": { + "relationship": [ + { + "related-to": "sp-partner", + "relationship-label": "org.onap.relationships.inventory.PartOf", + "related-link": "/aai/v13/business/sp-partners/sp-partner/1b9c677d-fddf-4b70-938b-925a7fa57d22", + "relationship-data": [ + { + "relationship-key": "sp-partner.sp-partner-id", + "relationship-value": "1b9c677d-fddf-4b70-938b-925a7fa57d22" + } + ], + "related-to-property": [ + { + "property-key": "sp-partner.sp-partner-id", + "property-value": "1b9c677d-fddf-4b70-938b-925a7fa57d22" + } + ] + }, + { + "related-to": "device", + "relationship-label": "org.onap.relationships.inventory.PartOf", + "related-link": "/aai/v13/network/devices/device/6e0d83f3-f4f5-4a24-9462-712b52ac6700", + "relationship-data": [ + { + "relationship-key": "device.device-id", + "relationship-value": "6e0d83f3-f4f5-4a24-9462-712b52ac6700" + } + ], + "related-to-property": [ + { + "property-key": "device.device-name" + } + ] + }, + { + "related-to": "wan-port-config", + "relationship-label": "org.onap.relationships.inventory.PartOf", + "related-link": "/aai/v13/network/wan-port-configs/wan-port-config/aaa3e552-08c4-4697-aeeb-d8d3e09ce58e", + "relationship-data": [ + { + "relationship-key": "wan-port-config.wan-port-config-id", + "relationship-value": "aaa3e552-08c4-4697-aeeb-d8d3e09ce58e" + } + ], + "related-to-property": [ + { + "property-key": "wan-port-config.wan-port-config-name", + "property-value": "mpls" + } + ] + }, + { + "related-to": "site-resource", + "relationship-label": "org.onap.relationships.inventory.PartOf", + "related-link": "/aai/v13/network/site-resources/site-resource/aa2de9d8-d76b-4134-b5f1-41e79056adbe", + "relationship-data": [ + { + "relationship-key": "site-resource.site-resource-id", + "relationship-value": "aa2de9d8-d76b-4134-b5f1-41e79056adbe" + } + ], + "related-to-property": [ + { + "property-key": "site-resource.site-resource-name", + "property-value": "cmcc-spokesite" + } + ] + } + ] + } + }, + { + "service-instance-id": "189b87a5-72fe-4197-a307-6929c3831f81", + "service-instance-name": "SiteBeijingDC", + "serviceDomain":"SITE", + "service-type": "E2E Service", + "service-role": "E2E Service", + "model-invariant-id": "5c13f3fb-2744-4635-9f1f-c59c92dc8f70", + "model-version-id": "3a76b1f5-fb0d-4b6b-82d5-0e8a4ebc3838", + "resource-version": "1535686458510", + "input-parameters": "{\n \"service\":{\n \"name\":\"SiteService\",\n \"description\":\"SiteService\",\n \"serviceInvariantUuid\":\"5c13f3fb-2744-4635-9f1f-c59c92dc8f70\",\n \"serviceUuid\":\"3a76b1f5-fb0d-4b6b-82d5-0e8a4ebc3838\",\n \"globalSubscriberId\":\"Demonstration\",\n \"serviceType\":\"CCVPN\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n {\n \"resourceName\":\"SiteVF\",\n \"resourceInvariantUuid\":\"0c0e1cbe-6e01-4f9e-8c45-a9700ebc14df\",\n \"resourceUuid\":\"4ad2d390-5c51-45f5-9710-b467a4ec7a73\",\n \"resourceCustomizationUuid\":\"66590e07-0777-415c-af44-36347cf3ddd3\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"mpls\",\n \"resourceInvariantUuid\":\"97a3e552-08c4-4697-aeeb-d8d3e09ce58e\",\n \"resourceUuid\":\"63d8e1af-32dc-4c71-891d-e3f7b6a976d2\",\n \"resourceCustomizationUuid\":\"205456e7-3dc0-40c4-8cb0-28e6c1877042\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"deviceVF\",\n \"resourceInvariantUuid\":\"c726490a-0ce2-4bc7-abea-dade66bfb13d\",\n \"resourceUuid\":\"0e2de9d8-d76b-4134-b5f1-41e79056adbe\",\n \"resourceCustomizationUuid\":\"5bc1373e-9a36-4a00-8c62-784e0bc417ad\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"sdwanvpnattachmentVF\",\n \"resourceInvariantUuid\":\"f714feec-1aef-4890-abba-f8f3a906935f\",\n \"resourceUuid\":\"709919b7-75fd-4e49-8398-67853323ff55\",\n \"resourceCustomizationUuid\":\"debd988f-fe04-4940-a5cb-37f61d84eab4\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"internet\",\n \"resourceInvariantUuid\":\"97a3e552-08c4-4697-aeeb-d8d3e09ce58e\",\n \"resourceUuid\":\"63d8e1af-32dc-4c71-891d-e3f7b6a976d2\",\n \"resourceCustomizationUuid\":\"64b8e8ba-62b9-4db6-b420-1ca7067d63e0\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"sotnvpnattachmentvF\",\n \"resourceInvariantUuid\":\"97c4a3c6-2943-41af-8717-2f3183f944be\",\n \"resourceUuid\":\"44b777ee-9793-465d-8053-d8e86d2e2362\",\n \"resourceCustomizationUuid\":\"37aeb073-c75d-4cf6-a7fa-a1af862ef58a\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"SPPartnerVF\",\n \"resourceInvariantUuid\":\"072f9238-15b0-4bc5-a5f5-f18548739470\",\n \"resourceUuid\":\"81b9430b-8abe-45d6-8bf9-f41a8f5c735f\",\n \"resourceCustomizationUuid\":\"cd0b4b9c-66c6-49c5-b346-7580e4b6c394\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n }\n ],\n \"requestInputs\":{\n \"devicevf_device_class\":\"PNF\",\n \"devicevf_device_esn\":\"2102351BTJ10HB000075\",\n \"devicevf_device_name\":\"50.47\",\n \"devicevf_device_systemIp\":\"192.168.1.47\",\n \"devicevf_device_type\":\"AR161EW\",\n \"devicevf_device_vendor\":\"huawei\",\n \"devicevf_device_version\":\"1.0\",\n \"internet_sitewanport_description\":\"internet\",\n \"internet_sitewanport_deviceName\":\"50.47\",\n \"internet_sitewanport_inputBandwidth\":\"100\",\n \"internet_sitewanport_ipAddress\":\"100.2.30.9\",\n \"internet_sitewanport_name\":\"internet\",\n \"internet_sitewanport_outputBandwidth\":\"100\",\n \"internet_sitewanport_portNumber\":\"0/0/2\",\n \"internet_sitewanport_portType\":\"GE\",\n \"internet_sitewanport_providerIpAddress\":\"100.2.30.10\",\n \"internet_sitewanport_transportNetworkName\":\"internet\",\n \"mpls_sitewanport_description\":\"mpls\",\n \"mpls_sitewanport_deviceName\":\"50.47\",\n \"mpls_sitewanport_inputBandwidth\":\"100\",\n \"mpls_sitewanport_ipAddress\":\"10.2.30.7\",\n \"mpls_sitewanport_name\":\"mpls\",\n \"mpls_sitewanport_outputBandwidth\":\"100\",\n \"mpls_sitewanport_portNumber\":\"0/0/1\",\n \"mpls_sitewanport_portType\":\"GE\",\n \"mpls_sitewanport_providerIpAddress\":\"10.2.30.8\",\n \"mpls_sitewanport_transportNetworkName\":\"internet\",\n \"sdwanvpnattachmentvf_sdwancondition_role\":\"spoke\",\n \"sdwanvpnattachmentvf_sdwancondition_sdwanVpnName\":\"CMCCVPN\",\n \"sitevf_site_address\":\"beijing beiqing road\",\n \"sitevf_site_controlPoint\":\"CMCC_VCPE\",\n \"sitevf_site_description\":\"CMCC_CPE\",\n \"sitevf_site_emails\":\"\",\n \"sitevf_site_latitude\":\"\",\n \"sitevf_site_longitude\":\"\",\n \"sitevf_site_name\":\"CMCC_CPE2\",\n \"sitevf_site_postcode\":\"100095\",\n \"sitevf_site_role\":\"sd-wan-edge\",\n \"sitevf_site_type\":\"single-gateway\",\n \"sotnvpnattachmentvf_sotncondition_clientSignal\":\"\",\n \"sotnvpnattachmentvf_sotncondition_cVLAN\":\"\",\n \"sotnvpnattachmentvf_sotncondition_sotnVpnName\":\"SOTN L2\"\n }\n }\n }\n}", + "relationship-list": { + "relationship": [ + { + "related-to": "sp-partner", + "relationship-label": "org.onap.relationships.inventory.PartOf", + "related-link": "/aai/v13/business/sp-partners/sp-partner/1b9c677d-fddf-4b70-938b-925a7fa57d33", + "relationship-data": [ + { + "relationship-key": "sp-partner.sp-partner-id", + "relationship-value": "1b9c677d-fddf-4b70-938b-925a7fa57d33" + } + ], + "related-to-property": [ + { + "property-key": "sp-partner.sp-partner-id", + "property-value": "1b9c677d-fddf-4b70-938b-925a7fa57d33" + } + ] + }, + { + "related-to": "site-resource", + "relationship-label": "org.onap.relationships.inventory.PartOf", + "related-link": "/aai/v13/network/site-resources/site-resource/bb2de9d8-d76b-4134-b5f1-41e79056adbe", + "relationship-data": [ + { + "relationship-key": "site-resource.site-resource-id", + "relationship-value": "bb2de9d8-d76b-4134-b5f1-41e79056adbe" + } + ], + "related-to-property": [ + { + "property-key": "site-resource.site-resource-name", + "property-value": "cmcc-hubsite" + } + ] + }, + { + "related-to": "device", + "relationship-label": "org.onap.relationships.inventory.PartOf", + "related-link": "/aai/v13/network/devices/device/6e0d83f3-f4f5-4a24-9462-712b52ac6711", + "relationship-data": [ + { + "relationship-key": "device.device-id", + "relationship-value": "6e0d83f3-f4f5-4a24-9462-712b52ac6711" + } + ], + "related-to-property": [ + { + "property-key": "device.device-name", + "property-value": "cmcc_hub" + } + ] + }, + { + "related-to": "wan-port-config", + "relationship-label": "org.onap.relationships.inventory.PartOf", + "related-link": "/aai/v13/network/wan-port-configs/wan-port-config/bba3e552-08c4-4697-aeeb-d8d3e09ce58e", + "relationship-data": [ + { + "relationship-key": "wan-port-config.wan-port-config-id", + "relationship-value": "bba3e552-08c4-4697-aeeb-d8d3e09ce58e" + } + ], + "related-to-property": [ + { + "property-key": "wan-port-config.wan-port-config-name", + "property-value": "mpls" + } + ] + } + ] + } + }, + { + "service-instance-id": "289b87a5-72fe-4197-a307-6929c3831f82", + "service-instance-name": "SiteLondonDC", + "serviceDomain":"SITE", + "service-type": "E2E Service", + "service-role": "E2E Service", + "model-invariant-id": "5c13f3fb-2744-4635-9f1f-c59c92dc8f70", + "model-version-id": "3a76b1f5-fb0d-4b6b-82d5-0e8a4ebc3838", + "resource-version": "1535686481928", + "input-parameters": "{\n \"service\":{\n \"name\":\"SiteService\",\n \"description\":\"SiteService\",\n \"serviceInvariantUuid\":\"5c13f3fb-2744-4635-9f1f-c59c92dc8f70\",\n \"serviceUuid\":\"3a76b1f5-fb0d-4b6b-82d5-0e8a4ebc3838\",\n \"globalSubscriberId\":\"Demonstration\",\n \"serviceType\":\"CCVPN\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n {\n \"resourceName\":\"SiteVF\",\n \"resourceInvariantUuid\":\"0c0e1cbe-6e01-4f9e-8c45-a9700ebc14df\",\n \"resourceUuid\":\"4ad2d390-5c51-45f5-9710-b467a4ec7a73\",\n \"resourceCustomizationUuid\":\"66590e07-0777-415c-af44-36347cf3ddd3\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"mpls\",\n \"resourceInvariantUuid\":\"97a3e552-08c4-4697-aeeb-d8d3e09ce58e\",\n \"resourceUuid\":\"63d8e1af-32dc-4c71-891d-e3f7b6a976d2\",\n \"resourceCustomizationUuid\":\"205456e7-3dc0-40c4-8cb0-28e6c1877042\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"deviceVF\",\n \"resourceInvariantUuid\":\"c726490a-0ce2-4bc7-abea-dade66bfb13d\",\n \"resourceUuid\":\"0e2de9d8-d76b-4134-b5f1-41e79056adbe\",\n \"resourceCustomizationUuid\":\"5bc1373e-9a36-4a00-8c62-784e0bc417ad\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"sdwanvpnattachmentVF\",\n \"resourceInvariantUuid\":\"f714feec-1aef-4890-abba-f8f3a906935f\",\n \"resourceUuid\":\"709919b7-75fd-4e49-8398-67853323ff55\",\n \"resourceCustomizationUuid\":\"debd988f-fe04-4940-a5cb-37f61d84eab4\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"internet\",\n \"resourceInvariantUuid\":\"97a3e552-08c4-4697-aeeb-d8d3e09ce58e\",\n \"resourceUuid\":\"63d8e1af-32dc-4c71-891d-e3f7b6a976d2\",\n \"resourceCustomizationUuid\":\"64b8e8ba-62b9-4db6-b420-1ca7067d63e0\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"sotnvpnattachmentvF\",\n \"resourceInvariantUuid\":\"97c4a3c6-2943-41af-8717-2f3183f944be\",\n \"resourceUuid\":\"44b777ee-9793-465d-8053-d8e86d2e2362\",\n \"resourceCustomizationUuid\":\"37aeb073-c75d-4cf6-a7fa-a1af862ef58a\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"SPPartnerVF\",\n \"resourceInvariantUuid\":\"072f9238-15b0-4bc5-a5f5-f18548739470\",\n \"resourceUuid\":\"81b9430b-8abe-45d6-8bf9-f41a8f5c735f\",\n \"resourceCustomizationUuid\":\"cd0b4b9c-66c6-49c5-b346-7580e4b6c394\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n }\n ],\n \"requestInputs\":{\n \"devicevf_device_class\":\"PNF\",\n \"devicevf_device_esn\":\"2102351BTJ10HB000075\",\n \"devicevf_device_name\":\"50.47\",\n \"devicevf_device_systemIp\":\"192.168.1.47\",\n \"devicevf_device_type\":\"AR161EW\",\n \"devicevf_device_vendor\":\"huawei\",\n \"devicevf_device_version\":\"1.0\",\n \"internet_sitewanport_description\":\"internet\",\n \"internet_sitewanport_deviceName\":\"50.47\",\n \"internet_sitewanport_inputBandwidth\":\"100\",\n \"internet_sitewanport_ipAddress\":\"100.2.30.9\",\n \"internet_sitewanport_name\":\"internet\",\n \"internet_sitewanport_outputBandwidth\":\"100\",\n \"internet_sitewanport_portNumber\":\"0/0/2\",\n \"internet_sitewanport_portType\":\"GE\",\n \"internet_sitewanport_providerIpAddress\":\"100.2.30.10\",\n \"internet_sitewanport_transportNetworkName\":\"internet\",\n \"mpls_sitewanport_description\":\"mpls\",\n \"mpls_sitewanport_deviceName\":\"50.47\",\n \"mpls_sitewanport_inputBandwidth\":\"100\",\n \"mpls_sitewanport_ipAddress\":\"10.2.30.7\",\n \"mpls_sitewanport_name\":\"mpls\",\n \"mpls_sitewanport_outputBandwidth\":\"100\",\n \"mpls_sitewanport_portNumber\":\"0/0/1\",\n \"mpls_sitewanport_portType\":\"GE\",\n \"mpls_sitewanport_providerIpAddress\":\"10.2.30.8\",\n \"mpls_sitewanport_transportNetworkName\":\"internet\",\n \"sdwanvpnattachmentvf_sdwancondition_role\":\"spoke\",\n \"sdwanvpnattachmentvf_sdwancondition_sdwanVpnName\":\"CMCCVPN\",\n \"sitevf_site_address\":\"beijing beiqing road\",\n \"sitevf_site_controlPoint\":\"CMCC_VCPE\",\n \"sitevf_site_description\":\"CMCC_CPE\",\n \"sitevf_site_emails\":\"\",\n \"sitevf_site_latitude\":\"\",\n \"sitevf_site_longitude\":\"\",\n \"sitevf_site_name\":\"CMCC_CPE3\",\n \"sitevf_site_postcode\":\"100095\",\n \"sitevf_site_role\":\"sd-wan-edge\",\n \"sitevf_site_type\":\"single-gateway\",\n \"sotnvpnattachmentvf_sotncondition_clientSignal\":\"\",\n \"sotnvpnattachmentvf_sotncondition_cVLAN\":\"\",\n \"sotnvpnattachmentvf_sotncondition_sotnVpnName\":\"SOTN L2\"\n }\n }\n }\n}", + "relationship-list": { + "relationship": [ + { + "related-to": "sp-partner", + "relationship-label": "org.onap.relationships.inventory.PartOf", + "related-link": "/aai/v13/business/sp-partners/sp-partner/1b9c677d-fddf-4b70-938b-925a7fa57d44", + "relationship-data": [ + { + "relationship-key": "sp-partner.sp-partner-id", + "relationship-value": "1b9c677d-fddf-4b70-938b-925a7fa57d44" + } + ], + "related-to-property": [ + { + "property-key": "sp-partner.sp-partner-id", + "property-value": "1b9c677d-fddf-4b70-938b-925a7fa57d44" + } + ] + } + ] + } + }, + { + "service-instance-id": "389b87a5-72fe-4197-a307-6929c3831f83", + "service-instance-name": "SiteLondon", + "serviceDomain":"SITE", + "service-type": "E2E Service", + "service-role": "E2E Service", + "model-invariant-id": "5c13f3fb-2744-4635-9f1f-c59c92dc8f70", + "model-version-id": "3a76b1f5-fb0d-4b6b-82d5-0e8a4ebc3838", + "resource-version": "1535686521672", + "input-parameters": "{\n \"service\":{\n \"name\":\"SiteService\",\n \"description\":\"SiteService\",\n \"serviceInvariantUuid\":\"5c13f3fb-2744-4635-9f1f-c59c92dc8f70\",\n \"serviceUuid\":\"3a76b1f5-fb0d-4b6b-82d5-0e8a4ebc3838\",\n \"globalSubscriberId\":\"Demonstration\",\n \"serviceType\":\"CCVPN\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n {\n \"resourceName\":\"SiteVF\",\n \"resourceInvariantUuid\":\"0c0e1cbe-6e01-4f9e-8c45-a9700ebc14df\",\n \"resourceUuid\":\"4ad2d390-5c51-45f5-9710-b467a4ec7a73\",\n \"resourceCustomizationUuid\":\"66590e07-0777-415c-af44-36347cf3ddd3\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"mpls\",\n \"resourceInvariantUuid\":\"97a3e552-08c4-4697-aeeb-d8d3e09ce58e\",\n \"resourceUuid\":\"63d8e1af-32dc-4c71-891d-e3f7b6a976d2\",\n \"resourceCustomizationUuid\":\"205456e7-3dc0-40c4-8cb0-28e6c1877042\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"deviceVF\",\n \"resourceInvariantUuid\":\"c726490a-0ce2-4bc7-abea-dade66bfb13d\",\n \"resourceUuid\":\"0e2de9d8-d76b-4134-b5f1-41e79056adbe\",\n \"resourceCustomizationUuid\":\"5bc1373e-9a36-4a00-8c62-784e0bc417ad\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"sdwanvpnattachmentVF\",\n \"resourceInvariantUuid\":\"f714feec-1aef-4890-abba-f8f3a906935f\",\n \"resourceUuid\":\"709919b7-75fd-4e49-8398-67853323ff55\",\n \"resourceCustomizationUuid\":\"debd988f-fe04-4940-a5cb-37f61d84eab4\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"internet\",\n \"resourceInvariantUuid\":\"97a3e552-08c4-4697-aeeb-d8d3e09ce58e\",\n \"resourceUuid\":\"63d8e1af-32dc-4c71-891d-e3f7b6a976d2\",\n \"resourceCustomizationUuid\":\"64b8e8ba-62b9-4db6-b420-1ca7067d63e0\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"sotnvpnattachmentvF\",\n \"resourceInvariantUuid\":\"97c4a3c6-2943-41af-8717-2f3183f944be\",\n \"resourceUuid\":\"44b777ee-9793-465d-8053-d8e86d2e2362\",\n \"resourceCustomizationUuid\":\"37aeb073-c75d-4cf6-a7fa-a1af862ef58a\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n },\n {\n \"resourceName\":\"SPPartnerVF\",\n \"resourceInvariantUuid\":\"072f9238-15b0-4bc5-a5f5-f18548739470\",\n \"resourceUuid\":\"81b9430b-8abe-45d6-8bf9-f41a8f5c735f\",\n \"resourceCustomizationUuid\":\"cd0b4b9c-66c6-49c5-b346-7580e4b6c394\",\n \"parameters\":{\n \"locationConstraints\":[\n\n ],\n \"resources\":[\n\n ],\n \"requestInputs\":{\n\n }\n }\n }\n ],\n \"requestInputs\":{\n \"devicevf_device_class\":\"PNF\",\n \"devicevf_device_esn\":\"2102351BTJ10HB000075\",\n \"devicevf_device_name\":\"50.47\",\n \"devicevf_device_systemIp\":\"192.168.1.47\",\n \"devicevf_device_type\":\"AR161EW\",\n \"devicevf_device_vendor\":\"huawei\",\n \"devicevf_device_version\":\"1.0\",\n \"internet_sitewanport_description\":\"internet\",\n \"internet_sitewanport_deviceName\":\"50.47\",\n \"internet_sitewanport_inputBandwidth\":\"100\",\n \"internet_sitewanport_ipAddress\":\"100.2.30.9\",\n \"internet_sitewanport_name\":\"internet\",\n \"internet_sitewanport_outputBandwidth\":\"100\",\n \"internet_sitewanport_portNumber\":\"0/0/2\",\n \"internet_sitewanport_portType\":\"GE\",\n \"internet_sitewanport_providerIpAddress\":\"100.2.30.10\",\n \"internet_sitewanport_transportNetworkName\":\"internet\",\n \"mpls_sitewanport_description\":\"mpls\",\n \"mpls_sitewanport_deviceName\":\"50.47\",\n \"mpls_sitewanport_inputBandwidth\":\"100\",\n \"mpls_sitewanport_ipAddress\":\"10.2.30.7\",\n \"mpls_sitewanport_name\":\"mpls\",\n \"mpls_sitewanport_outputBandwidth\":\"100\",\n \"mpls_sitewanport_portNumber\":\"0/0/1\",\n \"mpls_sitewanport_portType\":\"GE\",\n \"mpls_sitewanport_providerIpAddress\":\"10.2.30.8\",\n \"mpls_sitewanport_transportNetworkName\":\"internet\",\n \"sdwanvpnattachmentvf_sdwancondition_role\":\"spoke\",\n \"sdwanvpnattachmentvf_sdwancondition_sdwanVpnName\":\"CMCCVPN\",\n \"sitevf_site_address\":\"beijing beiqing road\",\n \"sitevf_site_controlPoint\":\"CMCC_VCPE\",\n \"sitevf_site_description\":\"CMCC_CPE\",\n \"sitevf_site_emails\":\"\",\n \"sitevf_site_latitude\":\"\",\n \"sitevf_site_longitude\":\"\",\n \"sitevf_site_name\":\"CMCC_CPE4\",\n \"sitevf_site_postcode\":\"100095\",\n \"sitevf_site_role\":\"sd-wan-edge\",\n \"sitevf_site_type\":\"single-gateway\",\n \"sotnvpnattachmentvf_sotncondition_clientSignal\":\"\",\n \"sotnvpnattachmentvf_sotncondition_cVLAN\":\"\",\n \"sotnvpnattachmentvf_sotncondition_sotnVpnName\":\"SOTN L2\"\n }\n }\n }\n}", + "relationship-list": { + "relationship": [ + { + "related-to": "sp-partner", + "relationship-label": "org.onap.relationships.inventory.PartOf", + "related-link": "/aai/v13/business/sp-partners/sp-partner/1b9c677d-fddf-4b70-938b-925a7fa57d55", + "relationship-data": [ + { + "relationship-key": "sp-partner.sp-partner-id", + "relationship-value": "1b9c677d-fddf-4b70-938b-925a7fa57d55" + } + ], + "related-to-property": [ + { + "property-key": "sp-partner.sp-partner-id", + "property-value": "1b9c677d-fddf-4b70-938b-925a7fa57d55" + } + ] + } + ] + } + } + ], + "service-type": "E2E Service", + "service-role": "E2E Service", + "model-invariant-id": "21886a96-0664-47a3-beae-766952f2059f", + "model-version-id": "54836196-c411-4690-af98-900c1c3aadd7", + "resource-version": "1535685742159", + "input-parameters": { + "service": { + "name": "SiteService", + "description": "SiteService", + "serviceInvariantUuid": "5c13f3fb-2744-4635-9f1f-c59c92dc8f70", + "serviceUuid": "3a76b1f5-fb0d-4b6b-82d5-0e8a4ebc3838", + "globalSubscriberId": "test_custormer", + "serviceType": "example-service-type", + "parameters": { + "locationConstraints": [ + ], + "resources": [], + "requestInputs": { + "sdwanvpnresource_list": [ + { + "sdwanvpn_topology": "hub_spoke", + "sdwanvpn_name": "defaultvpn", + "sdwansitelan_list": [ + { + "role": "Hub", + "portType": "GE", + "portSwitch": "layer3-port", + "vlanId": "dadada", + "ipAddress": "192.168.10.1", + "deviceName": "vCPE", + "portNumer": "0/0/1" + }, + { + "role": "Hub", + "portType": "GE", + "portSwitch": "layer2-port", + "vlanId": "55", + "ipAddress": "192.168.11.1", + "deviceName": "CPE_Beijing", + "portNumer": "0/0/1" + } + ] + }, + { + "sdwanvpn_topology": "hub_spoke", + "sdwanvpn_name": "defaultvpn", + "sdwansitelan_list": [ + { + "role": "Hub", + "portType": "GE", + "portSwitch": "layer3-port", + "vlanId": "dadadada", + "ipAddress": "192.168.10.1", + "deviceName": "vCPE", + "portNumer": "0/0/1" + }, + { + "role": "Hub", + "portType": "GE", + "portSwitch": "layer2-port", + "vlanId": "55", + "ipAddress": "192.168.11.1", + "deviceName": "CPE_Beijing", + "portNumer": "0/0/1" + } + ] + } + ], + "sdwansiteresource_list": [ + { + "sdwansite_emails": "chenchuanyu@huawei.com", + "sdwansite_address": "Huawei Public Cloud", + "sdwansite_description": "DC Site", + "sdwansite_role": "dsvpn_hub", + "sdwansite_postcode": "20000", + "sdwansite_type": "single_gateway", + "sdwansite_latitude": "gdfgdgd", + "sdwansite_controlPoint": "11qq31", + "sdwansite_longitude": "fsdgzcz", + "sdwansitewan_list": [ + { + "providerIpAddress": "101.1010", + "portType": "GE", + "inputBandwidth": "1000", + "ipAddress": "1111111", + "name": "10000", + "transportNetworkName": "internet", + "outputBandwidth": "10000", + "deviceName": "vCPE", + "portNumber": "0/0/0", + "ipMode": "DHCP", + "publicIP": "119.3.7.113" + }, + { + "providerIpAddress": "101.1010", + "portType": "GE", + "inputBandwidth": "1000", + "ipAddress": "1111111", + "name": "10000", + "transportNetworkName": "internet", + "outputBandwidth": "10000", + "deviceName": "vCPE", + "portNumber": "0/0/0", + "ipMode": "DHCP", + "publicIP": "119.3.7.113" + } + ], + "sdwandevice_list": [ + { + "esn": "XXXXXXX", + "vendor": "Huawei", + "name": "vCPE", + "type": "AR1000V", + "version": "1.0", + "class": "VNF", + "systemIp": "20.20.20.1" + } + ] + }, + { + "sdwansite_emails": "chenchuanyu@huawei.com", + "sdwansite_address": "Huawei Public Cloud", + "sdwansite_description": "DC Site", + "sdwansite_role": "dsvpn_hub", + "sdwansite_postcode": "20000", + "sdwansite_type": "single_gateway", + "sdwansite_latitude": "gsgcsca", + "sdwansite_controlPoint": "hrthdfbx", + "sdwansite_longitude": "fwedqdx", + "sdwansitewan_list": [ + { + "providerIpAddress": "01.45.44", + "portType": "GE", + "inputBandwidth": "1000", + "ipAddress": "172.18.1.2/24", + "name": "10000", + "transportNetworkName": "internet", + "outputBandwidth": "10000", + "deviceName": "CPE_Beijing", + "portNumber": "0/0/0", + "ipMode": "Static", + "publicIP": "1111" + } + ], + "sdwandevice_list": [ + { + "esn": "XXXXXXX", + "vendor": "Huawei", + "name": "CPE_Beijing", + "type": "AR161", + "version": "1.0", + "class": "PNF", + "systemIp": "20.20.20.2" + } + ] + } + ] + } + } + } + }, + "relationship-list": { + "relationship": [ + { + "related-to": "sp-partner", + "relationship-label": "org.onap.relationships.inventory.PartOf", + "related-link": "/aai/v13/business/sp-partners/sp-partner/1b9c677d-fddf-4b70-938b-925a7fa57d99", + "relationship-data": [ + { + "relationship-key": "sp-partner.sp-partner-id", + "relationship-value": "1b9c677d-fddf-4b70-938b-925a7fa57d99" + } + ], + "related-to-property": [ + { + "property-key": "sp-partner.sp-partner-id", + "property-value": "1b9c677d-fddf-4b70-938b-925a7fa57d99" + } + ] + }, + { + "related-to": "connectivity", + "relationship-label": "org.onap.relationships.inventory.PartOf", + "related-link": "/aai/v13/network/connectivities/connectivity/4efe6dff-acfc-4d13-a3fd-1177d3c08e84", + "relationship-data": [ + { + "relationship-key": "connectivity.connectivity-id", + "relationship-value": "4efe6dff-acfc-4d13-a3fd-1177d3c08e84" + } + ], + "related-to-property": [ + { + "property-key": "connectivity.etht-svc-name", + "property-value": "SOTNVPNInfra" + } + ] + }, + { + "related-to": "allotted-resource", + "relationship-label": "org.onap.relationships.inventory.Uses", + "related-link": "/aai/v13/business/customers/customer/Democcy/service-subscriptions/service-subscription/CCVPN/service-instances/service-instance/189b87a5-72fe-4197-a307-6929c3831f81/allotted-resources/allotted-resource/bb14feec-1aef-4890-abba-f8f3a906935f", + "relationship-data": [ + { + "relationship-key": "customer.global-customer-id", + "relationship-value": "Democcy" + }, + { + "relationship-key": "service-subscription.service-type", + "relationship-value": "CCVPN" + }, + { + "relationship-key": "service-instance.service-instance-id", + "relationship-value": "189b87a5-72fe-4197-a307-6929c3831f81" + }, + { + "relationship-key": "allotted-resource.id", + "relationship-value": "bb14feec-1aef-4890-abba-f8f3a906935f" + } + ], + "related-to-property": [ + { + "property-key": "allotted-resource.description", + "property-value": "bb14feec-1aef-4890-abba-f8f3a906935f" + }, + { + "property-key": "allotted-resource.allotted-resource-name", + "property-value": "ston ar" + } + ] + }, + { + "related-to": "allotted-resource", + "relationship-label": "org.onap.relationships.inventory.Uses", + "related-link": "/aai/v13/business/customers/customer/Democcy/service-subscriptions/service-subscription/CCVPN/service-instances/service-instance/089b87a5-72fe-4197-a307-6929c3831f80/allotted-resources/allotted-resource/aa14feec-1aef-4890-abba-f8f3a906935f", + "relationship-data": [ + { + "relationship-key": "customer.global-customer-id", + "relationship-value": "Democcy" + }, + { + "relationship-key": "service-subscription.service-type", + "relationship-value": "CCVPN" + }, + { + "relationship-key": "service-instance.service-instance-id", + "relationship-value": "089b87a5-72fe-4197-a307-6929c3831f80" + }, + { + "relationship-key": "allotted-resource.id", + "relationship-value": "aa14feec-1aef-4890-abba-f8f3a906935f" + } + ], + "related-to-property": [ + { + "property-key": "allotted-resource.description", + "property-value": "aa14feec-1aef-4890-abba-f8f3a906935f" + }, + { + "property-key": "allotted-resource.allotted-resource-name", + "property-value": "ston ar" + } + ] + } + ] + } + }, + + { + "service-instance-id": "32cd906f-ee7a-4ecf-b1c3-2fce4d591111", + "service-instance-name": "SOTNVPNInfra", + "serviceDomain":"E2E Service", + "operationResult":"2001", + "operationType":"1001", + "childServiceInstances":[ + + ], + "service-type": "E2E Service", + "service-role": "E2E Service", + "model-invariant-id": "21886a96-0664-47a3-beae-766952f2059f", + "model-version-id": "54836196-c411-4690-af98-900c1c3aadd7", + "resource-version": "1535685742159", + "input-parameters": { + "service": { + "name": "SOTNVPNInfra", + "description": "SOTNVPNInfra", + "serviceInvariantUuid": "21886a96-0664-47a3-beae-766952f2059f", + "serviceUuid": "54836196-c411-4690-af98-900c1c3aadd7", + "globalSubscriberId": "Demonstration", + "serviceType": "CCVPN", + "parameters": { + "locationConstraints": [], + "resources": [ + { + "resourceName": "SOTNConnectivity 0", + "resourceInvariantUuid": "1b9c677d-fddf-4b70-938b-925a7fa57d43", + "resourceUuid": "218df3c3-50dd-4c26-9e36-4771387bb771", + "resourceCustomizationUuid": "b44071c8-04fd-4d6b-b6af-772cbfaa1129", + "parameters": { + "locationConstraints": [ + { + "locationConstraints":{ + "cloudOwner": "City A", + "cloudRegionId": "Core_TIC01" + }, + "vnfProfileId":"4563686a-a63a-457d-8232-a3d07b314028" + }, + { + "locationConstraints":{ + "cloudOwner": "City B", + "cloudRegionId": "Core_TIC02" + }, + "vnfProfileId":"4563686a-a63a-457d-8232-a3d07b314028" + } + ], + "resources": [], + "requestInputs": {} + } + }, + { + "resourceName": "SPPartnerVF 0", + "resourceInvariantUuid": "072f9238-15b0-4bc5-a5f5-f18548739470", + "resourceUuid": "81b9430b-8abe-45d6-8bf9-f41a8f5c735f", + "resourceCustomizationUuid": "c3612284-6c67-4d8c-8b41-b699cc90e76d", + "parameters": { + "locationConstraints": [ + { + "locationConstraints":{ + "cloudOwner": "City A", + "cloudRegionId": "Core_TIC01" + }, + "vnfProfileId":"4563686a-a63a-457d-8232-a3d07b314028" + } + ], + "resources": [], + "requestInputs": {} + } + } + ], + "requestInputs": { + "sotnconnectivity0_eir": "1000", + "sotnconnectivity0_cir": "1000", + "sotnconnectivity0_endTime": "2018-8-8 10:00", + "sotnconnectivity0_ebs": "1000", + "sotnconnectivity0_startTime": "2018-8-1 10:00", + "sotnconnectivity0_dualLink": "true", + "sotnconnectivity0_reroute": "false", + "sotnconnectivity0_cbs": "1000", + "sotnconnectivity0_name": "SOTN L2", + "sotnconnectivity0_SLS": "", + "sotnconnectivity0_description": "", + "sotnconnectivity0_couplingFlag": "", + "sotnconnectivity0_colorAware": "", + "sotnconnectivity0_COS": "standard" + } + } + } + }, + "relationship-list": { + "relationship": [ + { + "related-to": "sp-partner", + "relationship-label": "org.onap.relationships.inventory.PartOf", + "related-link": "/aai/v13/business/sp-partners/sp-partner/1b9c677d-fddf-4b70-938b-925a7fa57d99", + "relationship-data": [ + { + "relationship-key": "sp-partner.sp-partner-id", + "relationship-value": "1b9c677d-fddf-4b70-938b-925a7fa57d99" + } + ], + "related-to-property": [ + { + "property-key": "sp-partner.sp-partner-id", + "property-value": "1b9c677d-fddf-4b70-938b-925a7fa57d99" + } + ] + }, + { + "related-to": "connectivity", + "relationship-label": "org.onap.relationships.inventory.PartOf", + "related-link": "/aai/v13/network/connectivities/connectivity/4efe6dff-acfc-4d13-a3fd-1177d3c08e84", + "relationship-data": [ + { + "relationship-key": "connectivity.connectivity-id", + "relationship-value": "4efe6dff-acfc-4d13-a3fd-1177d3c08e84" + } + ], + "related-to-property": [ + { + "property-key": "connectivity.etht-svc-name", + "property-value": "SOTNVPNInfra" + } + ] + }, + { + "related-to": "allotted-resource", + "relationship-label": "org.onap.relationships.inventory.Uses", + "related-link": "/aai/v13/business/customers/customer/Democcy/service-subscriptions/service-subscription/CCVPN/service-instances/service-instance/189b87a5-72fe-4197-a307-6929c3831f81/allotted-resources/allotted-resource/bb14feec-1aef-4890-abba-f8f3a906935f", + "relationship-data": [ + { + "relationship-key": "customer.global-customer-id", + "relationship-value": "Democcy" + }, + { + "relationship-key": "service-subscription.service-type", + "relationship-value": "CCVPN" + }, + { + "relationship-key": "service-instance.service-instance-id", + "relationship-value": "189b87a5-72fe-4197-a307-6929c3831f81" + }, + { + "relationship-key": "allotted-resource.id", + "relationship-value": "bb14feec-1aef-4890-abba-f8f3a906935f" + } + ], + "related-to-property": [ + { + "property-key": "allotted-resource.description", + "property-value": "bb14feec-1aef-4890-abba-f8f3a906935f" + }, + { + "property-key": "allotted-resource.allotted-resource-name", + "property-value": "ston ar" + } + ] + }, + { + "related-to": "allotted-resource", + "relationship-label": "org.onap.relationships.inventory.Uses", + "related-link": "/aai/v13/business/customers/customer/Democcy/service-subscriptions/service-subscription/CCVPN/service-instances/service-instance/089b87a5-72fe-4197-a307-6929c3831f80/allotted-resources/allotted-resource/aa14feec-1aef-4890-abba-f8f3a906935f", + "relationship-data": [ + { + "relationship-key": "customer.global-customer-id", + "relationship-value": "Democcy" + }, + { + "relationship-key": "service-subscription.service-type", + "relationship-value": "CCVPN" + }, + { + "relationship-key": "service-instance.service-instance-id", + "relationship-value": "089b87a5-72fe-4197-a307-6929c3831f80" + }, + { + "relationship-key": "allotted-resource.id", + "relationship-value": "aa14feec-1aef-4890-abba-f8f3a906935f" + } + ], + "related-to-property": [ + { + "property-key": "allotted-resource.description", + "property-value": "aa14feec-1aef-4890-abba-f8f3a906935f" + }, + { + "property-key": "allotted-resource.allotted-resource-name", + "property-value": "ston ar" + } + ] + } + ] + } + }, + + { + "nsInstanceId": "nsserviceidxxxxxxxxx", + "nsName": "nstext01", + "operationResult":"2001", + "operationType":"1004", + "operationId":"xxxxxxx", + "serviceDomain":"Network Service", + "childServiceInstances":[ + + ], + "description": "nstext01", + "nsdId": "string", + "vnfInfo": [ + { + "vnfInstanceId": "vnfinstanceidxxxxxxx", + "vnfInstanceName": "vnfName1111", + "vnfdId": "string" + }, + { + "vnfInstanceId": "vnfinstanceid2222222", + "vnfInstanceName": "vnfName12222", + "vnfdId": "string" + } + ], + "vlInfo": [ + { + "vlInstanceId": "string", + "vlInstanceName": "string", + "vldId": "string", + "relatedCpInstanceId": [ + { + "cpInstanceId": "string", + "cpInstanceName": "string", + "cpdId": "string" + } + ] + } + ], + "vnffgInfo": [ + { + "vnffgInstanceId": "string", + "vnfdId": "string", + "pnfId": "string", + "virtualLinkId": "string", + "cpdId": "string", + "nfp": "string" + } + ], + "nsState": "string" + }, + { + "nsInstanceId": "nsserviceidxxxxxxxxx", + "nsName": "string", + "operationResult":"2001", + "operationType":"1004", + "operationId":"xxxxxxx", + "serviceDomain":"Network Service", + "childServiceInstances":[ + + ], + "description": "string", + "nsdId": "string", + "vnfInfo": [ + { + "vnfInstanceId": "vnfinstanceidxxxxxxx", + "vnfInstanceName": "vnfName1111", + "vnfdId": "string" + }, + { + "vnfInstanceId": "vnfinstanceid2222222", + "vnfInstanceName": "vnfName12222", + "vnfdId": "string" + } + ], + "vlInfo": [ + { + "vlInstanceId": "string", + "vlInstanceName": "string", + "vldId": "string", + "relatedCpInstanceId": [ + { + "cpInstanceId": "string", + "cpInstanceName": "string", + "cpdId": "string" + } + ] + } + ], + "vnffgInfo": [ + { + "vnffgInstanceId": "string", + "vnfdId": "string", + "pnfId": "string", + "virtualLinkId": "string", + "cpdId": "string", + "nfp": "string" + } + ], + "nsState": "string" + }, + { + "nsInstanceId": "nsserviceidxxxxxxxxx", + "nsName": "string", + "operationResult":"2001", + "operationType":"1004", + "operationId":"xxxxxxx", + "serviceDomain":"Network Service", + "childServiceInstances":[ + + ], + "description": "string", + "nsdId": "string", + "vnfInfo": [ + { + "vnfInstanceId": "vnfinstanceidxxxxxxx", + "vnfInstanceName": "vnfName1111", + "vnfdId": "string" + }, + { + "vnfInstanceId": "vnfinstanceid2222222", + "vnfInstanceName": "vnfName12222", + "vnfdId": "string" + } + ], + "vlInfo": [ + { + "vlInstanceId": "string", + "vlInstanceName": "string", + "vldId": "string", + "relatedCpInstanceId": [ + { + "cpInstanceId": "string", + "cpInstanceName": "string", + "cpdId": "string" + } + ] + } + ], + "vnffgInfo": [ + { + "vnffgInstanceId": "string", + "vnfdId": "string", + "pnfId": "string", + "virtualLinkId": "string", + "cpdId": "string", + "nfp": "string" + } + ], + "nsState": "string" + } + + ] +} + diff --git a/usecaseui-portal/src/app/mock/json/uui-lcm_service-templates.json b/usecaseui-portal/src/app/mock/json/uui-lcm_service-templates.json new file mode 100644 index 00000000..7f49493f --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-lcm_service-templates.json @@ -0,0 +1,43 @@ + +[ + { + "uuid": "d0a4af63-570c-40b3-a26f-ef11366f0a03", + "invariantUUID": "88dcb2f0-085b-4548-8b93-0882e37d25d8", + "name": "SDWANVPNInfraService", + "version": "2.0", + "toscaModelURL": "/sdc/v1/catalog/services/d0a4af63-570c-40b3-a26f-ef11366f0a03/toscaModel", + "category": "E2E Service" + }, + { + "uuid": "4ca96a53-2e18-4297-8dc7-5776fdf6871b", + "invariantUUID": "21886a96-0664-47a3-beae-766952f2059f", + "name": "SOTNVPNInfraService", + "version": "2.0", + "toscaModelURL": "/sdc/v1/catalog/services/4ca96a53-2e18-4297-8dc7-5776fdf6871b/toscaModel", + "category": "E2E Service" + }, + { + "uuid": "ea8bb4d2-00ea-4aeb-ad76-20ac8cb1c99c", + "invariantUUID": "342ff5e8-5592-4455-a537-a81172c9d541", + "name": "sowsiteservice", + "version": "3.0", + "toscaModelURL": "/sdc/v1/catalog/services/ea8bb4d2-00ea-4aeb-ad76-20ac8cb1c99c/toscaModel", + "category": "E2E Service" + }, + { + "uuid": "cb756ffb-8d91-49fb-86f7-12ceb2b13158", + "invariantUUID": "a7029145-4294-4664-b619-00dc959a1ff6", + "name": "SiteServiceV3", + "version": "1.0", + "toscaModelURL": "/sdc/v1/catalog/services/cb756ffb-8d91-49fb-86f7-12ceb2b13158/toscaModel", + "category": "E2E Service" + }, + { + "uuid": "4b4b3ef8-6747-4111-b9e0-81cf251c0068", + "invariantUUID": "5c13f3fb-2744-4635-9f1f-c59c92dc8f70", + "name": "SiteService", + "version": "2.0", + "toscaModelURL": "/sdc/v1/catalog/services/4b4b3ef8-6747-4111-b9e0-81cf251c0068/toscaModel", + "category": "E2E Service" + } +] diff --git a/usecaseui-portal/src/app/mock/json/uui-lcm_services.json b/usecaseui-portal/src/app/mock/json/uui-lcm_services.json new file mode 100644 index 00000000..5e50ea9c --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-lcm_services.json @@ -0,0 +1,6 @@ +{ + "service":{ + "serviceId":"044377e5-3dd4-4f84-86a0-02dab3c43bc5", + "operationId":"1e606677-7864-4bec-b50c-adcd858e4cd8" + } +}
\ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/uui-lcm_services_progress.json b/usecaseui-portal/src/app/mock/json/uui-lcm_services_progress.json new file mode 100644 index 00000000..8676b49a --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-lcm_services_progress.json @@ -0,0 +1,13 @@ +{ + "operationStatus":{ + "operationId": "XXXXXX", + "operation": "create|delete|update|scale", + "result": "finished|error|processing", + "reason": "", + "userId": "", + "operationContent": "Be creating pop.", + "progress": 99, + "operateAt": "", + "finishedAt": "" + } +} diff --git a/usecaseui-portal/src/app/mock/json/uui-lcm_services_updateService.json b/usecaseui-portal/src/app/mock/json/uui-lcm_services_updateService.json new file mode 100644 index 00000000..d99f7709 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-lcm_services_updateService.json @@ -0,0 +1,5 @@ +{ + + "operationId": "e151059a-d924-4629-845f-264db19e50b4" + +}
\ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/uui-lcm_terminateNetworkServiceInstance.json b/usecaseui-portal/src/app/mock/json/uui-lcm_terminateNetworkServiceInstance.json new file mode 100644 index 00000000..f1fcc0d5 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-lcm_terminateNetworkServiceInstance.json @@ -0,0 +1,3 @@ +{ + "jobId": "jobid_xxxxxxxxx" +}
\ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/uui-sotn_getAllottedResources.json b/usecaseui-portal/src/app/mock/json/uui-sotn_getAllottedResources.json new file mode 100644 index 00000000..6c109296 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-sotn_getAllottedResources.json @@ -0,0 +1,122 @@ +{ + "allotted-resource": [ + { + "id": "8beee9a7-abf0-4c98-8073-1d4d03e50033", + "description": "sdwan-attachment", + "selflink": "", + "model-invariant-id": "3d369bb8-5546-41d4-a3e7-a2557295ae40", + "model-version-id": "78ed8099-90a5-49b4-a400-89f38a7cbe6e", + "resource-version": "1537857961665", + "orchestration-status": "", + "operational-status": "", + "type": "", + "role": "spoke", + "allotted-resource-name": "sdwan ar", + "access-provider-id": "", + "access-client-id": "", + "access-topology-id": "", + "access-node-id": "", + "access-ltp-id": "", + "cvlan": "", + "vpn-name": "SDWANVPNInfra", + "relationship-list": { + "relationship": [ + { + "related-to": "service-instance", + "relationship-label": "org.onap.relationships.inventory.Uses", + "related-link": "/aai/v13/business/customers/customer/demo/service-subscriptions/service-subscription/ccvpn/service-instances/service-instance/15e88f8e-473f-4d88-92f8-6739a42baa2g", + "relationship-data": [ + { + "relationship-key": "customer.global-customer-id", + "relationship-value": "demo" + }, + { + "relationship-key": "service-subscription.service-type", + "relationship-value": "ccvpn" + }, + { + "relationship-key": "service-instance.service-instance-id", + "relationship-value": "15e88f8e-473f-4d88-92f8-6739a42baa2g" + } + ], + "related-to-property": [ + { + "property-key": "service-instance.service-instance-name", + "property-value": "SDWANVPNInfra" + } + ] + } + ] + } + }, + { + "id": "28f2b69e-c489-48fa-b974-166104eb15c9", + "description": "sotn-attachment", + "selflink": "", + "model-invariant-id": "d92ce7ca-ca87-4830-972e-83ae9857ded7", + "model-version-id": "3704879e-b07e-4a15-b8fd-f047f966a261", + "resource-version": "1537858263268", + "orchestration-status": "", + "operational-status": "", + "type": "", + "role": "spoke", + "allotted-resource-name": "sotn ar", + "access-provider-id": "", + "access-client-id": "", + "access-topology-id": "", + "access-node-id": "", + "access-ltp-id": "", + "cvlan": "", + "vpn-name": "SOTNVPNInfra", + "relationship-list": { + "relationship": [ + { + "related-to": "service-instance", + "relationship-label": "org.onap.relationships.inventory.Uses", + "related-link": "/aai/v13/business/customers/customer/demo/service-subscriptions/service-subscription/ccvpn/service-instances/service-instance/32cd906f-ee7a-4ecf-b1c3-2fce4d59f8c0", + "relationship-data": [ + { + "relationship-key": "customer.global-customer-id", + "relationship-value": "demo" + }, + { + "relationship-key": "service-subscription.service-type", + "relationship-value": "ccvpn" + }, + { + "relationship-key": "service-instance.service-instance-id", + "relationship-value": "32cd906f-ee7a-4ecf-b1c3-2fce4d59f8c0" + } + ], + "related-to-property": [ + { + "property-key": "service-instance.service-instance-name", + "property-value": "SOTNVPNInfra" + } + ] + }, + { + "related-to": "p-interface", + "relationship-label": "org.onap.relationships.inventory.Uses", + "related-link": "/aai/v13/network/pnfs/pnf/11.11.11.11/p-interfaces/p-interface/nodeId-11.11.11.11-ltpId-36", + "relationship-data": [ + { + "relationship-key": "pnf.pnf-name", + "relationship-value": "11.11.11.11" + }, + { + "relationship-key": "p-interface.interface-name", + "relationship-value": "nodeId-79.79.79.79-ltpId-2" + } + ], + "related-to-property": [ + { + "property-key": "p-interface.prov-status" + } + ] + } + ] + } + } + ] +}
\ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/uui-sotn_getConnectivityInfo.json b/usecaseui-portal/src/app/mock/json/uui-sotn_getConnectivityInfo.json new file mode 100644 index 00000000..967ec98b --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-sotn_getConnectivityInfo.json @@ -0,0 +1,94 @@ +{ + "connectivity": [ + { + "connectivity-id": "4424ea5a-3603-4040-baa9-4046ed533fe5", + "bandwidth-profile-name": "vpn1", + "vpn-type": "ethernet", + "color-aware": "true", + "coupling-flag": "true", + "etht-svc-name": "vpn1", + "access-provider-id": "", + "access-client-id": "", + "access-topology-id": "", + "access-node-id": "", + "access-ltp-id": "", + "connectivity-selflink": "restconf/config/GENERIC-RESOURCE-API:services/service/32cd906f-ee7a-4ecf-b1c3-2fce4d59f8c0/service-data/networks/network/4424ea5a-3603-4040-baa9-4046ed533fe5/network-data/", + "operational-status": "Active", + "model-customization-id": "2bafc8aa-c60c-4a17-a658-db4cbca07fac", + "model-invariant-id": "5d0ada6b-de04-4624-9410-3baab839cd6f", + "model-version-id": "15e21930-3248-4148-b071-a2a9be1f9889", + "resource-version": "1537623789475", + "relationship-list": { + "relationship": [ + { + "related-to": "vpn-binding", + "relationship-label": "org.onap.relationships.inventory.PartOf", + "related-link": "/aai/v13/network/vpn-bindings/vpn-binding/11.11.11.11-vpn1", + "relationship-data": [ + { + "relationship-key": "vpn-binding.vpn-id", + "relationship-value": "11.11.11.11-vpn1" + } + ], + "related-to-property": [ + { + "property-key": "vpn-binding.vpn-name", + "property-value": "11.11.11.11-vpn1" + }, + { + "property-key": "vpn-binding.vpn-type", + "property-value": "ethernet" + } + ] + }, + { + "related-to": "service-instance", + "relationship-label": "org.onap.relationships.inventory.PartOf", + "related-link": "/aai/v13/business/customers/customer/demo/service-subscriptions/service-subscription/ccvpn/service-instances/service-instance/32cd906f-ee7a-4ecf-b1c3-2fce4d59f8c0", + "relationship-data": [ + { + "relationship-key": "customer.global-customer-id", + "relationship-value": "demo" + }, + { + "relationship-key": "service-subscription.service-type", + "relationship-value": "ccvpn" + }, + { + "relationship-key": "service-instance.service-instance-id", + "relationship-value": "32cd906f-ee7a-4ecf-b1c3-2fce4d59f8c0" + } + ], + "related-to-property": [ + { + "property-key": "service-instance.service-instance-name", + "property-value": "SOTNVPNInfra" + } + ] + }, + { + "related-to": "vpn-binding", + "relationship-label": "org.onap.relationships.inventory.PartOf", + "related-link": "/aai/v13/network/vpn-bindings/vpn-binding/12.12.12.12-vpn1", + "relationship-data": [ + { + "relationship-key": "vpn-binding.vpn-id", + "relationship-value": "12.12.12.12-vpn1" + } + ], + "related-to-property": [ + { + "property-key": "vpn-binding.vpn-name", + "property-value": "12.12.12.12-vpn1" + }, + { + "property-key": "vpn-binding.vpn-type", + "property-value": "ethernet" + } + ] + } + ] + } + } + ] +}
\ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/uui-sotn_getExtAaiId.json b/usecaseui-portal/src/app/mock/json/uui-sotn_getExtAaiId.json new file mode 100644 index 00000000..418e772d --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-sotn_getExtAaiId.json @@ -0,0 +1,3 @@ +{ + "resource-version":"cmcc_1.0" +}
\ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/uui-sotn_getHostUrl.json b/usecaseui-portal/src/app/mock/json/uui-sotn_getHostUrl.json new file mode 100644 index 00000000..e84b42d8 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-sotn_getHostUrl.json @@ -0,0 +1,8 @@ +{ + "esr-system-info-id": "gongjie666", + "service-url": "http://10.10.10.10:8080/", + "user-name": "demo", + "password": "demo123456!", + "system-type": "ONAP", + "resource-version": "1536221798873" +} diff --git a/usecaseui-portal/src/app/mock/json/uui-sotn_getLogicalLinks.json b/usecaseui-portal/src/app/mock/json/uui-sotn_getLogicalLinks.json new file mode 100644 index 00000000..1b8ecff1 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-sotn_getLogicalLinks.json @@ -0,0 +1,117 @@ +{ + "logical-link": [ + { + "link-name": "cross-link-1", + "in-maint": false, + "link-type": "cross-link", + "resource-version": "1536029865021", + "operational-status": "up", + "relationship-list": { + "relationship": [ + { + "related-to": "p-interface", + "relationship-label": "tosca.relationships.network.LinksTo", + "related-link": "/aai/v13/network/pnfs/pnf/pnf2000/p-interfaces/p-interface/nodeId-78.78.78.78-ltpId-1", + "relationship-data": [ + { + "relationship-key": "pnf.pnf-name", + "relationship-value": "pnf2000" + }, + { + "relationship-key": "p-interface.interface-name", + "relationship-value": "nodeId-78.78.78.78-ltpId-1" + } + ], + "related-to-property": [ + { + "property-key": "p-interface.prov-status" + } + ] + }, + { + "related-to": "p-interface", + "relationship-label": "tosca.relationships.network.LinksTo", + "related-link": "/aai/v13/network/pnfs/pnf/pnf1000/p-interfaces/p-interface/nodeId-79.79.79.79-ltpId-1", + "relationship-data": [ + { + "relationship-key": "pnf.pnf-name", + "relationship-value": "pnf1000" + }, + { + "relationship-key": "p-interface.interface-name", + "relationship-value": "nodeId-79.79.79.79-ltpId-1" + } + ], + "related-to-property": [ + { + "property-key": "p-interface.prov-status" + } + ] + } + ] + } + }, + { + "link-name": "cross-link-2", + "in-maint": false, + "link-type": "cross-link", + "resource-version": "1536029865021", + "operational-status": "up", + "relationship-list": { + "relationship": [ + { + "related-to": "p-interface", + "relationship-label": "tosca.relationships.network.LinksTo", + "related-link": "/aai/v13/network/pnfs/pnf/pnf3000/p-interfaces/p-interface/nodeId-80.80.80.80-ltpId-2", + "relationship-data": [ + { + "relationship-key": "pnf.pnf-name", + "relationship-value": "pnf3000" + }, + { + "relationship-key": "p-interface.interface-name", + "relationship-value": "nodeId-80.80.80.80-ltpId-2" + } + ], + "related-to-property": [ + { + "property-key": "p-interface.prov-status" + } + ] + }, + { + "related-to": "p-interface", + "relationship-label": "tosca.relationships.network.LinksTo", + "related-link": "/aai/v13/network/pnfs/pnf/pnf-cloud/p-interfaces/p-interface/cloud-tp", + "relationship-data": [ + { + "relationship-key": "pnf.pnf-name", + "relationship-value": "pnf-cloud" + }, + { + "relationship-key": "p-interface.interface-name", + "relationship-value": "cloud-tp" + } + ], + "related-to-property": [ + { + "property-key": "p-interface.prov-status" + } + ] + }, + { + "related-to": "ext-aai-network", + "relationship-label": "org.onap.relationships.inventory.BelongsTo", + "related-link": "/aai/v13/network/ext-aai-networks/ext-aai-network/gongjie666", + "relationship-data": [ + { + "relationship-key": "ext-aai-network.aai-id", + "relationship-value": "gongjie666" + } + ] + } + ] + } + } + ] +} diff --git a/usecaseui-portal/src/app/mock/json/uui-sotn_getNetWorkResources.json b/usecaseui-portal/src/app/mock/json/uui-sotn_getNetWorkResources.json new file mode 100644 index 00000000..faacef83 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-sotn_getNetWorkResources.json @@ -0,0 +1,198 @@ +[ + { + "networkId": "1000", + "pnfs": [ + { + "pnfName": "pnf1000" + } + ], + "tps": [ + { + "interface-name": "nodeId-78.78.78.78-ltpId-5" + }, + { + "interface-name": "nodeId-78.78.78.78-ltpId-4" + }, + { + "interface-name": "nodeId-78.78.78.78-ltpId-1" + }, + { + "interface-name": "nodeId-78.78.78.78-ltpId-3" + }, + { + "interface-name": "nodeId-78.78.78.78-ltpId-2" + } + ], + "aaiId":"" + }, + { + "networkId": "2000", + "pnfs": [ + { + "pnfName": "pnf2000" + } + ], + "tps": [ + { + "interface-name": "nodeId-79.79.79.79-ltpId-5" + }, + { + "interface-name": "nodeId-79.79.79.79-ltpId-4" + }, + { + "interface-name": "nodeId-79.79.79.79-ltpId-1" + }, + { + "interface-name": "nodeId-79.79.79.79-ltpId-3" + }, + { + "interface-name": "nodeId-79.79.79.79-ltpId-2" + } + ], + "aaiId":"" + }, + { + "networkId": "3000", + "pnfs": [ + { + "pnfName": "pnf3000" + } + ], + "tps": [ + { + "interface-name": "nodeId-80.80.80.80-ltpId-5" + }, + { + "interface-name": "nodeId-80.80.80.80-ltpId-4" + }, + { + "interface-name": "nodeId-80.80.80.80-ltpId-1" + }, + { + "interface-name": "nodeId-80.80.80.80-ltpId-3" + }, + { + "interface-name": "nodeId-80.80.80.80-ltpId-2" + } + ], + "aaiId":"" + }, + { + "networkId": "4000", + "pnfs": [ + { + "pnfName": "pnf4000" + } + ], + "tps": [ + { + "interface-name": "nodeId-81.81.81.81-ltpId-5" + }, + { + "interface-name": "nodeId-81.81.81.81-ltpId-4" + }, + { + "interface-name": "nodeId-81.81.81.81-ltpId-1" + }, + { + "interface-name": "nodeId-81.81.81.81-ltpId-3" + }, + { + "interface-name": "nodeId-81.81.81.81-ltpId-2" + } + ], + "aaiId":"" + }, + { + "networkId": "5000", + "pnfs": [ + { + "pnfName": "pnf5000" + } + ], + "tps": [ + { + "interface-name": "nodeId-82.82.82.82-ltpId-5" + }, + { + "interface-name": "nodeId-82.82.82.82-ltpId-4" + }, + { + "interface-name": "nodeId-82.82.82.82-ltpId-1" + }, + { + "interface-name": "nodeId-82.82.82.82-ltpId-3" + }, + { + "interface-name": "nodeId-82.82.82.82-ltpId-2" + } + ], + "aaiId":"" + }, + { + "networkId": "5000", + "pnfs": [ + { + "pnfName": "pnf5000" + } + ], + "tps": [ + { + "interface-name": "nodeId-82.82.82.82-ltpId-5" + }, + { + "interface-name": "nodeId-82.82.82.82-ltpId-4" + }, + { + "interface-name": "nodeId-82.82.82.82-ltpId-1" + }, + { + "interface-name": "nodeId-82.82.82.82-ltpId-3" + }, + { + "interface-name": "nodeId-82.82.82.82-ltpId-2" + } + ], + "aaiId":"" + }, + { + "networkId": "5000", + "pnfs": [ + { + "pnfName": "pnf5000" + } + ], + "tps": [ + { + "interface-name": "nodeId-82.82.82.82-ltpId-5" + }, + { + "interface-name": "nodeId-82.82.82.82-ltpId-4" + }, + { + "interface-name": "nodeId-82.82.82.82-ltpId-1" + }, + { + "interface-name": "nodeId-82.82.82.82-ltpId-3" + }, + { + "interface-name": "nodeId-82.82.82.82-ltpId-2" + } + ], + "aaiId":"" + }, + { + "networkId": "cloud-network", + "pnfs": [ + { + "pnfName": "pnf-cloud" + } + ], + "tps": [ + { + "interface-name": "cloud-tp" + } + ], + "aaiId":"gongjie666" + } +] diff --git a/usecaseui-portal/src/app/mock/json/uui-sotn_getPinterfaceByPnfName.json b/usecaseui-portal/src/app/mock/json/uui-sotn_getPinterfaceByPnfName.json new file mode 100644 index 00000000..399c21b9 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-sotn_getPinterfaceByPnfName.json @@ -0,0 +1,17 @@ +[ + { + "interface-name": "nodeId-78.78.78.78-ltpId-5" + }, + { + "interface-name": "nodeId-78.78.78.78-ltpId-4" + }, + { + "interface-name": "nodeId-78.78.78.78-ltpId-3" + }, + { + "interface-name": "nodeId-78.78.78.78-ltpId-2" + }, + { + "interface-name": "nodeId-78.78.78.78-ltpId-1" + } +] diff --git a/usecaseui-portal/src/app/mock/json/uui-sotn_getPinterfaceByVpnId.json b/usecaseui-portal/src/app/mock/json/uui-sotn_getPinterfaceByVpnId.json new file mode 100644 index 00000000..04ff2a6d --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-sotn_getPinterfaceByVpnId.json @@ -0,0 +1,82 @@ +{ + "vpn-binding": [ + { + "vpn-id": "pnf1000-vpn1", + "vpn-name": "pnf1000-vpn1", + "vpn-type": "ethernet", + "access-provider-id": "5555", + "access-client-id": "6666", + "access-topology-id": "100", + "src-access-node-id": "10.10.10.10", + "src-access-ltp-id": "14", + "dst-access-node-id": "10.10.10.10", + "dst-access-ltp-id": "2", + "operational-status": "Created", + "model-customization-id": "", + "model-invariant-id": "", + "model-version-id": "", + "resource-version": "1536135677693", + "relationship-list": { + "relationship": [ + { + "related-to": "connectivity", + "relationship-label": "org.onap.relationships.inventory.PartOf", + "related-link": "/aai/v13/network/connectivities/connectivity/4efe6dff-acfc-4d13-a3fd-1177d3c08e84", + "relationship-data": [ + { + "relationship-key": "connectivity.connectivity-id", + "relationship-value": "4efe6dff-acfc-4d13-a3fd-1177d3c08e84" + } + ], + "related-to-property": [ + { + "property-key": "connectivity.etht-svc-name", + "property-value": "SOTNVPNInfra" + } + ] + }, + { + "related-to": "p-interface", + "relationship-label": "org.onap.relationships.inventory.BindsTo", + "related-link": "/aai/v13/network/pnfs/pnf/pnf1000/p-interfaces/p-interface/nodeId-79.79.79.79-ltpId-2", + "relationship-data": [ + { + "relationship-key": "pnf.pnf-name", + "relationship-value": "pnf1000" + }, + { + "relationship-key": "p-interface.interface-name", + "relationship-value": "nodeId-79.79.79.79-ltpId-2" + } + ], + "related-to-property": [ + { + "property-key": "p-interface.prov-status" + } + ] + }, + { + "related-to": "p-interface", + "relationship-label": "org.onap.relationships.inventory.BindsTo", + "related-link": "/aai/v13/network/pnfs/pnf/pnf1000/p-interfaces/p-interface/nodeId-79.79.79.79-ltpId-1", + "relationship-data": [ + { + "relationship-key": "pnf.pnf-name", + "relationship-value": "pnf1000" + }, + { + "relationship-key": "p-interface.interface-name", + "relationship-value": "nodeId-79.79.79.79-ltpId-1" + } + ], + "related-to-property": [ + { + "property-key": "p-interface.prov-status" + } + ] + } + ] + } + } + ] +}
\ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/uui-sotn_getPnfInfo.json b/usecaseui-portal/src/app/mock/json/uui-sotn_getPnfInfo.json new file mode 100644 index 00000000..c337bd97 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-sotn_getPnfInfo.json @@ -0,0 +1,29 @@ +{ + "pnf-name": "pnf1000", + "pnf-id": "79.79.79.79", + "in-maint": true, + "resource-version": "1536028638695", + "admin-status": "up", + "operational-status": "up", + "relationship-list": { + "relationship": [ + { + "related-to": "network-resource", + "relationship-label": "tosca.relationships.network.LinksTo", + "related-link": "/aai/v13/network/network-resources/network-resource/1000", + "relationship-data": [ + { + "relationship-key": "network-resource.network-id", + "relationship-value": "1000" + } + ], + "related-to-property": [ + { + "property-key": "network-resource.network-id", + "property-value": "1000" + } + ] + } + ] + } +}
\ No newline at end of file diff --git a/usecaseui-portal/src/app/mock/json/uui-sotn_getSpecificLogicalLink.json b/usecaseui-portal/src/app/mock/json/uui-sotn_getSpecificLogicalLink.json new file mode 100644 index 00000000..e9911409 --- /dev/null +++ b/usecaseui-portal/src/app/mock/json/uui-sotn_getSpecificLogicalLink.json @@ -0,0 +1,52 @@ +{ + "link-name": "nodeId-79.79.79.79-ltpId-4_nodeId-78.78.78.78-ltpId-4", + "in-maint": false, + "link-type": "some type", + "speed-value": "some speed", + "resource-version": "1536212883031", + "operational-status": "up", + "relationship-list": { + "relationship": [ + { + "related-to": "p-interface", + "relationship-label": "tosca.relationships.network.LinksTo", + "related-link": "/aai/v13/network/pnfs/pnf/pnf1000/p-interfaces/p-interface/nodeId-79.79.79.79-ltpId-4", + "relationship-data": [ + { + "relationship-key": "pnf.pnf-name", + "relationship-value": "pnf1000" + }, + { + "relationship-key": "p-interface.interface-name", + "relationship-value": "nodeId-79.79.79.79-ltpId-4" + } + ], + "related-to-property": [ + { + "property-key": "p-interface.prov-status" + } + ] + }, + { + "related-to": "p-interface", + "relationship-label": "tosca.relationships.network.LinksTo", + "related-link": "/aai/v13/network/pnfs/pnf/pnf2000/p-interfaces/p-interface/nodeId-78.78.78.78-ltpId-4", + "relationship-data": [ + { + "relationship-key": "pnf.pnf-name", + "relationship-value": "pnf2000" + }, + { + "relationship-key": "p-interface.interface-name", + "relationship-value": "nodeId-78.78.78.78-ltpId-4" + } + ], + "related-to-property": [ + { + "property-key": "p-interface.prov-status" + } + ] + } + ] + } +} diff --git a/usecaseui-portal/src/app/mock/routes.js b/usecaseui-portal/src/app/mock/routes.js index 9668e2fc..093f847b 100644 --- a/usecaseui-portal/src/app/mock/routes.js +++ b/usecaseui-portal/src/app/mock/routes.js @@ -35,20 +35,61 @@ module.exports = ///////////////////////// ///////<-------------managemence services--------->///// - "/uui-lcm/customers/:customer/service-subscriptions": "/serviceTypes?customer=:customer", + "/uui-lcm/customers/:customer/service-subscriptions": "/serviceType", + "/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?customerId=:customerId&resourceVersion=:resourceVersion": "/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", + "/POST/uui-lcm/fetchCCVPNTemplateData/:uuid":"/uui-lcm_fetchCCVPNTemplateData", + "/POST/uui-lcm/service-templates/:uuid":"/uui-lcm_e2e_service-templates", + "/POST/uui-lcm/fetchNsTemplateData":"/uui-lcm_fetchNsTemplateData", + "/DELETE/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", + "/PUT/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", + "/POST/uui-lcm/healNetworkServiceInstance?ns_instance_id=:ns_instance_id":"/uui-lcm_healNetworkServiceInstance", + "/POST/uui-lcm/services?customerId=:customerId&serviceType=:serviceType&serviceDomain=:serviceDomain":"/uui-lcm_services", + "/POST/uui-lcm/createNetworkServiceInstance":"/uui-lcm_createNetworkServiceInstance", + "/POST/uui-lcm/instantiateNetworkServiceInstance?ns_instance_id=:ns_instance_id&customerId=:customerId&serviceType=:serviceType&serviceDomain=:serviceDomain&parentServiceInstanceId=":"/uui-lcm_instantiateNetworkServiceInstance", + "/POST/uui-lcm/terminateNetworkServiceInstance?ns_instance_id=:ns_instance_id":"/uui-lcm_terminateNetworkServiceInstance", + "/DELETE/uui-lcm/deleteNetworkServiceInstance?ns_instance_id=:ns_instance_id":"/uui-lcm_deleteNetworkServiceInstance", ///////////////////////// ///////<-------------networkhttp services--------->///// - + "/DELETE/uui-sotn/deleteExtNetWork": "/status", + "/uui-sotn/getPinterfaceByPnfName/:pnfName": "/uui-sotn_getPinterfaceByPnfName", + "/PUT/uui-sotn/createLink/:linkName": "/status", + "/uui-sotn/getSpecificLogicalLink/:linkName": "/uui-sotn_getSpecificLogicalLink", + "/uui-sotn/getHostUrl/:aaiId": "/uui-sotn_getHostUrl", + "/uui-sotn/getExtAaiId/:aaiId": "/uui-sotn_getExtAaiId", + "/PUT/uui-sotn/createTopoNetwork/:networkId": "/status", + "/PUT/uui-sotn/createPnf/:nodeName": "/status", + "/PUT/uui-sotn/pnf/:nodeName/p-interfaces/p-interface/:interfaceName/createTerminationPoint": "/status", + "/PUT/uui-sotn/createHostUrl/:aaiId": "/status", ///////////////////////// ///////<-------------onboard services--------->///// - - ///////////////////////// + "/nsd/v1/ns_descriptors/:nsdInfoId/nsd_content": "/nsd_content", + "/vnfpkgm/v1/vnf_packages/:vnfPkgId/package_content": "/nsd_content", + "/nsd/v1/pnf_descriptors/:pnfdInfoId/pnfd_content": "/nsd_content", + "/uui-lcm/jobs/:_jobId": "/uui-lcm_jobs_progress", + "/DELETE/uui-lcm/deleteNsdPackage?nsdInfoId:id": "/DELETE_uui-lcm_deleteNsdPackage", + "/DELETE/uui-lcm/deleteVnfPackage?vnfPkgId:id": "/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/vf-packages": "/POST_uui-lcm_vf-packages", + "/POST/uui-lcm/:jsonData": "/POST_uui-lcm_create", ///////<-------------general interface--------->///// "/api/*": "/$1", diff --git a/usecaseui-portal/src/app/mock/server.js b/usecaseui-portal/src/app/mock/server.js index f0c46fb3..010f480d 100644 --- a/usecaseui-portal/src/app/mock/server.js +++ b/usecaseui-portal/src/app/mock/server.js @@ -18,6 +18,7 @@ const jsonServer = require('json-server'); const server = jsonServer.create(); const middlewares = jsonServer.defaults(); const customersRouters = require('./routes'); +const baseUrl = "/usecaseui-server/v1"; // Set default middlewares (logger, static, cors and no-cache) server.use(middlewares); @@ -68,6 +69,7 @@ function fileDisplay(filePath) { runServer(localJsonDb); }, 100) } + function getjsonContent(path) { let newpath = `./src/app/mock/json/${path}.json`; let result = JSON.parse(fs.readFileSync(newpath)); @@ -82,6 +84,24 @@ function serverRewrite() { function runServer(db) { server.use(jsonServer.router(db)); } +server.post(`${baseUrl}/*`, (req, res, next) => { + const prefix = req.url.replace(baseUrl, ""); + req.url = `${baseUrl}/POST${prefix}`; + req.method = 'GET'; + next(); +}) +server.put(`${baseUrl}/*`, (req, res, next) => { + const prefix = req.url.replace(baseUrl, ""); + req.url = `${baseUrl}/PUT${prefix}`; + req.method = 'GET'; + next(); +}) +server.delete(`${baseUrl}/*`, (req, res, next) => { + const prefix = req.url.replace(baseUrl, ""); + req.url = `${baseUrl}/DELETE${prefix}`; + req.method = 'GET'; + next(); +}) server.listen(3002, () => { console.log('Mock Server is successfully running on port 3002 😁') diff --git a/usecaseui-portal/src/app/shared/components/charts/pie/pie.component.ts b/usecaseui-portal/src/app/shared/components/charts/pie/pie.component.ts index dc5c80a0..85cf72ee 100644 --- a/usecaseui-portal/src/app/shared/components/charts/pie/pie.component.ts +++ b/usecaseui-portal/src/app/shared/components/charts/pie/pie.component.ts @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, ViewChild, ElementRef } from '@angular/core'; import { SimpleChanges } from '@angular/core/src/metadata/lifecycle_hooks'; @Component({ @@ -110,5 +110,10 @@ export class PieComponent implements OnInit { }) } + resize(parentHeight: number, size: number){ + this.chartIntance.resize( { + height: parentHeight - size + }) + } } diff --git a/usecaseui-portal/src/app/shared/components/notification/notification.component.html b/usecaseui-portal/src/app/shared/components/notification/notification.component.html new file mode 100644 index 00000000..f20fd48c --- /dev/null +++ b/usecaseui-portal/src/app/shared/components/notification/notification.component.html @@ -0,0 +1,50 @@ +<ng-template #notificationModel> + <div class="ant-notification-notice-content"> + <div class="ant-notification-notice-with-icon"> + <span class="ant-notification-notice-icon"> + <img src="{{notificationAttributes.imgPath}}" alt="{{notificationAttributes.status}}"> + </span> + <!-- customer&onboard --> + <div *ngIf="!isServicesList"> + <div class="ant-notification-notice-message"> + {{(notificationAttributes.action === 'OnboardingState'? notificationAttributes.title : "i18nTextDefine_"+notificationAttributes.title) | translate}} + {{"i18nTextDefine_"+notificationAttributes.action | translate}} {{"i18nTextDefine_"+notificationAttributes.status | translate}} + </div> + <div class="ant-notification-notice-description"> + <div class="notificationlist"> + <p *ngIf="notificationAttributes.action !== 'OnboardingState'">{{"i18nTextDefine_"+notificationAttributes.title | translate}}:</p> + <p *ngIf="notificationAttributes.action === 'OnboardingState'">{{notificationAttributes.title}} id: </p> + <span>{{ notificationAttributes.name }}</span> + </div> + </div> + <div class="close-icons">{{"i18nTextDefine_Close" | translate}}</div> + </div> + <!-- services-list --> + <div *ngIf="isServicesList"> + <div class="ant-notification-notice-message" + *ngIf="notificationAttributes.title === 'CCVPN' || notificationAttributes.title === 'SOTN'"> + {{ notificationAttributes.title }} {{notificationAttributes.status === 'Success'? "i18nTextDefine_InstanceTeminatedSuccessfully" : (notificationAttributes.status === 'Failed'?"i18nTextDefine_InstanceTeminationFailed":"i18nTextDefine_InstanceTeminationStarting") | translate}} + </div> + <div class="ant-notification-notice-message" + *ngIf="notificationAttributes.title === 'E2E Service' || notificationAttributes.title === 'Network Service'"> + {{notificationAttributes.title === 'E2E Service'?'E2E': 'NS'}} {{notificationAttributes.status === 'Success'? "i18nTextDefine_InstanceTeminatedSuccessfully" :(notificationAttributes.status === 'Failed'?"i18nTextDefine_InstanceTeminationFailed":"i18nTextDefine_InstanceTeminationStarting")| translate}} + </div> + <div class="ant-notification-notice-description"> + <div class="notificationlist"> + <p> {{"i18nTextDefine_InstanceName" | translate}} :</p> + <span>{{ notificationAttributes.name }} </span> + </div> + <div class="notificationlist"> + <p> {{"i18nTextDefine_Customer" | translate}} :</p> + <span>{{ customerSelected.name }}</span> + </div> + <div class="notificationlist"> + <p> {{"i18nTextDefine_UseCase" | translate}} :</p> + <span>{{ notificationAttributes.title }}</span> + </div> + </div> + <div class="close-icons">{{"i18nTextDefine_Close" | translate}}</div> + </div> + </div> + </div> +</ng-template> diff --git a/usecaseui-portal/src/app/views/services/services.component.less b/usecaseui-portal/src/app/shared/components/notification/notification.component.less index e69de29b..e69de29b 100644 --- a/usecaseui-portal/src/app/views/services/services.component.less +++ b/usecaseui-portal/src/app/shared/components/notification/notification.component.less diff --git a/usecaseui-portal/src/app/shared/components/notification/notification.component.spec.ts b/usecaseui-portal/src/app/shared/components/notification/notification.component.spec.ts new file mode 100644 index 00000000..69192c5e --- /dev/null +++ b/usecaseui-portal/src/app/shared/components/notification/notification.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { NotificationComponent } from './notification.component'; + +describe('NotificationComponent', () => { + let component: NotificationComponent; + let fixture: ComponentFixture<NotificationComponent>; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ NotificationComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(NotificationComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/usecaseui-portal/src/app/shared/components/notification/notification.component.ts b/usecaseui-portal/src/app/shared/components/notification/notification.component.ts new file mode 100644 index 00000000..de0df083 --- /dev/null +++ b/usecaseui-portal/src/app/shared/components/notification/notification.component.ts @@ -0,0 +1,46 @@ +import { Component, OnInit, ViewChild, Input } from '@angular/core'; +import { NzNotificationService } from 'ng-zorro-antd'; + +@Component({ + selector: 'app-notification', + templateUrl: './notification.component.html', + styleUrls: ['./notification.component.less'] +}) +export class NotificationComponent implements OnInit { + @ViewChild('notificationModel')notificationModel: any; + @Input()isServicesList: boolean; + @Input()customerSelected: object; + + notificationAttributes: { + title: string, + imgPath: string, + action: string, + status: string, + name: string + }; + + constructor(private notification: NzNotificationService) { } + + ngOnInit() { + } + + setNotification({ title, imgPath, action, status, name }):void{ + this.notificationAttributes = { title, imgPath, action, status, name }; + } + notificationSuccess(title: string, action: string, name: string): void { + this.notification.remove(); + this.setNotification({ title, imgPath: "assets/images/execute-success.png", action, status: 'Success', name }) + this.notification.template(this.notificationModel); + } + notificationFailed(title: string, action: string, name: string): void { + this.notification.remove(); + this.setNotification({ title, imgPath: "assets/images/execute-faild.png", action, status: 'Failed', name }) + this.notification.template(this.notificationModel) + } + notificationStart(title: string, action: string, name: string): void { + this.notification.remove(); + this.setNotification({ title, imgPath: "assets/images/execute-inproess.png", action , status: 'instance temination is starting', name }) + this.notification.template(this.notificationModel) + } + +} diff --git a/usecaseui-portal/src/app/shared/utils/animates.ts b/usecaseui-portal/src/app/shared/utils/animates.ts index d5c29b7e..86780a3a 100644 --- a/usecaseui-portal/src/app/shared/utils/animates.ts +++ b/usecaseui-portal/src/app/shared/utils/animates.ts @@ -18,17 +18,17 @@ import { trigger, state, style, animate, transition } from '@angular/animations' // Routing animation export const slideToRight = trigger('routerAnimate', [ // Define void to indicate empty state - state('void', style({ position:'fixed', zIndex:'-1' })), //I don't understand why I want to add a positioning animation to take effect. + state('void', style({ })), // * Indicates any state - state('*', style({ })), + state('*', style({})), // Admission animation transition(':enter', [ - style({transform: 'translateX(-100%)'}), + style({transform: 'translateX(-100%)',position: 'fixed',width: '*'}), animate('.5s ease-in-out') ]), // Opening animation transition(':leave', [ - animate('.5s ease-in-out', style({transform: 'translateX(100%)'}) ) + animate('.5s ease-in-out', style({transform: 'translateX(100%)',position: 'fixed',width:'*' }) ) ]) ]); // Detail page shows hidden animation diff --git a/usecaseui-portal/src/app/test/test.component.spec.ts b/usecaseui-portal/src/app/test/test.component.spec.ts index ef4e38cb..47300e1f 100644 --- a/usecaseui-portal/src/app/test/test.component.spec.ts +++ b/usecaseui-portal/src/app/test/test.component.spec.ts @@ -1,5 +1,8 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { NO_ERRORS_SCHEMA, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { HttpClientModule } from '@angular/common/http'; +import { TextService } from '../core/services/text.service'; import { TestComponent } from './test.component'; describe('TestComponent', () => { @@ -8,9 +11,15 @@ describe('TestComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ TestComponent ] + schemas: [ + CUSTOM_ELEMENTS_SCHEMA, + NO_ERRORS_SCHEMA + ], + imports: [HttpClientModule], + providers: [TextService], + declarations: [TestComponent] }) - .compileComponents(); + .compileComponents(); })); beforeEach(() => { diff --git a/usecaseui-portal/src/app/views/alarm/alarm.component.spec.ts b/usecaseui-portal/src/app/views/alarm/alarm.component.spec.ts index 9f01597e..8276e423 100644 --- a/usecaseui-portal/src/app/views/alarm/alarm.component.spec.ts +++ b/usecaseui-portal/src/app/views/alarm/alarm.component.spec.ts @@ -60,7 +60,7 @@ fdescribe('AlarmComponent', () => { const req = httpMock.expectOne('http://.../data/contacts'); expect(req.request.method).toEqual('GET'); // Then we set the fake data to be returned by the mock - req.flush({ data: ...}); + req.flush({ data: {pageInfo: {totalRecordCount: 21, pageNumber: 0}, data: []}}); }) ); }); diff --git a/usecaseui-portal/src/app/views/ccvpn-network/ccvpn-network.component.html b/usecaseui-portal/src/app/views/ccvpn-network/ccvpn-network.component.html index 25687f67..fb025d96 100644 --- a/usecaseui-portal/src/app/views/ccvpn-network/ccvpn-network.component.html +++ b/usecaseui-portal/src/app/views/ccvpn-network/ccvpn-network.component.html @@ -145,7 +145,7 @@ </li> </ul> <button nz-button nzType="primary" nzSize="small" class="del-button" style="width: 90px;" (click)="delLink()" *ngIf="!delcloud"> {{"i18nTextDefine_DeleteLink" | translate}} </button> - <button nz-button nzType="primary" nzSize="small" class="del-button" style="width: 90px;" (click)="delCloudLink()" *ngIf="delcloud"> {{"i18nTextDefine_deleteLink" | translate}} </button> + <button nz-button nzType="primary" nzSize="small" class="del-button" style="width: 90px;" (click)="delCloudLink()" *ngIf="delcloud"> {{"i18nTextDefine_DeleteLink" | translate}} </button> <button nz-button nzType="default" nzSize="small" class="del-button" style="width: 60px;" (click)="hideForm()"> {{"i18nTextDefine_Cancel" | translate}} </button> </div> </div> diff --git a/usecaseui-portal/src/app/views/ccvpn-network/ccvpn-network.component.ts b/usecaseui-portal/src/app/views/ccvpn-network/ccvpn-network.component.ts index d02149d0..a2f9561c 100644 --- a/usecaseui-portal/src/app/views/ccvpn-network/ccvpn-network.component.ts +++ b/usecaseui-portal/src/app/views/ccvpn-network/ccvpn-network.component.ts @@ -688,7 +688,7 @@ export class CcvpnNetworkComponent implements OnInit { let params = { pnfName: this.selectedNode1, }; - this.myhttp.getPInterfacesData1(params) + this.myhttp.getPInterfacesData(params) .subscribe((data) => { this.tpOption1 = []; for (let i = 0; i < data.length; i++) { @@ -716,7 +716,7 @@ export class CcvpnNetworkComponent implements OnInit { let params = { pnfName: this.selectedNode2, }; - this.myhttp.getPInterfacesData2(params) + this.myhttp.getPInterfacesData(params) .subscribe((data) => { this.tpOption2 = []; for (let i = 0; i < data.length; i++) { diff --git a/usecaseui-portal/src/app/views/home/home.component.html b/usecaseui-portal/src/app/views/home/home.component.html index 0946b587..faa5dcd4 100644 --- a/usecaseui-portal/src/app/views/home/home.component.html +++ b/usecaseui-portal/src/app/views/home/home.component.html @@ -17,9 +17,9 @@ <div class="content"> <!-- left-content --> <div class="left-content"> - <div class="services"> + <div class="services" #services> <h4>{{"i18nTextDefine_SERVICES" | translate}}</h4> - <app-pie [initData]="serviceChartInit" [chartData]="serviceChartData"></app-pie> + <app-pie [initData]="serviceChartInit" [chartData]="serviceChartData" #seriverChart></app-pie> <div> <h5><span>{{"i18nTextDefine_Total" | translate}}:</span> {{serviceNumber}} <span>{{"i18nTextDefine_cutomers_and" | translate}}</span> {{serviceNumber}} @@ -34,7 +34,7 @@ <div class="details"> <li class="detailstoplinContent"> <div class="detailstoplin"> - <div><span></span> NS</div> + <div>NS</div> <div> <app-bar [initData]="serviceBarChartInit" [chartData]="servicesBarChartData"></app-bar> </div> @@ -43,7 +43,7 @@ </li> <li class="detailstoplinContent"> <div class="detailstoplin"> - <div><span style="background-color:#BCECB8;"></span> VNF</div> + <div>VNF</div> <div> <app-bar [initData]="serviceBarChartInit" [chartData]="servicesBarChartData1"></app-bar> </div> @@ -52,7 +52,7 @@ </li> <li class="detailstoplinContent"> <div class="detailstoplin"> - <div><span style="background-color:#ACCAF4;"></span> PNF</div> + <div>PNF</div> <div> <app-bar [initData]="serviceBarChartInit" [chartData]="servicesBarChartData2"></app-bar> </div> diff --git a/usecaseui-portal/src/app/views/home/home.component.less b/usecaseui-portal/src/app/views/home/home.component.less index dc736f18..cb0d877e 100644 --- a/usecaseui-portal/src/app/views/home/home.component.less +++ b/usecaseui-portal/src/app/views/home/home.component.less @@ -15,12 +15,17 @@ */ .content { - padding: 20px 20px; - overflow: hidden; + padding: 20px; + min-height: 937px; + height: 100vh; .left-content{ + height: 100%; float: left; width:30%; .services,.PACKAGE{ + display:flex; + flex-direction: column; + justify-content: space-between; width: 100%; background:rgba(255,255,255,1); box-shadow:0px 10px 10px 2px rgba(222,222,222,0.5); @@ -34,27 +39,27 @@ font: 400 14px/14px "Arial"; } .tip { - float: right; + align-self: flex-end; width: 110px; line-height: 35px; border-radius: 5px; background-color: #eceff4; font-size: 16px; color: #3C4F8C; - margin-top: 20px; - margin-bottom: 0; text-align: center; + cursor: pointer; span{ color: #3C4F8C; } } } .services{ - height:466px; - h4{ - margin-bottom: 20px; - } + min-height:467px; + height: 49vh; + flex-wrap: wrap; h5 { + position: relative; + z-index: 3; font: 500 18px/18px "ArialMT"; color:#0DA9E2; margin: -2em 0 1em 0 ; @@ -78,23 +83,20 @@ } } .PACKAGE{ - height:422px; + min-height:410px; + height: 43vh; margin-top: 20px; - h4{ - margin-bottom: 50px; - } .details { .detailstoplinContent{ border-bottom:0.5px solid rgba(237,237,237,1); border-radius:4px; - line-height: 45px; + line-height: 58px; font-size: 14px; color: #3C4F8C; font-family:"ArialMT"; .detailstoplin { width: 100%; - height: 50px; - border-top: 0.5px solid #ededed; + height: 58px; border-radius: 4px; div:first-child{ width: 20%; @@ -112,18 +114,22 @@ color:rgba(60,79,140,0.5); } } - } + &:first-child{ + border-top: 0.5px solid rgba(237,237,237,1); + } + } } } } .right-content { + height: 100%; float: left; width: 70%; - height: 96vh; padding-left: 15px; .rt-content { - height: 40%; + min-height: 327px; + height: 34vh; margin-bottom: 18px; background:rgba(255,255,255,1); box-shadow:0px 10px 10px 2px rgba(222,222,222,0.5); @@ -201,7 +207,8 @@ } .rb-content { position: relative; - height: 58%; + min-height: 550px; + height: 58vh; background-color: #fff; padding: 24px 30px; box-shadow:0px 10px 15px 2px rgba(222,222,222,0.5); diff --git a/usecaseui-portal/src/app/views/home/home.component.ts b/usecaseui-portal/src/app/views/home/home.component.ts index 153e2219..a7f312e6 100644 --- a/usecaseui-portal/src/app/views/home/home.component.ts +++ b/usecaseui-portal/src/app/views/home/home.component.ts @@ -13,12 +13,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Component, OnInit, Input, Output, EventEmitter, HostBinding } from '@angular/core'; +import { Component, OnInit, HostBinding, ViewChild, ElementRef } from '@angular/core'; import { HomesService } from '../../core/services/homes.service'; import { slideToRight } from '../../shared/utils/animates'; import { Util } from '../../shared/utils/utils'; import { TranslateService } from "@ngx-translate/core"; import { Router } from '@angular/router'; +import { Observable } from 'rxjs' @Component({ selector: 'app-home', @@ -28,12 +29,16 @@ import { Router } from '@angular/router'; }) export class HomeComponent implements OnInit { @HostBinding('@routerAnimate') routerAnimateState; + @ViewChild('seriverChart') seriverChart; + @ViewChild('services') services: ElementRef; + resizeMark constructor( - private myhttp: HomesService, - private router: Router, - private Util: Util - ) { } + private myhttp: HomesService, + private router: Router, + private Util: Util + ) { + } ngOnInit() { this.getListSortMasters(); @@ -44,16 +49,27 @@ export class HomeComponent implements OnInit { this.getHomeServiceBarNsData(); this.getHomeServiceBarVnfData(); this.getHomeServiceBarPnfData(); + this.resizeMark = Observable.fromEvent(window,'resize') + .subscribe((event) => { + this.seriverChart.resize(this.services.nativeElement.offsetHeight,250) + }) + } + + ngAfterViewInit(){ + this.seriverChart.resize(this.services.nativeElement.offsetHeight,250) } + ngOnDestroy(){ + this.resizeMark.unsubscribe() + } // services serviceNumber: number = 0; serviceChartData: Object; serviceChartInit: Object = { - backgroundColor: '#fff', - height: 200, + height: 280, option: { + backgroundColor: '#fff', legend: { orient: 'vertical', left: '0px', @@ -100,17 +116,11 @@ export class HomeComponent implements OnInit { } }; // gethomeServiceData - serviceChart = true; getHomeServiceData() { this.myhttp.getHomeServiceData() .subscribe( (data) => { this.serviceNumber = data.serviceTotalNum; - if (this.serviceNumber > 0) { - this.serviceChart = true; - } else { - this.serviceChart = false; - } this.serviceChartData = { series: [{ data: data.customerServiceList }] }; @@ -165,7 +175,7 @@ export class HomeComponent implements OnInit { show: false, }, emphasis: { - show: true, + show: false, formatter: '{b}\n{c},{d}%', color: "#3C4F8C" } @@ -230,7 +240,7 @@ export class HomeComponent implements OnInit { show: false, }, emphasis: { - show: true, + show: false, formatter: '{b}\n{c},{d}%', color: "#3C4F8C" } @@ -301,7 +311,7 @@ export class HomeComponent implements OnInit { servicesBarChartData1: Object; servicesBarChartData2: Object; serviceBarChartInit: Object = { - height: 40, + height: 58, width: 160, option: { tooltip: { diff --git a/usecaseui-portal/src/app/shared/components/customer/customer.component.html b/usecaseui-portal/src/app/views/management/customer/customer.component.html index c0d3c8d5..63b0a5b8 100644 --- a/usecaseui-portal/src/app/shared/components/customer/customer.component.html +++ b/usecaseui-portal/src/app/views/management/customer/customer.component.html @@ -15,9 +15,9 @@ --> <div class="content"> <div class="chearts"> - <div class="Cu"> + <div class="Cu" #chart> <p> {{"i18nTextDefine_Instance_Count_of_Customer" | translate}} </p> - <app-pie [initData]="CUChartInit" [chartData]="CUChartData" *ngIf="serviceChart"></app-pie> + <app-pie [initData]="CUChartInit" [chartData]="CUChartData" *ngIf="serviceChart" #pie></app-pie> <div *ngIf="!serviceChart">No Service Instances </div> </div> <div class="type"> @@ -41,7 +41,7 @@ <input nz-input placeholder=" {{'i18nTextDefine_Input_customerName' | translate}} " class="customer_name" nzSize="default" [(ngModel)]="addNewCustomer"> <button nz-button nzType="primary" class="customer_addbut" - (click)="createNewCustomer(notificationModel)">{{"i18nTextDefine_Add" | translate}}</button> + (click)="createNewCustomer()">{{"i18nTextDefine_Add" | translate}}</button> </div> <div class="customer_list"> <ul> @@ -49,7 +49,7 @@ (click)="choseCustomer(i,item)"> <img src="assets/images/customer05.png" alt=""> <span>{{item.name}}</span> - <i class="anticon anticon-delete" nzType="info" (click)="deleteCustomerModel(item)"></i> + <i class="anticon anticon-delete" (click)="deleteCustomerModel(item)"></i> </li> </ul> </div> @@ -67,7 +67,7 @@ <input nz-input placeholder=" {{'i18nTextDefine_Input_ServicesType' | translate}} " class="services_name" nzSize="default" [(ngModel)]="addNewServiceType"> <button nz-button nzType="primary" class="services_addbut" - (click)="createNewServiceType(notificationModel)">{{"i18nTextDefine_Add" | translate}}</button> + (click)="createNewServiceType()">{{"i18nTextDefine_Add" | translate}}</button> </div> <div class="services_list_content"> <div class="border_size"></div> @@ -75,7 +75,7 @@ <ul> <li *ngFor="let item of AllServiceTypes"> <span>{{item.type}}</span> - <i class="anticon anticon-delete" nzType="info" (click)="deleteServiceTypeModel(item)"></i> + <i class="anticon anticon-delete" (click)="deleteServiceTypeModel(item)"></i> </li> </ul> </div> @@ -84,7 +84,7 @@ </div> <nz-modal nzWidth="428" [(nzVisible)]="deleteCustomerModelVisible" nzTitle=" {{'i18nTextDefine_delete' | translate}} " - (nzOnCancel)="deleteCustomerCancel()" (nzOnOk)="deleteCustomerOk(notificationModel)" nzClassName="deleteModel" + (nzOnCancel)="deleteCustomerCancel()" (nzOnOk)="deleteCustomerOk()" nzClassName="deleteModel" nzCancelText=" {{'i18nTextDefine_Cancel' | translate}} " nzOkText=" {{'i18nTextDefine_modelOk' | translate}} "> <h3><span style="color: red">* </span> {{"i18nTextDefine_Input_Sure_deleteCustomer" | translate}} </h3> <div class="question"> @@ -98,7 +98,7 @@ </nz-modal> <nz-modal nzWidth="428" [(nzVisible)]="deleteServiceTypeModelVisible" nzTitle=" {{'i18nTextDefine_delete' | translate}} " (nzOnCancel)="deleteServiceTypeCancel()" - (nzOnOk)="deleteServiceTypeOk(notificationModel)" nzClassName="deleteModel deleteServiceTypeModel" + (nzOnOk)="deleteServiceTypeOk()" nzClassName="deleteModel deleteServiceTypeModel" nzCancelText=" {{'i18nTextDefine_Cancel' | translate}} " nzOkText=" {{'i18nTextDefine_modelOk' | translate}} "> <h3><span style="color: red">* </span> {{"i18nTextDefine_Input_Sure_deleteServiceType" | translate}} </h3> <div class="question"> @@ -114,25 +114,5 @@ <div class="deleteModelContent">{{thisdeleteServiceType["type"]}}</div> </div> </nz-modal> - <!--2019.08.14 add notification--> - <ng-template #notificationModel> - <div class="ant-notification-notice-content"> - <div class="ant-notification-notice-with-icon"> - <span class="ant-notification-notice-icon"> - <img src="{{this.notificationAttributes.imgPath}}" alt="{{notificationAttributes.status}}"> - </span> - <div class="ant-notification-notice-message" *ngIf="notificationAttributes.title == 'Customer'"> - {{"i18nTextDefine_"+notificationAttributes.title | translate}} - {{"i18nTextDefine_"+notificationAttributes.action | translate}} {{"i18nTextDefine_"+notificationAttributes.status | translate}} - </div> - <div class="ant-notification-notice-description"> - <div class="notificationlist"> - <p>{{"i18nTextDefine_"+notificationAttributes.title | translate}}:</p> - <span>{{ notificationAttributes.name }}</span> - </div> - </div> - <div class="close-icons">{{"i18nTextDefine_Close" | translate}}</div> - </div> - </div> - </ng-template> + <app-notification #notification [isServicesList]="false"></app-notification> </div>
\ No newline at end of file diff --git a/usecaseui-portal/src/app/shared/components/customer/customer.component.less b/usecaseui-portal/src/app/views/management/customer/customer.component.less index e5bf2dd3..93e14455 100644 --- a/usecaseui-portal/src/app/shared/components/customer/customer.component.less +++ b/usecaseui-portal/src/app/views/management/customer/customer.component.less @@ -16,7 +16,7 @@ .content { display: flex; width: 100%; - height: 100%; + min-height: 917px; i.anticon { cursor: pointer; font-size: 18px; @@ -42,18 +42,24 @@ >div{ padding: 20px 20px; } - .Cu { - height: 48%; + .Cu,.type{ + min-height: 438px; + height: 46.5vh; width: 100%; - margin-bottom: 7%; margin-right: 2.5%; border-radius: 5px; background-color: #fff; box-shadow: 0 2px 23px 0 rgba(0, 0, 0, 0.1), 0 2px 49px 0 rgba(0, 0, 0, 0.06); - p { - color :#0DA9E2; + p{ + color: #0DA9E2; font-family:"ArialMT"; } + } + .Cu { + margin-bottom: 20px; + p{ + margin-bottom: 60px; + } div:last-child{ color: #ddd; font-weight: 700; @@ -64,36 +70,43 @@ } } .type { - height: 48%; - width: 100%; - margin-right: 2.5%; - border-radius: 5px; - background-color: #fff; - box-shadow: 0 2px 23px 0 rgba(0, 0, 0, 0.1), 0 2px 49px 0 rgba(0, 0, 0, 0.06); - p { - color :#0DA9E2; - font-family:"ArialMT"; - } + display: flex; + flex-direction: column; + justify-content: space-between; app-bar{ + position: relative; + left: 0px; + top: -6%; width: 100%; } .footname{ + display: block; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; width: 100%; height: 40px; line-height: 40px; text-align: center; color: #3C4F8C; - margin-top: 20px; + margin-bottom: 20px; + img{ margin-right: 5px; margin-bottom: 3px; } } + // &::after{ + // display: block; + // content: ''; + // height: 1px; + // } } } .customer { - height: 100%; + min-height: 897px; + height: 95.7vh; overflow: hidden; width: 32%; margin-right: 1.5%; @@ -104,7 +117,6 @@ vertical-align: top; .customer_title { line-height: 3.5em; - //height: 5%; width: 100%; border-bottom: 1px #07A9E1 solid; .customers { @@ -168,7 +180,10 @@ span { width: 70%; padding-left: 10%; - display: inline-block; + display: block; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } } } @@ -176,8 +191,9 @@ } .services_type { + min-height: 897px; + height: 95.7vh; overflow: hidden; - height: 100%; border-radius: 5px; width: 32%; background-color: #fff; diff --git a/usecaseui-portal/src/app/shared/components/customer/customer.component.spec.ts b/usecaseui-portal/src/app/views/management/customer/customer.component.spec.ts index f185e7a7..f185e7a7 100644 --- a/usecaseui-portal/src/app/shared/components/customer/customer.component.spec.ts +++ b/usecaseui-portal/src/app/views/management/customer/customer.component.spec.ts diff --git a/usecaseui-portal/src/app/shared/components/customer/customer.component.ts b/usecaseui-portal/src/app/views/management/customer/customer.component.ts index a510e6db..20cebccb 100644 --- a/usecaseui-portal/src/app/shared/components/customer/customer.component.ts +++ b/usecaseui-portal/src/app/views/management/customer/customer.component.ts @@ -13,32 +13,47 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Component, OnInit, TemplateRef } from '@angular/core'; +import { Component, OnInit, ViewChild } from '@angular/core'; import { ManagemencsService } from '../../../core/services/managemencs.service'; -import { NzNotificationService } from 'ng-zorro-antd'; +import { Observable } from 'rxjs'; + @Component({ selector: 'app-customer', templateUrl: './customer.component.html', styleUrls: ['./customer.component.less'] }) export class CustomerComponent implements OnInit { + @ViewChild('chart') chart; + @ViewChild('pie') pie; + @ViewChild('notification')notification:any; public chose = ''; + resizeMark; constructor( private managemencs: ManagemencsService, - private notification: NzNotificationService ) { } ngOnInit() { this.getAllCustomers(); + this.resizeMark = Observable.fromEvent(window,'resize') + .subscribe((event) => { + this.pie.resize(this.chart.nativeElement.offsetHeight,210) + }) } + ngAfterViewInit(){ + this.pie.resize(this.chart.nativeElement.offsetHeight,210) + } + + ngOnDestroy(){ + this.resizeMark.unsubscribe() + } + AllCustomersdata = []; AllServiceTypes = []; customerber = []; // Get all customers - active; selectCustomer = { name: null, id: null @@ -47,37 +62,16 @@ export class CustomerComponent implements OnInit { addNewServiceType = null; deleteCustomerModelVisible = false; deleteServiceTypeModelVisible = false; - //2019.08.14 add - notificationAttributes = { - "title": "Customer", - "imgPath": "assets/images/execute-inproess.png", - "action": "Create", - "status": "InProgress", - "name": "" - }; - notificationModelShow(template: TemplateRef<{}>): void { - this.notification.template(template); - } - notificationSuccess(notificationModel) { - this.notificationAttributes.imgPath = "assets/images/execute-success.png"; - this.notificationAttributes.status = "Success"; - this.notificationModelShow(notificationModel); - } - notificationFailed(notificationModel) { - this.notificationAttributes.imgPath = "assets/images/execute-faild.png"; - this.notificationAttributes.status = "Failed"; - this.notificationModelShow(notificationModel); - } getAllCustomers() { this.managemencs.getAllCustomers().subscribe((data) => { this.AllCustomersdata = data.map((item) => { return { name: item["subscriber-name"], id: item["global-customer-id"] } }); - this.active = this.selectCustomer = this.AllCustomersdata[0]; + this.selectCustomer = this.AllCustomersdata[0]; this.serviceInit["customer"] = this.AllCustomersdata[0].name; this.getCustomersPie(); - this.getServiceTypes(this.active); - this.getCustomersColumn(this.active); + this.getServiceTypes(this.selectCustomer); + this.getCustomersColumn(this.selectCustomer); }) } @@ -174,15 +168,9 @@ export class CustomerComponent implements OnInit { Pie_name = []; Pie_value = []; serviceChart = true; - serviceNumber; getCustomersPie() { this.managemencs.getCustomersPie().subscribe((data) => { - this.serviceNumber = data.serviceTotalNum; - if (this.serviceNumber > 0) { - this.serviceChart = true; - } else { - this.serviceChart = false; - } + this.serviceChart =data.serviceTotalNum > 0 ? true : false this.CUChartData = { series: [{ data: data.customerServiceList @@ -197,17 +185,16 @@ export class CustomerComponent implements OnInit { serviceData: Object; serviceInit: Object = { customer: '', - width: 280, height: 190, option: { tooltip: { show: true, trigger: 'item', - formatter: "{c}" + formatter: "{b}:\n{c}" }, grid: { top: '5%', - left: '5%', + left: '0%', bottom: '3%', containLabel: true }, @@ -361,7 +348,6 @@ export class CustomerComponent implements OnInit { }; name_s = []; value_s = []; - getCustomersColumn(item) { this.name_s = []; this.value_s = []; @@ -381,28 +367,19 @@ export class CustomerComponent implements OnInit { }) } - createNewCustomer(notificationModel) { + createNewCustomer(): void { let createParams = { customerId: this.addNewCustomer, 'global-customer-id': this.addNewCustomer, 'subscriber-name': this.addNewCustomer, 'subscriber-type': 'INFRA' }; - this.notificationAttributes = { - "title": "Customer", - "imgPath": "assets/images/execute-inproess.png", - "action": "Create", - "status": "InProgress", - "name": this.addNewCustomer - }; - this.notificationModelShow(notificationModel); this.managemencs.createCustomer(this.addNewCustomer, createParams).subscribe((data) => { if (data["status"] == 'SUCCESS') { - this.notificationSuccess(notificationModel); + this.notification.notificationSuccess('Customer','Create',this.addNewCustomer); this.getAllCustomers(); } else { - this.notificationFailed(notificationModel); - console.log(data, "Interface returned error") + this.notification.notificationFailed('Customer','Create',this.addNewCustomer); } }) } @@ -419,66 +396,47 @@ export class CustomerComponent implements OnInit { deleteCustomerCancel() { this.deleteCustomerModelVisible = false; } - deleteCustomerOk(notificationModel) { + deleteCustomerOk() { this.deleteCustomerModelVisible = false; - this.getCustomerVersion(this.thisdeleteCustomer, notificationModel); - this.notificationAttributes = { - "title": "Customer", - "imgPath": "assets/images/execute-inproess.png", - "action": "delete", - "status": "InProgress", - "name": this.thisdeleteCustomer.name - }; - this.notificationModelShow(notificationModel); + this.getCustomerVersion(this.thisdeleteCustomer,); } - getCustomerVersion(thisdeleteCustomer, notificationModel) { + getCustomerVersion(thisdeleteCustomer) { this.managemencs.getdeleteCustomerVersion(thisdeleteCustomer).subscribe((data) => { if (data["status"] == 'SUCCESS') { let params = { customerId: thisdeleteCustomer.id, - version: data["result"]["resource-version"] + resourceVersion: data["result"]["resource-version"] }; - this.deleteCustomer(params, notificationModel); + this.deleteCustomer(params) } else { - console.log(data, "Interface returned error") + console.error(data, "Interface returned error") } }) } - deleteCustomer(params, notificationModel) { - this.managemencs.deleteSelectCustomer(params).subscribe((data) => { + deleteCustomer(paramsObj) { + this.managemencs.deleteSelectCustomer(paramsObj).subscribe((data) => { if (data["status"] == 'SUCCESS') { - this.notificationSuccess(notificationModel); + this.notification.notificationSuccess('Customer','delete',this.thisdeleteCustomer.name); this.getAllCustomers(); } else { - this.notificationFailed(notificationModel); - console.log(data, "Interface returned error") + this.notification.notificationFailed('Customer','delete',this.thisdeleteCustomer.name); } }) } - createNewServiceType(notificationModel) { + createNewServiceType() { let createParams = { customer: this.selectCustomer, ServiceType: this.addNewServiceType, "service-type": this.addNewServiceType, "temp-ub-sub-account-id": "sotnaccount" }; - this.notificationAttributes = { - "title": "ServiceType", - "imgPath": "assets/images/execute-inproess.png", - "action": "Create", - "status": "InProgress", - "name": this.addNewServiceType - }; - this.notificationModelShow(notificationModel); this.managemencs.createServiceType(createParams).subscribe((data) => { if (data["status"] == 'SUCCESS') { - this.notificationSuccess(notificationModel); - this.getCustomersColumn(this.selectCustomer); + this.notification.notificationSuccess('ServiceType','Create',this.addNewServiceType); this.getAllCustomers(); } else { - this.notificationFailed(notificationModel); - console.log(data, "Interface returned error") + this.notification.notificationFailed('ServiceType','Create',this.addNewServiceType); } }) } @@ -494,23 +452,15 @@ export class CustomerComponent implements OnInit { deleteServiceTypeCancel() { this.deleteServiceTypeModelVisible = false; } - deleteServiceTypeOk(notificationModel) { + deleteServiceTypeOk() { this.deleteServiceTypeModelVisible = false; - this.getServiceTypeVersion(notificationModel); + this.getServiceTypeVersion(); } - getServiceTypeVersion(notificationModel) { + getServiceTypeVersion() { let paramss = { customerId: this.selectCustomer, ServiceType: this.thisdeleteServiceType["type"] }; - this.notificationAttributes = { - "title": "ServiceType", - "imgPath": "assets/images/execute-inproess.png", - "action": "delete", - "status": "InProgress", - "name": this.thisdeleteServiceType["type"] - }; - this.notificationModelShow(notificationModel); this.managemencs.getdeleteServiceTypeVersion(paramss).subscribe((data) => { if (data["status"] == 'SUCCESS') { let params = { @@ -518,22 +468,19 @@ export class CustomerComponent implements OnInit { ServiceType: this.thisdeleteServiceType["type"], version: data["result"]["resource-version"] }; - this.deleteServiceType(params, notificationModel); + this.deleteServiceType(params); } else { - console.log(data, "Interface returned error") + console.error(data, "Interface returned error") } }) } - deleteServiceType(params, notificationModel) { + deleteServiceType(params) { this.managemencs.deleteSelectServiceType(params).subscribe((data) => { if (data["status"] == 'SUCCESS') { - this.notificationSuccess(notificationModel); - this.getServiceTypes(params.customerId); - this.getCustomersColumn(params.customerId); + this.notification.notificationSuccess('ServiceType','delete',this.thisdeleteServiceType["type"]); this.getAllCustomers(); } else { - this.notificationFailed(notificationModel); - console.log(data, "Interface returned error") + this.notification.notificationFailed('ServiceType','delete',this.thisdeleteServiceType["type"]); } }) } diff --git a/usecaseui-portal/src/app/views/management/management.component.ts b/usecaseui-portal/src/app/views/management/management.component.ts index 8220a166..b1a88e1e 100644 --- a/usecaseui-portal/src/app/views/management/management.component.ts +++ b/usecaseui-portal/src/app/views/management/management.component.ts @@ -28,27 +28,21 @@ import { ManagemencsService } from '../../core/services/managemencs.service'; export class ManagementComponent implements OnInit { @HostBinding('@routerAnimate') routerAnimateState; //Routing animation + nocuster: boolean; + firstCustomer: string; + constructor(private managemencs: ManagemencsService) { } ngOnInit() { this.getAllCustomers(); } - - nocuster = true; - firstCustomer = null; - AllCustomersdata = []; - + // Get all customers getAllCustomers() { this.managemencs.getAllCustomers().subscribe((data) => { - if (data.length > 0) { - this.nocuster = false; - } else { - this.nocuster = true; - } + this.nocuster = data.length > 0 ? false : true; }) } - createNewCustomer(customer) { let createParams = { customerId: customer @@ -63,6 +57,6 @@ export class ManagementComponent implements OnInit { }) } clearCustomerInput() { - this.firstCustomer = null; + this.firstCustomer = ''; } } diff --git a/usecaseui-portal/src/app/views/services/onboard-vnf-vm/onboard-vnf-vm.component.html b/usecaseui-portal/src/app/views/services/onboard-vnf-vm/onboard-vnf-vm.component.html index 4f865ff3..c48d68f9 100644 --- a/usecaseui-portal/src/app/views/services/onboard-vnf-vm/onboard-vnf-vm.component.html +++ b/usecaseui-portal/src/app/views/services/onboard-vnf-vm/onboard-vnf-vm.component.html @@ -13,274 +13,111 @@ See the License for the specific language governing permissions and limitations under the License. --> -<nz-tabset [nzTabPosition]="'top'" [nzType]="'card'"> - <nz-tab *ngFor="let tab of tabs" [nzTitle]="tab" (nzClick)="handleTabChange(tab)"> - <!-- nsList --> - <div class="list" *ngIf="tab === 'NS'"> - <div style="width:100%;height: 30%;margin-bottom: 1%"> - <div class="listupload"> - <nz-upload nzType="drag" [(nzFileList)]="fileListNS" [nzBeforeUpload]="beforeUploadNS"> - <p class="ant-upload-drag-icon"> - <i nz-icon type="inbox" class="anticon anticon-inbox"></i> - </p> - <p class="ant-upload-text"> {{"i18nTextDefine_Click_CSAR_File" | translate}} </p> - <p class="ant-upload-hint"></p> - </nz-upload> - <button nz-button [nzLoading]="nsuploading" (click)="onClick(tab)" [disabled]="fileListNS.length == 0" - style="margin-top: 16px;margin-left: 55px;color: #FFFFFF;font-size: 13px;background-color: #3E9BFF;font-family: ArialMT;"> - {{ nsuploading ? 'Uploading' : 'Start Upload' }} - </button> - </div> - <div class="listlin"></div> - <div class="listfile"> - <div style="color: rgba(66,84,143,1);font-family:ArialMT;padding-bottom: 15px;height: 15%"> {{"i18nTextDefine_Uploaded_files" | translate}} </div> - <div class="nouploadfile">{{"i18nTextDefine_Nofileuploading" | translate}}</div> - <div style="height:80%;overflow: auto"> - <div class="listfilebgc" *ngFor="let itemns of nsRightList"> - <div> - <i class="anticon anticon-link"></i> - </div> - <div class="color" [ngClass]="{'progress':itemns.status == true}">{{itemns.name}}</div> - <div class="color" *ngIf="itemns.status"> - <nz-progress [nzPercent]="itemns.progress" [nzShowInfo]="false"></nz-progress> - </div> - <div class="color" *ngIf="!itemns.status"> - <span *ngIf="itemns.success == 0">{{"i18nTextDefine_File_upload_completed" | translate}}</span> - <span *ngIf="itemns.success == 1">{{"i18nTextDefine_File_upload_failed" | translate}}</span> - </div> - <div *ngIf="!itemns.status"> - <i class="anticon anticon-check-circle" *ngIf="itemns.success == 0" style="color:#7BC7F3!important;"></i> - <i class="anticon anticon-exclamation-circle" *ngIf="itemns.success == 1" style="color:#fb5c5c!important;"></i> - </div> - </div> - </div> - </div> - </div> - <nz-spin [nzSpinning]="isSpinning" style="height: 69%"> - <div class="mask" *ngIf="isSpinning"></div> - <nz-table #nzTable [nzData]="nstableData" nzShowSizeChanger [nzFrontPagination]="true" - [nzShowQuickJumper]="true" [nzPageSizeOptions]="[5,10,15,20]" [nzTotal]='total' [(nzPageSize)]="nspageSize" - [(nzPageIndex)]='nspageIndex' [nzLoading]="loading" nzSize="middle"> - <thead (nzSortChange)="sort($event)" nzSingleSort> - <tr> - <th nzWidth="15%"> {{"i18nTextDefine_NO" | translate}} </th> - <th nzWidth="15%" nzShowSort nzSortKey="name"> {{"i18nTextDefine_Name" | translate}} </th> - <th nzWidth="15%"> {{"i18nTextDefine_Version" | translate}} </th> - <th nzWidth="15%"> {{"i18nTextDefine_OnboardingState" | translate}} </th> - <th nzWidth="15%"> {{"i18nTextDefine_OperationalState" | translate}} </th> - <th nzWidth="10%"> {{"i18nTextDefine_UsageState" | translate}} </th> - <th nzWidth="15%"> {{"i18nTextDefine_Operationbutton" | translate}} </th> - </tr> - </thead> - <tbody> - <tr *ngFor="let item of nzTable.data; let i = index; "> - <td>{{i+1}}</td> - - <td *ngIf="item.nsdName">{{item.nsdName}}</td> - <td *ngIf="item.nsdName === null || item.nsdName === ''"> </td> - <td *ngIf="item.name">{{item.name}}</td> - <td *ngIf="item.name===null || item.name=== ''"> </td> - <td *ngIf="item.nsdVersion">{{item.nsdVersion}}</td> - <td *ngIf="item.nsdVersion === null || item.nsdVersion === ''"> </td> - <td *ngIf="item.version">{{item.version}}</td> - <td *ngIf="item.version === null || item.version === ''"> </td> - <td> - <span *ngIf="item.nsdOnboardingState">{{item.nsdOnboardingState}}</span> - <span *ngIf="item.nsdOnboardingState === null || item.nsdOnboardingState === ''"> </span> - <span *ngIf="item.uuid">{{status}}</span> - - </td> - <td>{{item.nsdOperationalState}}</td> - <td>{{item.nsdUsageState}}</td> - <td> - <i [ngClass]="{'cannotclick':onboardData.status == 'onboarding' && i == currentIndex}" - class="anticon anticon-upload upicon" #upload_icon (click)="updataNsService(item.uuid,i,notificationModel)" - *ngIf="item.uuid"></i> - <i class="anticon anticon-delete" nzType="info" (click)="showConfirm(i,item.id,tab,notificationModel)" - *ngIf="item.id"></i> - - </td> - </tr> - </tbody> - </nz-table> - </nz-spin> - - </div> - <!-- VNFList --> - <div class="list" *ngIf="tab === 'VNF'"> - <div style="width:100%;height: 30%;margin-bottom: 1%"> - <div class="listupload"> - <nz-upload nzType="drag" [(nzFileList)]="fileListVNF" [nzBeforeUpload]="beforeUploadVNF"> - <p class="ant-upload-drag-icon"> - <i nz-icon type="inbox" class="anticon anticon-inbox"></i> - </p> - <p class="ant-upload-text">Click or drag CSAR File here</p> - <p class="ant-upload-hint"></p> - </nz-upload> - <button nz-button [nzLoading]="vnfuploading" (click)="onClick(tab)" [disabled]="fileListVNF.length == 0" - style="margin-top: 16px;margin-left: 55px;color: #FFFFFF;font-size: 13px;background-color: #3E9BFF;font-family: ArialMT;"> - {{ vnfuploading ? 'Uploading' : 'Start Upload' }} - </button> - </div> - <div class="listlin"></div> - <div class="listfile"> - <div style="color: rgba(66,84,143,1);font-family:ArialMT;padding-bottom: 15px;height: 15%"> {{"i18nTextDefine_Uploaded_files" | translate}} </div> - <div class="nouploadfile">{{"i18nTextDefine_Nofileuploading" | translate}}</div> - <div style="height:80%;overflow: auto"> - <div class="listfilebgc" *ngFor="let itemns of vnfRightList"> - <div> - <i class="anticon anticon-link"></i> - </div> - <div class="color" [ngClass]="{'progress':itemns.status == true}">{{itemns.name}}</div> - <div class="color" *ngIf="itemns.status"> - <nz-progress [nzPercent]="itemns.progress" [nzShowInfo]="false"></nz-progress> - </div> - <div class="color" *ngIf="!itemns.status"> - <span *ngIf="itemns.success == 0">{{"i18nTextDefine_File_upload_completed" | translate}}</span> - <span *ngIf="itemns.success == 1">{{"i18nTextDefine_File_upload_failed" | translate}}</span> - </div> - <div *ngIf="!itemns.status"> - <i class="anticon anticon-check-circle" *ngIf="itemns.success == 0" style="color:#7BC7F3!important;"></i> - <i class="anticon anticon-exclamation-circle" *ngIf="itemns.success == 1" style="color:#fb5c5c!important;"></i> - </div> - </div> - </div> - </div> - </div> - <nz-spin [nzSpinning]="isSpinning" style="height: 69%"> - <div class="mask" *ngIf="isSpinning"></div> - <nz-table #nzTable [nzData]="vnftableData" nzShowSizeChanger [nzFrontPagination]="true" - [nzShowQuickJumper]="true" [nzPageSizeOptions]="[5,10,15,20]" [nzTotal]='total' [(nzPageSize)]="vnfpageSize" - [(nzPageIndex)]='vnfpageIndex' [nzLoading]="loading" nzSize="middle"> - <thead (nzSortChange)="sort($event)" nzSingleSort> - <tr> - <th nzWidth="15%"> {{"i18nTextDefine_NO" | translate}} </th> - <th nzWidth="15%" nzShowSort nzSortKey="name"> {{"i18nTextDefine_Name" | translate}} </th> - <th nzWidth="15%"> {{"i18nTextDefine_Version" | translate}} </th> - <th nzWidth="15%"> {{"i18nTextDefine_OnboardingState" | translate}} </th> - <th nzWidth="15%"> {{"i18nTextDefine_OperationalState" | translate}} </th> - <th nzWidth="10%"> {{"i18nTextDefine_UsageState" | translate}} </th> - <th nzWidth="15%"> {{"i18nTextDefine_Operationbutton" | translate}} </th> - </tr> - </thead> - <tbody> - <tr *ngFor="let item of nzTable.data; let i = index; "> - <td>{{i+1}}</td> - <td *ngIf="item.vnfProductName">{{item.vnfProductName}}</td> - <td *ngIf="item.vnfProductName === null || item.vnfProductName === ''"> </td> - <td *ngIf="item.name">{{item.name}}</td> - <td *ngIf="item.vnfdVersion">{{item.vnfdVersion}}</td> - <td *ngIf="item.vnfdVersion === null || item.vnfdVersion === ''"> </td> - <td *ngIf="item.version">{{item.version}}</td> - <td>{{item.onboardingState}}</td> - <td>{{item.operationalState}}</td> - <td>{{item.usageState}}</td> - <td> - <i [ngClass]="{'cannotclick':onboardData.status == 'onboarding' && i == currentIndex}" - class="anticon anticon-upload upicon" #upload_icon (click)="updataVnfService(item.uuid,i,notificationModel)" - *ngIf="item.uuid"></i> - <i class="anticon anticon-delete" nzType="info" (click)="showConfirm(i,item.id,tab,notificationModel)" - *ngIf="item.id"></i> - </td> - </tr> - </tbody> - </nz-table> - </nz-spin> +<!-- tab --> +<nz-tabset [nzTabPosition]="'top'" [nzType]="'card'"> + <nz-tab *ngFor="let tab of tabs" [nzTitle]="tab" (nzClick)="handleTabChange(tab)"></nz-tab> +</nz-tabset> +<div class="list"> + <!-- upload --> + <div class="listUploadContainer"> + <div class="listupload"> + <nz-upload nzType="drag" [(nzFileList)]="fileList" [nzBeforeUpload]="beforeUpload"> + <p class="ant-upload-drag-icon"> + <i nz-icon type="inbox" class="anticon anticon-inbox"></i> + </p> + <p class="ant-upload-text"> {{"i18nTextDefine_Click_CSAR_File" | translate}} </p> + <p class="ant-upload-hint"></p> + </nz-upload> + <button nz-button [nzLoading]="uploading" (click)="onClick()" [disabled]="fileList.length == 0" class="upload"> + {{ uploading ? 'Uploading' : 'Start Upload' }} + </button> </div> - <!-- PNFList --> - <div class="list" *ngIf="tab === 'PNF'"> - <div style="width:100%;height: 30%;margin-bottom: 1%"> - <div class="listupload"> - <nz-upload nzType="drag" [(nzFileList)]="fileListPNF" [nzBeforeUpload]="beforeUploadPNF"> - <p class="ant-upload-drag-icon"> - <i nz-icon type="inbox" class="anticon anticon-inbox"></i> - </p> - <p class="ant-upload-text">Click or drag CSAR File here</p> - <p class="ant-upload-hint"></p> - </nz-upload> - <button nz-button [nzLoading]="pnfuploading" (click)="onClick(tab)" [disabled]="fileListPNF.length == 0" - style="margin-top: 16px;margin-left: 55px;color: #FFFFFF;font-size: 13px;background-color: #3E9BFF;font-family: ArialMT;"> - {{ pnfuploading ? 'Uploading' : 'Start Upload' }} - </button> - </div> - <div class="listlin"></div> - <div class="listfile"> - <div style="color: rgba(66,84,143,1);font-family:ArialMT;padding-bottom: 15px;height: 15%"> {{"i18nTextDefine_Uploaded_files" | translate}} </div> - <div class="nouploadfile">{{"i18nTextDefine_Nofileuploading" | translate}}</div> - <div style="height:80%;overflow: auto"> - <div class="listfilebgc" *ngFor="let itemns of pnfRightList"> - <div> - <i class="anticon anticon-link"></i> - </div> - <div class="color" [ngClass]="{'progress':itemns.status == true}">{{itemns.name}}</div> - <div class="color" *ngIf="itemns.status"> - <nz-progress [nzPercent]="itemns.progress" [nzShowInfo]="false"></nz-progress> - </div> - <div class="color" *ngIf="!itemns.status"> - <span *ngIf="itemns.success == 0">{{"i18nTextDefine_File_upload_completed" | translate}}</span> - <span *ngIf="itemns.success == 1">{{"i18nTextDefine_File_upload_failed" | translate}}</span> - </div> - <div *ngIf="!itemns.status"> - <i class="anticon anticon-check-circle" *ngIf="itemns.success == 0" style="color:#7BC7F3!important;"></i> - <i class="anticon anticon-exclamation-circle" *ngIf="itemns.success == 1" style="color:#fb5c5c!important;"></i> - </div> - </div> + <div class="listlin"></div> + <div class="listfile"> + <div class="listFileTitle"> {{"i18nTextDefine_Uploaded_files" | translate}} </div> + <div class="nouploadfile" [style.display]="display">{{"i18nTextDefine_Nofileuploading" | translate}}</div> + <div class="listfilebgc" *ngIf="file"> + <i class="anticon anticon-link icon"></i> + <div class="color" [ngClass]="{'progress':file.status}">{{file.name}}</div> + <div class="color" *ngIf="file.status"> + <nz-progress [nzPercent]="file.progress" [nzShowInfo]="false"></nz-progress> </div> - </div> - </div> - <nz-spin [nzSpinning]="isSpinning" style="height: 69%"> - <div class="mask" *ngIf="isSpinning"></div> - <nz-table #nzTable [nzData]="pnftableData" nzShowSizeChanger [nzFrontPagination]="true" - [nzShowQuickJumper]="true" [nzPageSizeOptions]="[5,10,15,20]" [nzTotal]='total' [(nzPageSize)]="pnfpageSize" - [(nzPageIndex)]='pnfpageIndex' [nzLoading]="loading" nzSize="middle"> - <thead (nzSortChange)="sort($event)" nzSingleSort> - <tr> - <th nzWidth="15%"> {{"i18nTextDefine_NO" | translate}} </th> - <th nzWidth="15%" nzShowSort nzSortKey="name"> {{"i18nTextDefine_Name" | translate}} </th> - <th nzWidth="15%"> {{"i18nTextDefine_Version" | translate}} </th> - <th nzWidth="15%"> {{"i18nTextDefine_OnboardingState" | translate}} </th> - <th nzWidth="10%"> {{"i18nTextDefine_UsageState" | translate}} </th> - <th nzWidth="15%"> {{"i18nTextDefine_Operationbutton" | translate}} </th> - </tr> - </thead> - <tbody> - <tr *ngFor="let item of nzTable.data; let i = index; "> - <td>{{i+1}}</td> - <td>{{item.pnfdName}}</td> - <td>{{item.pnfdVersion}}</td> - <td>{{item.pnfdOnboardingState}}</td> - <td>{{item.pnfdUsageState}}</td> - <td> - <i class="anticon anticon-delete" nzType="info" (click)="showConfirm(i,item.id,tab,notificationModel)"></i> - </td> - </tr> - </tbody> - </nz-table> - </nz-spin> - - </div> - </nz-tab> - <!--2019.08.14 add notification--> - <ng-template #notificationModel > - <div class="ant-notification-notice-content"> - <div class="ant-notification-notice-with-icon"> - <span class="ant-notification-notice-icon"> - <img src="{{notificationAttributes.imgPath}}" alt="{{notificationAttributes.status}}"> - </span> - <div class="ant-notification-notice-message"> - {{notificationAttributes.title}} - {{"i18nTextDefine_"+notificationAttributes.action | translate}} {{"i18nTextDefine_"+notificationAttributes.status | translate}} + <div class="color" *ngIf="!file.status"> + <span *ngIf="file.success === 0">{{"i18nTextDefine_File_upload_completed" | translate}}</span> + <span *ngIf="file.success === 1">{{"i18nTextDefine_File_upload_failed" | translate}}</span> </div> - <div class="ant-notification-notice-description"> - <div class="notificationlist"> - <p>{{notificationAttributes.title}} id: </p> - <span>{{ notificationAttributes.id }}</span> - </div> + <div *ngIf="!file.status"> + <i class="anticon anticon-check-circle success" *ngIf="file.success === 0"></i> + <i class="anticon anticon-exclamation-circle fail" *ngIf="file.success === 1"></i> </div> - <div class="close-icons">{{"i18nTextDefine_Close" | translate}}</div> </div> </div> - </ng-template> -</nz-tabset> - + </div> + <!-- table --> + <nz-spin [nzSpinning]="isSpinning" class="listContainer"> + <div class="mask" *ngIf="isSpinning"></div> + <nz-table #nzTable [nzData]="currentTab === 'NS'? nsTableData: (currentTab === 'VNF'? vnfTableData : pnfTableData)" nzShowSizeChanger [nzFrontPagination]="true" + [nzShowQuickJumper]="true" [nzPageSizeOptions]="[5,10,15,20]" [(nzPageSize)]="pageSize" + [(nzPageIndex)]='pageIndex' nzSize="middle"> + <thead> + <tr class="theadColor"> + <th nzWidth="15%"> {{"i18nTextDefine_NO" | translate}} </th> + <th nzWidth="15%"> {{"i18nTextDefine_Name" | translate}} </th> + <th nzWidth="15%"> {{"i18nTextDefine_Version" | translate}} </th> + <th nzWidth="15%"> {{"i18nTextDefine_OnboardingState" | translate}} </th> + <th nzWidth="15%" *ngIf="currentTab !== 'PNF'"> {{"i18nTextDefine_OperationalState" | translate}} </th> + <th nzWidth="10%"> {{"i18nTextDefine_UsageState" | translate}} </th> + <th nzWidth="15%"> {{"i18nTextDefine_Operationbutton" | translate}} </th> + </tr> + </thead> + <tbody *ngIf="currentTab === 'NS'"> + <tr *ngFor="let item of nzTable.data;let i = index;"> + <td>{{i+1}}</td> + <td>{{item.nsdName || item.name }}</td> + <td>{{item.nsdVersion || item.version}}</td> + <td>{{item.nsdOnboardingState ? item.nsdOnboardingState : status}}</td> + <td>{{item.nsdOperationalState}}</td> + <td>{{item.nsdUsageState}}</td> + <td> + <i [ngClass]="{'cannotclick': isUpdate}" + class="anticon anticon-upload upicon" #upload_icon (click)="updataService(item.uuid)" + *ngIf="item.uuid"></i> + <i class="anticon anticon-delete" (click)="showDeleteConfirm(item.id)" + *ngIf="item.id"></i> + </td> + </tr> + </tbody> + <tbody *ngIf="currentTab === 'VNF'"> + <tr *ngFor="let item of nzTable.data;let i = index;"> + <td>{{i+1}}</td> + <td>{{item.vnfProductName || item.name }}</td> + <td>{{item.vnfdVersion || item.version}}</td> + <td>{{item.onboardingState}}</td> + <td>{{item.operationalState}}</td> + <td>{{item.usageState}}</td> + <td> + <i [ngClass]="{'cannotclick': isUpdate}" + class="anticon anticon-upload upicon" #upload_icon (click)="updataService(item.uuid)" + *ngIf="item.uuid"></i> + <i class="anticon anticon-delete" (click)="showDeleteConfirm(item.id)" + *ngIf="item.id"></i> + </td> + </tr> + </tbody> + <tbody *ngIf="currentTab === 'PNF'" > + <tr *ngFor="let item of nzTable.data; let i = index;"> + <td>{{i+1}}</td> + <td>{{item.pnfdName}}</td> + <td>{{item.pnfdVersion}}</td> + <td>{{item.pnfdOnboardingState}}</td> + <td>{{item.pnfdUsageState}}</td> + <td> + <i class="anticon anticon-delete" (click)="showDeleteConfirm(item.id)"></i> + </td> + </tr> + </tbody> + </nz-table> + </nz-spin> +</div> +<app-notification #notification [isServicesList]="false"></app-notification>
\ No newline at end of file diff --git a/usecaseui-portal/src/app/views/services/onboard-vnf-vm/onboard-vnf-vm.component.less b/usecaseui-portal/src/app/views/services/onboard-vnf-vm/onboard-vnf-vm.component.less index 5ba479de..f877e1ca 100644 --- a/usecaseui-portal/src/app/views/services/onboard-vnf-vm/onboard-vnf-vm.component.less +++ b/usecaseui-portal/src/app/views/services/onboard-vnf-vm/onboard-vnf-vm.component.less @@ -13,141 +13,112 @@ See the License for the specific language governing permissions and limitations under the License. */ -.title { - font: 700 18px/18px "思源黑体"; - color: #4c5e70; - margin-bottom: 18px; +th{ + background-color: rgba(241,243,244,.9) !important; } -hr { - border: none; - height: 2px; - background-color: #dce1e7; - margin-bottom: 20px; -} -.switch_btn { - position: absolute; - right: 6%; - top: 18px; - border: 1px solid #3fa8eb; - width: 8%; - border-radius: 10px; - margin-bottom: 18px; - span { - display: block; - float: left; - text-align: center; - width: 50%; - color: #3fa8eb; - font-weight: 700; - cursor: pointer; - } - span:first-child { - border-radius: 10px 0 0 10px; - } - span:last-child { - border-radius: 0 10px 10px 0; - } - span.left_b { - border-left: 1px solid #3fa8eb; - } - span.active { - color: #fff; - background: #3fa8eb; - } -} - .list { - border-radius: 5px; - .listupload { - width: 22%; - vertical-align: top; - display: inline-block; - margin-left: 13%; - } - .listlin { - vertical-align: top; - display: inline-block; - width: 1%; - margin-left: 10%; - height: 177px; - margin-bottom: 30px; - border-right: 2px solid #EEEEEE; - } - .listfile { - width: 43%; - height: 100%; - vertical-align: top; - display: inline-block; - margin-left: 10%; - .nouploadfile{ - height: 80%; - width: 100%; - text-align: center; - font-size: 22px; - margin-top: 5%; + padding: 20px; + .listUploadContainer{ + display: flex; + align-items: flex-start; + width: 100%; + height: 30%; + margin-bottom: 1%; + .listupload { + position: relative; + width: 22%; + margin-left: 13%; + .upload{ + position: absolute; + left: 50%; + bottom: -48px; + transform: translateX(-50%); + color: #FFFFFF; + font-size: 13px; + background-color: #3E9BFF; + font-family: ArialMT; + } } - .listfilebgc { - background-color: #fff; - border-bottom: 8px solid #F7F8FC; + .listlin { + width: 1%; + margin-left: 10%; + height: 177px; + margin-bottom: 30px; + border-right: 2px solid #EEEEEE; } - .listfilebgc { - background-color: #fff; - height: 30px; - border-radius: 2px; - line-height: 2; - color: #42548F; - border-bottom: 4px solid #F7F8FC; - >div { - float: left; + .listfile { + width: 43%; + height: 100%; + margin-left: 10%; + .listFileTitle{ + height: 15%; + padding-bottom: 15px; + color: rgba(66,84,143,1); + font-family: ArialMT; } - :first-child { - width: 6%; - margin-left: 5px; - } - :nth-child(2){ - width:20%; - } - :nth-child(3){ - width: 60%; - text-align: center; - } - :nth-child(4){ - padding-left: 4%; - } - .color { - color:rgba(66,84,143,1); - span{ - color:rgba(66,84,143,0.7); - } - } - .progress{ - color:rgba(66,84,143,0.7); + .nouploadfile{ + height: 80%; + width: 100%; + text-align: center; + font-size: 22px; + margin: 5% 0 10px; } + .listfilebgc { + display: flex; + justify-content: space-around; + align-items: center; + width:100%; + height: 80%; + padding: 5px; + background-color: #fff; + border-radius: 2px; + color: #42548F; + .icon{ + width: 15px; + } + :nth-child(3){ + width: 50%; + } + :nth-child(4){ + width: 5%; + height:100%; + .success{ + color:#7BC7F3!important; + } + .fail{ + color:#fb5c5c!important; + } + } + .color { + color:rgba(66,84,143,1); + span{ + color:rgba(66,84,143,0.7); + } + .progress{ + color:rgba(66,84,143,0.7); + } + } + } + + } + + } + .listContainer{ + height: 69%; + .mask { + top: 0; + left: 0; + position: fixed; + width: 100%; + height: 100%; + opacity: 0.1; + background: black; + z-index: 1049; } } nz-table { tbody { td { - span.onboarding { - font-size: 12px; - color: #147dc2; - } - span.onboarded { - font-size: 14px; - color: #147dc2; - } - span.updating { - font-size: 12px; - color: blue; - } - span.deleting { - font-size: 12px; - color: red; - } - span.invalid { - font-size: 14px; - color: purple; - } i.anticon { cursor: pointer; font-size: 18px; @@ -161,20 +132,7 @@ hr { color: #aaa; opacity: 0.6; } - .fileIcon{ - display: none; - } } } } } -.mask { - top: 0; - left: 0; - position: fixed; - width: 100%; - height: 100%; - opacity: 0.1; - background: black; - z-index: 1049; -}
\ No newline at end of file diff --git a/usecaseui-portal/src/app/views/services/onboard-vnf-vm/onboard-vnf-vm.component.ts b/usecaseui-portal/src/app/views/services/onboard-vnf-vm/onboard-vnf-vm.component.ts index 33385e32..3d312c5c 100644 --- a/usecaseui-portal/src/app/views/services/onboard-vnf-vm/onboard-vnf-vm.component.ts +++ b/usecaseui-portal/src/app/views/services/onboard-vnf-vm/onboard-vnf-vm.component.ts @@ -14,14 +14,11 @@ limitations under the License. */ import { HttpClient, HttpRequest, HttpResponse } from '@angular/common/http'; -import { Component, OnInit, HostBinding, TemplateRef } from '@angular/core'; -import { NzNotificationService } from 'ng-zorro-antd'; -// import { MyhttpService } from '../../myhttp.service'; +import { Component, OnInit, HostBinding, TemplateRef, ViewChild } from '@angular/core'; import { onboardService } from '../../../core/services/onboard.service'; import { slideToRight } from '../../../shared/utils/animates'; import { NzMessageService, UploadFile, NzModalRef, NzModalService } from 'ng-zorro-antd'; import { filter } from 'rxjs/operators'; -import { Title } from '@angular/platform-browser'; @Component({ selector: 'app-onboard-vnf-vm', @@ -31,114 +28,75 @@ import { Title } from '@angular/platform-browser'; }) export class OnboardVnfVmComponent implements OnInit { @HostBinding('@routerAnimate') routerAnimateState; + @ViewChild('notification') notification: any; - // delete Modal - confirmModal: NzModalRef; - nsdInfoId = ''; - vnfPkgId = ''; - pnfdInfoId = ''; - tabTitle = "NS"; - nsuploading = false; - vnfuploading = false; - pnfloading = false; + // upload + tabs: string[] = ['NS', 'VNF', 'PNF']; + currentTab: string = 'NS' fileList: UploadFile[] = []; - fileListNS: UploadFile[] = []; - fileListVNF: UploadFile[] = []; - fileListPNF: UploadFile[] = []; - // onboard initial value - status = "Onboard Available"; - jobId = ''; + uploading:boolean = false; + infoId: string; + display: string = 'block'; + + // table + isSpinning: boolean = false; + nsTableData: any[]; + vnfTableData: any[]; + pnfTableData: any[]; + status: string = "Onboard Available"; + pageIndex: number = 1; + pageSize: number = 10; + + // update or delete + isUpdate: boolean = false; + jobId: string; + //url url = { - // line up ns: '/api/nsd/v1/ns_descriptors/*_*/nsd_content', vnf: '/api/vnfpkgm/v1/vnf_packages/*_*/package_content', pnf: '/api/nsd/v1/pnf_descriptors/*_*/pnfd_content' - // line local - //ns: 'https://jsonplaceholder.typicode.com/posts/', - //vnf: 'https://jsonplaceholder.typicode.com/posts/', - //pnf: 'https://jsonplaceholder.typicode.com/posts/', }; + + file: { + name: string, + uid: string, + progress: number, + status: boolean, + success: number + }; + constructor( private myhttp: onboardService, private http: HttpClient, private msg: NzMessageService, - private titleService: Title, - private modal: NzModalService, - private modalService: NzModalService, - private notification: NzNotificationService + private modalService: NzModalService ) { } + //default Call ns data by default ngOnInit() { this.getTableData(); } - //Tabular data - nstableData: any; - vnftableData: any; - pnftableData: any; - nssdcData: any; - nsvfcData: any; - - vnfsdcData: any; - vnfvfcData: any; - nspageIndex = 1; - nspageSize = 10; - vnfpageIndex = 1; - vnfpageSize = 10; - pnfpageIndex = 1; - pnfpageSize = 10; - total; - nsloading = false; - sortName = null; - sortValue = null; - tabs = ['NS', 'VNF', 'PNF']; - isSpinning = false; - - //2019.08.14 add - notificationAttributes = { - "title": this.tabs[0], - "imgPath": "../../../../assets/images/execute-inproess.png", - "action": "OnboardingState", - "status": "InProgress", - "id": null - }; - notificationModelShow(template: TemplateRef<{}>): void { - this.notification.template(template); - } - notificationSuccess(notificationModel) { - this.notificationAttributes.imgPath = "../../../../assets/images/execute-success.png"; - this.notificationAttributes.status = "Success"; - this.notificationModelShow(notificationModel); - } - notificationFailed(notificationModel) { - this.notificationAttributes.imgPath = "../../../../assets/images/execute-faild.png"; - this.notificationAttributes.status = "Failed"; - this.notificationModelShow(notificationModel); - } // Handling tab switching request data - handleTabChange(tab) { - this.tabTitle = tab; + handleTabChange(tab: string): void { + this.currentTab = tab; + this.fileList = []; + this.display = 'block'; + delete this.file; switch (tab) { case 'NS': - this.nstableData = []; this.getTableData(); - this.fileList = []; //Empty uploaded files when switching break case 'VNF': - this.vnftableData = []; this.getTableVnfData() - this.fileList = []; break case 'PNF': - this.pnftableData = []; this.getTablePnfData() - this.fileList = []; break } } - //before put create--Drag and drop files to the page before uploading requestBody = { "userDefinedData": { @@ -148,302 +106,128 @@ export class OnboardVnfVmComponent implements OnInit { } } - //NS/VNF List add file beforeUpload = (file: UploadFile): boolean => { - this.fileList.push(file); - return false; - } - - // ns beforeUpload - beforeUploadNS = (file: UploadFile): boolean => { - this.fileListNS.push(file); - this.myhttp.getCreatensData("createNetworkServiceData", this.requestBody)//on-line - // this.myhttp.getCreatensData("creatensDataNS") //local - .subscribe((data) => { - this.nsdInfoId = data["id"]; - }, (err) => { - console.log(err); - }) - return false; - } - - //vnf beforeUpload - beforeUploadVNF = (file: UploadFile): boolean => { - this.fileListVNF.push(file); - this.myhttp.getCreatensData("createVnfData", this.requestBody)//on-line - // this.myhttp.getCreatensData("creatensDataVNF") //local - .subscribe((data) => { - this.vnfPkgId = data["id"]; - }, (err) => { - console.log(err); - }) - return false; - } - - // //pnf eforeUpload - beforeUploadPNF = (file: UploadFile): boolean => { - this.fileListPNF.push(file); - this.myhttp.getCreatensData("createPnfData", this.requestBody) //on-line - // this.myhttp.getCreatensData("creatensDataPNF") //local + this.fileList.splice(0,1,file); + let API: string; + if(this.currentTab === 'NS'){ + API = 'createNetworkServiceData'; + }else if(this.currentTab === 'VNF'){ + API = 'createVnfData'; + }else { + API = 'createPnfData'; + } + this.myhttp.getCreatensData(API, this.requestBody)//on-line .subscribe((data) => { - this.pnfdInfoId = data["id"]; + this.infoId = data["id"]; }, (err) => { console.log(err); }) return false; } - //Get list list id - onClickId(id, tab) { - switch (tab) { - case 'NS': - this.nsdInfoId = id; - break - case 'VNF': - this.vnfPkgId = id; - break - case 'PNF': - this.pnfdInfoId = id; - break - } - } - - //Drag and drop and click the upload button - onClick(tab) { - switch (tab) { - case 'NS': - // this.handleUpload('/api/nsd/v1/ns_descriptors/'+this.nsdInfoId+'/nsd_content',tab); - this.handleUpload(this.url.ns.replace("*_*", this.nsdInfoId), tab); - this.getTableData(); - break - case 'VNF': - // this.handleUpload('/api/vnfpkgm/v1/vnf_packages/'+this.vnfPkgId+'/package_content',tab); - this.handleUpload(this.url.vnf.replace("*_*", this.vnfPkgId), tab); - this.getTableVnfData() - break - case 'PNF': - // this.handleUpload('/api/nsd/v1/pnf_descriptors/'+this.pnfdInfoId+'/pnfd_content',tab); - this.handleUpload(this.url.pnf.replace("*_*", this.pnfdInfoId), tab); - this.getTablePnfData(); - break - } + // Drag and drop and click the upload button + onClick(): void { + this.display = 'none'; + let tab = this.currentTab === 'NS' ? 'ns' : (this.currentTab === 'VNF' ? 'vnf' : 'pnf') + this.handleUpload(this.url[tab].replace("*_*", this.infoId)); } - nsRightList = []; - nsNum = 0; - vnfRightList = []; - vnfNum = 0; - pnfRightList = []; - pnfNum = 0; - //put Upload Upload - handleUpload(url, tab): void { + handleUpload(url: string): void { const formData = new FormData(); // tslint:disable-next-line:no-any - switch (tab) { - case "NS": - this.fileListNS.forEach((file: any) => { - formData.append('file', file); - }); - this.nsuploading = true; - let lastNs = this.fileListNS[this.fileListNS.length - 1]; - let nsfile = { - name: lastNs.name, - uid: lastNs.uid, - progress: 0, - status: true, - success: 0 - }; - this.nsNum += 1; - this.nsRightList.push(nsfile); - let requeryNs = (nsfile) => { - setTimeout(() => { - nsfile.progress += 2; - if (nsfile.progress < 100) { - requeryNs(nsfile) - } else { - nsfile.progress = 100; - nsfile.status = false; - } - }, 100) - }; - requeryNs(nsfile); - break - case "VNF": - this.fileListVNF.forEach((file: any) => { - formData.append('file', file); - }); - this.vnfuploading = true; - let lastVnf = this.fileListVNF[this.fileListVNF.length - 1]; - let vnffile = { - name: lastVnf.name, - uid: lastVnf.uid, - progress: 0, - status: true, - success: 0 - }; - this.vnfNum += 1; - this.vnfRightList.push(vnffile); - let requeryVnf = (vnffile) => { - setTimeout(() => { - vnffile.progress += 2; - if (vnffile.progress < 100) { - requeryVnf(vnffile) - } else { - vnffile.progress = 100; - vnffile.status = false; - } - }, 100) - }; - requeryVnf(vnffile); - break - case "PNF": - this.fileListPNF.forEach((file: any) => { - formData.append('file', file); - }); - this.pnfloading = true; - let lastPnf = this.fileListPNF[this.fileListPNF.length - 1]; - let pnffile = { - name: lastPnf.name, - uid: lastPnf.uid, - progress: 0, - status: true, - success: 0 - }; - this.pnfNum += 1; - this.pnfRightList.push(pnffile); - let requeryPnf = (pnffile) => { - setTimeout(() => { - pnffile.progress += 2; - if (pnffile.progress < 100) { - requeryPnf(pnffile) - } else { - pnffile.progress = 100; - pnffile.status = false; - } - }, 100) - }; - requeryPnf(pnffile); - break - } - // line PUT + this.fileList.forEach((file: any) => { + formData.set('file', file); + }); + this.uploading = true; + this.file = { + name: this.fileList[0].name, + uid: this.fileList[0].uid, + progress: 0, + status: true, + success: 0 + }; + let requery = (file) => { + file.progress += 3; + setTimeout(() => { + if (file.progress < 100) { + requery(file) + } + }, 100) + }; + requery(this.file); const req = new HttpRequest('PUT', url, formData, { reportProgress: true, withCredentials: true }); //Upload pre-empty array this.fileList = []; - this.fileListNS = []; - this.fileListVNF = []; - this.fileListPNF = []; this.http.request(req) .pipe(filter(e => e instanceof HttpResponse)) .subscribe( (event: {}) => { - if (tab == "NS") { - this.nsRightList[this.nsNum - 1].progress = 100; - this.nsRightList[this.nsNum - 1].status = false; - this.nsRightList[this.nsNum - 1].success = 0; - } - if (tab == "VNF") { - this.vnfRightList[this.vnfNum - 1].progress = 100; - this.vnfRightList[this.vnfNum - 1].status = false; - this.vnfRightList[this.vnfNum - 1].success = 0; - } - if (tab == "PNF") { - this.pnfRightList[this.pnfNum - 1].progress = 100; - this.pnfRightList[this.pnfNum - 1].status = false; - this.pnfRightList[this.pnfNum - 1].success = 0; - } - this.changeUploadingSta(tab); + this.file.progress = 100; + this.file.status = false; + this.uploading = false; this.msg.success('upload successfully.'); + this.currentTab === 'NS' ? this.getTableData() : (this.currentTab === 'VNF' ? this.getTableVnfData() : this.getTablePnfData()); }, err => { - if (tab == "NS") { - this.nsRightList[this.nsNum - 1].progress = 100; - this.nsRightList[this.nsNum - 1].status = false; - this.nsRightList[this.nsNum - 1].success = 1; - } - if (tab == "VNF") { - this.vnfRightList[this.vnfNum - 1].progress = 100; - this.vnfRightList[this.vnfNum - 1].status = false; - this.vnfRightList[this.vnfNum - 1].success = 1; - } - if (tab == "PNF") { - this.pnfRightList[this.pnfNum - 1].progress = 100; - this.pnfRightList[this.pnfNum - 1].status = false; - this.pnfRightList[this.pnfNum - 1].success = 1; - } - this.changeUploadingSta(tab); + this.file.progress = 100; + this.file.status = false; + this.file.success = 1; + this.uploading = false; this.msg.error('upload failed.'); } ); } - // Control the status of uploading - changeUploadingSta(tab) { - switch (tab) { - case "NS": - this.nsuploading = false; - break - case "VNF": - this.vnfuploading = false; - break - case "PNF": - this.pnfloading = false; - } - } - - //---------------------------------------------------------------------------------------------- - // Get the NS list - getTableData() { + getTableData(): void{ this.isSpinning = true; //ns vfc lists this.myhttp.getOnboardTableData() .subscribe((data) => { - this.nsvfcData = data; - this.nstableData = this.nsvfcData; + this.nsTableData = data; //ns sdc list this.myhttp.getSDC_NSTableData() .subscribe((data) => { this.isSpinning = false; //loading hide - this.nssdcData = data; - this.nsvfcData.map((nsvfc) => { nsvfc.sameid = this.nssdcData.find((nssdc) => { return nsvfc.id == nssdc.uuid }) && nsvfc.id; return nsvfc; }); - let sameData = this.nssdcData.filter((nssdc) => { return !this.nsvfcData.find((nsvfc) => { return nsvfc.id == nssdc.uuid }) }); - this.nstableData = this.nstableData.concat(sameData); + let nsData = data; + // this.NSTableData.map((nsvfc) => { nsvfc.sameid = nsData.find((nssdc) => { return nsvfc.id == nssdc.uuid }) && nsvfc.id; return nsvfc; }); + let sameData = nsData.filter((nssdc) => { return !this.nsTableData.find((nsvfc) => { return nsvfc.id == nssdc.uuid }) }); + this.nsTableData = this.nsTableData.concat(sameData); }, (err) => { - console.log(err); + console.error(err); this.isSpinning = false; }) }, (err) => { - console.log(err); + console.error(err); this.isSpinning = false; }) - } // Get the vnf list - getTableVnfData() { + getTableVnfData(): void{ this.isSpinning = true; //vnf vfc lists this.myhttp.getOnboardTableVnfData() .subscribe((data) => { - this.vnfvfcData = data; - this.vnftableData = this.vnfvfcData; + this.vnfTableData = data; //vnf sdc lists this.myhttp.getSDC_VNFTableData() .subscribe((data) => { this.isSpinning = false; //loading hide - this.vnfsdcData = data; - this.vnfvfcData.map((vnfvfc) => { vnfvfc.sameid = this.vnfsdcData.find((nssdc) => { return vnfvfc.id == nssdc.uuid }) && vnfvfc.id; return vnfvfc; }); - let sameData = this.vnfsdcData.filter((vnfsdc) => { return !this.vnfvfcData.find((vnfvfc) => { return vnfvfc.id == vnfsdc.uuid }) }); - this.vnftableData = this.vnftableData.concat(sameData); + let vnfData = data; + // this.VNFTableData.map((vnfvfc) => { vnfvfc.sameid = this.vnfData.find((nssdc) => { return vnfvfc.id == nssdc.uuid }) && vnfvfc.id; return vnfvfc; }); + let sameData = vnfData.filter((vnfsdc) => { return !this.vnfTableData.find((vnfvfc) => { return vnfvfc.id == vnfsdc.uuid }) }); + this.vnfTableData = this.vnfTableData.concat(sameData); }, (err) => { - console.log(err); + console.error(err); + this.isSpinning = false; }) - }, (err) => { - console.log(err); + console.error(err); + this.isSpinning = false; }) } @@ -452,133 +236,76 @@ export class OnboardVnfVmComponent implements OnInit { this.isSpinning = true; this.myhttp.getOnboardTablePnfData() .subscribe((data) => { - this.pnftableData = data; + this.pnfTableData = data; this.isSpinning = false; //loading hide }, (err) => { - console.log(err); + console.error(err); + this.isSpinning = false; }) } - //----------------------------------------------------------------------------------- - /* onboard */ - //Successful frame - success(tab): void { - const modal = this.modalService.success({ - nzTitle: 'This is an success message', - nzContent: 'Package Onboard Completed.' - }); - switch (tab) { - case "NS": - this.getTableData(); - break - case "VNF": - this.getTableVnfData(); - break - } + // confirm + showConfirm(requestBody: object, id: string): void{ + let API = this.currentTab === 'NS'? 'getNsonboard' : 'getVnfonboard'; + this.modalService.confirm({ + nzTitle: '<p>Are you sure you want to do this?</p>', + nzOnOk: () => { + this.myhttp[API](requestBody) + .subscribe((data) => { + if (data.status == "success") { + if(this.currentTab === 'NS'){ + this.isUpdate = false; + this.notification.notificationSuccess(this.currentTab, "OnboardingState", id); + this.getTableData(); + }else{ + this.jobId = data.jobId; + this.queryProgress(this.jobId, id); + this.getTableVnfData(); + } + } else { + this.isUpdate = false; + this.notification.notificationFailed(this.currentTab, "OnboardingState", id); + return false + } + }, (err) => { + console.log(err); + }) + } + }) } - //Failure frame - error(): void { - this.modalService.error({ - nzTitle: 'This is an error message', - nzContent: 'Package Onboard Failed!' - }); - } - //onboard status - onboardData = { - status: "onboard", - progress: 0, - } - currentIndex = 0; // ns onboard Upload button - updataNsService(id, index, notificationModel) { - this.currentIndex = index; - this.onboardData.status = "onboarding"; //Disabled - this.onboardData.progress = 0; - let requestBody = { - "csarId": id - }; - this.notificationAttributes = { - "title": this.tabs[0], - "imgPath": "../../../../assets/images/execute-inproess.png", - "action": "OnboardingState", - "status": "InProgress", - "id": id - }; - this.notificationModelShow(notificationModel); - this.myhttp.getNsonboard(requestBody) - .subscribe((data) => { - if (data.status == "failed") { - this.onboardData.status = "Failed"; - this.notificationFailed(notificationModel); - this.error(); - return false - } else if (data.status == "success") { - this.success("NS"); - this.onboardData.status = "onboarded"; - this.notificationSuccess(notificationModel); - } - }, (err) => { - console.log(err); - }) - } - - // vnf onboard Upload button - updataVnfService(id, index, notificationModel) { - this.currentIndex = index; - this.onboardData.status = "onboarding"; //Disabled button - this.onboardData.progress = 0; - - - let requestBody = { - "csarId": id - }; - this.notificationAttributes = { - "title": this.tabs[1], - "imgPath": "../../../../assets/images/execute-inproess.png", - "action": "OnboardingState", - "status": "InProgress", - "id": id - }; - this.notificationModelShow(notificationModel); - this.myhttp.getVnfonboard(requestBody) - .subscribe((data) => { - this.jobId = data.jobId; - this.queryProgress(this.jobId, 0, notificationModel); //vnf Need to query progress interface - }, (err) => { - console.log(err); - }) - } + updataService(id: string) { + this.isUpdate = true; + let requestBody = { "csarId": id }; + this.showConfirm(requestBody, id) + } //Progress Progress inquiry - queryProgress(jobId, responseId, notificationModel) { + queryProgress(jobId: string, id: string): any{ let mypromise = new Promise((res) => { - this.myhttp.getProgress(jobId, responseId) + this.myhttp.getProgress(jobId, 0) .subscribe((data) => { if (data.responseDescriptor == null || data.responseDescriptor == "null" || data.responseDescriptor.progress == undefined || data.responseDescriptor.progress == null) { - this.onboardData.status = "onboarding"; + this.isUpdate = true; setTimeout(() => { - this.queryProgress(this.jobId, 0, notificationModel); + this.queryProgress(this.jobId, id); }, 10000) return false } if (data.responseDescriptor.progress > 100) { - this.onboardData.status = "Failed"; - this.notificationFailed(notificationModel); - this.error(); - return false - } - if (data.responseDescriptor.progress < 100) { - this.onboardData.status = "onboarding"; + this.isUpdate = false; + this.notification.notificationFailed(this.currentTab, 'OnboardingState', id); + }else if (data.responseDescriptor.progress < 100) { + this.isUpdate = true; setTimeout(() => { - this.queryProgress(this.jobId, 0, notificationModel); + this.queryProgress(this.jobId, id); }, 5000) - } else if (data.responseDescriptor.progress == 100) { + } else { res(data); - this.success("VNF"); - this.onboardData.status = "onboarded"; - this.notificationSuccess(notificationModel); + this.isUpdate = false; + this.notification.notificationSuccess(this.currentTab, 'OnboardingState', id); } return false }) @@ -586,83 +313,48 @@ export class OnboardVnfVmComponent implements OnInit { return mypromise; } - //-------------------------------------------------------------------------------- /* delete button */ - showConfirm(index, pkgid, tab, notificationModel): void { - this.notificationAttributes = { - "title": this.tabs[0], - "imgPath": "../../../../assets/images/execute-inproess.png", - "action": "OnboardingState", - "status": "InProgress", - "id": pkgid - }; - this.confirmModal = this.modal.confirm({ + showDeleteConfirm(pkgid: string): void { + this.modalService.confirm({ nzTitle: 'Do you Want to delete these items?', nzContent: 'Do you Want to delete these items?', nzOkText: 'Yes', nzCancelText: 'No', - nzOnOk: () => new Promise((resolve, reject) => { - switch (tab) { - case 'NS': - this.notificationAttributes.title = this.tabs[0]; - this.notificationModelShow(notificationModel); - this.deleteNsService(index, pkgid, notificationModel); - setTimeout(Math.random() > 0.5 ? resolve : reject, 2000); - break - case 'VNF': - this.notificationAttributes.title = this.tabs[1]; - this.notificationModelShow(notificationModel); - this.deleteVnfService(index, pkgid, notificationModel); - setTimeout(Math.random() > 0.5 ? resolve : reject, 2000); - break - case 'PNF': - this.notificationAttributes.title = this.tabs[2]; - this.notificationModelShow(notificationModel); - this.deletePnfService(index, pkgid, notificationModel); - setTimeout(Math.random() > 0.5 ? resolve : reject, 2000); - break - } + nzOnOk: () => new Promise((resolve) => { + this.deleteService(pkgid, resolve); }).catch(() => console.log('Oops errors!')) }); } //delete nsItem - deleteNsService(index, pkgid, notificationModel) { - this.myhttp.deleteNsIdData(pkgid) - .subscribe((data) => { - this.notificationSuccess(notificationModel); - //refresh list after successful deletion - this.getTableData(); - }, (err) => { - console.log(err); - this.notificationFailed(notificationModel); - }) - } - - //delete vnfItem - deleteVnfService(index, pkgid, notificationModel) { - this.myhttp.deleteVnfIdData(pkgid) - .subscribe((data) => { - this.notificationSuccess(notificationModel); - //refresh list after successful deletion - this.getTableVnfData() - }, (err) => { - console.log(err); - this.notificationFailed(notificationModel); - }) - } - - //delete PnfItem - deletePnfService(index, pkgid, notificationModel) { - this.myhttp.deletePnfIdData(pkgid) + deleteService(pkgid, resolve) { + let API: string; + if(this.currentTab === 'NS'){ + API = 'deleteNsIdData'; + }else if(this.currentTab === 'VNF'){ + API = 'deleteVnfIdData'; + }else{ + API = 'deletePnfIdData'; + } + this.myhttp[API](pkgid) .subscribe((data) => { + this.notification.notificationSuccess(this.currentTab, 'OnboardingState', pkgid); + resolve() //refresh list after successful deletion - this.notificationSuccess(notificationModel); - this.getTablePnfData() + switch(this.currentTab){ + case 'NS': + this.getTableData(); + break + case 'VNF': + this.getTableVnfData(); + break + case 'PNF': + this.getTablePnfData(); + break + } }, (err) => { console.log(err); - this.notificationFailed(notificationModel); + this.notification.notificationFailed(this.currentTab, 'OnboardingState', pkgid); }) } - } diff --git a/usecaseui-portal/src/app/views/ccvpn-creation/ccvpn-creation.component.css b/usecaseui-portal/src/app/views/services/services-list/ccvpn-creation/ccvpn-creation.component.css index efeec683..8ea1b621 100644 --- a/usecaseui-portal/src/app/views/ccvpn-creation/ccvpn-creation.component.css +++ b/usecaseui-portal/src/app/views/services/services-list/ccvpn-creation/ccvpn-creation.component.css @@ -44,14 +44,14 @@ hr { display: inline-block; width: 35px; height: 35px; - background:url("../../../assets/images/Return-icon.png") no-repeat!important; + background:url("../../../../../assets/images/Return-icon.png") no-repeat!important; background-size: 100%!important; border-radius:4px; color: #D7D7D7; cursor: pointer; } .model .back:hover{ - background: url("../../../assets/images/Return-icon-active.png")!important; + background: url("../../../../../assets/images/Return-icon-active.png")!important; background-size: 100%!important; } .top-title h3.title { @@ -109,16 +109,16 @@ hr { } .model .creation .service-title .lable{ display: inline-block; - width: 100px; font: 700 14px "Arial"; color: #3C4F8C; height: 42px; line-height: 42px; vertical-align: middle; margin-left: 5px; + margin-right: 10px; } .model .creation .service-title input { - width: 230px; + width: 20%; height: 42px; border-radius:4px; outline: none; @@ -129,20 +129,14 @@ hr { .model .sitemodel,.model .sotnnpnmodel{ position: absolute; z-index: 1001; - left: 50px; - top: 60px; + left: 50%; + top: 50%; background-color: #fff; - width:1500px; - height: 81%; + width:90%; + min-width: 725px; border-radius:2px; overflow:auto; -} -.model .sotnnpnmodel{ - width: 1000px; - height: 53%; - top:200px; - left: 50%; - margin-left: -500px; + transform: translate(-50%, -50%); } .model .sitemodel h3,.model .sotnnpnmodel h3{ width: 96%; @@ -182,14 +176,14 @@ hr { float: left; } .model .sitemodel .inputs input,.model .sitemodel .inputs nz-select { - width: 186px; + width: 42%; float: right; - margin-right: 60px; + margin-right: 2%; } .model .sotnnpnmodel .inputs input{ - width: 186px; - float: left; - margin-left: 20px; + width: 42%; + float: right; + margin-right: 2%; } .model .sitemodel .action,.model .sotnnpnmodel .action { text-align: center; diff --git a/usecaseui-portal/src/app/views/ccvpn-creation/ccvpn-creation.component.html b/usecaseui-portal/src/app/views/services/services-list/ccvpn-creation/ccvpn-creation.component.html index 1fc9a500..6a05ff11 100644 --- a/usecaseui-portal/src/app/views/ccvpn-creation/ccvpn-creation.component.html +++ b/usecaseui-portal/src/app/views/services/services-list/ccvpn-creation/ccvpn-creation.component.html @@ -81,7 +81,7 @@ </nz-table> </div> </nz-tab> - <nz-tab nzTitle="Sdwansiteresource List"> + <nz-tab nzTitle="Sdwansiteresource List" nzVirtualScroll> <div class="site"> <div style="height: 10px"> <h3 style="float: left;color: #3C4F8C">Site List</h3> @@ -90,12 +90,12 @@ style="transform: scale(1.2);font-weight: 700"></i>{{"i18nTextDefine_Add" | translate}} </button> </div> - <nz-table #siteTable [nzData]="siteTableData" [nzShowPagination]="false" nzSize="small"> + <nz-table #siteTable [nzData]="siteTableData" [nzShowPagination]="false" nzSize="small" nzVirtualScroll [nzScroll]="siteTableWidth"> <thead> <tr> - <th nzWidth="10%"> NO.</th> + <th nzWidth="10%" nzLeft="0px"> NO.</th> <th *ngFor="let key of getKeys(this.siteBaseData)">{{key.split("_")[1] || key}}</th> - <th nzWidth="20%" style="text-align: center"> Action</th> + <th nzWidth="20%" style="text-align: center" nzRight="0px"> Action</th> </tr> </thead> <tbody> @@ -234,17 +234,17 @@ style="transform: scale(1.2);font-weight: 700;"></i>{{"i18nTextDefine_Add" | translate}} </button> </div> - <table class="siteWanTab"> + <nz-table class="siteWanTab" nzVirtualScroll #nzTable [nzData]="siteWanData" [nzScroll]="{ x: '2500px'}"> <thead> <tr> - <th width="4%"> NO.</th> + <th width="4%" nzLeft="0px"> NO.</th> <th *ngFor="let key of getKeys(this.siteWanParams)">{{key}}</th> - <th width="7%"> Action</th> + <th width="7%" nzRight="0px"> Action</th> </tr> </thead> <tbody> - <tr *ngFor="let item of siteWanData; let i = index;" - [ngClass]="{'tr-border':item.tabInputShowWanPort ==false}"> + <ng-template ngFor let-item [ngForOf]="nzTable.data" let-i="index"> + <tr [ngClass]="{'tr-border':item.tabInputShowWanPort ==false}"> <td>{{i+1}}</td> <td *ngFor="let key of getKeys(item);let a = index;"> <span *ngIf="!tabInputShowWanPort[i]" @@ -260,8 +260,9 @@ class="anticon anticon-delete"></i></span> </td> </tr> + </ng-template> </tbody> - </table> + </nz-table> </div> </div> diff --git a/usecaseui-portal/src/app/views/ccvpn-creation/ccvpn-creation.component.spec.ts b/usecaseui-portal/src/app/views/services/services-list/ccvpn-creation/ccvpn-creation.component.spec.ts index 30402412..30402412 100644 --- a/usecaseui-portal/src/app/views/ccvpn-creation/ccvpn-creation.component.spec.ts +++ b/usecaseui-portal/src/app/views/services/services-list/ccvpn-creation/ccvpn-creation.component.spec.ts diff --git a/usecaseui-portal/src/app/views/ccvpn-creation/ccvpn-creation.component.ts b/usecaseui-portal/src/app/views/services/services-list/ccvpn-creation/ccvpn-creation.component.ts index cb1c61df..752fddd6 100644 --- a/usecaseui-portal/src/app/views/ccvpn-creation/ccvpn-creation.component.ts +++ b/usecaseui-portal/src/app/views/services/services-list/ccvpn-creation/ccvpn-creation.component.ts @@ -15,7 +15,8 @@ */ import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; import * as d3 from 'd3'; -import { MyhttpService } from '../../core/services/myhttp.service'; +import { ServiceListService } from '../../../../core/services/serviceList.service'; +import {Observable} from "../../../../../../node_modules/rxjs"; @Component({ selector: 'app-ccvpn-creation', @@ -24,24 +25,31 @@ import { MyhttpService } from '../../core/services/myhttp.service'; }) export class CcvpnCreationComponent implements OnInit { - constructor(private myhttp: MyhttpService) { } + constructor(private myhttp: ServiceListService) { } @Input() createParams; @Input() ccvpn_temParametersContent; @Output() closeCreate = new EventEmitter(); + ngOnInit() { this.getccvpnTemParameters(this.ccvpn_temParametersContent); + Observable.fromEvent(window, 'resize').subscribe((event) => { + this.siteTableWidth["x"] = document.documentElement.clientWidth > 1400 ?"78%":"961px"; + }); } //tabBarStyle - tabBarStyle = { + tabBarStyle: object = { "height": "58px", "width": "694px", "box-shadow": "none", "margin": "0", "border-radius": "4px 4px 0px 0px" }; - templateParameters = { + siteTableWidth: object = { + x:"" + }; + templateParameters: any = { service: {}, sotnvpn: { info: {}, @@ -56,31 +64,31 @@ export class CcvpnCreationComponent implements OnInit { } }; - bodyTemplateParameter = {}; + bodyTemplateParameter: object = {}; // SOTN VPN List - sotnVpnTableData = []; - sotnInfo = {};//sotnmodel The first part of sotnInfo - sotnSdwansitelanData = [];//sotnmodel The second part of the data sdwansitelan Table - sotnSdwansitelanParams = {};//sdwansitelan Table Detailed parameters of each line of data - tabInputShowSdwansitelan = [];//sdwansitelan Table input&span The status identifier of the label switching display + sotnVpnTableData: any[] = []; + sotnInfo: object = {};//sotnmodel The first part of sotnInfo + sotnSdwansitelanData: any[] = [];//sotnmodel The second part of the data sdwansitelan Table + sotnSdwansitelanParams: object = {};//sdwansitelan Table Detailed parameters of each line of data + tabInputShowSdwansitelan: any[] = [];//sdwansitelan Table input&span The status identifier of the label switching display // Site List - siteTableData = []; - siteBaseData = {}; //sitemodel one sdwansiteresource_list + siteTableData: any[] = []; + siteBaseData: object = {}; //sitemodel one sdwansiteresource_list // cpe - siteSdwanDevice = []; //sitemodel SdwanDevice port Table data - siteCpeData = {}; //sitemodel two sdwandevice_list - tabInputShowDevice = [];//Device port Table input和span The status identifier of the label switching display + siteSdwanDevice: any[] = []; //sitemodel SdwanDevice port Table data + siteCpeData: object = {}; //sitemodel two sdwandevice_list + tabInputShowDevice: any[] = [];//Device port Table input和span The status identifier of the label switching display // Wan Port - siteWanData = []; //sitemodel three wan port Table data - siteWanParams = {}; //wan port Table Detailed parameters of each line of data - tabInputShowWanPort = [];//wan port Table input和span The status identifier of the label switching display + siteWanData: any[] = []; //sitemodel three wan port Table data + siteWanParams: object = {}; //wan port Table Detailed parameters of each line of data + tabInputShowWanPort: any[] = [];//wan port Table input和span The status identifier of the label switching display getKeys(item) { return Object.keys(item); } getccvpnTemParameters(data) { //Get template parameters - if (typeof data["model"] == 'string') { + if (data.hasOwnProperty("model") && typeof data["model"] == 'string') { data = JSON.parse(data["model"]); } let inputss = data["inputs"]; @@ -260,19 +268,19 @@ export class CcvpnCreationComponent implements OnInit { //add,edit,delete SdwanDevice addSdwanDevice() { - if (this.tabInputShowDevice.indexOf(true) > -1) {//当有正在编辑的一行数据时,不允许添加新的行 + if (this.tabInputShowDevice.indexOf(true) > -1) {//Adding new rows is not allowed when there is a row of data being edited return false; } let addNum = this.siteSdwanDevice.length; let inputsData = Object.assign({}, this.siteCpeData); - Object.keys(inputsData).forEach((item) => {//新增一行空数据 + Object.keys(inputsData).forEach((item) => {//Add a new line of empty data if (item != "description") { inputsData[item] = null; } }); this.siteSdwanDevice[addNum] = inputsData; this.tabInputShowDevice[addNum] = true; - this.siteSdwanDevice = [...this.siteSdwanDevice]; //表格刷新 + this.siteSdwanDevice = [...this.siteSdwanDevice]; //Table refresh } editDevicePort(num, item, siteSdwanDevice) { diff --git a/usecaseui-portal/src/app/views/ccvpn-detail/ccvpn-detail.component.css b/usecaseui-portal/src/app/views/services/services-list/ccvpn-detail/ccvpn-detail.component.css index d5ad960d..8d005d40 100644 --- a/usecaseui-portal/src/app/views/ccvpn-detail/ccvpn-detail.component.css +++ b/usecaseui-portal/src/app/views/services/services-list/ccvpn-detail/ccvpn-detail.component.css @@ -58,14 +58,14 @@ hr { display: inline-block; width: 35px; height: 35px; - background:url("../../../assets/images/Return-icon.png") no-repeat!important; + background:url("../../../../../assets/images/Return-icon.png") no-repeat!important; background-size: 100%!important; border-radius:4px; color: #D7D7D7; cursor: pointer; } .model .back:hover{ - background: url("../../../assets/images/Return-icon-active.png")!important; + background: url("../../../../../assets/images/Return-icon-active.png")!important; background-size: 100%!important; } .top-title h3.title { @@ -156,34 +156,28 @@ hr { float: left; } .model .sitemodel .inputs input,.model .sitemodel .inputs nz-select{ - width: 186px; + width: 42%; float: right; - margin-right: 60px; + margin-right: 2%; } .model .sotnnpnmodel .inputs input{ - width: 186px; - float: left; - margin-left: 20px; + width: 42%; + float: right; + margin-right: 2%; } /* addsite model */ .model .sitemodel,.model .sotnnpnmodel{ position: absolute; z-index: 1001; - left: 50px; - top: 60px; + left: 50%; + top: 50%; background-color: #fff; - width:1500px; - height: 81%; + width:90%; + min-width: 725px; border-radius:2px; overflow:auto; -} -.model .sotnnpnmodel{ - width: 1000px; - height: 53%; - top:200px; - left: 50%; - margin-left: -500px; + transform: translate(-50%, -50%); } .model .sitemodel h3,.model .sotnnpnmodel h3{ width: 96%; @@ -223,14 +217,14 @@ hr { float: left; } .model .sitemodel .inputs input,.model .sitemodel .inputs nz-select{ - width: 186px; + width: 42%; float: right; - margin-right: 60px; + margin-right: 2%; } .model .sotnnpnmodel .inputs div{ - width: 186px; - float: left; - margin-left: 20px; + width: 42%; + float: right; + margin-right: 2%; } .model .sitemodel .action,.model .sotnnpnmodel .action { text-align: center; diff --git a/usecaseui-portal/src/app/views/ccvpn-detail/ccvpn-detail.component.html b/usecaseui-portal/src/app/views/services/services-list/ccvpn-detail/ccvpn-detail.component.html index e2b5159e..e2b5159e 100644 --- a/usecaseui-portal/src/app/views/ccvpn-detail/ccvpn-detail.component.html +++ b/usecaseui-portal/src/app/views/services/services-list/ccvpn-detail/ccvpn-detail.component.html diff --git a/usecaseui-portal/src/app/views/ccvpn-detail/ccvpn-detail.component.spec.ts b/usecaseui-portal/src/app/views/services/services-list/ccvpn-detail/ccvpn-detail.component.spec.ts index 3d112bf8..b6f3171f 100644 --- a/usecaseui-portal/src/app/views/ccvpn-detail/ccvpn-detail.component.spec.ts +++ b/usecaseui-portal/src/app/views/services/services-list/ccvpn-detail/ccvpn-detail.component.spec.ts @@ -20,7 +20,7 @@ import { NZ_I18N, en_US } from 'ng-zorro-antd'; import { TranslateModule, TranslateLoader, TranslateService, TranslateFakeLoader } from '@ngx-translate/core'; import { CcvpnDetailComponent } from './ccvpn-detail.component'; -import { MyhttpService } from '../../core/services/myhttp.service'; +import { ServiceListService } from '../../core/services/serviceList.service'; describe('CcvpnDetailComponent', () => { let component: CcvpnDetailComponent; @@ -31,7 +31,7 @@ describe('CcvpnDetailComponent', () => { declarations: [CcvpnDetailComponent], imports: [TranslateModule.forRoot({ loader: { provide: TranslateLoader, useClass: TranslateFakeLoader } }), NgZorroAntdModule.forRoot(), HttpClientModule], - providers: [MyhttpService, { provide: NZ_I18N, useValue: en_US }] + providers: [ServiceListService, { provide: NZ_I18N, useValue: en_US }] }) .compileComponents(); })); diff --git a/usecaseui-portal/src/app/views/ccvpn-detail/ccvpn-detail.component.ts b/usecaseui-portal/src/app/views/services/services-list/ccvpn-detail/ccvpn-detail.component.ts index 8e4d6f1d..a253b044 100644 --- a/usecaseui-portal/src/app/views/ccvpn-detail/ccvpn-detail.component.ts +++ b/usecaseui-portal/src/app/views/services/services-list/ccvpn-detail/ccvpn-detail.component.ts @@ -14,7 +14,7 @@ limitations under the License. */ import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; -import { MyhttpService } from '../../core/services/myhttp.service'; +import { ServiceListService } from '../../../../core/services/serviceList.service'; import * as d3 from 'd3'; @Component({ @@ -24,7 +24,7 @@ import * as d3 from 'd3'; }) export class CcvpnDetailComponent implements OnInit { - constructor(private myhttp: MyhttpService) { } + constructor(private myhttp: ServiceListService) { } ngOnInit() { this.dataInit(); diff --git a/usecaseui-portal/src/app/views/services/services-list/create-model/create-model.component.html b/usecaseui-portal/src/app/views/services/services-list/create-model/create-model.component.html new file mode 100644 index 00000000..e093b3b8 --- /dev/null +++ b/usecaseui-portal/src/app/views/services/services-list/create-model/create-model.component.html @@ -0,0 +1,59 @@ +<nz-modal nzWidth="428" [(nzVisible)]="isVisible" nzTitle=" {{'i18nTextDefine_ServiceCreation' | translate}} " + (nzOnCancel)="handleCancel()" + (nzOnOk)="handleOk()" nzClassName="serviceCreationModel" + nzCancelText=" {{'i18nTextDefine_Cancel' | translate}} " + nzOkText=" {{'i18nTextDefine_modelOk' | translate}} " +> + <div class="select-list"> + <span> {{"i18nTextDefine_Customer" | translate}} : </span> + <nz-select [(ngModel)]="currentCustomer.name" nzAllowClear + (ngModelChange)="customerChange()"> + <nz-option *ngFor="let item of customerList" [nzValue]="item.name" [nzLabel]="item.name"></nz-option> + </nz-select> + </div> + <div class="select-list"> + <span> {{"i18nTextDefine_ServiceType" | translate}} : </span> + <nz-select [(ngModel)]="currentServiceType.name" nzAllowClear> + <nz-option *ngFor="let item of serviceTypes" [nzValue]="item.name" [nzLabel]="item.name"> + </nz-option> + </nz-select> + </div> + <div class="select-list"> + <span> {{"i18nTextDefine_UseCase" | translate}} : </span> + <nz-select [(ngModel)]="templateTypeSelected" nzAllowClear + (ngModelChange)="choseTemplateType()"> + <nz-option nzValue="SOTN" nzLabel="SOTN"></nz-option> + <nz-option nzValue="CCVPN" nzLabel="CCVPN"></nz-option> + <nz-option nzValue="E2E Service" nzLabel="E2E Service"></nz-option> + <nz-option nzValue="Network Service" nzLabel="Network Service"></nz-option> + </nz-select> + </div> + <div class="select-list"> + <span> {{"i18nTextDefine_Template" | translate}} : </span> + <nz-select [(ngModel)]="currentTemplate" nzAllowClear> + <nz-option *ngFor="let item of templates" [nzValue]="item" [nzLabel]="item.name"></nz-option> + </nz-select> + </div> + <div *ngIf="templateTypeSelected === 'E2E Service'"> + <div class="select-list"> + <span> {{"i18nTextDefine_Orchestrator" | translate}} : </span> + <nz-select [(ngModel)]="orchestratorSelected" nzAllowClear> + <nz-option *ngFor="let item of orchestratorList" [nzValue]="item" [nzLabel]="item.name"></nz-option> + </nz-select> + </div> + <div class="checkbox select-list"> + <span>Sol005 :</span> + <input type="checkbox" + [(ngModel)]="isSol005Interface" value="true" nzAllowClear> + + </div> + </div> + <div class="select-list" *ngIf="temParametersTips"> + {{"i18nTextDefine_Templateparsingfailed" | translate}} + </div> +</nz-modal> +<div class="loading" *ngIf="loadingAnimateShow"> + <img src="assets/images/loading-animate2.gif" alt="loading"> + <p>Please wating……</p> +</div> + diff --git a/usecaseui-portal/src/app/views/services/services-list/create-model/create-model.component.less b/usecaseui-portal/src/app/views/services/services-list/create-model/create-model.component.less new file mode 100644 index 00000000..fdee93c8 --- /dev/null +++ b/usecaseui-portal/src/app/views/services/services-list/create-model/create-model.component.less @@ -0,0 +1,59 @@ +.select-list{
+ width: 320px;
+ height: 32px;
+ line-height: 32px;
+ margin: 35px auto;
+ .select-list>span{
+ display:inline-block;
+ text-align: right;
+ line-height: 32px;
+ }
+ nz-select{
+ width: 176px;
+ float: right;
+ }
+ &.checkbox{
+ margin: 0 auto;
+ line-height: 32px;
+ input[type="checkbox"]{
+ zoom: 1.3;
+ width: 140px;
+ }
+ }
+}
+::ng-deep nz-modal button.ant-btn {
+ margin-top:20px !important;
+}
+
+.loading{
+ width: 100%;
+ height: 100%;
+ position: fixed;
+ top: 0;
+ margin-top: -50px;
+ margin-left: -50px;
+ z-index: 1001;
+ text-align: center;
+ background: transparent;
+ p{
+ color: #0DA9E2;
+ text-align: center;
+ position: absolute;
+ width: 300px;
+ height: 30px;
+ line-height: 30px;
+ top: 71%;
+ left: 36%;
+ margin-top: -150px;
+ margin-left: -150px;
+ }
+ img{
+ width: 300px;
+ height: 300px;
+ position: absolute;
+ top: 50%;
+ left: 36%;
+ margin-top: -150px;
+ margin-left: -150px;
+ }
+}
diff --git a/usecaseui-portal/src/app/views/services/services-list/create-model/create-model.component.spec.ts b/usecaseui-portal/src/app/views/services/services-list/create-model/create-model.component.spec.ts new file mode 100644 index 00000000..fd57b3a7 --- /dev/null +++ b/usecaseui-portal/src/app/views/services/services-list/create-model/create-model.component.spec.ts @@ -0,0 +1,26 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { CreateModelComponent } from './create-model.component'; + +describe('CreateModelComponent', () => { + let component: CreateModelComponent; + let fixture: ComponentFixture<CreateModelComponent>; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ CreateModelComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(CreateModelComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); + 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 new file mode 100644 index 00000000..f7cce450 --- /dev/null +++ b/usecaseui-portal/src/app/views/services/services-list/create-model/create-model.component.ts @@ -0,0 +1,144 @@ +import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; +import { ServiceListService } from '../../../../core/services/serviceList.service'; + +@Component({ + selector: 'app-create-model', + templateUrl: './create-model.component.html', + styleUrls: ['./create-model.component.less'], +}) +export class CreateModelComponent implements OnInit { + @Input()isVisible: boolean; + @Input()customerList; + @Input()serviceTypeList; + @Input()customerSelected; + @Input()serviceTypeSelected; + + @Output() cancel = new EventEmitter<boolean>(); + @Output() createdModalShow = new EventEmitter<any>(); + + serviceTypes: any[]; + currentCustomer: any; + currentServiceType: any; + templateTypeSelected:string = "CCVPN"; + templates: any[] = []; + currentTemplate: object = { name: null }; + orchestratorList: any[] = []; + orchestratorSelected: object = { name: null, id: null }; + isSol005Interface: boolean = false; + temParametersTips: boolean = false; + createData: Object = {}; + loadingAnimateShow: boolean = false; + + constructor( private http: ServiceListService) {} + + ngOnInit() { + this.serviceTypes = this.serviceTypeList; + this.currentCustomer = JSON.parse(JSON.stringify(this.customerSelected)); + this.currentServiceType = JSON.parse(JSON.stringify(this.serviceTypeSelected)); + this.getAlltemplates(); + } + + getServiceType(): void{ + this.http.getServiceTypes(this.currentCustomer) + .subscribe((data) => { + this.serviceTypes = data.map((item) => { + return { name: item["service-type"] } + }); + }) + } + + getAlltemplates() { + this.http.getAllServiceTemplates(this.templateTypeSelected) + .subscribe((data) => { + this.templates = data; + if (this.templateTypeSelected == "Network Service") { + this.templates = data.filter((d) => { + return typeof d.packageInfo.csarName == "string"; + }).map((item) => { + let cName = item.packageInfo.csarName.split("/").reverse()[0]; + return { name: cName, id: item.csarId, packageInfo: item.packageInfo } + }); + } + this.currentTemplate = this.templates[0]; + }, (err) => { + console.log(err); + }) + } + + getallOrchestrators() { + this.http.getAllOrchestrators() + .subscribe((data) => { + if(data.length > 0){ + this.orchestratorList = data.map((item) => { + return { name: item["name"], id: item["name"] } + }); + this.orchestratorSelected = this.orchestratorList[0]; + } + }) + } + + handleCancel(): void { + this.isVisible = false; + this.cancel.emit(false); + this.loadingAnimateShow = false; + } + + customerChange(): void { + this.getServiceType(); + } + + choseTemplateType() { + if(this.templateTypeSelected === 'E2E Service'){ + this.getallOrchestrators(); + } + this.getAlltemplates(); + } + + handleOk(): void { + if (this.templateTypeSelected === "SOTN" || this.templateTypeSelected === "CCVPN") { + this.createData = { + commonParams: { + customer: this.currentCustomer, + serviceType: this.currentServiceType, + templateType: this.templateTypeSelected + }, + template: this.currentTemplate + }; + } else if (this.templateTypeSelected === "E2E Service" || this.templateTypeSelected === "Network Service") { + this.createData = { + commonParams: { + customer: this.currentCustomer, + serviceType: this.currentServiceType, + templateType: this.templateTypeSelected + }, + template: this.currentTemplate, + orchestrator: this.orchestratorSelected, + isSol005Interface: this.isSol005Interface + }; + } + this.getTemParameters(); + } + + getTemParameters() { + let chosedtemplates = this.createData["template"]; + let types = this.createData["commonParams"].templateType; + if (types == "E2E Service") { + types = "e2e"; + } else if (types == "Network Service") { + types = "ns"; + } + this.loadingAnimateShow = true; + this.http.getTemplateParameters(types, chosedtemplates) + .subscribe((data) => { + this.loadingAnimateShow = false; + if (data.status == "FAILED") { + this.temParametersTips = true; + this.isVisible = true; + } else { + this.cancel.emit(false); + this.temParametersTips = false; + this.createdModalShow.emit({templateType: this.templateTypeSelected, data, createData: this.createData}) + } + }) + } +}
\ No newline at end of file diff --git a/usecaseui-portal/src/app/views/services/services-list/delete-model/delete-model.component.html b/usecaseui-portal/src/app/views/services/services-list/delete-model/delete-model.component.html new file mode 100644 index 00000000..5b516a0f --- /dev/null +++ b/usecaseui-portal/src/app/views/services/services-list/delete-model/delete-model.component.html @@ -0,0 +1,34 @@ +<nz-modal nzWidth="428" [(nzVisible)]="deleteModalVisible" nzTitle=" {{'i18nTextDefine_delete' | translate}}" + (nzOnCancel)="deleteCancel()" (nzOnOk)="deleteOk()" + nzClassName="{{thisService['serviceDomain'] == 'Network Service'?'nsdeleteModel':'deleteModel'}}" + nzCancelText=" {{'i18nTextDefine_Cancel' | translate}} " + nzOkText=" {{'i18nTextDefine_modelOk' | translate}} "> + <h3><span style="color: red">* </span> {{"i18nTextDefine_SureDelete" | translate}} </h3> + <div class="question"> + <h4> {{"i18nTextDefine_InstanceName" | translate}} :</h4> + <div class="deleteModelContent">{{ thisService["service-instance-name"] || + thisService["nsInstanceName"] }} + </div> + </div> + <div class="question"> + <h4> {{"i18nTextDefine_InstanceID" | translate}} :</h4> + <div class="deleteModelContent">{{ thisService["service-instance-id"] || + thisService["nsInstanceId"] }} + </div> + </div> + <div *ngIf="thisService['serviceDomain'] == 'Network Service'"> + <div class="question"> + <h4> {{"i18nTextDefine_terminationType" | translate}} :</h4> + <nz-select style="width: 306px;" [(ngModel)]="terminationType"> + <nz-option nzValue="graceful" nzLabel=" {{'i18nTextDefine_graceful' | translate}} "></nz-option> + <nz-option nzValue="forceful" nzLabel=" {{'i18nTextDefine_forceful' | translate}} "></nz-option> + </nz-select> + </div> + <div class="question"> + <h4 *ngIf="terminationType=='graceful'"> {{"i18nTextDefine_gracefulTerminationTimeout" | translate}} + :</h4> + <input *ngIf="terminationType=='graceful'" style="width: 306px;" nz-input + [(ngModel)]="gracefulTerminationTimeout"> + </div> + </div> +</nz-modal> diff --git a/usecaseui-portal/src/app/views/services/services-list/delete-model/delete-model.component.less b/usecaseui-portal/src/app/views/services/services-list/delete-model/delete-model.component.less new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/usecaseui-portal/src/app/views/services/services-list/delete-model/delete-model.component.less diff --git a/usecaseui-portal/src/app/views/services/services-list/delete-model/delete-model.component.spec.ts b/usecaseui-portal/src/app/views/services/services-list/delete-model/delete-model.component.spec.ts new file mode 100644 index 00000000..e5e94c94 --- /dev/null +++ b/usecaseui-portal/src/app/views/services/services-list/delete-model/delete-model.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { DeleteModelComponent } from './delete-model.component'; + +describe('DeleteModelComponent', () => { + let component: DeleteModelComponent; + let fixture: ComponentFixture<DeleteModelComponent>; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ DeleteModelComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(DeleteModelComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/usecaseui-portal/src/app/views/services/services-list/delete-model/delete-model.component.ts b/usecaseui-portal/src/app/views/services/services-list/delete-model/delete-model.component.ts new file mode 100644 index 00000000..f9bf9a9c --- /dev/null +++ b/usecaseui-portal/src/app/views/services/services-list/delete-model/delete-model.component.ts @@ -0,0 +1,42 @@ +import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core'; + +@Component({ + selector: 'app-delete-model', + templateUrl: './delete-model.component.html', + styleUrls: ['./delete-model.component.less'] +}) +export class DeleteModelComponent implements OnInit { + @Input()deleteModalVisible: boolean; + @Input()thisService; + @Input()terminationType; + @Input()loadingAnimateShow; + @Input()templateDeleteSuccessFaild; + @Input()gracefulTerminationTimeout; + + @Output() cancel = new EventEmitter<boolean>(); + @Output() deleteModalOK = new EventEmitter<any>(); + + constructor() { } + + ngOnInit() { + } + + deleteOk() { + this.deleteModalVisible = false; + this.loadingAnimateShow = true; + + if (this.thisService["serviceDomain"] === "Network Service") { + this.deleteModalOK.emit({ + terminationType: this.terminationType, + gracefulTerminationTimeout: this.gracefulTerminationTimeout + }) + } else { + this.deleteModalOK.emit() + } + } + deleteCancel() { + this.deleteModalVisible = false; + } + + +} diff --git a/usecaseui-portal/src/app/shared/components/e2e-creation/e2e-creation.component.css b/usecaseui-portal/src/app/views/services/services-list/e2e-creation/e2e-creation.component.css index 5dce6c92..5dce6c92 100644 --- a/usecaseui-portal/src/app/shared/components/e2e-creation/e2e-creation.component.css +++ b/usecaseui-portal/src/app/views/services/services-list/e2e-creation/e2e-creation.component.css diff --git a/usecaseui-portal/src/app/shared/components/e2e-creation/e2e-creation.component.html b/usecaseui-portal/src/app/views/services/services-list/e2e-creation/e2e-creation.component.html index da673bf0..da673bf0 100644 --- a/usecaseui-portal/src/app/shared/components/e2e-creation/e2e-creation.component.html +++ b/usecaseui-portal/src/app/views/services/services-list/e2e-creation/e2e-creation.component.html diff --git a/usecaseui-portal/src/app/shared/components/e2e-creation/e2e-creation.component.less b/usecaseui-portal/src/app/views/services/services-list/e2e-creation/e2e-creation.component.less index edbd2db0..3679079e 100644 --- a/usecaseui-portal/src/app/shared/components/e2e-creation/e2e-creation.component.less +++ b/usecaseui-portal/src/app/views/services/services-list/e2e-creation/e2e-creation.component.less @@ -59,14 +59,14 @@ hr { display: inline-block; width: 35px; height: 35px; - background:url("../../../../assets/images/Return-icon.png") no-repeat!important; + background:url("../../../../../assets/images/Return-icon.png") no-repeat!important; background-size: 100%!important; border-radius:4px; color: #D7D7D7; cursor: pointer; } .back:hover{ - background: url("../../../../assets/images/Return-icon-active.png")!important; + background: url("../../../../../assets/images/Return-icon-active.png")!important; background-size: 100%!important; } .top-title h3.title { @@ -128,14 +128,16 @@ hr { span { display: inline-block; width: 30%; + min-width: 80px; font: 700 14px "Arial"; - vertical-align: middle; overflow: hidden; - text-align: left; + text-align: left; + word-break: break-all; + vertical-align: top; } input,nz-select{ - width: 65%; - margin-left:3% + width: 49%; + margin-left:3% } } } @@ -150,7 +152,7 @@ hr { width: 38%; padding: 10px; height: 95%; - margin-right: 40px; + margin: 0 auto; #createChart{ height: 100%; width: 100%; diff --git a/usecaseui-portal/src/app/shared/components/e2e-creation/e2e-creation.component.spec.ts b/usecaseui-portal/src/app/views/services/services-list/e2e-creation/e2e-creation.component.spec.ts index de00c43f..de00c43f 100644 --- a/usecaseui-portal/src/app/shared/components/e2e-creation/e2e-creation.component.spec.ts +++ b/usecaseui-portal/src/app/views/services/services-list/e2e-creation/e2e-creation.component.spec.ts diff --git a/usecaseui-portal/src/app/shared/components/e2e-creation/e2e-creation.component.ts b/usecaseui-portal/src/app/views/services/services-list/e2e-creation/e2e-creation.component.ts index 068fb039..f1df9636 100644 --- a/usecaseui-portal/src/app/shared/components/e2e-creation/e2e-creation.component.ts +++ b/usecaseui-portal/src/app/views/services/services-list/e2e-creation/e2e-creation.component.ts @@ -14,7 +14,7 @@ limitations under the License. */ import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; -import { MyhttpService } from '../../../core/services/myhttp.service'; +import { ServiceListService } from '../../../../core/services/serviceList.service'; import * as d3 from 'd3'; @Component({ @@ -24,7 +24,7 @@ import * as d3 from 'd3'; }) export class E2eCreationComponent implements OnInit { - constructor(private myhttp: MyhttpService) { } + constructor(private myhttp: ServiceListService) { } ngOnInit() { this.gete2eTemParameters(this.e2e_ns_temParametersContent); diff --git a/usecaseui-portal/src/app/shared/components/e2e-detail/e2e-detail.component.html b/usecaseui-portal/src/app/views/services/services-list/e2e-detail/e2e-detail.component.html index c0953a90..976a9f6c 100644 --- a/usecaseui-portal/src/app/shared/components/e2e-detail/e2e-detail.component.html +++ b/usecaseui-portal/src/app/views/services/services-list/e2e-detail/e2e-detail.component.html @@ -50,7 +50,7 @@ <h3>{{template.name}}</h3> <ul class="clearfix"> <li *ngFor="let input of template.vnfs; let i = index;"> - <span style="width: 26%"> vf_location: </span> + <span style="width: 26%;min-width: 80px!important"> vf_location: </span> <span class="input-content">{{input["vf_location"]}}</span> </li> </ul> @@ -84,9 +84,14 @@ <h4>vnfs Inputs</h4> <ul> <li *ngFor="let vnf of ns_nestedTemplates;"> - <h5>id: {{vnf.vnfInstanceId}}</h5> - <span style="width: 26%"> vf_location: </span> - <span class="input-content">{{vnf["vnfInstanceName"]}}</span> + <h5> + <span style="width: 26%;min-width: 80px!important"> id: </span> + <span class="input-content"> {{vnf.vnfInstanceId}}</span> + </h5> + <h5> + <span style="width: 26%;min-width: 80px!important"> vf_location: </span> + <span class="input-content">{{vnf["vnfInstanceName"]}}</span> + </h5> </li> </ul> </div> diff --git a/usecaseui-portal/src/app/shared/components/e2e-detail/e2e-detail.component.less b/usecaseui-portal/src/app/views/services/services-list/e2e-detail/e2e-detail.component.less index e560cd9b..ad28a518 100644 --- a/usecaseui-portal/src/app/shared/components/e2e-detail/e2e-detail.component.less +++ b/usecaseui-portal/src/app/views/services/services-list/e2e-detail/e2e-detail.component.less @@ -45,14 +45,14 @@ hr { display: inline-block; width: 35px; height: 35px; - background:url("../../../../assets/images/Return-icon.png") no-repeat!important; + background:url("../../../../../assets/images/Return-icon.png") no-repeat!important; background-size: 100%!important; border-radius:4px; color: #D7D7D7; cursor: pointer; } .back:hover{ - background: url("../../../../assets/images/Return-icon-active.png")!important; + background: url("../../../../../assets/images/Return-icon-active.png")!important; background-size: 100%!important; } .top-title h3.title { @@ -110,15 +110,18 @@ hr { display: inline-block; width: 50%; font: 700 14px "Arial"; - vertical-align: middle; + vertical-align: top; overflow: hidden; text-align: left; color:rgba(60,79,140,0.5); + word-break: break-all; } span.input-content{ width: 42%; color: #3C4F8C; margin-left: 5%; + word-break: break-all; + vertical-align: top; } } } @@ -128,7 +131,7 @@ hr { padding: 10px; height: 95%; box-shadow: 0px 10px 35px 10px rgba(222, 222, 222, 0.5); - margin-right: 40px; + margin-right: 1%; background:linear-gradient(180deg,rgba(183, 230, 247, 1) 0%,rgba(214, 240, 254, 1) 100%); border-radius: 4px; #createChart{ diff --git a/usecaseui-portal/src/app/shared/components/e2e-detail/e2e-detail.component.spec.ts b/usecaseui-portal/src/app/views/services/services-list/e2e-detail/e2e-detail.component.spec.ts index ad24a477..ad24a477 100644 --- a/usecaseui-portal/src/app/shared/components/e2e-detail/e2e-detail.component.spec.ts +++ b/usecaseui-portal/src/app/views/services/services-list/e2e-detail/e2e-detail.component.spec.ts diff --git a/usecaseui-portal/src/app/shared/components/e2e-detail/e2e-detail.component.ts b/usecaseui-portal/src/app/views/services/services-list/e2e-detail/e2e-detail.component.ts index 7618c98c..50f63b3e 100644 --- a/usecaseui-portal/src/app/shared/components/e2e-detail/e2e-detail.component.ts +++ b/usecaseui-portal/src/app/views/services/services-list/e2e-detail/e2e-detail.component.ts @@ -15,7 +15,7 @@ */ import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; -import { MyhttpService } from '../../../core/services/myhttp.service'; +import { ServiceListService } from '../../../../core/services/serviceList.service'; import * as d3 from 'd3'; @Component({ @@ -25,7 +25,7 @@ import * as d3 from 'd3'; }) export class E2eDetailComponent implements OnInit { - constructor(private myhttp: MyhttpService) { + constructor(private myhttp: ServiceListService) { } ngOnInit() { diff --git a/usecaseui-portal/src/app/views/services/services-list/heal-model/heal-model.component.html b/usecaseui-portal/src/app/views/services/services-list/heal-model/heal-model.component.html new file mode 100644 index 00000000..0117669f --- /dev/null +++ b/usecaseui-portal/src/app/views/services/services-list/heal-model/heal-model.component.html @@ -0,0 +1,72 @@ +<nz-modal nzWidth="428" [nzVisible]="healModelVisible" nzTitle=" {{'i18nTextDefine_Heal' | translate}} " + (nzOnCancel)="healCancel()" (nzOnOk)="healOk()" + nzClassName="healModel" nzCancelText=" {{'i18nTextDefine_Cancel' | translate}} " + nzOkText=" {{'i18nTextDefine_modelOk' | translate}} "> + <h3><span style="color: red">* </span> {{"i18nTextDefine_SureHeal" | translate}} </h3> + <div class="heal-question"> + <p class="heal-label"> {{"i18nTextDefine_InstanceID" | translate}} : </p> + <div class="healModelContent" title="{{ thisService['service-instance-id'] || thisService['nsInstanceId'] || + thisService['vnfInstanceId']}}"> {{ thisService["service-instance-id"] || + thisService["nsInstanceId"] || + thisService["vnfInstanceId"]}} + </div> + </div> + <!-- NS --> + <div *ngIf="thisService['serviceDomain'] == 'Network Service'"> + <div class="question"> + <p class="heal-label"> {{"i18nTextDefine_degreeHealing" | translate}} :</p> + <nz-select style="width: 200px;height:42px;margin-left: 15px;border-radius: 6px" + [(ngModel)]="nsParams.degreeHealing"> + <nz-option nzValue="HEAL_RESTORE" nzLabel="HEAL_RESTORE"></nz-option> + <nz-option nzValue="HEAL_QOS" nzLabel="HEAL_QOS"></nz-option> + <nz-option nzValue="HEAL_RESET" nzLabel="HEAL_RESET"></nz-option> + <nz-option nzValue="PARTIAL_HEALING" nzLabel="PARTIAL_HEALING"></nz-option> + </nz-select> + </div> + <div> + <span style="display:inline-block;"> {{"i18nTextDefine_actionsHealing" | translate}} :</span> + <button nz-button [nzType]="'default'" (click)="addActionsHealing()"><i + class="anticon anticon-plus-circle-o"></i></button> + <br> + <div *ngFor="let item of healActions;let i = index;" style="display:inline-block;"> + <input style="width: 165px;" nz-input [(ngModel)]="item.value"> + <button nz-button [nzType]="'dashed'" (click)="minusActionsHealing(i)"><i + class="anticon anticon-minus-circle-o"></i></button> + + </div> + </div> + <span style="display:inline-block;width:50%;"> {{"i18nTextDefine_healScript" | translate}} :</span> + <input style="width: 165px;" nz-input [(ngModel)]="nsParams.healScript"> + <div> + <span style="display:inline-block;"> {{"i18nTextDefine_additionalParamsforNs" | translate}} :</span> + <button nz-button [nzType]="'default'" (click)="addNsAdditional()"><i + class="anticon anticon-plus-circle-o"></i></button> + <br> + <div *ngFor="let item of nsAdditional;let i = index;"> + Key: <input style="width: 165px;" nz-input [(ngModel)]="item.key"> + Value: <input style="width: 165px;" nz-input [(ngModel)]="item.value"> + <button nz-button [nzType]="'dashed'" (click)="minusNsAdditional(i)"><i + class="anticon anticon-minus-circle-o"></i></button> + </div> + </div> + </div> + <!-- vnf --> + <div *ngIf="thisService['serviceDomain'] == 'vnf'" style="clear: both"> + <div class="heal-question"> + <p class="heal-label"> {{"i18nTextDefine_cause" | translate}} :</p> + <input nz-input [(ngModel)]="vnfParams.cause" class="heal-input"> + </div> + <div class="heal-question"> + <p class="heal-label"> {{"i18nTextDefine_action" | translate}} :</p> + <input nz-input [(ngModel)]="vnfParams.additionalParams.action" class="heal-input"> + </div> + <div class="heal-question"> + <p class="heal-label"> {{"i18nTextDefine_actionvminfo" | translate}}:</p> + <nz-select + style=" float: right;width: 200px;margin-left: 15px;border-radius: 6px;margin-right: 30px" + [(ngModel)]="vmSelected"> + <nz-option *ngFor="let item of vnfVms" [nzValue]="item" [nzLabel]="item.vmName"></nz-option> + </nz-select> + </div> + </div> +</nz-modal>
\ No newline at end of file diff --git a/usecaseui-portal/src/app/views/services/services-list/heal-model/heal-model.component.less b/usecaseui-portal/src/app/views/services/services-list/heal-model/heal-model.component.less new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/usecaseui-portal/src/app/views/services/services-list/heal-model/heal-model.component.less diff --git a/usecaseui-portal/src/app/views/services/services-list/heal-model/heal-model.component.spec.ts b/usecaseui-portal/src/app/views/services/services-list/heal-model/heal-model.component.spec.ts new file mode 100644 index 00000000..af1c07bd --- /dev/null +++ b/usecaseui-portal/src/app/views/services/services-list/heal-model/heal-model.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { HealModelComponent } from './heal-model.component'; + +describe('HealModelComponent', () => { + let component: HealModelComponent; + let fixture: ComponentFixture<HealModelComponent>; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ HealModelComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(HealModelComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/usecaseui-portal/src/app/views/services/services-list/heal-model/heal-model.component.ts b/usecaseui-portal/src/app/views/services/services-list/heal-model/heal-model.component.ts new file mode 100644 index 00000000..a7ffe663 --- /dev/null +++ b/usecaseui-portal/src/app/views/services/services-list/heal-model/heal-model.component.ts @@ -0,0 +1,68 @@ +import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core'; + +@Component({ + selector: 'app-heal-model', + templateUrl: './heal-model.component.html', + styleUrls: ['./heal-model.component.less'] +}) +export class HealModelComponent implements OnInit { + @Input()healModelVisible: boolean; + @Input()thisService; + @Input()nsParams; + @Input()healActions; + @Input()nsAdditional; + @Input()vnfParams; + @Input()vmSelected; + @Input()vnfVms; + @Input()templatehealstarting; + @Input()templatehealSuccessFaild; + + @Output() cancel = new EventEmitter<boolean>(); + @Output() healModalOK = new EventEmitter<any>(); + + constructor() { } + + ngOnInit() { + } + + + addActionsHealing() { + this.healActions.push({ value: "" }) + } + + minusActionsHealing(index) { + this.healActions.splice(index, 1); + } + + addNsAdditional() { + this.nsAdditional.push({ key: "", value: "" }) + } + + minusNsAdditional(index) { + this.nsAdditional.splice(index, 1); + } + + healOk() { + this.healModelVisible = false; + // nsParams + this.nsParams.actionsHealing = this.healActions.map((item) => { + return item.value + }); + let additional = {}; + this.nsAdditional.forEach((item) => { + additional[item.key] = item.value; + }); + this.nsParams.additionalParamsforNs = JSON.stringify(additional); + // vnfParams + this.vnfParams.additionalParams.actionvminfo.vmid = this.vmSelected["vmId"]; + this.vnfParams.additionalParams.actionvminfo.vmname = this.vmSelected["vmName"]; + + let requestBody = this.thisService["serviceDomain"] == "Network Service" ? { healNsData: this.nsParams } : { healVnfData: this.vnfParams }; + this.healModalOK.emit(requestBody) + } + + healCancel() { + this.healModelVisible = false; + } + +} diff --git a/usecaseui-portal/src/app/views/services/services-list/scale-model/scale-model.component.html b/usecaseui-portal/src/app/views/services/services-list/scale-model/scale-model.component.html new file mode 100644 index 00000000..cb873149 --- /dev/null +++ b/usecaseui-portal/src/app/views/services/services-list/scale-model/scale-model.component.html @@ -0,0 +1,40 @@ +<nz-modal nzWidth="428" [nzVisible]="scaleModelVisible" nzTitle=" {{'i18nTextDefine_Scale' | translate}} " + (nzOnCancel)="scaleCancel()" (nzOnOk)="scaleOk()" + nzClassName="scaleModel" nzCancelText=" {{'i18nTextDefine_Cancel' | translate}} " + nzOkText=" {{'i18nTextDefine_modelOk' | translate}} "> + <h3><span style="color: red">* </span> {{"i18nTextDefine_SureScale" | translate}} </h3> + <div class="question"> + <h4> {{"i18nTextDefine_InstanceID" | translate}} :</h4> + <div class="scaleModelContent" style="width: 100%">{{ thisService["service-instance-id"] || + thisService["nsInstanceId"] || + thisService["vnfInstanceId"]}} + </div> + </div> + <div *ngFor="let item of e2e_nsData" style="margin-top: 20px"> + <h3>{{ item.netWorkServiceName }}</h3> + <div class="e2eScaleContent"> + <span class="e2eScaleLable"> {{"i18nTextDefine_ScaleType" | translate}} :</span> + <nz-select style="width: 165px;" [(ngModel)]="item.scaleType"> + <nz-option nzValue="SCALE_NS" nzLabel="SCALE_NS"></nz-option> + <nz-option nzValue="SCALE_VNF" nzLabel="SCALE_VNF"></nz-option> + </nz-select> + </div> + <div class="e2eScaleContent"> + <span class="e2eScaleLable"> {{"i18nTextDefine_AspectId" | translate}} :</span> + <input style="width: 165px;" nz-input [(ngModel)]="item.aspectId" placeholder="string"> + </div> + <div class="e2eScaleContent"> + <span class="e2eScaleLable"> {{"i18nTextDefine_Number_Of_Steps" | translate}} :</span> + <nz-input-number style="width: 165px;" [(ngModel)]="item.numberOfSteps" [nzMin]="1" [nzMax]="100" + nzPrecision=0 [nzStep]="1" nzPlaceHolder="number"></nz-input-number> + </div> + <div class="e2eScaleContent"> + <span class="e2eScaleLable"> {{"i18nTextDefine_ScalingDirection" | translate}} :</span> + <nz-select style="width: 165px;" nzPlaceHolder="Chose" [(ngModel)]="item.scalingDirection"> + <nz-option nzValue="SCALE_IN" nzLabel="SCALE_IN"></nz-option> + <nz-option nzValue="SCALE_OUT" nzLabel="SCALE_OUT"></nz-option> + </nz-select> + </div> + </div> + +</nz-modal>
\ No newline at end of file diff --git a/usecaseui-portal/src/app/views/services/services-list/scale-model/scale-model.component.less b/usecaseui-portal/src/app/views/services/services-list/scale-model/scale-model.component.less new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/usecaseui-portal/src/app/views/services/services-list/scale-model/scale-model.component.less diff --git a/usecaseui-portal/src/app/views/services/services-list/scale-model/scale-model.component.spec.ts b/usecaseui-portal/src/app/views/services/services-list/scale-model/scale-model.component.spec.ts new file mode 100644 index 00000000..5d069ee4 --- /dev/null +++ b/usecaseui-portal/src/app/views/services/services-list/scale-model/scale-model.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ScaleModelComponent } from './scale-model.component'; + +describe('ScaleModelComponent', () => { + let component: ScaleModelComponent; + let fixture: ComponentFixture<ScaleModelComponent>; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ScaleModelComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ScaleModelComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/usecaseui-portal/src/app/views/services/services-list/scale-model/scale-model.component.ts b/usecaseui-portal/src/app/views/services/services-list/scale-model/scale-model.component.ts new file mode 100644 index 00000000..c1b9a86e --- /dev/null +++ b/usecaseui-portal/src/app/views/services/services-list/scale-model/scale-model.component.ts @@ -0,0 +1,53 @@ +import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core'; + +@Component({ + selector: 'app-scale-model', + templateUrl: './scale-model.component.html', + styleUrls: ['./scale-model.component.less'] +}) +export class ScaleModelComponent implements OnInit { + @Input()scaleModelVisible: boolean; + @Input()templatescalestarting; + @Input()templateScaleSuccessFaild; + @Input()thisService; + @Input()e2e_nsData; + @Input()customerSelected; + @Input()serviceTypeSelected; + + @Output() cancel = new EventEmitter<boolean>(); + @Output() scaleModalOK = new EventEmitter<any>(); + constructor() { } + + ngOnInit() { + } + + scaleOk() { + this.scaleModelVisible = false; + let requestBody = { + "service": { + "serviceInstanceName": this.thisService["service-instance-name"], + "serviceType": this.serviceTypeSelected.name, + "globalSubscriberId": this.customerSelected.id, + "resources": this.e2e_nsData.map((item) => { + return { + "resourceInstanceId": item["netWorkServiceId"], + "scaleType": item["scaleType"], + "scaleNsData": { + "scaleNsByStepsData": { + "aspectId": item["aspectId"], + "numberOfSteps": item["numberOfSteps"], + "scalingDirection": item["scalingDirection"] + } + } + } + }) + } + }; + this.scaleModalOK.emit(requestBody) + } + + scaleCancel() { + this.scaleModelVisible = false; + } + +} diff --git a/usecaseui-portal/src/app/views/services/services-list/services-list.component.html b/usecaseui-portal/src/app/views/services/services-list/services-list.component.html index a995b485..216e92df 100644 --- a/usecaseui-portal/src/app/views/services/services-list/services-list.component.html +++ b/usecaseui-portal/src/app/views/services/services-list/services-list.component.html @@ -14,7 +14,6 @@ limitations under the License. --> <div class="action ant-tabs-bar"> - <span> <i class="icon"> <img src="assets/images/customer.png" alt=""> @@ -51,88 +50,26 @@ <i *ngIf="width>1200" class="anticon anticon-plus"></i> <span> {{"i18nTextDefine_Create" | translate}} </span> </button> - <nz-modal nzWidth="428" [(nzVisible)]="isVisible" nzTitle=" {{'i18nTextDefine_ServiceCreation' | translate}} " - (nzOnCancel)="handleCancel()" - (nzOnOk)="handleOk()" nzClassName="serviceCreationModel" - nzCancelText=" {{'i18nTextDefine_Cancel' | translate}} " - nzOkText=" {{'i18nTextDefine_modelOk' | translate}} "> - <div class="select-list"> - <span style="display:inline-block;"> {{"i18nTextDefine_Customer" | translate}} : </span> - <nz-select style="width: 176px;float: right;" [(ngModel)]="customerSelected2.name" nzAllowClear - (ngModelChange)="customerChange()"> - <nz-option *ngFor="let item of customerList2" [nzValue]="item.name" [nzLabel]="item.name"></nz-option> - </nz-select> - </div> - <div class="select-list"> - <span style="display:inline-block;"> {{"i18nTextDefine_ServiceType" | translate}} : </span> - <nz-select style="width: 176px;float: right;" [(ngModel)]="serviceTypeSelectedName" nzAllowClear - (ngModelChange)="serviceTypeChange()"> - <nz-option *ngFor="let item of serviceTypeList2" [nzValue]="item.name" [nzLabel]="item.name"> - </nz-option> - </nz-select> - </div> - <div class="select-list"> - <span style="display:inline-block;"> {{"i18nTextDefine_UseCase" | translate}} : </span> - <nz-select style="width: 176px;float: right;" [(ngModel)]="templateTypeSelected" nzAllowClear - (ngModelChange)="choseTemplateType()"> - <nz-option nzValue="SOTN" nzLabel="SOTN"></nz-option> - <nz-option nzValue="CCVPN" nzLabel="CCVPN"></nz-option> - <nz-option nzValue="E2E Service" nzLabel="E2E Service"></nz-option> - <nz-option nzValue="Network Service" nzLabel="Network Service"></nz-option> - </nz-select> - </div> - - <div class="select-list"> - <span style="display:inline-block;width:70px;"> {{"i18nTextDefine_Template" | translate}} : </span> - <nz-select style="width: 176px;float: right;" [(ngModel)]="template1" nzAllowClear> - <nz-option *ngFor="let item of templates" [nzValue]="item" [nzLabel]="item.name"></nz-option> - </nz-select> - </div> - <div *ngIf="templateTypeSelected == 'E2E Service'"> - <div class="select-list"> - <span style="display:inline-block;width:70px;"> {{"i18nTextDefine_Orchestrator" | translate}} : </span> - <nz-select style="width: 176px;float: right;" [(ngModel)]="orchestratorSelected" nzAllowClear> - <nz-option *ngFor="let item of orchestratorList" [nzValue]="item" [nzLabel]="item.name"></nz-option> - </nz-select> - </div> - </div> - <div *ngIf="templateTypeSelected == 'E2E Service'"> - <div class="check-box" style="margin:30px; height: 50px"> - <input class="check-box-style" style="zoom: 1.8; width: 70px" type="checkbox" - [(ngModel)]="isSol005Interface" value="true" nzAllowClear> - <label class="label" style="font-size: 20px; color: rgb(60,79,140,0.5)">Sol005</label> - </div> - </div> - <div class="select-list" style="color: red;margin-left: 66px;" *ngIf="temParametersTips"> - {{"i18nTextDefine_Templateparsingfailed" | translate}} - </div> - </nz-modal> + <app-create-model *ngIf="isVisible" [isVisible]="isVisible" (cancel)="isVisible=$event" (createdModalShow)="createdModalShow($event)" + [customerList]="customerList" [serviceTypeList]="serviceTypeList" [customerSelected]="customerSelected" [serviceTypeSelected]="serviceTypeSelected"> + </app-create-model> + </div> -<nz-layout style=" padding: 20px 32px; "> - <ul class="top-num"> - <li *ngFor="let item of serviceMunber" class="top-list"> - <span class="round">{{item.serviceDomain}}</span> - <div class="top-list-text"> - <p> - <span>{{item.failed}}</span> - <span> {{"i18nTextDefine_Failed" | translate}} </span> - </p> - <p> - <span>{{item.Success}}</span> - <span> {{"i18nTextDefine_Success" | translate}} </span> - </p> - <p> - <span>{{item.InProgress}}</span> - <span> {{"i18nTextDefine_InProgress" | translate}} </span> - </p> - <p class="service-description"> {{item.detailName | translate}} </p> - </div> - </li> - </ul> - <div class="list" id="services-list" [ngClass]="{'listdisplay':listDisplay == true}"> - <nz-table *ngIf="1" #nzTable [nzData]="tableData" nzShowSizeChanger [nzFrontPagination]="false" +<nz-layout> + <div class="top-num"> + <app-top-card + *ngFor="let item of serviceNunber" + [serviceDomain]="item.serviceDomain" + [successNum]="item.Success" + [failedNum]="item.failed" + [inProgressNum]="item.InProgress" + [serviceDetailName]="item.detailName"> + </app-top-card> + </div> + <div class="list" id="services-list" [ngClass]="{'listdisplay':listDisplay === true}"> + <nz-table #nzTable [nzData]="tableData" nzShowSizeChanger [nzFrontPagination]="false" [nzShowQuickJumper]="true" [nzPageSizeOptions]="[5,10,15,20]" [nzTotal]='total' [(nzPageSize)]="pageSize" - [(nzPageIndex)]='pageIndex' [nzLoading]="loading" [nzSize]="'middle'" [nzScroll]="{ y: '58vh' }" + [(nzPageIndex)]='pageIndex' [nzLoading]="loading" [nzSize]="'middle'" (nzPageIndexChange)="searchData()" (nzPageSizeChange)="searchData(true)"> <thead> <tr> @@ -153,31 +90,30 @@ <td>{{data["service-instance-name"] || data.nsName}}</td> <td>{{data["service-instance-id"] || data.nsInstanceId}}</td> <td> - <p - [ngClass]="{'e2eColor':data.serviceDomain=='E2E Service','nsColor':data.serviceDomain=='Network Service','ccvpnColor':data.serviceDomain=='CCVPN','sotnColor':data.serviceDomain=='SOTN','voLTEColor':data.serviceDomain=='voLTE type'}"> + <p class="usecase"> {{data.serviceDomain}} </p> </td> <td> - <span [ngClass]="{'active':data.statusClass=='2001','closed':data.statusClass=='Closed','onboarding':data.statusClass=='Onboarding', - 'updating':data.statusClass=='Updating','deleting':data.statusClass=='1002','creating':data.statusClass=='1001', - 'scaling':data.statusClass=='1003','healing':data.statusClass=='1004'}" - *ngIf="data.tips != 'Available' && data.tips != 'Unavailable'">{{data.tips}}</span> - <span *ngIf="data.tips == 'Available' " style="margin-left: 10px"> + <span [ngClass]="{'active':data.statusClass==='2001','closed':data.statusClass==='Closed','onboarding':data.statusClass==='Onboarding', + 'updating':data.statusClass==='Updating','deleting':data.statusClass==='1002','creating':data.statusClass==='1001', + 'scaling':data.statusClass==='1003','healing':data.statusClass==='1004'}" + *ngIf="data.tips !== 'Available' && data.tips !== 'Unavailable'">{{data.tips}}</span> + <span *ngIf="data.tips === 'Available' " class="marginLeft10"> <img src="assets/images/wancheng-icon.png" alt="Available"> </span> - <span *ngIf="data.tips == 'Unavailable' " style="margin-left: 10px"> + <span *ngIf="data.tips === 'Unavailable' " class="marginLeft10"> <img src="assets/images/shibai-icon.png" alt="Unavailable"> </span> - <nz-progress *ngIf="data.status == 'In Progress'" [nzPercent]="data.rate" + <nz-progress *ngIf="data.status === 'In Progress'" [nzPercent]="data.rate" [nzShowInfo]="false" nzStatus="active"></nz-progress> </td> <td> - <i [ngClass]="{'cannotclick':data.status == 'In Progress'||(data.status=='Failed' && data.operationType=='1001')||(data.status=='Failed' && data.operationType=='1002')}" + <i [ngClass]="{'cannotclick':data.status === 'In Progress'||(data.status=='Failed' && data.operationType=='1001')||(data.status==='Failed' && data.operationType=='1002')}" class="anticon anticon-bars" (click)="serviceDetail(data,1)"></i> - <i [ngClass]="{'cannotclick':data.status == 'In Progress'}" class="anticon anticon-delete" + <i [ngClass]="{'cannotclick':data.status === 'In Progress'}" class="anticon anticon-delete" (click)="deleteModel(data)"></i> - <i [ngClass]="{'cannotclick':data.status == 'In Progress'}" class="anticon anticon-ellipsis" + <i [ngClass]="{'cannotclick':data.status === 'In Progress'}" class="anticon anticon-ellipsis" (click)="iconMoreShow(data,tableData)" style="transform: rotate(90deg);"></i> <ul *ngIf="data.iconMore==true " class="icon-more"> @@ -218,255 +154,50 @@ </tbody> </nz-table> - <nz-modal nzWidth="428" [nzVisible]="scaleModelVisible" nzTitle=" {{'i18nTextDefine_Scale' | translate}} " - (nzOnCancel)="scaleCancel()" (nzOnOk)="scaleOk(templatescalestarting,templateScaleSuccessFaild)" - nzClassName="scaleModel" nzCancelText=" {{'i18nTextDefine_Cancel' | translate}} " - nzOkText=" {{'i18nTextDefine_modelOk' | translate}} "> - <h3><span style="color: red">* </span> {{"i18nTextDefine_SureScale" | translate}} </h3> - <div class="question"> - <h4> {{"i18nTextDefine_InstanceID" | translate}} :</h4> - <div class="scaleModelContent" style="width: 100%">{{ thisService["service-instance-id"] || - thisService["nsInstanceId"] || - thisService["vnfInstanceId"]}} - </div> - </div> - <div *ngFor="let item of e2e_nsData" style="margin-top: 20px"> - <h3>{{ item.netWorkServiceName }}</h3> - <div class="e2eScaleContent"> - <span class="e2eScaleLable"> {{"i18nTextDefine_ScaleType" | translate}} :</span> - <nz-select style="width: 165px;" [(ngModel)]="item.scaleType"> - <nz-option nzValue="SCALE_NS" nzLabel="SCALE_NS"></nz-option> - <nz-option nzValue="SCALE_VNF" nzLabel="SCALE_VNF"></nz-option> - </nz-select> - </div> - <div class="e2eScaleContent"> - <span class="e2eScaleLable"> {{"i18nTextDefine_AspectId" | translate}} :</span> - <input style="width: 165px;" nz-input [(ngModel)]="item.aspectId" placeholder="string"> - </div> - <div class="e2eScaleContent"> - <span class="e2eScaleLable"> {{"i18nTextDefine_Number_Of_Steps" | translate}} :</span> - <nz-input-number style="width: 165px;" [(ngModel)]="item.numberOfSteps" [nzMin]="1" [nzMax]="100" - nzPrecision=0 [nzStep]="1" nzPlaceHolder="number"></nz-input-number> - </div> - <div class="e2eScaleContent"> - <span class="e2eScaleLable"> {{"i18nTextDefine_ScalingDirection" | translate}} :</span> - <nz-select style="width: 165px;" nzPlaceHolder="Chose" [(ngModel)]="item.scalingDirection"> - <nz-option nzValue="SCALE_IN" nzLabel="SCALE_IN"></nz-option> - <nz-option nzValue="SCALE_OUT" nzLabel="SCALE_OUT"></nz-option> - </nz-select> - </div> - </div> - - <ng-template #templatescalestarting> - <div class="ant-notification-notice-content"> - <div class="ant-notification-notice-with-icon"> - <span class="ant-notification-notice-icon"> - <img src="assets/images/execute-inproess.png" alt="instance temination is starting"> - </span> - <div class="ant-notification-notice-message">E2E - {{"i18nTextDefine_InstanceTeminationStarting" | translate}} - </div> - <div class="ant-notification-notice-description"> - <div class="notificationlist"> - <p> {{"i18nTextDefine_InstanceName" | translate}} :</p> - <span>{{ thisService["service-instance-name"] || - thisService["nsInstanceName"] }} - </span> - </div> - <div class="notificationlist"> - <p> {{"i18nTextDefine_Customer" | translate}} :</p> - <span>{{ customerSelected.name }}</span> - </div> - <div class="notificationlist"> - <p> {{"i18nTextDefine_UseCase" | translate}} :</p> - <span>{{ thisService["serviceDomain"] }}</span> - </div> - </div> - <div class="close-icons">{{"i18nTextDefine_Close" | translate}}</div> - </div> - </div> - </ng-template> - </nz-modal> - - <nz-modal nzWidth="428" [(nzVisible)]="deleteModelVisible" nzTitle=" {{'i18nTextDefine_delete' | translate}} " - (nzOnCancel)="deleteCancel()" (nzOnOk)="deleteOk(templatedeletestarting,templateDeleteSuccessFaild)" - nzClassName="{{thisService['serviceDomain'] == 'Network Service'?'nsdeleteModel':'deleteModel'}}" - nzCancelText=" {{'i18nTextDefine_Cancel' | translate}} " - nzOkText=" {{'i18nTextDefine_modelOk' | translate}} "> - <h3><span style="color: red">* </span> {{"i18nTextDefine_SureDelete" | translate}} </h3> - <div class="question"> - <h4> {{"i18nTextDefine_InstanceName" | translate}} :</h4> - <div class="deleteModelContent">{{ thisService["service-instance-name"] || - thisService["nsInstanceName"] }} - </div> - </div> - <div class="question"> - <h4> {{"i18nTextDefine_InstanceID" | translate}} :</h4> - <div class="deleteModelContent">{{ thisService["service-instance-id"] || - thisService["nsInstanceId"] }} - </div> - </div> - <div *ngIf="thisService['serviceDomain'] == 'Network Service'"> - <div class="question"> - <h4> {{"i18nTextDefine_terminationType" | translate}} :</h4> - <nz-select style="width: 306px;" [(ngModel)]="terminationType"> - <nz-option nzValue="graceful" nzLabel=" {{'i18nTextDefine_graceful' | translate}} "></nz-option> - <nz-option nzValue="forceful" nzLabel=" {{'i18nTextDefine_forceful' | translate}} "></nz-option> - </nz-select> - </div> - <div class="question"> - <h4 *ngIf="terminationType=='graceful'"> {{"i18nTextDefine_gracefulTerminationTimeout" | translate}} - :</h4> - <input *ngIf="terminationType=='graceful'" style="width: 306px;" nz-input - [(ngModel)]="gracefulTerminationTimeout"> - </div> - </div> - - <ng-template #templatedeletestarting> - <div class="ant-notification-notice-content"> - <div class="ant-notification-notice-with-icon"> - <span class="ant-notification-notice-icon"> - <img src="assets/images/execute-inproess.png" alt="instance temination is starting"> - </span> - <div class="ant-notification-notice-message" - *ngIf="thisService['serviceDomain'] == 'CCVPN' || thisService['serviceDomain'] == 'SOTN'"> - {{ thisService['serviceDomain'] }} {{"i18nTextDefine_InstanceTeminationStarting" | - translate}} - </div> - <div class="ant-notification-notice-message" - *ngIf="thisService['serviceDomain'] == 'E2E Service'">E2E - {{"i18nTextDefine_InstanceTeminationStarting" | translate}} - </div> - <div class="ant-notification-notice-message" - *ngIf="thisService['serviceDomain'] == 'Network Service'">NS - {{"i18nTextDefine_InstanceTeminationStarting" | translate}} - </div> - <div class="ant-notification-notice-description"> - <div class="notificationlist"> - <p> {{"i18nTextDefine_InstanceName" | translate}} :</p> - <span>{{ thisService["service-instance-name"] || - thisService["nsInstanceName"] }} - </span> - </div> - <div class="notificationlist"> - <p> {{"i18nTextDefine_Customer" | translate}} :</p> - <span>{{ customerSelected.name }}</span> - </div> - <div class="notificationlist"> - <p> {{"i18nTextDefine_UseCase" | translate}} :</p> - <span>{{ thisService["serviceDomain"] }}</span> - </div> - </div> - <div class="close-icons">{{"i18nTextDefine_Close" | translate}}</div> - </div> - </div> - </ng-template> - </nz-modal> - - <nz-modal nzWidth="428" [nzVisible]="healModelVisible" nzTitle=" {{'i18nTextDefine_Heal' | translate}} " - (nzOnCancel)="healCancel()" (nzOnOk)="healOk(templatehealstarting,templatehealSuccessFaild)" - nzClassName="healModel" nzCancelText=" {{'i18nTextDefine_Cancel' | translate}} " - nzOkText=" {{'i18nTextDefine_modelOk' | translate}} "> - <h3><span style="color: red">* </span> {{"i18nTextDefine_SureHeal" | translate}} </h3> - <div class="heal-question"> - <p class="heal-label"> {{"i18nTextDefine_InstanceID" | translate}} : </p> - <div class="healModelContent" title="{{ thisService['service-instance-id'] || thisService['nsInstanceId'] || - thisService['vnfInstanceId']}}"> {{ thisService["service-instance-id"] || - thisService["nsInstanceId"] || - thisService["vnfInstanceId"]}} - </div> - </div> - <!-- NS --> - <div *ngIf="thisService['serviceDomain'] == 'Network Service'"> - <div class="question"> - <p class="heal-label"> {{"i18nTextDefine_degreeHealing" | translate}} :</p> - <nz-select style="width: 200px;height:42px;margin-left: 15px;border-radius: 6px" - [(ngModel)]="nsParams.degreeHealing"> - <nz-option nzValue="HEAL_RESTORE" nzLabel="HEAL_RESTORE"></nz-option> - <nz-option nzValue="HEAL_QOS" nzLabel="HEAL_QOS"></nz-option> - <nz-option nzValue="HEAL_RESET" nzLabel="HEAL_RESET"></nz-option> - <nz-option nzValue="PARTIAL_HEALING" nzLabel="PARTIAL_HEALING"></nz-option> - </nz-select> - </div> - <div> - <span style="display:inline-block;"> {{"i18nTextDefine_actionsHealing" | translate}} :</span> - <button nz-button [nzType]="'default'" (click)="addActionsHealing()"><i - class="anticon anticon-plus-circle-o"></i></button> - <br> - <div *ngFor="let item of healActions;let i = index;" style="display:inline-block;"> - <input style="width: 165px;" nz-input [(ngModel)]="item.value"> - <button nz-button [nzType]="'dashed'" (click)="minusActionsHealing(i)"><i - class="anticon anticon-minus-circle-o"></i></button> - - </div> - </div> - <span style="display:inline-block;width:50%;"> {{"i18nTextDefine_healScript" | translate}} :</span> - <input style="width: 165px;" nz-input [(ngModel)]="nsParams.healScript"> - <div> - <span style="display:inline-block;"> {{"i18nTextDefine_additionalParamsforNs" | translate}} :</span> - <button nz-button [nzType]="'default'" (click)="addNsAdditional()"><i - class="anticon anticon-plus-circle-o"></i></button> - <br> - <div *ngFor="let item of nsAdditional;let i = index;"> - Key: <input style="width: 165px;" nz-input [(ngModel)]="item.key"> - Value: <input style="width: 165px;" nz-input [(ngModel)]="item.value"> - <button nz-button [nzType]="'dashed'" (click)="minusNsAdditional(i)"><i - class="anticon anticon-minus-circle-o"></i></button> - </div> - </div> - </div> - <!-- vnf --> - <div *ngIf="thisService['serviceDomain'] == 'vnf'" style="clear: both"> - <div class="heal-question"> - <p class="heal-label"> {{"i18nTextDefine_cause" | translate}} :</p> - <input nz-input [(ngModel)]="vnfParams.cause" class="heal-input"> - </div> - <div class="heal-question"> - <p class="heal-label"> {{"i18nTextDefine_action" | translate}} :</p> - <input nz-input [(ngModel)]="vnfParams.additionalParams.action" class="heal-input"> - </div> - <div class="heal-question"> - <p class="heal-label"> {{"i18nTextDefine_actionvminfo" | translate}}:</p> - <nz-select - style=" float: right;width: 200px;margin-left: 15px;border-radius: 6px;margin-right: 30px" - [(ngModel)]="vmSelected"> - <nz-option *ngFor="let item of vnfVms" [nzValue]="item" [nzLabel]="item.vmName"></nz-option> - </nz-select> - </div> - </div> - - <ng-template #templatehealstarting> - <div class="ant-notification-notice-content"> - <div class="ant-notification-notice-with-icon"> - <span class="ant-notification-notice-icon"> - <img src="assets/images/execute-inproess.png" alt="instance temination is starting"> - </span> - <div class="ant-notification-notice-message">NS - {{"i18nTextDefine_InstanceHealingStarting" | translate}} - </div> - <div class="ant-notification-notice-description"> - <div class="notificationlist"> - <p> {{"i18nTextDefine_InstanceName" | translate}} :</p> - <span>{{ thisService["service-instance-name"] || - thisService["nsInstanceName"] }} - </span> - </div> - <div class="notificationlist"> - <p> {{"i18nTextDefine_Customer" | translate}} :</p> - <span>{{ customerSelected.name }}</span> - </div> - <div class="notificationlist"> - <p> {{"i18nTextDefine_UseCase" | translate}} :</p> - <span>{{ thisService["serviceDomain"] }}</span> - </div> - </div> - <div class="close-icons">{{"i18nTextDefine_Close" | translate}}</div> - </div> - </div> - </ng-template> - </nz-modal> + <app-delete-model + *ngIf="deleteModalVisible" + [deleteModalVisible]="deleteModalVisible" + [thisService]="thisService" + [terminationType]="terminationType" + [loadingAnimateShow]="loadingAnimateShow" + [gracefulTerminationTimeout]="gracefulTerminationTimeout" + [templateDeleteSuccessFaild]="templateDeleteSuccessFaild" + (cancel)="deleteModalVisible=$event" + (deleteModalOK)="deleteModalOK($event,templateDeleteSuccessFaild)" + > + </app-delete-model> + <app-scale-model + *ngIf="scaleModelVisible" + [scaleModelVisible]="scaleModelVisible" + [thisService]="thisService" + [e2e_nsData]="e2e_nsData" + [customerSelected]="customerSelected" + [serviceTypeSelected]="serviceTypeSelected" + [templatescalestarting]="templatescalestarting" + [templateScaleSuccessFaild]="templateScaleSuccessFaild" + (cancel)="scaleModelVisible=$event" + (scaleModalOK)="scaleModalOK($event,templatescalestarting,templateScaleSuccessFaild)" + > + </app-scale-model> + <app-heal-model + *ngIf="healModelVisible" + [healModelVisible]="healModelVisible" + [thisService]="thisService" + [nsParams]="nsParams" + [healActions]="healActions" + [nsAdditional]="nsAdditional" + [vnfParams]="vnfParams" + [vmSelected]="vmSelected" + [vnfVms]="vnfVms" + [templatehealstarting]="templatehealstarting" + [templatehealSuccessFaild]="templatehealSuccessFaild" + (cancel)="healModelVisible=$event" + (healModalOK)="healModalOK($event,templatehealstarting,templatehealSuccessFaild)" + ></app-heal-model> + <app-notification #notification [isServicesList]="true" [customerSelected]="customerSelected"></app-notification> <!-- add notification--> + <ng-template #templateCreatestarting> <div class="ant-notification-notice-content"> <div class="ant-notification-notice-with-icon"> @@ -474,7 +205,7 @@ <img src="assets/images/execute-inproess.png" alt="instance temination is starting"> </span> <div class="ant-notification-notice-message" - *ngIf="thisCreateService['serviceDomain'] == 'CCVPN' || thisService['serviceDomain'] == 'SOTN'"> + *ngIf="thisCreateService['serviceDomain'] === 'CCVPN' || thisService['serviceDomain'] === 'SOTN'"> {{ thisService['serviceDomain'] }} {{"i18nTextDefine_InstanceCreationStarting" | translate}} </div> @@ -582,6 +313,7 @@ *ngIf="(thisService['serviceDomain'] == 'Network Service') && thisService.status == 'Successful'"> NS {{"i18nTextDefine_InstanceTeminatedSuccessfully" | translate}} </div> + <div class="ant-notification-notice-message" *ngIf="(thisService['serviceDomain'] == 'CCVPN' || thisService['serviceDomain'] == 'SOTN') && thisService.status == 'Failed'"> {{ thisService['serviceDomain'] }} {{"i18nTextDefine_InstanceTeminationFailed" | @@ -615,6 +347,35 @@ </div> </div> </ng-template> + <ng-template #templatescalestarting> + <div class="ant-notification-notice-content"> + <div class="ant-notification-notice-with-icon"> + <span class="ant-notification-notice-icon"> + <img src="assets/images/execute-inproess.png" alt="instance temination is starting"> + </span> + <div class="ant-notification-notice-message">E2E + {{"i18nTextDefine_InstanceTeminationStarting" | translate}} + </div> + <div class="ant-notification-notice-description"> + <div class="notificationlist"> + <p> {{"i18nTextDefine_InstanceName" | translate}} :</p> + <span>{{ thisService["service-instance-name"] || + thisService["nsInstanceName"] }} + </span> + </div> + <div class="notificationlist"> + <p> {{"i18nTextDefine_Customer" | translate}} :</p> + <span>{{ customerSelected.name }}</span> + </div> + <div class="notificationlist"> + <p> {{"i18nTextDefine_UseCase" | translate}} :</p> + <span>{{ thisService["serviceDomain"] }}</span> + </div> + </div> + <div class="close-icons">{{"i18nTextDefine_Close" | translate}}</div> + </div> + </div> + </ng-template> <ng-template #templateScaleSuccessFaild> <div class="ant-notification-notice-content"> <div class="ant-notification-notice-with-icon"> @@ -650,6 +411,35 @@ </div> </div> </ng-template> + <ng-template #templatehealstarting> + <div class="ant-notification-notice-content"> + <div class="ant-notification-notice-with-icon"> + <span class="ant-notification-notice-icon"> + <img src="assets/images/execute-inproess.png" alt="instance temination is starting"> + </span> + <div class="ant-notification-notice-message">NS + {{"i18nTextDefine_InstanceHealingStarting" | translate}} + </div> + <div class="ant-notification-notice-description"> + <div class="notificationlist"> + <p> {{"i18nTextDefine_InstanceName" | translate}} :</p> + <span>{{ thisService["service-instance-name"] || + thisService["nsInstanceName"] }} + </span> + </div> + <div class="notificationlist"> + <p> {{"i18nTextDefine_Customer" | translate}} :</p> + <span>{{ customerSelected.name }}</span> + </div> + <div class="notificationlist"> + <p> {{"i18nTextDefine_UseCase" | translate}} :</p> + <span>{{ thisService["serviceDomain"] }}</span> + </div> + </div> + <div class="close-icons">{{"i18nTextDefine_Close" | translate}}</div> + </div> + </div> + </ng-template> <ng-template #templatehealSuccessFaild> <div class="ant-notification-notice-content"> <div class="ant-notification-notice-with-icon"> @@ -728,7 +518,7 @@ </div> <div class="detailComponent" *ngIf="detailshow2"> <app-e2e-detail [detailParams]="detailData" (closeDetail)="detailshow2 = false;listDisplay = false;"> - </app-e2e-detail> + </app-e2e-detail> </div> <div class="createComponent" *ngIf="createshow"> <app-ccvpn-creation [createParams]="createData" [ccvpn_temParametersContent]="ccvpn_temParametersContent" diff --git a/usecaseui-portal/src/app/views/services/services-list/services-list.component.less b/usecaseui-portal/src/app/views/services/services-list/services-list.component.less index aeddf257..454e3bc8 100644 --- a/usecaseui-portal/src/app/views/services/services-list/services-list.component.less +++ b/usecaseui-portal/src/app/views/services/services-list/services-list.component.less @@ -207,69 +207,9 @@ nz-layout{ width: 100%; display: flex; justify-content: space-around; - .top-list{ - position: relative; - width:32%; - max-width:400px; - height:170px; - background:url("/assets/images/servicelist-e2e.png") no-repeat; - background-size: 100% 100%; - border-radius:2px; - .round{ - position: absolute; - width: 60px; - height: 60px; - line-height: 60px; - text-align: center; - background:#E0EDFF; - border:2px solid rgba(224,237,255,1); - border-radius: 50%; - font-size:16px; - font-family:ArialMT; - color:#3C4F8C; - transition: .5s; - } - .top-list-text{ - position: absolute; - text-align: right; - line-height: 20px; - right: 12%; - color: #fff; - p{ - height: 28px; - margin-bottom: 0; - padding-left: 5px; - font-size: 14px; - clear: both; - span{ - display: inline-block; - float: right; - font-weight: 500; - text-align: right; - } - span:nth-child(1){ - font-size: 18px; - margin-left: 15px; - } - span:nth-child(2){ - width: 85px; - font-size: 16px; - } - } - p:nth-child(1){ - margin-top: 25px; - } - .service-description{ - - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - color: #3C4F8C; - - } - } + app-top-card{ + width: 32%; } - } } .list { @@ -312,6 +252,9 @@ nz-layout{ font-size: 12px; color: orangered; } + span.marginLeft10{ + margin-left: 10px; + } i.anticon { cursor: pointer; font-size: 18px; @@ -395,7 +338,7 @@ nz-layout{ z-index: 3; } -.e2eColor,.nsColor,.ccvpnColor,.sotnColor,.voLTEColor{ +.usecase{ width:120px; height: 34px; line-height: 34px; @@ -416,18 +359,6 @@ nz-layout{ border-radius:4px; } -.select-list{ - width: 320px; - height: 32px; - line-height: 32px; - margin: 35px auto; -} -.select-list>span{ - text-align: right; - width: 110px!important; - line-height: 32px; -} - .listdisplay{ display: none; }
\ No newline at end of file diff --git a/usecaseui-portal/src/app/views/services/services-list/services-list.component.ts b/usecaseui-portal/src/app/views/services/services-list/services-list.component.ts index 72cacc7e..da027028 100644 --- a/usecaseui-portal/src/app/views/services/services-list/services-list.component.ts +++ b/usecaseui-portal/src/app/views/services/services-list/services-list.component.ts @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Component, OnInit, HostBinding, TemplateRef } from '@angular/core'; -import { MyhttpService } from '../../../core/services/myhttp.service'; +import { Component, OnInit, HostBinding, TemplateRef, ViewChild } from '@angular/core'; +import { ServiceListService } from '../../../core/services/serviceList.service'; import { slideToRight } from '../../../shared/utils/animates'; import { NzModalService } from 'ng-zorro-antd'; import { NzNotificationService } from 'ng-zorro-antd'; @@ -28,10 +28,11 @@ import { Observable } from 'rxjs/Rx'; }) export class ServicesListComponent implements OnInit { @HostBinding('@routerAnimate') routerAnimateState; + @ViewChild('notification') notification1: any; public width:number = document.documentElement.clientWidth; - constructor(private myhttp: MyhttpService, private modalService: NzModalService, private notification: NzNotificationService) { + constructor(private myhttp: ServiceListService, private modalService: NzModalService, private notification: NzNotificationService) { } ngOnInit() { @@ -41,16 +42,19 @@ export class ServicesListComponent implements OnInit { this.width = document.documentElement.clientWidth }); } - + ngOnDestroy() { + clearInterval(this.progressCcvpnOutTimer); + clearInterval(this.progressingCcvpnTimer); + clearInterval(this.progressNsOutTimer); + clearInterval(this.progressingNsTimer); + } // customer servicetype isSol005Interface = false; orchestratorList = []; customerList = []; - customerList2 = []; customerSelected = { name: null, id: null }; customerSelected2 = { name: null, id: null }; serviceTypeList = []; - serviceTypeList2 = []; serviceTypeSelected = { name: '' }; serviceTypeSelected2 = { name: '' }; serviceTypeSelectedName = ""; @@ -60,7 +64,7 @@ export class ServicesListComponent implements OnInit { language = sessionStorage.getItem("DefaultLang"); iconMore = false; loadingAnimateShow = false; - serviceMunber = [ // top: E2E/NS/CCVPN data + serviceNunber = [ // top: E2E/NS/CCVPN data { "serviceDomain": "E2E", "Success": 0, @@ -84,6 +88,11 @@ export class ServicesListComponent implements OnInit { } ]; + progressCcvpnOutTimer :any; // ccvpn��NS progress Timer + progressingCcvpnTimer :any; + progressNsOutTimer :any; + progressingNsTimer :any; + //The icon behind each row of data in the table expands iconMoreShow(data, tableData) { tableData.map((its) => { @@ -104,59 +113,40 @@ export class ServicesListComponent implements OnInit { console.log(this.language, "this.language"); this.myhttp.getAllCustomers() .subscribe((data) => { - this.customerList = data.map((item) => { - return { name: item["subscriber-name"], id: item["global-customer-id"] } - }); - if (this.customerList.length == 0) { - console.log("customerList.length == 0", this.customerList); - return false; + this.customerList = data.map(item => ({ name: item["subscriber-name"], id: item["global-customer-id"] }) ); + if(data.length !== 0){ + this.customerSelected = this.customerList[0]; + this.choseCustomer(); } - this.customerList2 = data.map((item) => { - return { name: item["subscriber-name"], id: item["global-customer-id"] } - }); - if (this.customerList2.length == 0) { - return false; - } - this.customerSelected = this.customerList[0]; - this.choseCustomer(this.customerSelected); }) } getallOrchestrators() { this.myhttp.getAllOrchestrators() .subscribe((data) => { - this.orchestratorList = data.map((item) => { - return { name: item["name"], id: item["name"] } - }); - if (this.orchestratorList.length == 0) { - console.log("orchestratorList.length == 0", this.orchestratorList); - return false; + if(data.length > 0){ + this.orchestratorList = data.map((item) => { + return { name: item["name"], id: item["name"] } + }); + this.orchestratorSelected = this.orchestratorList[0]; } - this.orchestratorSelected = this.orchestratorList[0]; }) } - choseCustomer(item) { - this.customerSelected = item; + choseCustomer(item = this.customerSelected) { + if(this.customerSelected !== item) this.customerSelected = item; this.myhttp.getServiceTypes(this.customerSelected) .subscribe((data) => { - this.serviceTypeList = data.map((item) => { - return { name: item["service-type"] } - }); - - if (this.serviceTypeList.length == 0) { - console.log("serviceTypeList.length == 0", this.serviceTypeList); - return false; + this.serviceTypeList = data.map( item => ({ name: item["service-type"] })); + if(data.length !== 0){ + this.serviceTypeSelected = this.serviceTypeList[0]; + this.choseServiceType(); } - - this.serviceTypeSelected = this.serviceTypeList[0]; - - this.choseServiceType(this.serviceTypeSelected); }) } - choseServiceType(item) { - this.serviceTypeSelected = item; + choseServiceType(item = this.serviceTypeSelected) { + if(this.serviceTypeSelected !== item) this.serviceTypeSelected = item; this.getTableData(); } @@ -164,131 +154,28 @@ export class ServicesListComponent implements OnInit { // Create modal box 2 (dialog box) create ------------------------------- isVisible = false; - customerChange(): void { - this.getServiceType(this.customerSelected2); - } - - getServiceType(customerSelected2) { - this.myhttp.getServiceTypes(customerSelected2) - .subscribe((data) => { - this.serviceTypeList2 = data.map((item) => { - return { name: item["service-type"] } - }); - if (this.serviceTypeList2.length == 0) { - console.log("serviceTypeList.length == 0", this.serviceTypeList2); - return false; - } - this.getAlltemplates(); - }) - } - - serviceTypeChange(): void { - this.serviceTypeSelected2.name = this.serviceTypeSelectedName - } - createModal(): void { this.isVisible = true; - this.getallOrchestrators(); - this.customerSelected2 = this.customerSelected; - this.serviceTypeSelectedName = this.serviceTypeSelected.name; - this.serviceTypeSelected2 = Object.assign({}, this.serviceTypeSelected); - this.getServiceType(this.customerSelected2); - } - - choseTemplateType() { - this.getallOrchestrators(); - this.getAlltemplates(); - } - - templates = []; - template1 = { name: null }; - - getAlltemplates() { - this.myhttp.getAllServiceTemplates(this.templateTypeSelected) - .subscribe((data) => { - this.templates = data; - if (this.templateTypeSelected == "Network Service") { - this.templates = data.filter((d) => { - return typeof d.packageInfo.csarName == "string"; - }).map((item) => { - let cName = item.packageInfo.csarName.split("/").reverse()[0]; - return { name: cName, id: item.csarId, packageInfo: item.packageInfo } - }); - } - this.template1 = this.templates[0]; - }, (err) => { - console.log(err); - }) } - createshow = false; - createshow2 = false; - listDisplay = false; + createshow: boolean = false; + createshow2: boolean = false; + listDisplay: boolean = false; createData: Object = {}; - - handleOk(): void { - if (this.templateTypeSelected == "SOTN" || this.templateTypeSelected == "CCVPN") { - this.createData = { - commonParams: { - customer: this.customerSelected, - serviceType: this.serviceTypeSelected2, - templateType: this.templateTypeSelected - }, template: this.template1 - }; - } else if (this.templateTypeSelected == "E2E Service" || this.templateTypeSelected == "Network Service") { - this.createData = { - commonParams: { - customer: this.customerSelected, - serviceType: this.serviceTypeSelected2, - templateType: this.templateTypeSelected - }, - template: this.template1, - orchestrator: this.orchestratorSelected, - isSol005Interface: this.isSol005Interface - }; - } - this.getTemParameters(); - } - - handleCancel(): void { - this.isVisible = false; - this.loadingAnimateShow = false; - } - - temParametersTips = false; ccvpn_temParametersContent: any; e2e_ns_temParametersContent: any; - getTemParameters() { - let chosedtemplates = this.createData["template"]; - let types = this.createData["commonParams"].templateType; - if (types == "E2E Service") { - types = "e2e"; - } else if (types == "Network Service") { - types = "ns"; + createdModalShow(obj: any): void{ + this.createData = obj.createData; + console.log(obj.createData) + if (obj.templateType === "SOTN" || obj.templateType === "CCVPN") { + this.ccvpn_temParametersContent = obj.data; + this.createshow = true; + } else if (obj.templateType === "E2E Service" || obj.templateType === "Network Service") { + this.e2e_ns_temParametersContent = obj.data; + this.createshow2 = true; } - this.loadingAnimateShow = true; - this.myhttp.getTemplateParameters(types, chosedtemplates) - .subscribe((data) => { - this.loadingAnimateShow = false; - if (data.status == "FAILED") { - this.temParametersTips = true; - this.isVisible = true; - console.log("Template parsing Failed"); - } else { - this.isVisible = false; - this.temParametersTips = false; - if (this.templateTypeSelected == "SOTN" || this.templateTypeSelected == "CCVPN") { - this.ccvpn_temParametersContent = data; - this.createshow = true; - this.listDisplay = true; - } else if (this.templateTypeSelected == "E2E Service" || this.templateTypeSelected == "Network Service") { - this.e2e_ns_temParametersContent = data; - this.createshow2 = true; - this.listDisplay = true; - } - } - }) + this.listDisplay = true; } //tableData @@ -316,7 +203,7 @@ export class ServicesListComponent implements OnInit { } item["iconMore"] = this.iconMore; - if (item["serviceDomain"] == "Network Service") { + if (item["serviceDomain"] === "Network Service") { if (item["vnfInfo"]) { item["childServiceInstances"] = item["vnfInfo"].map((vnf) => { vnf["serviceDomain"] = "vnf"; @@ -334,10 +221,10 @@ export class ServicesListComponent implements OnInit { }; vnfInfo.vnfNsInstanceId = item["nsInstanceId"] || item["service-instance-id"]; vnfInfo.vnfInstanceId = vnf["relationship-data"].find((vnfid) => { - return vnfid["relationship-key"] == "generic-vnf.vnf-id" + return vnfid["relationship-key"] === "generic-vnf.vnf-id" })["relationship-value"]; vnfInfo.vnfInstanceName = vnf["related-to-property"].find((vnfname) => { - return vnfname["property-key"] == "generic-vnf.vnf-name" + return vnfname["property-key"] === "generic-vnf.vnf-name" })["property-value"]; return vnfInfo; }) @@ -347,32 +234,30 @@ export class ServicesListComponent implements OnInit { } // - if (item["operationResult"] == "2001") { //operationResult==2001 + if (item["operationResult"] === "2001") { item["status"] = "Available"; item["tips"] = "Available"; item["statusClass"] = item["operationResult"]; } // 2018.12.13 - else if (item["operationResult"] == "2002") { //operationResult==2002 - if (item["operationType"] == "1001" || item["operationType"] == "1002") { + else if (item["operationResult"] === "2002") { + if (item["operationType"] === "1001" || item["operationType"] === "1002") { // item["status"] = this.accordingState["operationResult"][item["operationResult"]]; item["status"] = this.listSortMasters["operationResults"].find((its) => { - return its["sortCode"] == item["operationResult"] && its["language"] == this.language + return its["sortCode"] === item["operationResult"] && its["language"] === this.language })["sortValue"]; item["tips"] = "Unavailable"; item["statusClass"] = item["operationType"]; - } else if (item["operationType"] != "1001" && item["operationType"] != "1002") { - // item["status"] = this.accordingState["operationResult"][item["operationResult"]]; + } else { item["status"] = this.listSortMasters["operationResults"].find((its) => { - return its["sortCode"] == item["operationResult"] && its["language"] == this.language + return its["sortCode"] === item["operationResult"] && its["language"] === this.language })["sortValue"]; item["tips"] = "Available"; item["statusClass"] = item["operationType"]; } } - else if (item["operationResult"] == "2003") { //operationResult==2003 - // item["status"] = this.accordingState["operationResult"][item["operationResult"]]; + else if (item["operationResult"] === "2003") { item["status"] = this.listSortMasters["operationResults"].find((its) => { return its["sortCode"] == item["operationResult"] && its["language"] == this.language })["sortValue"]; @@ -404,16 +289,11 @@ export class ServicesListComponent implements OnInit { }) } else { let updata = (prodata) => { - item["rate"] = prodata.progress || item["rate"]; + item["rate"] = prodata.progress || 0; + if(item["rate"] > 100) item["status"] = prodata.status; item["tips"] = this.listSortMasters["operationTypes"].find((its) => { - return its["sortCode"] == item["operationType"] && its["language"] == this.language - })["sortValue"] + '\xa0\xa0\xa0' + prodata.progress + "%"; - if (item["rate"] > 100) { - item["status"] = prodata.status; - item["tips"] = this.listSortMasters["operationTypes"].find((its) => { - return its["sortCode"] == item["operationType"] && its["language"] == this.language - })["sortValue"] + '\xa0\xa0\xa0' + item["status"]; - } + return its["sortCode"] === item["operationType"] && its["language"] === this.language + })["sortValue"] + '\xa0\xa0\xa0' + (item["rate"] > 100? item["status"] : prodata.progress + '%'); } let obj = { serviceId: item["service-instance-id"], @@ -433,35 +313,36 @@ export class ServicesListComponent implements OnInit { } return item; }) - this.tableData.map((item, index) => { - if (item.serviceDomain == 'E2E Service') { - if (item.operationResult == 2001) { - this.serviceMunber[0]["Success"] += 1; - } else if (item.operationResult == 2002) { - this.serviceMunber[0]["failed"] += 1; - } else if (item.operationResult == 2003) { - this.serviceMunber[0]["InProgress"] += 1; + this.tableData.forEach( item => { + if (item.serviceDomain === 'E2E Service') { + if (item.operationResult === 2001) { + this.serviceNunber[0]["Success"] += 1; + } else if (item.operationResult === 2002) { + this.serviceNunber[0]["failed"] += 1; + } else if (item.operationResult === 2003) { + this.serviceNunber[0]["InProgress"] += 1; } } - else if (item.serviceDomain == 'Network Service') { - if (item.operationResult == 2001) { - this.serviceMunber[1]["Success"] += 1; - } else if (item.operationResult == 2002) { - this.serviceMunber[1]["failed"] += 1; - } else if (item.operationResult == 2003) { - this.serviceMunber[1]["InProgress"] += 1; + else if (item.serviceDomain === 'Network Service') { + if (item.operationResult === 2001) { + this.serviceNunber[1]["Success"] += 1; + } else if (item.operationResult === 2002) { + this.serviceNunber[1]["failed"] += 1; + } else if (item.operationResult === 2003) { + this.serviceNunber[1]["InProgress"] += 1; } } - else if (item.serviceDomain == 'CCVPN') { - if (item.operationResult == 2001) { - this.serviceMunber[2]["Success"] += 1; - } else if (item.operationResult == 2002) { - this.serviceMunber[2]["failed"] += 1; - } else if (item.operationResult == 2003) { - this.serviceMunber[2]["InProgress"] += 1; + else if (item.serviceDomain === 'CCVPN') { + if (item.operationResult === 2001) { + this.serviceNunber[2]["Success"] += 1; + } else if (item.operationResult === 2002) { + this.serviceNunber[2]["failed"] += 1; + } else if (item.operationResult === 2003) { + this.serviceNunber[2]["InProgress"] += 1; } } }) + console.log(this.tableData) this.loading = false; }, (err) => { console.log(err); @@ -484,43 +365,18 @@ export class ServicesListComponent implements OnInit { customerId: this.customerSelected.id, serviceType: this.serviceTypeSelected.name, serviceId: service["service-instance-id"] - } + }; this.myhttp.getE2e_nsData(paramsObj) .subscribe((data) => { this.e2e_nsData = data; }) } - scaleOk(templatescalestarting, templateScaleSuccessFaild) { - this.scaleModelVisible = false; - let requestBody = { - "service": { - "serviceInstanceName": this.thisService["service-instance-name"], - "serviceType": this.serviceTypeSelected.name, - "globalSubscriberId": this.customerSelected.id, - "resources": this.e2e_nsData.map((item) => { - return { - "resourceInstanceId": item["netWorkServiceId"], - "scaleType": item["scaleType"], - "scaleNsData": { - "scaleNsByStepsData": { - "aspectId": item["aspectId"], - "numberOfSteps": item["numberOfSteps"], - "scalingDirection": item["scalingDirection"] - } - } - } - }) - } - } - this.scaleE2eService(this.thisService, requestBody, templateScaleSuccessFaild); + scaleModalOK(obj: any,templatescalestarting,templateScaleSuccessFaild) :void{ + this.scaleE2eService(this.thisService, obj, templateScaleSuccessFaild); this.scaleNotification(templatescalestarting); } - scaleCancel() { - this.scaleModelVisible = false; - } - scaleNotification(template: TemplateRef<{}>): void { this.notification.template(template); } @@ -552,23 +408,7 @@ export class ServicesListComponent implements OnInit { vmname: "" } } - } - - addActionsHealing() { - this.healActions.push({ value: "" }) - } - - minusActionsHealing(index) { - this.healActions.splice(index, 1); - } - - addNsAdditional() { - this.nsAdditional.push({ key: "", value: "" }) - } - - minusNsAdditional(index) { - this.nsAdditional.splice(index, 1); - } + }; healService(service) { this.thisService = service; @@ -583,30 +423,11 @@ export class ServicesListComponent implements OnInit { } } - healOk(templatehealstarting, templatehealSuccessFaild) { - this.healModelVisible = false; - // nsParams - this.nsParams.actionsHealing = this.healActions.map((item) => { - return item.value - }); - let additional = {}; - this.nsAdditional.forEach((item) => { - additional[item.key] = item.value; - }); - this.nsParams.additionalParamsforNs = JSON.stringify(additional); - // vnfParams - this.vnfParams.additionalParams.actionvminfo.vmid = this.vmSelected["vmId"]; - this.vnfParams.additionalParams.actionvminfo.vmname = this.vmSelected["vmName"]; - - let requestBody = this.thisService["serviceDomain"] == "Network Service" ? { healNsData: this.nsParams } : { healVnfData: this.vnfParams }; - this.healNsVnfService(this.thisService, requestBody, templatehealSuccessFaild); + healModalOK(obj: any,templatehealstarting,templatehealSuccessFaild) :void{ + this.healNsVnfService(this.thisService, obj, templatehealSuccessFaild); this.healNotification(templatehealstarting); } - healCancel() { - this.healModelVisible = false; - } - healNotification(template: TemplateRef<{}>): void { this.notification.template(template); } @@ -628,54 +449,45 @@ export class ServicesListComponent implements OnInit { service["serviceType"] = this.serviceTypeSelected; service.childServiceInstances.forEach((item) => { - if (item.serviceDomain == "SITE") { + if (item.serviceDomain === "SITE") { service.siteSer.push(item); - } else if (item.serviceDomain == "SDWAN") { + } else if (item.serviceDomain === "SDWAN") { service.sdwanSer.push(item); } }) - if (service["serviceDomain"] == 'CCVPN' || service["serviceDomain"] == 'SOTN') { + if (service["serviceDomain"] === 'CCVPN' || service["serviceDomain"] === 'SOTN') { this.detailshow = true; - if (typeNum == 1) { + if (typeNum === 1) { this.upDateShow = false; } else { this.upDateShow = true; } - } else if (service["serviceDomain"] == 'E2E Service' || service["serviceDomain"] == 'Network Service') { + } else if (service["serviceDomain"] === 'E2E Service' || service["serviceDomain"] === 'Network Service') { this.detailshow2 = true; } this.listDisplay = true; this.detailData = service; - console.log(service); } - deleteModelVisible = false; + deleteModalVisible = false; terminationType = "graceful"; gracefulTerminationTimeout = 120; // delete Model show deleteModel(service) { this.thisService = service; - this.deleteModelVisible = true; + this.deleteModalVisible = true; } - deleteOk(templatedeletestarting, templateDeleteSuccessFaild) { - this.deleteModelVisible = false; + deleteModalOK(obj: any,templateDeleteSuccessFaild) :void{ + this.deleteModalVisible = false; this.loadingAnimateShow = true; - if (this.thisService["serviceDomain"] == "Network Service") { - this.deleteNsService(this.thisService, templateDeleteSuccessFaild); + if (this.thisService["serviceDomain"] === "Network Service") { + this.deleteNsService(obj,this.thisService); } else { this.deleteService(this.thisService, templateDeleteSuccessFaild); } - this.deleteNotification(templatedeletestarting); - } - - deleteCancel() { - this.deleteModelVisible = false; - } - - deleteNotification(template: TemplateRef<{}>): void { - this.notification.template(template); + this.notification1.notificationStart(this.thisService['serviceDomain'],'deleteStarting',this.thisService["service-instance-name"] ||this.thisService["nsInstanceName"]) } deleteSuccessNotification(template: TemplateRef<{}>): void { @@ -1011,7 +823,10 @@ export class ServicesListComponent implements OnInit { service.tips = ""; service.statusClass = "1004"; let id = service.nsInstanceId || service["service-instance-id"] || service["vnfNsInstanceId"]; - this.myhttp.healNsService(id, requestBody) + let paramsObj = { + "ns_instance_id":id + }; + this.myhttp.healNsService(paramsObj, requestBody) .subscribe((data) => { if (data.status == "FAILED") { console.log("heal nsvnf service Failed :" + JSON.stringify(data)); @@ -1113,7 +928,7 @@ export class ServicesListComponent implements OnInit { }) } - deleteService(service, templateDeleteSuccessFaild) { + deleteService(service:any, templateDeleteSuccessFaild) { let allprogress = {}; let querypros = []; service.rate = 0; @@ -1190,21 +1005,17 @@ export class ServicesListComponent implements OnInit { }) } - deleteNsService(service, templateDeleteSuccessFaild) { + deleteNsService(obj:any,service:any) { service.rate = 0; service.status = "In Progress"; service.tips = ""; service.statusClass = "1002"; let id = service.nsInstanceId || service["service-instance-id"]; let operationType = "1002"; - let requestBody = { - terminationType: this.terminationType, - gracefulTerminationTimeout: this.gracefulTerminationTimeout - } - this.stopNsService(id, requestBody).then((jobid) => { - if (jobid == "Failed") { + this.stopNsService(id, obj).then((jobid) => { + if (jobid === "Failed") { service.status = "Failed"; - this.deleteSuccessNotification(templateDeleteSuccessFaild); + this.notification1.notificationFailed(service.serviceDomain,'deleteStarting',service["service-instance-name"] ||service["nsInstanceName"]) service.tips = this.listSortMasters["operationTypes"].find((its) => { return its["sortCode"] == service.statusClass && its["language"] == this.language })["sortValue"] + this.listSortMasters["operationResults"].find((its) => { @@ -1213,58 +1024,56 @@ export class ServicesListComponent implements OnInit { return false; } let updata = (prodata) => { - service.rate = prodata.progress; + service.rate = prodata.progress || 0; + if(service['rate'] > 100)service["status"] = prodata.status; service.tips = this.listSortMasters["operationTypes"].find((its) => { return its["sortCode"] == service.statusClass && its["language"] == this.language - })["sortValue"] + '\xa0\xa0\xa0' + service.rate + "%"; - if (service["rate"] > 100) { - service["status"] = prodata.status; - service.tips = this.listSortMasters["operationTypes"].find((its) => { - return its["sortCode"] == service.statusClass && its["language"] == this.language - })["sortValue"] + service["status"]; - } + })["sortValue"] + (service["rate"] > 100? service["status"] : ('\xa0\xa0\xa0' + service.rate + "%")); } - return this.queryNsProgress(jobid, null, updata, operationType); - }).then(() => { - this.myhttp.nsDeleteInstance(id) - .subscribe((data) => { - console.log(data); - service.rate = 100; - service.status = "Successful"; - service.tips = this.listSortMasters["operationTypes"].find((its) => { - return its["sortCode"] == service.statusClass && its["language"] == this.language - })["sortValue"] + this.listSortMasters["operationResults"].find((its) => { - return its["sortCode"] == 2001 && its["language"] == this.language - })["sortValue"]; - this.deleteSuccessNotification(templateDeleteSuccessFaild); - if (data.status == "FAILED") { - console.log("delete ns service Failed :" + JSON.stringify(data)); - service.status = "Failed"; - service.tips = this.listSortMasters["operationTypes"].find((its) => { - return its["sortCode"] == service.statusClass && its["language"] == this.language - })["sortValue"] + this.listSortMasters["operationResults"].find((its) => { - return its["sortCode"] == 2002 && its["language"] == this.language - })["sortValue"]; - this.deleteSuccessNotification(templateDeleteSuccessFaild); - return false; - } - console.log(service, "deleteservice"); - console.log(this.thisService, "thisService"); - let hasUndone = this.tableData.some((item) => { - return item.rate < 100; + this.queryNsProgress(jobid, null, updata, operationType).then(() => { + let paramsObj = { + "ns_instance_id":id + }; + this.myhttp.nsDeleteInstance(paramsObj) + .subscribe((data) => { + if(data.status == "SUCCESS"){ + service.rate = 100; + service.status = "Successful"; + service.tips = this.listSortMasters["operationTypes"].find((its) => { + return its["sortCode"] == service.statusClass && its["language"] == this.language + })["sortValue"] + this.listSortMasters["operationResults"].find((its) => { + return its["sortCode"] == 2001 && its["language"] == this.language + })["sortValue"]; + this.notification1.notificationSuccess(service.serviceDomain,'deleteStarting',service["service-instance-name"] ||service["nsInstanceName"]) + }else { + service.status = "Failed"; + service.tips = this.listSortMasters["operationTypes"].find((its) => { + return its["sortCode"] == service.statusClass && its["language"] == this.language + })["sortValue"] + this.listSortMasters["operationResults"].find((its) => { + return its["sortCode"] == 2002 && its["language"] == this.language + })["sortValue"]; + this.notification1.notificationFailed(service.serviceDomain,'deleteStarting',service["service-instance-name"] ||service["nsInstanceName"]) + return false; + } + let hasUndone = this.tableData.some((item) => { + return item.rate < 100; + }) + if (!hasUndone) { + setTimeout(() => { + this.getTableData(); + }, 1000) + } }) - if (!hasUndone) { - setTimeout(() => { - this.getTableData(); - }, 1000) - } - }) + }) }) } stopNsService(id, obj) { - let mypromise = new Promise((res, rej) => { - this.myhttp.stopNsService(id, obj) + let paramsObj = { + "ns_instance_id":id + } + return new Promise((res, rej) => { + this.myhttp.stopNsService(paramsObj, obj) .subscribe((data) => { this.loadingAnimateShow = false; if (data.status == "FAILED") { @@ -1275,87 +1084,77 @@ export class ServicesListComponent implements OnInit { res(data.jobId); }) }) - return mypromise; } queryProgress(obj, callback) { - let mypromise = new Promise((res, rej) => { + return new Promise( res => { + let operationTypeObj = {operationType:obj.operationType}; let errorNums = 180; - let requery = () => { - this.myhttp.getProgress(obj) + let requeryCcvpn = () => { + this.myhttp.getProgress(obj,operationTypeObj) .subscribe((data) => { - if (data.status == "FAILED") { + if (data.status === "FAILED") { callback({ progress: 255, status: "Failed" }); - return false; - } - if (data.operationStatus == null || data.operationStatus.progress == undefined) { + }else if (data.operationStatus === null || data.operationStatus.progress === undefined) { errorNums--; - if (errorNums == 0) { + if (errorNums === 0) { callback({ progress: 255, status: "time over" }); return false; } - setTimeout(() => { - requery(); - }, 10000) - return false; - } - if (data.operationStatus.progress > 100) { + this.progressCcvpnOutTimer = setTimeout(()=>{ + requeryCcvpn(); + },10000); + }else if (data.operationStatus.progress > 100) { callback({ progress: 255, status: "time over" }); - return false; - } - if (data.operationStatus.progress < 100) { + }else if (data.operationStatus.progress < 100) { callback(data.operationStatus); - setTimeout(() => { - requery(); - }, 5000) + this.progressingCcvpnTimer = setTimeout(()=>{ + requeryCcvpn(); + },5000); } else { res(data.operationStatus); } }) } - requery(); + requeryCcvpn(); }) - return mypromise; } queryNsProgress(jobid, id, callback, operationType) { - let mypromise = new Promise((res, rej) => { + return new Promise((res, rej) => { let errorNums = 180; - let requery = () => { - this.myhttp.getNsProgress(jobid, id, operationType) + let paramsObj = { + "responseId":0, + "serviceInstanceId":id, + "operationType":operationType + } + let requeryNs = () => { + this.myhttp.getNsProgress(jobid,paramsObj) .subscribe((data) => { if (data.status == "FAILED") { callback({ progress: 255, status: "Failed" }); - return false; - } - if (data.responseDescriptor == null || data.responseDescriptor.progress == undefined) { + }else if (data.responseDescriptor === null || data.responseDescriptor.progress === undefined) { errorNums--; - if (errorNums == 0) { + if (errorNums === 0) { callback({ progress: 255, status: "time over" }); return false; } - setTimeout(() => { - requery(); - }, 10000) - return false; - } - if (data.responseDescriptor.progress > 100 && data.responseDescriptor.status == "error") { + this.progressNsOutTimer = setTimeout(()=>{ + requeryNs(); + },10000); + }else if (data.responseDescriptor.progress > 100 && data.responseDescriptor.status === "error") { callback({ progress: 255, status: data.responseDescriptor.statusDescription }); - return false; - } - if (data.responseDescriptor.progress < 100) { + }else if (data.responseDescriptor.progress < 100) { callback(data.responseDescriptor); - setTimeout(() => { - requery(); - }, 5000) + this.progressingNsTimer = setTimeout(()=>{ + requeryNs(); + },5000); } else { res(data); } }) }; - requery(); + requeryNs(); }); - return mypromise; } - } diff --git a/usecaseui-portal/src/app/views/services/services-list/top-card/top-card.component.html b/usecaseui-portal/src/app/views/services/services-list/top-card/top-card.component.html new file mode 100644 index 00000000..98e42ae7 --- /dev/null +++ b/usecaseui-portal/src/app/views/services/services-list/top-card/top-card.component.html @@ -0,0 +1,18 @@ +<div class="top-list"> + <span class="round">{{serviceDomain}}</span> + <div class="top-list-text"> + <p> + <span>{{failedNum}}</span> + <span> {{"i18nTextDefine_Failed" | translate}} </span> + </p> + <p> + <span>{{successNum}}</span> + <span> {{"i18nTextDefine_Success" | translate}} </span> + </p> + <p> + <span>{{inProgressNum}}</span> + <span> {{"i18nTextDefine_InProgress" | translate}} </span> + </p> + <p class="service-description"> {{serviceDetailName | translate}} </p> + </div> +</div>
\ No newline at end of file diff --git a/usecaseui-portal/src/app/views/services/services-list/top-card/top-card.component.less b/usecaseui-portal/src/app/views/services/services-list/top-card/top-card.component.less new file mode 100644 index 00000000..a235b1e6 --- /dev/null +++ b/usecaseui-portal/src/app/views/services/services-list/top-card/top-card.component.less @@ -0,0 +1,65 @@ +.top-list{ + position: relative; + width:100%; + max-width:400px; + height:170px; + background:url("/assets/images/servicelist-e2e.png") no-repeat; + background-size: 100% 100%; + border-radius:2px; + .round{ + position: absolute; + width: 60px; + height: 60px; + line-height: 60px; + text-align: center; + background:#E0EDFF; + border:2px solid rgba(224,237,255,1); + border-radius: 50%; + font-size:16px; + font-family:ArialMT; + color:#3C4F8C; + transition: .5s; + top: 42%; + margin-top: -30px; + left: 15%; + } + .top-list-text{ + position: absolute; + text-align: right; + line-height: 20px; + right: 12%; + color: #fff; + p{ + height: 28px; + margin-bottom: 0; + padding-left: 5px; + font-size: 14px; + clear: both; + span{ + display: inline-block; + float: right; + font-weight: 500; + text-align: right; + } + span:nth-child(1){ + font-size: 18px; + margin-left: 15px; + } + span:nth-child(2){ + width: 85px; + font-size: 16px; + } + } + p:nth-child(1){ + margin-top: 25px; + } + .service-description{ + + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + color: #3C4F8C; + + } + } +}
\ No newline at end of file diff --git a/usecaseui-portal/src/app/views/services/services.component.spec.ts b/usecaseui-portal/src/app/views/services/services-list/top-card/top-card.component.spec.ts index 2e76b9f9..b2d2cbb4 100644 --- a/usecaseui-portal/src/app/views/services/services.component.spec.ts +++ b/usecaseui-portal/src/app/views/services/services-list/top-card/top-card.component.spec.ts @@ -1,20 +1,20 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { ServicesComponent } from './services.component'; +import { TopCardComponent } from './top-card.component'; -describe('ServicesComponent', () => { - let component: ServicesComponent; - let fixture: ComponentFixture<ServicesComponent>; +describe('TopCardComponent', () => { + let component: TopCardComponent; + let fixture: ComponentFixture<TopCardComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ ServicesComponent ] + declarations: [ TopCardComponent ] }) .compileComponents(); })); beforeEach(() => { - fixture = TestBed.createComponent(ServicesComponent); + fixture = TestBed.createComponent(TopCardComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/usecaseui-portal/src/app/views/services/services-list/top-card/top-card.component.ts b/usecaseui-portal/src/app/views/services/services-list/top-card/top-card.component.ts new file mode 100644 index 00000000..6004fb8e --- /dev/null +++ b/usecaseui-portal/src/app/views/services/services-list/top-card/top-card.component.ts @@ -0,0 +1,19 @@ +import { Component, OnInit, Input } from '@angular/core'; + +@Component({ + selector: 'app-top-card', + templateUrl: './top-card.component.html', + styleUrls: ['./top-card.component.less'] +}) +export class TopCardComponent implements OnInit { + @Input() serviceDomain: string; + @Input() failedNum: number; + @Input() successNum: number; + @Input() inProgressNum: number; + @Input() serviceDetailName: string; + constructor() { } + + ngOnInit() { + } + +} diff --git a/usecaseui-portal/src/app/views/services/services.component.html b/usecaseui-portal/src/app/views/services/services.component.html deleted file mode 100644 index 10142833..00000000 --- a/usecaseui-portal/src/app/views/services/services.component.html +++ /dev/null @@ -1,18 +0,0 @@ -<!-- - Copyright (C) 2019 CMCC, Inc. and others. All rights reserved. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<p> - services works! -</p> diff --git a/usecaseui-portal/src/app/views/services/services.component.ts b/usecaseui-portal/src/app/views/services/services.component.ts deleted file mode 100644 index eec235b4..00000000 --- a/usecaseui-portal/src/app/views/services/services.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-services', - templateUrl: './services.component.html', - styleUrls: ['./services.component.less'] -}) -export class ServicesComponent implements OnInit { - - constructor() { } - - ngOnInit() { - } - -} |