summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/principal
diff options
context:
space:
mode:
authorJose M. Guisado <jguisado@soleta.eu>2021-05-04 15:20:14 +0000
committerOpenGnSys Support Team <soporte-og@soleta.eu>2021-05-10 10:33:10 +0200
commit8634dd3ac37bc821afd0e7f321eb0064247074a2 (patch)
treed4ae1cc832bda46da1d5f458170185a7b5410ce8 /admin/WebConsole/principal
parentd3da332d007872a32b4f9ccd66370d3f9acd9458 (diff)
#995 Show client link speed if available
If the clients API response included speed information, show it in the default room view. In case link speed is less than 1000 Mbit, highlight so.
Diffstat (limited to 'admin/WebConsole/principal')
-rw-r--r--admin/WebConsole/principal/aula.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/admin/WebConsole/principal/aula.php b/admin/WebConsole/principal/aula.php
index efc09178..81c7b676 100644
--- a/admin/WebConsole/principal/aula.php
+++ b/admin/WebConsole/principal/aula.php
@@ -15,6 +15,7 @@ include_once("../clases/MenuContextual.php");
include_once("../includes/constantes.php");
include_once("../includes/comunes.php");
include_once("../includes/CreaComando.php");
+include_once("../includes/restfunctions.php");
include_once("../idiomas/php/".$idioma."/aulas_".$idioma.".php");
include_once("../idiomas/php/".$idioma."/estados_".$idioma.".php");
include_once("../idiomas/php/".$idioma."/comandos/mensajes_".$idioma.".php");
@@ -286,6 +287,12 @@ function pintaordenadores(){
global $map;
global $max_col;
+ $clients = clients_v2(2, $Mip);
+ $get_speed = function($cli) {
+ return $cli['speed'] ? $cli['speed'] : '-1';
+ };
+ $speeds = array_map($get_speed, $clients['clients']);
+
$ntr=0; // Numero de ordenadores por fila
if ($nombreaula!=""){
echo '<div>';
@@ -313,6 +320,13 @@ function pintaordenadores(){
echo ' <strong><font color="#D0A126">'.$Mip[$i].'</font></strong>';
echo ' </br>';
echo ' <font color="#003300" size="1" face="Arial, Helvetica, sans-serif">'.$Mmac[$i].'</font>';
+ echo ' </br>';
+ if ($speeds[$i] > 0 && $speeds[$i] < 1000) {
+ echo ' <font style="background-color: red" size="1" face="Arial, Helvetica, sans-serif">'.$speeds[$i].' Mbit</font>';
+ }
+ if ($speeds[$i] > 0 && $speeds[$i] >= 1000) {
+ echo ' <font size="1" color="#007700" face="Arial, Helvetica, sans-serif">'.$speeds[$i].' Mbit</font>';
+ }
echo '</td>';
echo '</tr>';
echo '</table>';