Merge pull request #1 from rohammer/master

Etwas aufgeraeumt und andere Kleinigkeiten
This commit is contained in:
Christian Dresel 2018-10-26 15:52:45 +02:00 committed by GitHub
commit 89eb2942f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 64 additions and 67 deletions

View File

@ -62,73 +62,70 @@ data=$(echo "dump" | nc ::1 33123)
<%
if ! [ ${GET_routes} ] && ! [ ${GET_v4table} ] && ! [ ${GET_v6table} ] && ! [ ${GET_weg} ] ; then
%>
%>
<H2>Interfaces</H2>
<%
<H2>Interfaces</H2>
<%
echo "$data" | grep interface | while read line ; do
echo "$line"
echo "<br>"
done
%>
<br />
<H2>Neighbours</H2>
<br />
<H2>Neighbours</H2>
<%
echo "$data" | grep neighbour | while read line ; do
echo $line
echo "<br>"
done
%>
<br />
<H2>Redistributed routes</H2>
<br />
<H2>Redistributed routes</H2>
<%
echo "$data" | grep xroute | while read line ; do
echo $line
echo "<br>"
done
%>
<%
fi
echo "<table>"
if [ ${GET_routes} ]; then
%>
<H2>All routes</H2>
<%
echo "$data" | grep route | grep -v xroute | while read line ; do
echo $line
echo "<br>"
%>
<H2>All routes</H2>
<%
echo "$data" | grep -w route | while read line ; do
echo "<tr><td>$line</td></tr>"
done
fi
if [ ${GET_v4table} ]; then
%>
%>
<H2>Show IPv6 Routing Tabele</H2>
<%
<%
v4routen=$(ip ro sh tab 10)
echo "$v4routen" | while read line ; do
echo $line
echo "<br>"
echo "<tr><td>$line</td></tr>"
done
fi
if [ ${GET_v6table} ]; then
%>
<H2>Show IPv6 Routing Tabele</H2>
<%
%>
<H2>Show IPv6 Routing Tabele</H2>
<%
v6routen=$(ip -6 ro sh tab 10)
echo "$v6routen" | while read line ; do
echo $line
echo "<br>"
echo "<tr><td>$line</td></tr>"
done
fi
if [ ${GET_weg} ]; then
%>
<H2>Wege zu <%# echo ${GET_ip} %></H2>
<%
v6routen=$(ip -6 ro sh tab 10)
echo "$v6routen" | while read line ; do
echo $line
echo "<br>"
%>
<H2>Wege zu <%# echo ${GET_ip} %></H2>
<%
echo "$data" | grep -w route | grep "${GET_ip}" | while read line ; do
echo "<tr><td>$line</td></tr>"
done
fi
%>