X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Fapp%2Finstances%2Fns-instances%2FNSInstancesComponent.ts;h=14d6349b6fc620cb3202311c81d6e56ee2294a8f;hb=refs%2Fchanges%2F78%2F14278%2F1;hp=7b81d91be1d816f1aa4885ea83eb84fcfe89a372;hpb=f2ae5462f9c1d6b7a649eb389c5a4c990501b5c4;p=osm%2FNG-UI.git
diff --git a/src/app/instances/ns-instances/NSInstancesComponent.ts b/src/app/instances/ns-instances/NSInstancesComponent.ts
index 7b81d91..14d6349 100644
--- a/src/app/instances/ns-instances/NSInstancesComponent.ts
+++ b/src/app/instances/ns-instances/NSInstancesComponent.ts
@@ -84,6 +84,9 @@ export class NSInstancesComponent implements OnInit {
/** operational State scaling data @public */
public operationalStateFourthStep: string = CONFIGCONSTANT.operationalStateFourthStep;
+ /** operational State healing data @public */
+ public operationalStateFifthStep: string = CONFIGCONSTANT.operationalStateFifthStep;
+
/** Config State init data @public */
public configStateFirstStep: string = CONFIGCONSTANT.configStateFirstStep;
@@ -144,9 +147,13 @@ export class NSInstancesComponent implements OnInit {
/** Generate smart table row title and filters @public */
public generateTableColumn(): void {
this.columnList = {
- name: { title: this.translateService.instant('NAME'), width: '15%', sortDirection: 'asc' },
+ name: { title: this.translateService.instant('NAME'), width: '15%' },
identifier: { title: this.translateService.instant('IDENTIFIER'), width: '20%' },
NsdName: { title: this.translateService.instant('NSDNAME'), width: '15%' },
+ 'create-time': {
+ title: this.translateService.instant('DATE'), width: '15%', sortDirection: 'desc',
+ compareFunction: this.sharedService.compareFunction
+ },
OperationalStatus: {
title: this.translateService.instant('OPERATIONALSTATUS'), width: '10%', type: 'html',
filter: {
@@ -157,27 +164,33 @@ export class NSInstancesComponent implements OnInit {
{ value: this.operationalStateFirstStep, title: this.operationalStateFirstStep },
{ value: this.operationalStateSecondStep, title: this.operationalStateSecondStep },
{ value: this.operationalStateThirdStep, title: this.operationalStateThirdStep },
- { value: this.operationalStateFourthStep, title: this.operationalStateFourthStep }
+ { value: this.operationalStateFourthStep, title: this.operationalStateFourthStep },
+ { value: this.operationalStateFifthStep, title: this.operationalStateFifthStep }
]
}
},
valuePrepareFunction: (cell: NSDInstanceData, row: NSDInstanceData): string => {
if (row.OperationalStatus === this.operationalStateFirstStep) {
return `
-
- `;
+
+ `;
} else if (row.OperationalStatus === this.operationalStateSecondStep) {
return `
-
- `;
+
+ `;
} else if (row.OperationalStatus === this.operationalStateThirdStep) {
return `
-
- `;
+
+ `;
} else if (row.OperationalStatus === this.operationalStateFourthStep) {
return `
-
- `;
+
+ `;
+ }
+ else if (row.OperationalStatus === this.operationalStateFifthStep) {
+ return `
+
+ `;
} else {
return `${row.OperationalStatus}`;
}
@@ -199,16 +212,16 @@ export class NSInstancesComponent implements OnInit {
valuePrepareFunction: (cell: NSDInstanceData, row: NSDInstanceData): string => {
if (row.ConfigStatus === this.configStateFirstStep) {
return `
-
- `;
+
+ `;
} else if (row.ConfigStatus === this.configStateSecondStep) {
return `
-
- `;
+
+ `;
} else if (row.ConfigStatus === this.configStateThirdStep) {
return `
-
- `;
+
+ `;
} else {
return `${row.ConfigStatus}`;
}
@@ -243,7 +256,9 @@ export class NSInstancesComponent implements OnInit {
vnfID: nsdInstanceData['vnfd-id'],
nsd: nsdInstanceData.nsd,
'nsd-id': nsdInstanceData['nsd-id'],
- vcaStatus: nsdInstanceData.vcaStatus
+ vcaStatus: nsdInstanceData.vcaStatus,
+ constituent: nsdInstanceData['constituent-vnfr-ref'],
+ 'create-time': this.sharedService.convertEpochTime(Number(nsdInstanceData['create-time']))
};
this.nsInstanceData.push(nsDataObj);
});
@@ -254,7 +269,9 @@ export class NSInstancesComponent implements OnInit {
}
this.dataSource.load(this.nsInstanceData).then((data: {}): void => {
this.isLoadingResults = false;
- }).catch();
+ }).catch((): void => {
+ // Catch Navigation Error
+ });
}, (error: ERRORDATA): void => {
this.restService.handleError(error, 'get');
this.isLoadingResults = false;
@@ -274,12 +291,15 @@ export class NSInstancesComponent implements OnInit {
/** Instantiate NS using modalservice @public */
public instantiateNS(): void {
+ // eslint-disable-next-line security/detect-non-literal-fs-filename
const modalRef: NgbModalRef = this.modalService.open(InstantiateNsComponent, { backdrop: 'static' });
modalRef.result.then((result: MODALCLOSERESPONSEDATA): void => {
if (result) {
this.generateData();
}
- }).catch();
+ }).catch((): void => {
+ // Catch Navigation Error
+ });
}
/**