diff options
4 files changed, 15 insertions, 15 deletions
diff --git a/vid-webpack-master/cypress/integration/iFrames/instantiation.templates.modal.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/instantiation.templates.modal.e2e.ts index 3786bc5e8..d892bf65b 100644 --- a/vid-webpack-master/cypress/integration/iFrames/instantiation.templates.modal.e2e.ts +++ b/vid-webpack-master/cypress/integration/iFrames/instantiation.templates.modal.e2e.ts @@ -40,9 +40,9 @@ describe('Template', () => { "createdBulkDate": 1525075968000, "isRetryEnabled": true, "requestSummary": { - "vnf": 2, - "vfModule": 3, - "network": 1 + "vnf": 1, + "vfModule": 2, + "volumeGroup": 1 } }, { @@ -144,7 +144,7 @@ describe('Template', () => { cy.getElementByDataTestsId(`createDate-${instantiationTemplates[0].jobId}`).contains('2018-04-30 11:12:48'); cy.getElementByDataTestsId(`instanceName-${instantiationTemplates[0].jobId}`).contains('nWUfl instance name_002'); cy.getElementByDataTestsId(`instantiationStatus-${instantiationTemplates[0].jobId}`).contains('FAILED'); - cy.getElementByDataTestsId(`summary-${instantiationTemplates[0].jobId}`).contains('{"vnf":2,"vfModule":3,"network":1}'); + cy.getElementByDataTestsId(`summary-${instantiationTemplates[0].jobId}`).contains('vnf: 1, vfModule: 2, volumeGroup: 1'); cy.getElementByDataTestsId(`region-${instantiationTemplates[0].jobId}`).contains('hvf6 (WAYNEHOLLAND)'); cy.getElementByDataTestsId(`tenant-${instantiationTemplates[0].jobId}`).contains('AIN Web Tool-15-D-testalexandria'); cy.getElementByDataTestsId(`aicZone-${instantiationTemplates[0].jobId}`).contains('NFTJSSSS-NFT1'); diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.spec.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.spec.ts index 6540a6551..a17abedfc 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.spec.ts +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.spec.ts @@ -56,13 +56,13 @@ describe('instantiation templates modal service', () => { test('convert map to json', () => { let result:InstantiationTemplatesRowModel = new InstantiationTemplatesRowModel({ - "requestSummary": { - "vnf": 2, - "vfModule": 3, - "network": 1 + requestSummary: { + 'vnf': 2, + 'vfModule': 3, + 'network': 1 } }); - expect(result.summary).toEqual( "{\"vnf\":2,\"vfModule\":3,\"network\":1}"); + expect(result.summary).toEqual( "vnf: 2, vfModule: 3, network: 1"); }); diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.row.model.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.row.model.ts index df40da74d..f2eda9df3 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.row.model.ts +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.row.model.ts @@ -45,13 +45,12 @@ export class InstantiationTemplatesRowModel extends InstantiationBase{ return '<Automatically generated>'; } return instanceName; - } + }; - convertRequestSummaryFromMapToString = (requestSummary): string => { - let myvnf: string = JSON.stringify(requestSummary); - return myvnf; + convertRequestSummaryFromMapToString = (requestSummary: Map<string, number>): string => { + let values: string[] = _.map(requestSummary, (count: number, instanceType: string) => instanceType + ": " + count); + return _.join(values, ", "); } - } diff --git a/vid-webpack-master/src/app/shared/server/serviceInfo/serviceInfo.model.ts b/vid-webpack-master/src/app/shared/server/serviceInfo/serviceInfo.model.ts index 8e47f0c78..c2fa2e662 100644 --- a/vid-webpack-master/src/app/shared/server/serviceInfo/serviceInfo.model.ts +++ b/vid-webpack-master/src/app/shared/server/serviceInfo/serviceInfo.model.ts @@ -35,7 +35,8 @@ export class ServiceInfoModel extends InstantiationBase{ auditUserId: string; action: ServiceAction; isRetryEnabled: boolean; - requestSummary:string; + requestSummary: Map<string, number>; + } export class ServiceInfoUiModel extends ServiceInfoModel{ |