Merge branch 'master' into ADG-9415
This commit is contained in:
@@ -10,6 +10,7 @@ import Card from '../ui/Card';
|
||||
|
||||
import DomainCell from './DomainCell';
|
||||
import { DASHBOARD_TABLES_DEFAULT_PAGE_SIZE, TABLES_MIN_ROWS } from '../../helpers/constants';
|
||||
import { formatNumber } from '../../helpers/helpers';
|
||||
|
||||
interface TimeCellProps {
|
||||
value?: string | number;
|
||||
@@ -20,7 +21,7 @@ const TimeCell = ({ value }: TimeCellProps) => {
|
||||
return '–';
|
||||
}
|
||||
|
||||
const valueInMilliseconds = round(Number(value) * 1000);
|
||||
const valueInMilliseconds = formatNumber(round(Number(value) * 1000));
|
||||
|
||||
return (
|
||||
<div className="logs__row o-hidden">
|
||||
|
||||
@@ -453,7 +453,7 @@ export const getParamsForClientsSearch = (data: any, param: any, additionalParam
|
||||
});
|
||||
|
||||
return {
|
||||
clients: Array.from(clients).map(id => ({ id })),
|
||||
clients: Array.from(clients).map((id) => ({ id })),
|
||||
};
|
||||
};
|
||||
|
||||
@@ -670,9 +670,16 @@ export const countClientsStatistics = (ids: any, autoClients: any) => {
|
||||
* @param {function} t translate
|
||||
* @returns {string}
|
||||
*/
|
||||
export const formatElapsedMs = (elapsedMs: any, t: any) => {
|
||||
const formattedElapsedMs = parseInt(elapsedMs, 10) || parseFloat(elapsedMs).toFixed(2);
|
||||
return `${formattedElapsedMs} ${t('milliseconds_abbreviation')}`;
|
||||
export const formatElapsedMs = (elapsedMs: string, t: (key: string) => string) => {
|
||||
const parsedElapsedMs = parseInt(elapsedMs, 10);
|
||||
|
||||
if (Number.isNaN(parsedElapsedMs)) {
|
||||
return elapsedMs;
|
||||
}
|
||||
|
||||
const formattedMs = formatNumber(parsedElapsedMs);
|
||||
|
||||
return `${formattedMs} ${t('milliseconds_abbreviation')}`;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user