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:
twelch24
2019-01-05 13:34:53 -06:00
committed by Tony Murray
parent ae29d43af0
commit 506f48d3fe
2 changed files with 16 additions and 4 deletions

View File

@@ -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

View File

@@ -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']]);