tango-app-api-infra 3.0.111-dev → 3.0.112-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
|
@@ -366,10 +366,10 @@ export async function edgeAppLogTable( req, res ) {
|
|
|
366
366
|
const speedTest = speedTestData.find(
|
|
367
367
|
( item ) => Number( item._source.data.occuringTime.split( ':' )[0] ) === hour,
|
|
368
368
|
);
|
|
369
|
-
if ( speedTest._source.data.upload_Speed
|
|
370
|
-
obj.Internetspeed =
|
|
369
|
+
if ( speedTest&&speedTest._source.data.upload_Speed =='0 bytes' ) {
|
|
370
|
+
obj.Internetspeed = '0 MB/sec';
|
|
371
371
|
} else {
|
|
372
|
-
obj.Internetspeed = '0
|
|
372
|
+
obj.Internetspeed = speedTest ? `${bytesToMB( speedTest._source.data.upload_Speed.split( '.' )[0] ).toFixed( 2 )} MB/sec` : '';
|
|
373
373
|
}
|
|
374
374
|
|
|
375
375
|
|
|
@@ -418,11 +418,7 @@ export async function edgeAppLogTable( req, res ) {
|
|
|
418
418
|
}
|
|
419
419
|
|
|
420
420
|
function bytesToMB( bytes ) {
|
|
421
|
-
|
|
422
|
-
return bytes / ( 1024 * 1024 );
|
|
423
|
-
} else {
|
|
424
|
-
return 0;
|
|
425
|
-
}
|
|
421
|
+
return bytes / ( 1024 * 1024 );
|
|
426
422
|
}
|
|
427
423
|
function generateTimeSlots( startHour, endHour, interval, req ) {
|
|
428
424
|
try {
|