aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/shared/components
diff options
context:
space:
mode:
Diffstat (limited to 'vid-webpack-master/src/app/shared/components')
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.spec.ts10
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.row.model.ts9
2 files changed, 9 insertions, 10 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, ", ");
}
-
}