aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2010-04-27 16:15:21 -0400
committerScott Ullrich <sullrich@pfsense.org>2010-04-27 16:15:21 -0400
commit5e885637287cd4b3f36e4f57a41e57075fabf3e2 (patch)
treeb6adb27ac58374a2b4bab7e2469451a05fd0fdcd
parent246ae0a6f3902c4b2f12823bee650521f333f6d1 (diff)
downloadpfsense-packages-5e885637287cd4b3f36e4f57a41e57075fabf3e2.tar.gz
pfsense-packages-5e885637287cd4b3f36e4f57a41e57075fabf3e2.tar.bz2
pfsense-packages-5e885637287cd4b3f36e4f57a41e57075fabf3e2.zip
Show configuration in a textarea
-rw-r--r--config/varnish64/varnish_view_config.php42
1 files changed, 6 insertions, 36 deletions
diff --git a/config/varnish64/varnish_view_config.php b/config/varnish64/varnish_view_config.php
index a1aad915..6c3bfcf0 100644
--- a/config/varnish64/varnish_view_config.php
+++ b/config/varnish64/varnish_view_config.php
@@ -31,13 +31,6 @@
require("guiconfig.inc");
-if($_REQUEST['getactivity']) {
- $varnishlogs = `cat /var/etc/default.vcl`;
- echo "Varnish Server configuration as of " . date("D M j G:i:s T Y") . "\n\n";
- echo $varnishlogs;
- exit;
-}
-
$pfSversion = str_replace("\n", "", file_get_contents("/etc/version"));
if(strstr($pfSversion, "1.2"))
$one_two = true;
@@ -47,25 +40,6 @@ include("head.inc");
?>
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-<script src="/javascript/scriptaculous/prototype.js" type="text/javascript"></script>
- <script type="text/javascript">
- function getlogactivity() {
- var url = "/varnish_view_config.php";
- var pars = 'getactivity=yes';
- var myAjax = new Ajax.Request(
- url,
- {
- method: 'post',
- parameters: pars,
- onComplete: activitycallback
- });
- }
- function activitycallback(transport) {
- $('varnishlogs').innerHTML = '<font face="Courier"><pre>' + transport.responseText + '</pre></font>';
- setTimeout('getlogactivity()', 2500);
- }
- setTimeout('getlogactivity()', 10000);
- </script>
<?php include("fbegin.inc"); ?>
<?php if($one_two): ?>
@@ -91,19 +65,15 @@ include("head.inc");
<tr>
<td class="tabcont" >
<form action="varnish_view_config.php" method="post">
- <br>
- <div id="varnishlogs">
- <pre>One moment please, loading Varnish configuration...</pre>
- </div>
+<textarea id="varnishlogs" rows="50" cols="80">
+<?php
+ $config_file = file_get_contents("/var/etc/default.vcl");
+ echo $config_file;
+?>
+</textarea>
</td>
</tr>
</table>
-<td align="left" valign="top">
- <form id="filterform" name="filterform" action="varnish_view_config.php" method="post" style="margin-top: 14px;">
- <p/>
- <input id="submit" name="clear" type="submit" class="formbtn" value="<?=gettext("Clear log");?>" />
- </form>
-</td>
</div>
<?php include("fend.inc"); ?>
</body>