diff options
Diffstat (limited to 'vid-webpack-master/src')
3 files changed, 11 insertions, 11 deletions
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{ |