tango-app-api-infra 3.1.16 → 3.1.17
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
|
@@ -302,7 +302,7 @@ export async function installationCard( req, res ) {
|
|
|
302
302
|
onboardedStoresCount: onboardedCount,
|
|
303
303
|
inactiveStoresCount: deactiveCount,
|
|
304
304
|
installedStoresCount: installedCount-yettoInstallCount.length,
|
|
305
|
-
yettoInstallCount: yettoInstallCount.length,
|
|
305
|
+
yettoInstallCount: yettoInstallCount.length-installFailedCount.length,
|
|
306
306
|
installFailedCount: installFailedCount.length,
|
|
307
307
|
infraIssues: response,
|
|
308
308
|
} );
|
|
@@ -516,6 +516,43 @@ export async function infraIssuesTable( req, res ) {
|
|
|
516
516
|
{ $skip: ( req.body.offset - 1 ) * req.body.limit },
|
|
517
517
|
{ $limit: Number( req.body.limit ) },
|
|
518
518
|
);
|
|
519
|
+
storesQuery.push( {
|
|
520
|
+
$lookup: {
|
|
521
|
+
from: 'clients',
|
|
522
|
+
let: { clientId: '$clientId' },
|
|
523
|
+
pipeline: [
|
|
524
|
+
{
|
|
525
|
+
$match: {
|
|
526
|
+
$expr: {
|
|
527
|
+
$and: [
|
|
528
|
+
{ $eq: [ '$clientId', '$$clientId' ] },
|
|
529
|
+
],
|
|
530
|
+
},
|
|
531
|
+
},
|
|
532
|
+
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
$project: {
|
|
536
|
+
clientName: 1,
|
|
537
|
+
},
|
|
538
|
+
},
|
|
539
|
+
], as: 'client',
|
|
540
|
+
},
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
$unwind: { path: '$client', preserveNullAndEmptyArrays: true },
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
$project: {
|
|
547
|
+
clientName: '$client.clientName',
|
|
548
|
+
storeId: 1,
|
|
549
|
+
clientId: 1,
|
|
550
|
+
storeName: 1,
|
|
551
|
+
status: 1,
|
|
552
|
+
createdAt: 1,
|
|
553
|
+
},
|
|
554
|
+
},
|
|
555
|
+
);
|
|
519
556
|
}
|
|
520
557
|
let result;
|
|
521
558
|
if ( req.body.infrafilterIssue == 'Live Stores' || req.body.infrafilterIssue == 'Total Stores' ) {
|
|
@@ -901,7 +901,7 @@ export async function edgeApplogsCheck( req, res ) {
|
|
|
901
901
|
edgelog: findissue,
|
|
902
902
|
storeId: ticket.basicDetails.storeId,
|
|
903
903
|
primary: 'System Issues',
|
|
904
|
-
secondary: [ '
|
|
904
|
+
secondary: [ 'Antivirus blockages' ],
|
|
905
905
|
};
|
|
906
906
|
updateIssue( findissueEdgeApp );
|
|
907
907
|
finalresult.push( findissueEdgeApp );
|
|
@@ -920,7 +920,7 @@ export async function edgeApplogsCheck( req, res ) {
|
|
|
920
920
|
storeId: ticket.basicDetails.storeId,
|
|
921
921
|
edgelog: findissue.edgelog.data,
|
|
922
922
|
primary: 'Camera Issues',
|
|
923
|
-
secondary: [ 'Camera
|
|
923
|
+
secondary: [ 'Camera not working' ],
|
|
924
924
|
};
|
|
925
925
|
updateIssue( findissueEdgeApp );
|
|
926
926
|
finalresult.push( findissueEdgeApp );
|
|
@@ -951,7 +951,7 @@ export async function edgeApplogsCheck( req, res ) {
|
|
|
951
951
|
edgelog: findissue,
|
|
952
952
|
storeId: ticket.basicDetails.storeId,
|
|
953
953
|
primary: 'Internet Issues',
|
|
954
|
-
secondary: [ '
|
|
954
|
+
secondary: [ 'Internet slow' ],
|
|
955
955
|
};
|
|
956
956
|
updateIssue( findissueEdgeApp );
|
|
957
957
|
finalresult.push( findissueEdgeApp );
|
|
@@ -294,6 +294,7 @@ export async function edgeAppLogTable( req, res ) {
|
|
|
294
294
|
obj.startTime = dayjs( obj.from ).format( 'hh:mm A' );
|
|
295
295
|
obj.endTime = dayjs( obj.to ).format( 'hh:mm A' );
|
|
296
296
|
let internetSpeedQuery = {
|
|
297
|
+
'size': 1000,
|
|
297
298
|
'query': {
|
|
298
299
|
'bool': {
|
|
299
300
|
'must': [
|
|
@@ -388,7 +389,7 @@ export async function edgeAppLogTable( req, res ) {
|
|
|
388
389
|
obj.files_generated = '';
|
|
389
390
|
}
|
|
390
391
|
let downTimeQuery = {
|
|
391
|
-
'size':
|
|
392
|
+
'size': 1000,
|
|
392
393
|
'query': {
|
|
393
394
|
'bool': {
|
|
394
395
|
'must': [
|
|
@@ -429,10 +430,10 @@ export async function edgeAppLogTable( req, res ) {
|
|
|
429
430
|
timeSlots.forEach( ( element ) => {
|
|
430
431
|
exportdata.push( {
|
|
431
432
|
'Time Stamp': element.startTime+ '-'+ element.endTime,
|
|
432
|
-
'Downtime': element.
|
|
433
|
-
'Avg Internet Speed': element.
|
|
434
|
-
'Files Genarated': element.
|
|
435
|
-
'Files Pushed': element.
|
|
433
|
+
'Downtime': element.downtime,
|
|
434
|
+
'Avg Internet Speed': element.Internetspeed,
|
|
435
|
+
'Files Genarated': element.files_generated,
|
|
436
|
+
'Files Pushed': element.files_pushed,
|
|
436
437
|
} );
|
|
437
438
|
} );
|
|
438
439
|
await download( exportdata, res );
|
|
@@ -530,7 +531,7 @@ export async function viewedgeAppLog( req, res ) {
|
|
|
530
531
|
response.appStartTime = appStartTime.body.hits.hits.length > 0 ? appStartTime.body.hits.hits[0]._source.data.occuringTime : '';
|
|
531
532
|
|
|
532
533
|
let appQuitTimeQuery = {
|
|
533
|
-
'size':
|
|
534
|
+
'size': 1000,
|
|
534
535
|
'query': {
|
|
535
536
|
'bool': {
|
|
536
537
|
'must': [
|
|
@@ -571,7 +572,7 @@ export async function viewedgeAppLog( req, res ) {
|
|
|
571
572
|
}
|
|
572
573
|
}
|
|
573
574
|
let appCrashTimeQuery = {
|
|
574
|
-
'size':
|
|
575
|
+
'size': 1000,
|
|
575
576
|
'query': {
|
|
576
577
|
'bool': {
|
|
577
578
|
'must': [
|
|
@@ -726,7 +727,7 @@ export async function viewedgeAppLog( req, res ) {
|
|
|
726
727
|
|
|
727
728
|
|
|
728
729
|
const antiVirus = await getOpenSearchData( JSON.parse( process.env.OPENSEARCH ).edgeAppSystemLogs, {
|
|
729
|
-
'size':
|
|
730
|
+
'size': 1000,
|
|
730
731
|
'query': {
|
|
731
732
|
'bool': {
|
|
732
733
|
'must': [
|