tango-app-api-infra 3.0.81-dev → 3.0.83-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tango-app-api-infra",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.83-dev",
|
|
4
4
|
"description": "infra",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"nodemon": "^3.1.0",
|
|
28
28
|
"swagger-ui-express": "^5.0.0",
|
|
29
29
|
"tango-api-schema": "^2.0.103",
|
|
30
|
-
"tango-app-api-middleware": "^1.0.
|
|
30
|
+
"tango-app-api-middleware": "^1.0.73-dev",
|
|
31
31
|
"winston": "^3.12.0",
|
|
32
32
|
"winston-daily-rotate-file": "^5.0.0"
|
|
33
33
|
},
|
|
@@ -773,7 +773,7 @@ export async function getInfraIssues( req, res ) {
|
|
|
773
773
|
_id: 0,
|
|
774
774
|
streamName: 1,
|
|
775
775
|
cameraNumber: 1,
|
|
776
|
-
thumbnailImage:
|
|
776
|
+
thumbnailImage: '$thumbnailImage',
|
|
777
777
|
},
|
|
778
778
|
},
|
|
779
779
|
];
|
|
@@ -792,7 +792,7 @@ export async function getInfraIssues( req, res ) {
|
|
|
792
792
|
$group: {
|
|
793
793
|
_id: null,
|
|
794
794
|
total: { $sum: 1 },
|
|
795
|
-
successRate: { $avg: '$successPercentage' },
|
|
795
|
+
successRate: { $avg: '$dataMismatch.successPercentage' },
|
|
796
796
|
},
|
|
797
797
|
},
|
|
798
798
|
{
|
|
@@ -810,6 +810,11 @@ export async function getInfraIssues( req, res ) {
|
|
|
810
810
|
const getHighCountTicket = await aggregateTangoTicket( highCountQuery );
|
|
811
811
|
logger.info( { getHighCountTicket: getHighCountTicket } );
|
|
812
812
|
const camera = await aggregateCamera( camQuery );
|
|
813
|
+
for ( let index = 0; index < camera.length; index++ ) {
|
|
814
|
+
if ( camera?.[index]?.thumbnailImage ) {
|
|
815
|
+
camera[index].thumbnailImage = await signedUrl( { Bucket: appConfig.cloud.aws.bucket.baseImage, file_path: camera[index].thumbnailImage } );
|
|
816
|
+
}
|
|
817
|
+
}
|
|
813
818
|
logger.info( { message: camera } );
|
|
814
819
|
return res.sendSuccess( { result: mergeValue, streams: camera, highCountTicketDetails: getHighCountTicket[0] || defaultValue } );
|
|
815
820
|
} catch ( error ) {
|
|
@@ -534,14 +534,15 @@ export async function workHistory( req, res ) {
|
|
|
534
534
|
'CLOSED ON': element.issueClosedDate,
|
|
535
535
|
'STATUS': element.status,
|
|
536
536
|
};
|
|
537
|
+
if ( req.body.issueType==='infra'||req.body.issueType==='installation' ) {
|
|
538
|
+
data = { ...data, ...{ 'ISSUE': element.infraIssue?element.infraIssue:'-', 'ISSUE IDENTIFIED DATE': element.issueIdentifiedDate } };
|
|
539
|
+
}
|
|
540
|
+
if ( req.body.issueType==='dataMismatch' ) {
|
|
541
|
+
data = { ...data, ...{ 'issueType': element.issueType?element.issueType:'-' } };
|
|
542
|
+
}
|
|
537
543
|
exportdata.push( data );
|
|
538
544
|
} );
|
|
539
|
-
|
|
540
|
-
data = { ...data, ...{ 'ISSUE': element.infraIssue?element.infraIssue:'-', 'ISSUE IDENTIFIED DATE': element.issueIdentifiedDate } };
|
|
541
|
-
}
|
|
542
|
-
if ( req.body.issueType==='dataMismatch' ) {
|
|
543
|
-
data = { ...data, ...{ 'issueType': element.issueType?element.issueType:'-' } };
|
|
544
|
-
}
|
|
545
|
+
|
|
545
546
|
await download( exportdata, res );
|
|
546
547
|
return;
|
|
547
548
|
}
|