cosmetic change to print channel type for ADSL

git-svn-id: http://www.observium.org/svn/observer/trunk@1994 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-03-30 12:07:08 +00:00
parent 463b0753a6
commit d302d1a4ce
3 changed files with 24 additions and 4 deletions

View File

@ -142,4 +142,4 @@ if ($graph_type && is_file($graph_file))
} }
?> ?>

View File

@ -101,7 +101,7 @@ if ($device['os'] == "ios" || $device['os'] == "iosxe")
if ($port_adsl['adslLineCoding']) if ($port_adsl['adslLineCoding'])
{ {
echo("</td><td width=150>"); echo("</td><td width=150>");
echo($port_adsl['adslLineCoding']."/".$port_adsl['adslLineType']); echo($port_adsl['adslLineCoding']."/" . rewrite_adslLineType($port_adsl['adslLineType']));
echo("<br />"); echo("<br />");
echo("Sync:".formatRates($port_adsl['adslAtucChanCurrTxRate']) . "/". formatRates($port_adsl['adslAturChanCurrTxRate'])); echo("Sync:".formatRates($port_adsl['adslAtucChanCurrTxRate']) . "/". formatRates($port_adsl['adslAturChanCurrTxRate']));
echo("<br />"); echo("<br />");
@ -274,4 +274,4 @@ if ($graph_type && is_file($graph_file))
} }
?> ?>

View File

@ -950,4 +950,24 @@ function array_preg_replace($array, $string)
return $string; return $string;
} }
?>
function rewrite_adslLineType($adslLineType)
{
$adslLineTypes = array ('noChannel' => 'No Channel',
'fastOnly' => 'Fastpath',
'interleavedOnly' => 'Interleaved',
'fastOrInterleaved' => 'Fast/Interleaved',
'fastAndInterleaved' => 'Fast+Interleaved');
foreach($adslLineTypes as $type => $text)
{
if($adslLineType == $type)
{
$adslLineType = $text;
}
}
return($adslLineType);
}
?>