diff options
author | Erik Kristensen <ekristen@pfsense.org> | 2005-08-30 00:55:03 +0000 |
---|---|---|
committer | Erik Kristensen <ekristen@pfsense.org> | 2005-08-30 00:55:03 +0000 |
commit | e8fc8fa0c4e5c0071e35fe93f933e585b96678e2 (patch) | |
tree | 67264793f3899607dd087198e11289692cb6600c /usr | |
parent | 50ad3b7c29a7b5e6a73a2748edfe85f4e836e754 (diff) | |
download | pfsense-e8fc8fa0c4e5c0071e35fe93f933e585b96678e2.zip pfsense-e8fc8fa0c4e5c0071e35fe93f933e585b96678e2.tar.gz |
just cleaning house ... took javascript out of carp_status.php
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/carp_status.php | 185 | ||||
-rw-r--r-- | usr/local/www/javascript/carp_status/carp_status.js | 6 |
2 files changed, 101 insertions, 90 deletions
diff --git a/usr/local/www/carp_status.php b/usr/local/www/carp_status.php index fa4d2ee..0df9f81 100755 --- a/usr/local/www/carp_status.php +++ b/usr/local/www/carp_status.php @@ -61,113 +61,118 @@ include("head.inc"); ?> <body link="#0000CC" vlink="#0000CC" alink="#0000CC"> -<?php -include("fbegin.inc"); -?> +<?php include("fbegin.inc"); ?> <p class="pgtitle"><?=$pgtitle?></p> <form action="carp_status.php" method="post"> <?php if ($savemsg) print_info_box($savemsg); ?> <div id="mainlevel"> -<table width="100%" border="0" cellpadding="0" cellspacing="0"> -<tr><td class="tabcont"> - + <table width="100%" border="0" cellpadding="0" cellspacing="0"> + <tr> + <td class="tabcont"> <?php - if($status == false) { - $carp_enabled = false; - echo "<input type=\"submit\" name=\"disablecarp\" id=\"disablecarp\" value=\"Enable Carp\">"; - } else { - $carp_enabled = true; - echo "<input type=\"submit\" name=\"disablecarp\" id=\"disablecarp\" value=\"Disable Carp\">"; - } - -if(is_array($config['virtualip']['vip'])) { - foreach($config['virtualip']['vip'] as $carp) { - if ($carp['mode'] == "carp") $carpcount++; - } - if ($carpcount == 0) { - echo "</td></tr></table><center><br>Could not locate any defined CARP interfaces."; - echo "</center>"; + if($status == false) { + $carp_enabled = false; + echo "<input type=\"submit\" name=\"disablecarp\" id=\"disablecarp\" value=\"Enable Carp\">"; + } else { + $carp_enabled = true; + echo "<input type=\"submit\" name=\"disablecarp\" id=\"disablecarp\" value=\"Disable Carp\">"; + } - include("fend.inc"); - echo "</body></html>"; - exit; - } -} + if(is_array($config['virtualip']['vip'])) { + foreach($config['virtualip']['vip'] as $carp) { + if ($carp['mode'] == "carp") $carpcount++; + } + if ($carpcount == 0) { + echo "</td></tr></table><center><br>Could not locate any defined CARP interfaces."; + echo "</center>"; + + include("fend.inc"); + echo "</body></html>"; + exit; + } + } ?> -<p> - -<table width="100%" border="0" cellpadding="6" cellspacing="0"> -</tr> -<tr> - <td class="listhdrr"><b><center>Carp Interface</center></b></td> - <td class="listhdrr"><b><center>Virtual IP</center></b></td> - <td class="listhdrr"><b><center>Status</center></b></td> -</tr> + <p> + <table width="100%" border="0" cellpadding="6" cellspacing="0"> + <tr> + <td class="listhdrr"><b><center>Carp Interface</center></b></td> + <td class="listhdrr"><b><center>Virtual IP</center></b></td> + <td class="listhdrr"><b><center>Status</center></b></td> + </tr> <?php - -if(is_array($config['virtualip']['vip'])) { - $carpint=0; - foreach($config['virtualip']['vip'] as $carp) { - if ($carp['mode'] != "carp") continue; - $ipaddress = $carp['subnet']; - $password = $carp['password']; - $netmask = $carp['subnet_bits']; - $vhid = $carp['vhid']; - $advskew = $carp['advskew']; - $carp_int = find_carp_interface($ipaddress); - $status = get_carp_interface_status($carp_int); - echo "<tr>"; - $align = "valign='middle'"; - if($carp_enabled == false) { - $icon = "<img {$align} src='/themes/".$g['theme']."/images/icons/icon_block.gif'>"; - $status = "DISABLED"; - $carp_int = "carp" . $carpint; - } else { - if($status == "MASTER") { - $icon = "<img {$align} src='/themes/".$g['theme']."/images/icons/icon_pass.gif'>"; - } else if($status == "BACKUP") { - $icon = "<img {$align} src='/themes/".$g['theme']."/images/icons/icon_pass_d.gif'>"; - } else if($status == "INIT") { - $icon = "<img {$align} src='/themes/".$g['theme']."/images/icons/icon_log.gif'>"; - } - } - echo "<td class=\"listlr\"><center>" . $carp_int . " </td>"; - echo "<td class=\"listlr\"><center>" . $ipaddress . " </td>"; - echo "<td class=\"listlr\"><center>{$icon} " . $status . " </td>"; - echo "</tr>"; - $carpint++; - } -} + if(is_array($config['virtualip']['vip'])) { + $carpint=0; + foreach($config['virtualip']['vip'] as $carp) { + if ($carp['mode'] != "carp") continue; + $ipaddress = $carp['subnet']; + $password = $carp['password']; + $netmask = $carp['subnet_bits']; + $vhid = $carp['vhid']; + $advskew = $carp['advskew']; + $carp_int = find_carp_interface($ipaddress); + $status = get_carp_interface_status($carp_int); + echo "<tr>"; + $align = "valign='middle'"; + if($carp_enabled == false) { + $icon = "<img {$align} src='/themes/".$g['theme']."/images/icons/icon_block.gif'>"; + $status = "DISABLED"; + $carp_int = "carp" . $carpint; + } else { + if($status == "MASTER") { + $icon = "<img {$align} src='/themes/".$g['theme']."/images/icons/icon_pass.gif'>"; + } else if($status == "BACKUP") { + $icon = "<img {$align} src='/themes/".$g['theme']."/images/icons/icon_pass_d.gif'>"; + } else if($status == "INIT") { + $icon = "<img {$align} src='/themes/".$g['theme']."/images/icons/icon_log.gif'>"; + } + } + echo "<td class=\"listlr\"><center>" . $carp_int . " </td>"; + echo "<td class=\"listlr\"><center>" . $ipaddress . " </td>"; + echo "<td class=\"listlr\"><center>{$icon} " . $status . " </td>"; + echo "</tr>"; + $carpint++; + } + } ?> -<tr><td> -<center> + <tr> + <td> + <center> <?php - echo "<br>pfSync nodes:<br>"; - echo "<pre>"; - system("/sbin/pfctl -vvss | /usr/bin/grep creator | /usr/bin/cut -d\" \" -f7 | /usr/bin/sort -u"); - echo "</pre>"; + echo "<br>pfSync nodes:<br>"; + echo "<pre>"; + system("/sbin/pfctl -vvss | /usr/bin/grep creator | /usr/bin/cut -d\" \" -f7 | /usr/bin/sort -u"); + echo "</pre>"; ?> -</center> - -</td></tr> -<td colspan="4"> - <p><span class="vexpl"><span class="red"><strong>Note:<br> - </strong></span>You can configure your CARP-Settings <a href="firewall_virtual_ip.php">here</a>.</span></p> -</td> -</table> - -</td></tr> -</table> + </center> + </td> + </tr> + <tr> + <td colspan="4"> + <p> + <span class="vexpl"> + <span class="red"> + <strong> + Note: + </strong> + </span> + <br /> + You can configure your CARP-Settings <a href="firewall_virtual_ip.php">here</a>. + </span> + </p> + </td> + </tr> + </table> + + </td> + </tr> + </table> </div> <?php include("fend.inc"); ?> -<script type="text/javascript"> -NiftyCheck(); -Rounded("div#mainlevel","all","#FFF","#eeeeee","smooth"); -</script> + </body> </html> diff --git a/usr/local/www/javascript/carp_status/carp_status.js b/usr/local/www/javascript/carp_status/carp_status.js new file mode 100644 index 0000000..9897258 --- /dev/null +++ b/usr/local/www/javascript/carp_status/carp_status.js @@ -0,0 +1,6 @@ + +window.onLoad = function () { + NiftyCheck(); + Rounded("div#mainlevel","all","#FFF","#eeeeee","smooth"); +} + |