mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Implement routing table raw output
This commit is contained in:
parent
4d93834e28
commit
f0d1fe9b84
@ -55,3 +55,14 @@ function getRouteInfo($checkAccess)
|
|||||||
return $rInfo;
|
return $rInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Fetches raw output of ip route
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function getRouteInfoRaw()
|
||||||
|
{
|
||||||
|
exec('ip route list', $routes);
|
||||||
|
return $routes;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@ function DisplayNetworkingConfig()
|
|||||||
|
|
||||||
exec("ls /sys/class/net | grep -v lo", $interfaces);
|
exec("ls /sys/class/net | grep -v lo", $interfaces);
|
||||||
$routeInfo = getRouteInfo(true);
|
$routeInfo = getRouteInfo(true);
|
||||||
|
$routeInfoRaw = getRouteInfoRaw();
|
||||||
$arrHostapdConf = parse_ini_file(RASPI_CONFIG.'/hostapd.ini');
|
$arrHostapdConf = parse_ini_file(RASPI_CONFIG.'/hostapd.ini');
|
||||||
$bridgedEnabled = $arrHostapdConf['BridgedEnable'];
|
$bridgedEnabled = $arrHostapdConf['BridgedEnable'];
|
||||||
|
|
||||||
@ -21,6 +22,7 @@ function DisplayNetworkingConfig()
|
|||||||
"status",
|
"status",
|
||||||
"interfaces",
|
"interfaces",
|
||||||
"routeInfo",
|
"routeInfo",
|
||||||
|
"routeInfoRaw",
|
||||||
"bridgedEnabled")
|
"bridgedEnabled")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
@ -679,6 +679,12 @@ msgstr "Error saving network configuration to file"
|
|||||||
msgid "Unable to detect interface"
|
msgid "Unable to detect interface"
|
||||||
msgstr "Unable to detect interface"
|
msgstr "Unable to detect interface"
|
||||||
|
|
||||||
|
msgid "Routing table"
|
||||||
|
msgstr "Routing table"
|
||||||
|
|
||||||
|
msgid "raw output"
|
||||||
|
msgstr "raw output"
|
||||||
|
|
||||||
#: includes/system.php
|
#: includes/system.php
|
||||||
msgid "System Information"
|
msgid "System Information"
|
||||||
msgstr "System Information"
|
msgstr "System Information"
|
||||||
|
@ -55,6 +55,29 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<h4 class="mt-3"><?php echo _("Routing table"); ?></h4>
|
||||||
|
<div class="card h-100 w-100">
|
||||||
|
<div class="card-header"><?php echo _("raw output") ?></div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table">
|
||||||
|
<tbody>
|
||||||
|
<?php foreach($routeInfoRaw as $route): ?>
|
||||||
|
<tr>
|
||||||
|
<pre class="unstyled"><?php echo $route; ?></pre>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<h4 class="mt-3"><?php echo _("Current settings") ?></h4>
|
<h4 class="mt-3"><?php echo _("Current settings") ?></h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<?php if (!$bridgedEnabled) : // No interface details when bridged ?>
|
<?php if (!$bridgedEnabled) : // No interface details when bridged ?>
|
||||||
|
Loading…
Reference in New Issue
Block a user