From 187eb6007b0b8d62e13f0bc2c1c53c084adf7784 Mon Sep 17 00:00:00 2001 From: David Beniamine <david.beniamine@tetras-libre.fr> Date: Mon, 5 Aug 2019 16:40:23 +0200 Subject: [PATCH] Sort by hostname --- wol/scripts/get_registry.sh | 2 +- wol/www/index.php | 19 +++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/wol/scripts/get_registry.sh b/wol/scripts/get_registry.sh index 7dd7c7b..07f6e02 100755 --- a/wol/scripts/get_registry.sh +++ b/wol/scripts/get_registry.sh @@ -26,4 +26,4 @@ subnet=$(ip a | awk '/inet.*containers/ {print $2}' | cut -d / -f 1 | cut -d . - host=$subnet.52 echo "get_registry" | netcat $host $port -stdbuf -i0 $netcat +stdbuf -i0 $netcat | sort -k 3 diff --git a/wol/www/index.php b/wol/www/index.php index 352fb66..2145a46 100644 --- a/wol/www/index.php +++ b/wol/www/index.php @@ -62,15 +62,16 @@ if(!isset($action)){ </form> <h2> Gestion des postes </h2> + <div class="table-responsive"> <table class="table-striped table-bordered table-hover"> <tr> <th>Nom</th> <th>IP(s)</th> <th>MAC</th> - <th>Version Debian</th> - <th>Version Primtux</th> - <th>État apt</th> - <th>État git</th> + <th>Version Debian</th> + <th>Version Primtux</th> + <th>Nombre de mises à jour en attente</th> + <th>État git</th> <th>Date dernier contact</th> <th>Actions</th> </tr> @@ -90,8 +91,8 @@ if(!isset($action)){ if($nb_infos > 4){ echo "<td>".$entry[4]."</td>"; echo "<td>".$entry[5]."</td>"; - echo "<td>".$entry[3]." mises à jour en attente</td>"; - echo "<td> branch ".$entry[6]." ".$entry[7]." commits en retard</td>"; + echo "<td>".$entry[3]."</td>"; + echo "<td> branche ".$entry[6].", ".$entry[7]." commits en retard</td>"; }else{ echo "<td>NA</td>"; echo "<td>NA</td>"; @@ -124,10 +125,8 @@ if(!isset($action)){ } ?> </table> - <pre> - <?php json_encode($registry); ?> - </pre> - + </div> + <?php }else{ echo "<h2> Action en cours </h2>"; -- GitLab