From e1f473f985e26b6cfa91e57e3472b64344202781 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Fri, 28 Apr 2023 10:51:02 +0200 Subject: [PATCH] #10638 format numbers network link --- .../models/VisualConsole/Items/NetworkLink.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/rest-api/models/VisualConsole/Items/NetworkLink.php b/pandora_console/include/rest-api/models/VisualConsole/Items/NetworkLink.php index e9ffd7aefb..c4feb01442 100644 --- a/pandora_console/include/rest-api/models/VisualConsole/Items/NetworkLink.php +++ b/pandora_console/include/rest-api/models/VisualConsole/Items/NetworkLink.php @@ -584,10 +584,12 @@ final class NetworkLink extends Model $inOctets = sprintf('%0.3f %s', $inOctets, $unitIn); $labelStart = $interface_name; - $labelStart .= ' (in): '.$inOctets; + $inOctets = explode(' ', $inOctets); + $labelStart .= ' (in): '.format_for_graph($inOctets[0]).' '.$inOctets[1]; $labelStart .= '
'.$interface_name; - $labelStart .= ' (out): '.$outOctets; + $outOctets = explode(' ', $outOctets); + $labelStart .= ' (out): '.format_for_graph($outOctets[0]).' '.$outOctets[1]; } if (isset($links['start']['id_metaconsole']) === true @@ -665,10 +667,12 @@ final class NetworkLink extends Model $inOctets = sprintf('%0.3f %s', $inOctets, $unitIn); $labelEnd = $interface_name; - $labelEnd .= ' (in): '.$inOctets; + $inOctets = explode(' ', $inOctets); + $labelEnd .= ' (in): '.format_for_graph($inOctets[0]).' '.$inOctets[1]; $labelEnd .= '
'.$interface_name; - $labelEnd .= ' (out): '.$outOctets; + $outOctets = explode(' ', $outOctets); + $labelEnd .= ' (out): '.format_for_graph($outOctets[0]).' '.$outOctets[1]; } if (isset($links['end']['id_metaconsole']) === true