summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorSjonHortensius <sjon@hortensius.net>2015-04-18 15:02:17 +0200
committerSjonHortensius <sjon@hortensius.net>2015-04-18 15:02:17 +0200
commit6979041d9a260d7d32578dff832bd0964de2f08f (patch)
tree1ffad564a2cbcfe24ed3239247d26d2a8a9af9e5 /usr
parentff4bb92850db0bde679906710fd65c8c29c1d0c1 (diff)
parentf7c1bce7d8567c8daf715d135de3fec474ecf77f (diff)
downloadpfsense-6979041d9a260d7d32578dff832bd0964de2f08f.zip
pfsense-6979041d9a260d7d32578dff832bd0964de2f08f.tar.gz
Merge pull request #70 from sbeaver-netgate/diag_system_pftop
Converted diag_system_pftop
Diffstat (limited to 'usr')
-rw-r--r--usr/local/www/diag_system_pftop.php185
1 files changed, 85 insertions, 100 deletions
diff --git a/usr/local/www/diag_system_pftop.php b/usr/local/www/diag_system_pftop.php
index f5cc443..c52b1df 100644
--- a/usr/local/www/diag_system_pftop.php
+++ b/usr/local/www/diag_system_pftop.php
@@ -1,31 +1,31 @@
<?php
/* $Id$ */
/*
- diag_system_pftop.php
- Copyright (C) 2008-2009 Scott Ullrich
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
+ diag_system_pftop.php
+ Copyright (C) 2008-2009 Scott Ullrich
+ Copyright (C) 2013-2015 Electric Sheep Fencing, LP
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
*/
/*
@@ -91,8 +91,7 @@ if($_REQUEST['sorttype'] && in_array($_REQUEST['sorttype'], $sorttypes)
}
?>
-<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-<?php include("fbegin.inc"); ?>
+
<form method="post" action="diag_system_pftop.php">
<script type="text/javascript">
//<![CDATA[
@@ -114,87 +113,75 @@ if($_REQUEST['sorttype'] && in_array($_REQUEST['sorttype'], $sorttypes)
setTimeout('getpftopactivity()', 1000);
//]]>
</script>
-<div id="maincontent">
+
+
<?php
if($savemsg) {
echo "<div id=\"savemsg\">";
print_info_box($savemsg);
echo "</div>";
}
+
if ($input_errors)
print_input_errors($input_errors);
?>
- <div id="mainarea" style="padding-bottom: 0px;">
- <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0" summary="diag system pftop">
- <tr>
- <td class="list">
- <div id='viewtypediv'><?=gettext("View type:"); ?>
- <select name='viewtype' id='viewtype'>
- <option value='default' <?php echo ($viewtype == "default") ? "selected=\"selected\"" : ""; ?>><?=gettext("Default");?></option>
- <option value='label' <?php echo ($viewtype == "label") ? "selected=\"selected\"" : ""; ?>><?=gettext("Label");?></option>
- <option value='long' <?php echo ($viewtype == "long") ? "selected=\"selected\"" : ""; ?>><?=gettext("Long");?></option>
- <option value='queue' <?php echo ($viewtype == "queue") ? "selected=\"selected\"" : ""; ?>><?=gettext("Queue");?></option>
- <option value='rules' <?php echo ($viewtype == "rules") ? "selected=\"selected\"" : ""; ?>><?=gettext("Rules");?></option>
- <option value='size' <?php echo ($viewtype == "size") ? "selected=\"selected\"" : ""; ?>><?=gettext("Size");?></option>
- <option value='speed' <?php echo ($viewtype == "speed") ? "selected=\"selected\"" : ""; ?>><?=gettext("Speed");?></option>
- <option value='state' <?php echo ($viewtype == "state") ? "selected=\"selected\"" : ""; ?>><?=gettext("State");?></option>
- <option value='time' <?php echo ($viewtype == "time") ? "selected=\"selected\"" : ""; ?>><?=gettext("Time");?></option>
- </select>
- </div>
- </td>
- <td class="list">
- <div id='sorttypediv'><?=gettext("Sort type:"); ?>
- <select name='sorttype' id='sorttype'>
- <option value='age' <?php echo ($sorttype == "age") ? "selected=\"selected\"" : ""; ?>><?=gettext("Age");?></option>
- <option value='bytes' <?php echo ($sorttype == "bytes") ? "selected=\"selected\"" : ""; ?>><?=gettext("Bytes");?></option>
- <option value='dest' <?php echo ($sorttype == "dest") ? "selected=\"selected\"" : ""; ?>><?=gettext("Destination Address");?></option>
- <option value='dport' <?php echo ($sorttype == "dport") ? "selected=\"selected\"" : ""; ?>><?=gettext("Destination Port");?></option>
- <option value='exp' <?php echo ($sorttype == "exp") ? "selected=\"selected\"" : ""; ?>><?=gettext("Expiry");?></option>
- <option value='none' <?php echo ($sorttype == "none") ? "selected=\"selected\"" : ""; ?>><?=gettext("None");?></option>
- <option value='peak' <?php echo ($sorttype == "peak") ? "selected=\"selected\"" : ""; ?>><?=gettext("Peak");?></option>
- <option value='pkt' <?php echo ($sorttype == "pkt") ? "selected=\"selected\"" : ""; ?>><?=gettext("Packet");?></option>
- <option value='rate' <?php echo ($sorttype == "rate") ? "selected=\"selected\"" : ""; ?>><?=gettext("Rate");?></option>
- <option value='size' <?php echo ($sorttype == "size") ? "selected=\"selected\"" : ""; ?>><?=gettext("Size");?></option>
- <option value='sport' <?php echo ($sorttype == "sport") ? "selected=\"selected\"" : ""; ?>><?=gettext("Source Port");?></option>
- <option value='src' <?php echo ($sorttype == "src") ? "selected=\"selected\"" : ""; ?>><?=gettext("Source Address");?></option>
- </select>
- </div>
- </td>
- <td class="list">
- <div id='statesdiv'><?=gettext("Number of States:"); ?>
- <select name='states' id='states'>
- <option value='50' <?php echo ($numstate == "50") ? "selected=\"selected\"" : ""; ?>>50</option>
- <option value='100' <?php echo ($numstate == "100") ? "selected=\"selected\"" : ""; ?>>100</option>
- <option value='200' <?php echo ($numstate == "200") ? "selected=\"selected\"" : ""; ?>>200</option>
- <option value='500' <?php echo ($numstate == "500") ? "selected=\"selected\"" : ""; ?>>500</option>
- <option value='1000' <?php echo ($numstate == "1000") ? "selected=\"selected\"" : ""; ?>>1000</option>
- <option value='all' <?php echo ($numstate == "all") ? "selected=\"selected\"" : ""; ?>>all</option>
- </select>
- </div>
- </td>
- </tr>
- <tr>
- <td colspan="3" align="center">
- <table id="backuptable" class="tabcont" align="center" width="100%" border="0" cellpadding="6" cellspacing="0" summary="tabcont">
- <tr>
- <td align="center">
- <table summary="results">
- <tr>
- <td>
- <div id="pftopactivitydiv"><?=gettext("Gathering pfTOP activity, please wait...");?></div>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </div>
-</div>
+
+ <div class="panel panel-default">
+ <div class="row">
+ <div class="form-group col-sm-2" id='viewtypediv'><?=gettext("View type:"); ?>
+ <select class="form-control col-sm-2" name='viewtype' id='viewtype'>
+ <option value='default' <?=($viewtype == "default") ? "selected=\"selected\"" : ""; ?>><?=gettext("Default")?></option>
+ <option value='label' <?=($viewtype == "label") ? "selected=\"selected\"" : ""; ?>><?=gettext("Label")?></option>
+ <option value='long' <?=($viewtype == "long") ? "selected=\"selected\"" : ""; ?>><?=gettext("Long")?></option>
+ <option value='queue' <?=($viewtype == "queue") ? "selected=\"selected\"" : ""; ?>><?=gettext("Queue")?></option>
+ <option value='rules' <?=($viewtype == "rules") ? "selected=\"selected\"" : ""; ?>><?=gettext("Rules")?></option>
+ <option value='size' <?=($viewtype == "size") ? "selected=\"selected\"" : ""; ?>><?=gettext("Size")?></option>
+ <option value='speed' <?=($viewtype == "speed") ? "selected=\"selected\"" : ""; ?>><?=gettext("Speed")?></option>
+ <option value='state' <?=($viewtype == "state") ? "selected=\"selected\"" : ""; ?>><?=gettext("State")?></option>
+ <option value='time' <?=($viewtype == "time") ? "selected=\"selected\"" : ""; ?>><?=gettext("Time")?></option>
+ </select>
+ </div>
+ <div class="form-group col-sm-2" id='sorttypediv'><?=gettext("Sort type:"); ?>
+ <select class="form-control col-sm-2" name='sorttype' id='sorttype'>
+ <option value='age' <?=($sorttype == "age") ? "selected=\"selected\"" : ""; ?>><?=gettext("Age")?></option>
+ <option value='bytes' <?=($sorttype == "bytes") ? "selected=\"selected\"" : ""; ?>><?=gettext("Bytes")?></option>
+ <option value='dest' <?=($sorttype == "dest") ? "selected=\"selected\"" : ""; ?>><?=gettext("Destination Address")?></option>
+ <option value='dport' <?=($sorttype == "dport") ? "selected=\"selected\"" : ""; ?>><?=gettext("Destination Port")?></option>
+ <option value='exp' <?=($sorttype == "exp") ? "selected=\"selected\"" : ""; ?>><?=gettext("Expiry")?></option>
+ <option value='none' <?=($sorttype == "none") ? "selected=\"selected\"" : ""; ?>><?=gettext("None")?></option>
+ <option value='peak' <?=($sorttype == "peak") ? "selected=\"selected\"" : ""; ?>><?=gettext("Peak")?></option>
+ <option value='pkt' <?=($sorttype == "pkt") ? "selected=\"selected\"" : ""; ?>><?=gettext("Packet")?></option>
+ <option value='rate' <?=($sorttype == "rate") ? "selected=\"selected\"" : ""; ?>><?=gettext("Rate")?></option>
+ <option value='size' <?=($sorttype == "size") ? "selected=\"selected\"" : ""; ?>><?=gettext("Size")?></option>
+ <option value='sport' <?=($sorttype == "sport") ? "selected=\"selected\"" : ""; ?>><?=gettext("Source Port")?></option>
+ <option value='src' <?=($sorttype == "src") ? "selected=\"selected\"" : ""; ?>><?=gettext("Source Address")?></option>
+ </select>
+ </div>
+ <div class="form-group col-sm-2" id='statesdiv'><?=gettext("# of States:"); ?>
+ <select class="form-control col-sm-2 name=" states' id='states'>
+ <option value='50' <?=($numstate == "50") ? "selected=\"selected\"" : ""; ?>>50</option>
+ <option value='100' <?=($numstate == "100") ? "selected=\"selected\"" : ""; ?>>100</option>
+ <option value='200' <?=($numstate == "200") ? "selected=\"selected\"" : ""; ?>>200</option>
+ <option value='500' <?=($numstate == "500") ? "selected=\"selected\"" : ""; ?>>500</option>
+ <option value='1000' <?=($numstate == "1000") ? "selected=\"selected\"" : ""; ?>>1000</option>
+ <option value='all' <?=($numstate == "all") ? "selected=\"selected\"" : ""; ?>>all</option>
+ </select>
+ </div>
+ </div>
+ </div>
+
+ <div class="panel panel-default panel-info">
+ <div class="panel-heading">Output</div>
+ <div class="panel panel-body" id="pftopactivitydiv">
+ <?=gettext("Gathering pfTOP activity, please wait...")?>
+ </div>
+ </div>
+
+ </div>
</form>
-<?php include("fend.inc"); ?>
+
+<?php include("foot.inc"); ?>
+
<script type="text/javascript">
//<![CDATA[
jQuery("#viewtype").change(function() {
@@ -211,5 +198,3 @@ jQuery("#viewtype").change(function() {
});
//]]>
</script>
-</body>
-</html>
OpenPOWER on IntegriCloud