mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Crossbar fix on Cisco 6500/7600 devices (#9588)
* c6k crossbar intial commit * removed debug.. * style fixes * more style fixes * more style fixes * cc fix
This commit is contained in:
@@ -84,8 +84,8 @@ foreach ($entity_state['group']['c6kxbar'] as $index => $entry) {
|
||||
<td><span style='font-weight: bold;' class=".$fabric['mode_class'].'>'.$fabric['cc6kxbarModuleChannelFabStatus'].'</span></td>
|
||||
<td>'.formatRates(($fabric['cc6kxbarModuleChannelSpeed'] * 1000000)).'</td>
|
||||
<td>'.overlib_link($link, $minigraph, $overlib_content).'</td>
|
||||
<td>'.print_percentage_bar(125, 20, $percent_in, 'Ingress', 'ffffff', $background['left'], $percent_in.'%', 'ffffff', $background['right']).'</td>
|
||||
<td>'.print_percentage_bar(125, 20, $percent_out, 'Egress', 'ffffff', $background['left'], $percent_out.'%', 'ffffff', $background['right']).'</td>
|
||||
<td>'.print_percentage_bar(125, 20, $percent_in, 'Ingress', 'ffffff', $background_in['left'], $percent_in.'%', 'ffffff', $background_in['right']).'</td>
|
||||
<td>'.print_percentage_bar(125, 20, $percent_out, 'Egress', 'ffffff', $background_out['left'], $percent_out.'%', 'ffffff', $background_out['right']).'</td>
|
||||
</tr>');
|
||||
}//end if
|
||||
}//end foreach
|
||||
|
@@ -11,12 +11,24 @@ foreach (dbFetch('SELECT * FROM `entPhysical_state` WHERE `device_id` = ?', arra
|
||||
$entity['entPhysicalIndex'],
|
||||
$entity['subindex'],
|
||||
$entity['group'],
|
||||
$entity['key'],
|
||||
$entity['key']
|
||||
)
|
||||
);
|
||||
} else {
|
||||
if ($entPhysical_state[$entity['entPhysicalIndex']][$entity['subindex']][$entity['group']][$entity['key']] != $entity['value']) {
|
||||
echo 'no match!';
|
||||
echo 'no match!' . ' ' . $entity['entPhysicalIndex'] . ' ' . $entity['subindex'] . ' ' . $entity['key'] . ': ' . $entPhysical_state[$entity['entPhysicalIndex']][$entity['subindex']][$entity['group']][$entity['key']] . ' ' . $entity['value'] . "\n";
|
||||
dbUpdate(
|
||||
array('value' => $entPhysical_state[$entity['entPhysicalIndex']][$entity['subindex']][$entity['group']][$entity['key']]),
|
||||
'entPhysical_state',
|
||||
'`device_id` = ? AND `entPhysicalIndex` = ? AND `subindex` = ? AND `group` = ? AND `key` = ?',
|
||||
array(
|
||||
$device['device_id'],
|
||||
$entity['entPhysicalIndex'],
|
||||
$entity['subindex'],
|
||||
$entity['group'],
|
||||
$entity['key']
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
unset($entPhysical_state[$entity['entPhysicalIndex']][$entity['subindex']][$entity['group']][$entity['key']]);
|
||||
|
Reference in New Issue
Block a user