summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/status_interfaces.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-12-15 10:38:12 +0545
committerPhil Davis <phil.davis@inf.org>2015-12-15 10:38:12 +0545
commitabe98adb911f9ff76af12034646a4c64e26d6390 (patch)
tree49c09b6bdf22f6afb54eb99e6d2287a8c65283d7 /src/usr/local/www/status_interfaces.php
parent7895a8802317a8477929bea6428bf8dfe214306f (diff)
downloadpfsense-abe98adb911f9ff76af12034646a4c64e26d6390.zip
pfsense-abe98adb911f9ff76af12034646a4c64e26d6390.tar.gz
Code style status*
Diffstat (limited to 'src/usr/local/www/status_interfaces.php')
-rw-r--r--src/usr/local/www/status_interfaces.php34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/usr/local/www/status_interfaces.php b/src/usr/local/www/status_interfaces.php
index 4d0fe5a..7c12c2b 100644
--- a/src/usr/local/www/status_interfaces.php
+++ b/src/usr/local/www/status_interfaces.php
@@ -90,7 +90,7 @@ $formtemplate = '<form name="%s" action="status_interfaces.php" method="post">'
// Display a term/definition pair
function showDef($show, $term, $def) {
- if($show) {
+ if ($show) {
print('<dt>' . $term . '</dt>');
print('<dd>' . htmlspecialchars($def) . '</dd>');
}
@@ -100,7 +100,7 @@ function showDef($show, $term, $def) {
function showDefBtn($show, $term, $def, $ifval, $btnlbl) {
global $formtemplate;
- if($show) {
+ if ($show) {
print('<dt>' . $term . '</dt>');
print('<dd>');
printf($formtemplate, $term, $ifval, $show, htmlspecialchars($def) . ' ', $btnlbl);
@@ -108,7 +108,7 @@ function showDefBtn($show, $term, $def, $ifval, $btnlbl) {
}
}
-$pgtitle = array(gettext("Status"),gettext("Interfaces"));
+$pgtitle = array(gettext("Status"), gettext("Interfaces"));
$shortcut_section = "interfaces";
include("head.inc");
@@ -160,7 +160,7 @@ foreach ($ifdescrs as $ifdescr => $ifname):
if ($ifdescr == "wan" && file_exists("{$g['varetc_path']}/resolv.conf")) {
$dns_servers = get_dns_servers();
$dnscnt = 0;
- foreach($dns_servers as $dns) {
+ foreach ($dns_servers as $dns) {
showDef(true, $dnscnt == 0 ? gettext('ISP DNS servers'):'', $dns);
$dnscnt++;
}
@@ -170,22 +170,22 @@ foreach ($ifdescrs as $ifdescr => $ifname):
showDef($ifinfo['mtu'], gettext("MTU"), $ifinfo['mtu']);
showDef($ifinfo['media'], gettext("Media"), $ifinfo['media']);
showDef($ifinfo['laggproto'], gettext("LAGG Protocol"), $ifinfo['laggproto']);
- showDef($ifinfo['laggport'],gettext("LAGG Ports"),$laggport);
- showDef($ifinfo['channel'],gettext("Channel"),$ifinfo['channel']);
- showDef($ifinfo['ssid'],gettext("SSID"),$ifinfo['ssid']);
- showDef($ifinfo['bssid'],gettext("BSSID"),$ifinfo['bssid']);
- showDef($ifinfo['rate'],gettext("Rate"),$ifinfo['rate']);
- showDef($ifinfo['rssi'],gettext("RSSI"),$ifinfo['rssi']);
- showDef(true,gettext("In/out packets"),$ifinfo['inpkts'] . '/' . $ifinfo['outpkts']);
- showDef(true,gettext("In/out packets (pass)"),$ifinfo['inpktspass'] . "/" . $ifinfo['outpktspass']);
- showDef(true,gettext("In/out packets (block)"),$ifinfo['inpktsblock'] . "/" . $ifinfo['outpktsblock']);
- showDef(isset($ifinfo['inerrs']),gettext("In/out errors"),$ifinfo['inerrs'] . "/" . $ifinfo['outerrs']);
- showDef(isset($ifinfo['collisions']),gettext("Collisions"),$ifinfo['collisions']);
+ showDef($ifinfo['laggport'], gettext("LAGG Ports"), $laggport);
+ showDef($ifinfo['channel'], gettext("Channel"), $ifinfo['channel']);
+ showDef($ifinfo['ssid'], gettext("SSID"), $ifinfo['ssid']);
+ showDef($ifinfo['bssid'], gettext("BSSID"), $ifinfo['bssid']);
+ showDef($ifinfo['rate'], gettext("Rate"), $ifinfo['rate']);
+ showDef($ifinfo['rssi'], gettext("RSSI"), $ifinfo['rssi']);
+ showDef(true, gettext("In/out packets"), $ifinfo['inpkts'] . '/' . $ifinfo['outpkts']);
+ showDef(true, gettext("In/out packets (pass)"), $ifinfo['inpktspass'] . "/" . $ifinfo['outpktspass']);
+ showDef(true, gettext("In/out packets (block)"), $ifinfo['inpktsblock'] . "/" . $ifinfo['outpktsblock']);
+ showDef(isset($ifinfo['inerrs']), gettext("In/out errors"), $ifinfo['inerrs'] . "/" . $ifinfo['outerrs']);
+ showDef(isset($ifinfo['collisions']), gettext("Collisions"), $ifinfo['collisions']);
} // e-o-if ($ifinfo['status'] != "down")
showDef($ifinfo['bridge'], gettext('Bridge (') . $ifinfo['bridgeint'] . ')', $ifinfo['bridge']);
- if(file_exists("/usr/bin/vmstat")) {
+ if (file_exists("/usr/bin/vmstat")) {
$real_interface = "";
$interrupt_total = "";
$interrupt_sec = "";
@@ -193,7 +193,7 @@ foreach ($ifdescrs as $ifdescr => $ifname):
$interrupt_total = `vmstat -i | grep $real_interface | awk '{ print $3 }'`;
$interrupt_sec = `vmstat -i | grep $real_interface | awk '{ print $4 }'`;
- if(strstr($interrupt_total, "hci")) {
+ if (strstr($interrupt_total, "hci")) {
$interrupt_total = `vmstat -i | grep $real_interface | awk '{ print $4 }'`;
$interrupt_sec = `vmstat -i | grep $real_interface | awk '{ print $5 }'`;
}
OpenPOWER on IntegriCloud