Unverified Commit 6293f9f8 authored by David Beniamine's avatar David Beniamine
Browse files

Remove ip from line

parent fa7bb475
......@@ -47,11 +47,12 @@ do
date=$(date +%Y%m%d)
rIP=$(echo $line | cut -d ' ' -f 3)
sline=$(echo $line | cut -d ' ' -f 1-2)
eline=$(echo $line | cut -d ' ' -f 4-)
res=$(grep "$sline" $conf_file)
if [ ! -z "$res" ]
then
# Update
sed -i -e "s/^.*$sline$/$date $line/" $conf_file
sed -i -e "s/^.*$sline.*$/$date $sline $eline/" $conf_file
else
# Add
echo "$date $line" >> $conf_file
......
......@@ -79,18 +79,19 @@ if(!isset($action)){
foreach($lines as $line){
if($line != ""){
$entry=explode(' ', $line);
$nb_infos=count($entry);
array_push($registry, $entry);
# Format date mac name ip [num_apt_upgrade deb_version pt_version git_branch git_update]
# Format date mac name [num_apt_upgrade deb_version pt_version git_branch git_update] ip
echo "<tr>";
echo "<td>".$entry[2]."</td>";
echo "<td> ".$entry[3]."</td>";
echo "<td> ".$entry[$nb_infos-1]."</td>";
echo "<td>".$entry[1]."</td>";
#echo "<td>".$entry[0]."</td>";
if(count($entry) > 4){
if($nb_infos > 4){
echo "<td>".$entry[4]."</td>";
echo "<td>".$entry[5]."</td>";
echo "<td>".$entry[6]."</td>";
echo "<td>".$entry[4]." mises à jour en attente</td>";
echo "<td> branch ".$entry[7]." ".$entry[8]." commits en retard</td>";
echo "<td>".$entry[3]." mises à jour en attente</td>";
echo "<td> branch ".$entry[6]." ".$entry[7]." commits en retard</td>";
}else{
echo "<td>NA</td>";
echo "<td>NA</td>";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment