Merge branch 'master' into 7555-fix-ra-packets

This commit is contained in:
Eugene Burkov
2025-03-07 18:32:14 +03:00
2 changed files with 7 additions and 3 deletions

View File

@@ -22,6 +22,8 @@ NOTE: Add new changes BELOW THIS COMMENT.
- Invalid ICMPv6 Router Advertisement messages ([#7547]). - Invalid ICMPv6 Router Advertisement messages ([#7547]).
- Formatting of elapsed times less than one millisecond.
- Changes to global upstream DNS settings not applying to custom client upstream configurations. - Changes to global upstream DNS settings not applying to custom client upstream configurations.
- The formatting of large numbers in the clients tables on the *Client settings* page ([#7583]). - The formatting of large numbers in the clients tables on the *Client settings* page ([#7583]).

View File

@@ -669,15 +669,17 @@ export const countClientsStatistics = (ids: any, autoClients: any) => {
* @returns {string} * @returns {string}
*/ */
export const formatElapsedMs = (elapsedMs: string, t: (key: string) => string) => { export const formatElapsedMs = (elapsedMs: string, t: (key: string) => string) => {
const parsedElapsedMs = parseInt(elapsedMs, 10); const parsedElapsedMs = parseFloat(elapsedMs);
if (Number.isNaN(parsedElapsedMs)) { if (Number.isNaN(parsedElapsedMs)) {
return elapsedMs; return elapsedMs;
} }
const formattedMs = formatNumber(parsedElapsedMs); const formattedValue = parsedElapsedMs < 1
? parsedElapsedMs.toFixed(2)
: Math.floor(parsedElapsedMs).toString();
return `${formattedMs} ${t('milliseconds_abbreviation')}`; return `${formattedValue} ${t('milliseconds_abbreviation')}`;
}; };
/** /**