tango-app-api-infra 3.0.47-dev → 3.0.48-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.47-dev",
3
+ "version": "3.0.48-dev",
4
4
  "description": "infra",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -16,7 +16,7 @@ export async function infraCard( req, res ) {
16
16
  $match: {
17
17
  $and: [
18
18
  { issueType: 'infra' },
19
- { 'status': { $ne: 'closed' } },
19
+ { 'ticketDetails.issueStatus': 'identified' },
20
20
  { 'basicDetails.clientId': { $in: req.body.clientId } },
21
21
  { createdAt: { $gte: date.start } },
22
22
  { createdAt: { $lte: date.end } },
@@ -50,7 +50,7 @@ export async function infraCard( req, res ) {
50
50
  $match: {
51
51
  $and: [
52
52
  { issueType: 'infra' },
53
- { 'status': { $ne: 'closed' } },
53
+ { 'ticketDetails.issueStatus': 'identified' },
54
54
  { 'basicDetails.clientId': { $in: req.body.clientId } },
55
55
  { 'ticketDetails.issueStatus': 'identified' },
56
56
  { createdAt: { $gte: date.start } },
@@ -334,11 +334,10 @@ export async function edgeAppLogTable( req, res ) {
334
334
  const sum = streamwiseDowntime.reduce( ( accumulator, currentValue ) => {
335
335
  return accumulator + currentValue.down_time;
336
336
  }, 0 );
337
- // Calculate the average
338
337
  const average = sum / streamwiseDowntime.length;
339
338
  obj.downtime = Math.round( average );
340
339
  } else {
341
- obj.downtime = 0;
340
+ obj.downtime = '';
342
341
  }
343
342
  let appStatusQuery = {
344
343
  'size': 1,
@@ -399,10 +399,10 @@ export async function workHistory( req, res ) {
399
399
  infraIssue: { $ifNull: [ '$primaryIssue.reasons.primaryIssue', '' ] },
400
400
  },
401
401
  } );
402
- if ( req.body.issueFilter && req.body.issueFilter !== '' ) {
402
+ if ( req.body.issueFilter && req.body.issueFilter.length>0 ) {
403
403
  query.push( {
404
404
  $match: {
405
- infraIssue: req.body.issueFilter,
405
+ infraIssue: { $in: req.body.issueFilter },
406
406
  },
407
407
  } );
408
408
  }