aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master
diff options
context:
space:
mode:
Diffstat (limited to 'vid-webpack-master')
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/instantiation.templates.modal.e2e.ts8
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.spec.ts12
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.row.model.ts9
-rw-r--r--vid-webpack-master/src/app/shared/server/serviceInfo/serviceInfo.model.ts1
4 files changed, 27 insertions, 3 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 e55b1dcd1..3786bc5e8 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
@@ -38,7 +38,12 @@ describe('Template', () => {
"serviceModelName": "action-data",
"serviceModelVersion": "1.0",
"createdBulkDate": 1525075968000,
- "isRetryEnabled": true
+ "isRetryEnabled": true,
+ "requestSummary": {
+ "vnf": 2,
+ "vfModule": 3,
+ "network": 1
+ }
},
{
"id": 7,
@@ -139,6 +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(`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 2f044112b..6540a6551 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
@@ -54,6 +54,17 @@ describe('instantiation templates modal service', () => {
expect(service).toBeDefined();
});
+ test('convert map to json', () => {
+ let result:InstantiationTemplatesRowModel = new InstantiationTemplatesRowModel({
+ "requestSummary": {
+ "vnf": 2,
+ "vfModule": 3,
+ "network": 1
+ }
+ });
+ expect(result.summary).toEqual( "{\"vnf\":2,\"vfModule\":3,\"network\":1}");
+ });
+
test('convertResponseToUI - should return table data', () => {
const jobs = [{
@@ -92,7 +103,6 @@ describe('instantiation templates modal service', () => {
"serviceModelName": "ComplexService",
"serviceModelVersion": "1.0",
"createdBulkDate": 1524995555000,
- "isRetryEnabled": false
}];
const tableRows: InstantiationTemplatesRowModel[] = service.convertResponseToUI(jobs);
expect(tableRows).toHaveLength(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 673709462..df40da74d 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
@@ -18,7 +18,7 @@ export class InstantiationTemplatesRowModel extends InstantiationBase{
this.createDate = !_.isNil(data.created) ? moment(data.created).format("YYYY-MM-DD HH:mm:ss") : null;
this.instanceName = this.getInstanceName(data.serviceInstanceName);
this.instantiationStatus = !_.isNil(data.jobStatus) ? data.jobStatus : null;
- this.summary = null;
+ this.summary = this.convertRequestSummaryFromMapToString(data.requestSummary);
this.region = this.getRegion(data.regionId, data.owningEntityName);
this.tenant = !_.isNil(data.tenantName) ? data.tenantName : null;
this.aicZone = !_.isNil(data.aicZoneName) ? data.aicZoneName : null;
@@ -46,5 +46,12 @@ export class InstantiationTemplatesRowModel extends InstantiationBase{
}
return instanceName;
}
+
+ convertRequestSummaryFromMapToString = (requestSummary): string => {
+ let myvnf: string = JSON.stringify(requestSummary);
+ return myvnf;
+ }
+
+
}
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 5a2b37a7d..8e47f0c78 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,6 +35,7 @@ export class ServiceInfoModel extends InstantiationBase{
auditUserId: string;
action: ServiceAction;
isRetryEnabled: boolean;
+ requestSummary:string;
}
export class ServiceInfoUiModel extends ServiceInfoModel{