summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/shared/components/auditInfoModal/auditInfoModal.component.ts
diff options
context:
space:
mode:
authorKruthi Bhat <krutbhat@att.com>2020-10-09 00:37:39 +0530
committerIkram Ikramullah <ikram@research.att.com>2020-10-23 11:40:26 +0000
commit12226e5a7874dcc1d5b4cdb305188391b4b97cc5 (patch)
tree20291b6b264ee9bcc9392196cb31c62c97363dc8 /vid-webpack-master/src/app/shared/components/auditInfoModal/auditInfoModal.component.ts
parentb47aac88acc6c8e69b044d62930eefc4c41fb249 (diff)
Sorting functionality on audit info screen
Change-Id: If2fed947ccc0cbcb68ad656fb6010aa9cb829acd Issue-ID: VID-904 Signed-off-by: rachitha.ramappa@att.com
Diffstat (limited to 'vid-webpack-master/src/app/shared/components/auditInfoModal/auditInfoModal.component.ts')
-rw-r--r--vid-webpack-master/src/app/shared/components/auditInfoModal/auditInfoModal.component.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/vid-webpack-master/src/app/shared/components/auditInfoModal/auditInfoModal.component.ts b/vid-webpack-master/src/app/shared/components/auditInfoModal/auditInfoModal.component.ts
index d8d3c32ac..bd2d77d99 100644
--- a/vid-webpack-master/src/app/shared/components/auditInfoModal/auditInfoModal.component.ts
+++ b/vid-webpack-master/src/app/shared/components/auditInfoModal/auditInfoModal.component.ts
@@ -151,6 +151,7 @@ export class AuditInfoModalComponent {
.subscribe((res: AuditStatus[][]) => {
this.vidInfoData = res[0];
this.msoInfoData = res[1];
+ this.msoInfoData.sort(this.getSortOrder("startTime"));
this.isLoading = false;
});
}
@@ -186,6 +187,17 @@ export class AuditInfoModalComponent {
this.dataIsReady = true;
}
+
+ //Comparer Function
+ getSortOrder(timestamp) {
+ return (obj1, obj2) =>{
+
+ let firstObj = obj1[timestamp];
+ let secondObj = obj2[timestamp];
+ return ((secondObj < firstObj) ? -1 : ((secondObj > firstObj) ? 1 : 0));
+
+ }
+ }
readOnlyRetryUrl = (): string =>
`../../serviceModels.htm?more#/servicePlanning/RETRY?serviceModelId=${this.serviceModelId}&jobId=${this.jobId}`