repeaters -> links

cleanup
kc1awv 2020-10-27 17:18:12 -04:00
parent 4c974875c8
commit 0cde3fc20e
3 changed files with 12 additions and 12 deletions

View File

@ -27,10 +27,10 @@ $PageOptions['PageRefreshActive'] = true;
$PageOptions['PageRefreshDelay'] = '10000'; // Page refresh time in miliseconds
$PageOptions['RepeatersPage'] = array();
$PageOptions['RepeatersPage']['LimitTo'] = 99; // Number of Repeaters to show
$PageOptions['RepeatersPage']['IPModus'] = 'ShowLast2ByteOfIP'; // See possible options above
$PageOptions['RepeatersPage']['MasqueradeCharacter'] = '*'; // Character used for masquerade
$PageOptions['LinksPage'] = array();
$PageOptions['LinksPage']['LimitTo'] = 99; // Number of Links to show
$PageOptions['LinksPage']['IPModus'] = 'ShowLast2ByteOfIP'; // See possible options above
$PageOptions['LinksPage']['MasqueradeCharacter'] = '*'; // Character used for masquerade
$PageOptions['PeerPage'] = array();

View File

@ -9,7 +9,7 @@
<th>Protocol</th>
<th>Module</th><?php
if ($PageOptions['RepeatersPage']['IPModus'] != 'HideIP') {
if ($PageOptions['LinksPage']['IPModus'] != 'HideIP') {
echo '
<th>IP</th>';
}
@ -53,12 +53,12 @@ for ($i=0;$i<$Reflector->NodeCount();$i++) {
<td>'.FormatSeconds(time()-$Reflector->Nodes[$i]->GetConnectTime()).' s</td>
<td>'.$Reflector->Nodes[$i]->GetProtocol().'</td>
<td>'.$Reflector->Nodes[$i]->GetLinkedModule().'</td>';
if ($PageOptions['RepeatersPage']['IPModus'] != 'HideIP') {
if ($PageOptions['LinksPage']['IPModus'] != 'HideIP') {
echo '<td>';
$Bytes = explode(".", $Reflector->Nodes[$i]->GetIP());
$MC = $PageOptions['RepeatersPage']['MasqueradeCharacter'];
$MC = $PageOptions['LinksPage']['MasqueradeCharacter'];
if ($Bytes !== false && count($Bytes) == 4) {
switch ($PageOptions['RepeatersPage']['IPModus']) {
switch ($PageOptions['LinksPage']['IPModus']) {
case 'ShowLast1ByteOfIP':
echo $MC.'.'.$MC.'.'.$MC.'.'.$Bytes[3];
break;
@ -85,7 +85,7 @@ for ($i=0;$i<$Reflector->NodeCount();$i++) {
echo '</td>';
}
echo '</tr>';
if ($i == $PageOptions['RepeatersPage']['LimitTo']) { $i = $Reflector->NodeCount()+1; }
if ($i == $PageOptions['LinksPage']['LimitTo']) { $i = $Reflector->NodeCount()+1; }
}
?>

View File

@ -108,7 +108,7 @@ $Reflector->LoadXML();
<div id="navbarCollapse" class="collapse navbar-collapse">
<ul class="navbar-nav mr-auto">
<li<?php echo (($_GET['show'] == "users") || ($_GET['show'] == "")) ? ' class="nav-item active"' : ''; ?>><a class="nav-link" href="./index.php">Last Heard</a></li>
<li<?php echo ($_GET['show'] == "repeaters") ? ' class="nav-item active"' : ''; ?>><a class="nav-link" href="./index.php?show=repeaters">Links (<?php echo $Reflector->NodeCount(); ?>)</a></li>
<li<?php echo ($_GET['show'] == "links") ? ' class="nav-item active"' : ''; ?>><a class="nav-link" href="./index.php?show=links">Links (<?php echo $Reflector->NodeCount(); ?>)</a></li>
</ul>
<span class="navbar-text px-2">mrefd v<?php echo $Reflector->GetVersion(); ?> - Dashboard v1.1.2 <?php echo $PageOptions['LocalModification']; ?></span>
<span class="navbar-text px-2">Service uptime: <?php echo FormatSeconds($Reflector->GetServiceUptime()); ?></span>
@ -122,8 +122,8 @@ $Reflector->LoadXML();
case 'users' :
require_once("./include/users.php");
break;
case 'repeaters' :
require_once("./include/repeaters.php");
case 'links' :
require_once("./include/links.php");
break;
default :
require_once("./include/users.php");