tango-app-api-analysis-traffic 3.0.0-alpha.23 → 3.0.0-alpha.24

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-analysis-traffic",
3
- "version": "3.0.0-alpha.23",
3
+ "version": "3.0.0-alpha.24",
4
4
  "description": "Traffic Analysis",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -391,6 +391,26 @@ export const performanceMatrixV1 = async ( req, res ) => {
391
391
  let resultData = await LamdaServiceCall( LamdaURL, reqestData );
392
392
  if ( resultData ) {
393
393
  if ( resultData.status_code == '200' ) {
394
+ let data = JSON.parse( JSON.stringify( resultData.performanceData ) );
395
+ data.forEach( ( item, index ) => {
396
+ if ( item.position == 'High_Low' ) {
397
+ data[index].left = ( Math.floor( Math.random() * 46 ) + 5 ) + '%';
398
+ data[index].top = ( Math.floor( Math.random() * 46 ) + 51 ) + '%';
399
+ } else if ( item.position == 'High_High' ) {
400
+ data[index].left = ( Math.floor( Math.random() * 46 ) + 51 ) + '%';
401
+ data[index].top = ( Math.floor( Math.random() * 46 ) + 51 ) + '%';
402
+ } else if ( item.position == 'Low_Low' ) {
403
+ data[index].left = ( Math.floor( Math.random() * 46 ) + 5 ) + '%';
404
+ data[index].top = ( Math.floor( Math.random() * 46 ) + 5 ) + '%';
405
+ console.log( data[index].left );
406
+ } else {
407
+ data[index].left = ( Math.floor( Math.random() * 46 ) + 51 ) + '%';
408
+ data[index].top = ( Math.floor( Math.random() * 46 ) + 5 ) + '%';
409
+ }
410
+ } );
411
+ resultData.performanceData = data;
412
+
413
+
394
414
  return res.sendSuccess( resultData );
395
415
  } else {
396
416
  return res.sendError( 'No Content', 204 );