aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2010-01-23 15:19:35 -0500
committerScott Ullrich <sullrich@pfsense.org>2010-01-23 15:19:35 -0500
commitd909ac739e19e3f0c8135942846ef00a25a84a8e (patch)
tree9539c68266ae7fe793a0563f8d4603a290e90e12
parent5c96c622e969f83b63116ba613e7a22c4f83ce6f (diff)
downloadpfsense-packages-d909ac739e19e3f0c8135942846ef00a25a84a8e.tar.gz
pfsense-packages-d909ac739e19e3f0c8135942846ef00a25a84a8e.tar.bz2
pfsense-packages-d909ac739e19e3f0c8135942846ef00a25a84a8e.zip
Add option to show generated haproxy.cfg file
-rwxr-xr-xconfig/haproxy/haproxy_global.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/config/haproxy/haproxy_global.php b/config/haproxy/haproxy_global.php
index 655c0125..e682f65a 100755
--- a/config/haproxy/haproxy_global.php
+++ b/config/haproxy/haproxy_global.php
@@ -106,6 +106,8 @@ include("head.inc");
?>
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
+<script type="text/javascript" src="javascript/scriptaculous/prototype.js"></script>
+<script type="text/javascript" src="javascript/scriptaculous/scriptaculous.js"></script>
<?php include("fbegin.inc"); ?>
<script language="JavaScript">
<!--
@@ -296,8 +298,26 @@ function enable_change(enable_change) {
</table>
</div>
</table>
+
+<p/>
+
+<div id="configuration" style="display:none; border-style:dashed; padding: 8px;">
+ <b><i>/var/etc/haproxy.cfg file contents:</b></i>
+ <?php
+ if(file_exists("/var/etc/haproxy.cfg")) {
+ echo "<pre>" . file_get_contents("/var/etc/haproxy.cfg") . "</pre>";
+ }
+ ?>
+</div>
+<div id="showconfiguration">
+ <a onClick="new Effect.Fade('showconfiguration'); new Effect.Appear('configuration'); setTimeout('scroll_after_fade', 500); return false;" href="#">Show</a> automatically generated configuration.
+</div>
+
</form>
<script language="JavaScript">
+ function scroll_after_fade() {
+ window.scrollBy(document_height, 0);
+ }
<!--
enable_change(false);
//-->