tango-app-api-analysis-traffic 3.0.0-alpha.29 → 3.0.0-alpha.30
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
|
@@ -483,33 +483,28 @@ export const performanceMatrixV1 = async ( req, res ) => {
|
|
|
483
483
|
let resultData = await LamdaServiceCall( LamdaURL, reqestData );
|
|
484
484
|
if ( resultData ) {
|
|
485
485
|
if ( resultData.status_code == '200' ) {
|
|
486
|
-
resultData.performanceData.forEach( ( item ) => {
|
|
487
|
-
delete item.top;
|
|
488
|
-
delete item.left;
|
|
489
|
-
} );
|
|
490
486
|
let data = [];
|
|
491
487
|
resultData.performanceData.forEach( ( item, index ) => {
|
|
492
|
-
data.
|
|
493
|
-
if (
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
} else if ( item.position == 'High_High' ) {
|
|
497
|
-
data[index].left = Math.floor( Math.random() * 40 ) + 50;
|
|
498
|
-
data[index].top = Math.floor( Math.random() * 37 ) + 7; ;
|
|
499
|
-
} else if ( item.position == 'Low_Low' ) {
|
|
500
|
-
data[index].left = Math.floor( Math.random() * 40 );
|
|
501
|
-
data[index].top = Math.floor( Math.random() * 37 ) + 51;
|
|
488
|
+
let findprevIndex = data.findLastIndex( ( ele ) => ele.position == item.position );
|
|
489
|
+
if ( findprevIndex != -1 ) {
|
|
490
|
+
item.top = data[findprevIndex].top + 7;
|
|
491
|
+
item.left = data[findprevIndex].left + 5;
|
|
502
492
|
} else {
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
493
|
+
if ( item.position == 'High_Low' ) {
|
|
494
|
+
item.left = 5;
|
|
495
|
+
item.top = 10;
|
|
496
|
+
} else if ( item.position == 'High_High' ) {
|
|
497
|
+
item.left = 50;
|
|
498
|
+
item.top = 10;
|
|
499
|
+
} else if ( item.position == 'Low_Low' ) {
|
|
500
|
+
item.left = 5;
|
|
501
|
+
item.top = 55;
|
|
502
|
+
} else {
|
|
503
|
+
item.left = 50;
|
|
504
|
+
item.top = 55;
|
|
505
|
+
}
|
|
512
506
|
}
|
|
507
|
+
data.push( item );
|
|
513
508
|
} );
|
|
514
509
|
resultData.performanceData = data;
|
|
515
510
|
return res.sendSuccess( resultData );
|