diff options
author | Anton <github@digitsolutions.nl> | 2013-11-12 18:15:50 +0100 |
---|---|---|
committer | Jeremy Brown <jeremy.b@infosend.com> | 2014-07-31 16:27:47 -0700 |
commit | cb8e0b1ce5f8ea0b35ebb1704856ed10416367ab (patch) | |
tree | 30ee98f6680c8f659c0bf59701e8a3becaabc0df /config/tinydns/tinydns_status.php | |
parent | 27ea3affa00297e713a8cf7c18bb81ec96ba500b (diff) | |
download | pfsense-packages-cb8e0b1ce5f8ea0b35ebb1704856ed10416367ab.tar.gz pfsense-packages-cb8e0b1ce5f8ea0b35ebb1704856ed10416367ab.tar.bz2 pfsense-packages-cb8e0b1ce5f8ea0b35ebb1704856ed10416367ab.zip |
Changed status page of tinydns to view correct monitor status
Changed layout of status page to show all relevant data of failover dns
info
Diffstat (limited to 'config/tinydns/tinydns_status.php')
-rw-r--r-- | config/tinydns/tinydns_status.php | 42 |
1 files changed, 33 insertions, 9 deletions
diff --git a/config/tinydns/tinydns_status.php b/config/tinydns/tinydns_status.php index ba119da9..e573b693 100644 --- a/config/tinydns/tinydns_status.php +++ b/config/tinydns/tinydns_status.php @@ -79,10 +79,11 @@ if ($pf_version < 2.0) <td class="tabcont" > <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> - <td width="55%" class="listhdrr">IP</td> - <td width="15%" class="listhdrr">Status</td> + <td width="45%" class="listhdrr">IP</td> + <td width="10%" class="listhdrr">Status</td> <td width="15%" class="listhdrr">In Service</td> - <td width="25%" class="listhdrr">Response time</td> + <td width="15%" class="listhdrr">Monitor ip</td> + <td width="15%" class="listhdrr">Response time</td> </tr> <?php @@ -104,7 +105,7 @@ foreach($config['installedpackages']['tinydnsdomains']['config'] as $ping) { $status = file_get_contents("/var/db/pingstatus/$monitorip"); else $status = "N/A"; - if(stristr($tinydns_data, "+{$hostname}:{$ipaddress}")) + if(stristr($tinydns_data, "+{$hostname}:{$ipaddress}") || stristr($tinydns_data, "={$hostname}:{$ipaddress}")) $inservice = "<FONT COLOR='GREEN'>YES</FONT>"; else $inservice = "<FONT COLOR='BLUE'>NO</FONT>"; @@ -115,8 +116,10 @@ foreach($config['installedpackages']['tinydnsdomains']['config'] as $ping) { echo "<td class=\"listlr\">"; if(stristr($status,"DOWN")) echo "<FONT COLOR='red'>DOWN</FONT>"; - else + else if(stristr($status,"UP")) echo "UP"; + else + echo "N/A"; echo "</td>"; echo "<td class=\"listlr\">"; @@ -130,7 +133,16 @@ foreach($config['installedpackages']['tinydnsdomains']['config'] as $ping) { $msstatus = file_get_contents("/var/db/pingmsstatus/$monitorip"); else $msstatus = "N/A"; - echo "<!-- " . $monitorip . " -->" . $msstatus; + echo $monitorip; + echo "</td>"; + echo "<td class=\"listlr\">"; + if(!$monitorip) + $monitorip = $ipaddress; + if(file_exists("/var/db/pingmsstatus/$monitorip")) + $msstatus = file_get_contents("/var/db/pingmsstatus/$monitorip"); + else + $msstatus = "N/A"; + echo $msstatus; echo "</td>"; echo "</tr>"; @@ -146,7 +158,7 @@ foreach($config['installedpackages']['tinydnsdomains']['config'] as $ping) { echo $ipaddress; if($row['loadbalance']) echo " (LB)"; - if(stristr($tinydns_data, "+{$hostname}:{$row['failoverip']}")) + if(stristr($tinydns_data, "+{$hostname}:{$row['failoverip']}") || stristr($tinydns_data, "={$hostname}:{$row['failoverip']}")) $inservice = "<FONT COLOR='GREEN'>YES</FONT>"; else $inservice = "<FONT COLOR='BLUE'>NO</FONT>"; @@ -154,8 +166,11 @@ foreach($config['installedpackages']['tinydnsdomains']['config'] as $ping) { echo "<td class=\"listlr\">"; if(stristr($status,"DOWN")) echo "<FONT COLOR='red'>DOWN</FONT>"; - else + else if(stristr($status,"UP")) echo "UP"; + else + echo "N/A"; + echo "</td>"; echo "<td class=\"listlr\">"; @@ -169,8 +184,17 @@ foreach($config['installedpackages']['tinydnsdomains']['config'] as $ping) { $msstatus = file_get_contents("/var/db/pingmsstatus/$monitorip"); else $msstatus = "N/A"; + echo $monitorip; + echo "</td>"; + echo "<td class=\"listlr\">"; + if(!$monitorip) + $monitorip = $ipaddress; + if(file_exists("/var/db/pingmsstatus/$monitorip")) + $msstatus = file_get_contents("/var/db/pingmsstatus/$monitorip"); + else + $msstatus = "N/A"; - echo "<!-- " . $monitorip . " -->" . $msstatus; + echo $msstatus; echo "</td>"; echo "</tr>"; } |