diff --git a/includes/html/graphs/c6kxbar/auth.inc.php b/includes/html/graphs/c6kxbar/auth.inc.php deleted file mode 100644 index c87e5957a0..0000000000 --- a/includes/html/graphs/c6kxbar/auth.inc.php +++ /dev/null @@ -1,14 +0,0 @@ -shortDisplayName() . '::' . $entity['entPhysicalName'] . '::Fabric' . $vars['chan']; - - $rrd_filename = Rrd::name($device['hostname'], ['c6kxbar', $vars['mod'], $vars['chan']]); -} diff --git a/includes/html/graphs/c6kxbar/util.inc.php b/includes/html/graphs/c6kxbar/util.inc.php deleted file mode 100644 index 4518228711..0000000000 --- a/includes/html/graphs/c6kxbar/util.inc.php +++ /dev/null @@ -1,17 +0,0 @@ - -
-
-
'; -echo ''; -echo ' Catalyst 6k Crossbar'; -echo '
- '; - -if (! isset($entity_state)) { - $entity_state = get_dev_entity_state($device['device_id']); -} -foreach ($entity_state['group']['c6kxbar'] as $index => $entry) { - // FIXME i'm not sure if this is the correct way to decide what entphysical index it is. slotnum+1? :> - $entity = dbFetchRow('SELECT * FROM entPhysical WHERE device_id = ? AND entPhysicalIndex = ?', [$device['device_id'], $index + 1]); - - echo " - - - '; - - foreach ($entity_state['group']['c6kxbar'][$index] as $subindex => $fabric) { - if (is_numeric($subindex)) { - if ($fabric['cc6kxbarModuleChannelFabStatus'] == 'ok') { - $fabric['mode_class'] = 'green'; - } else { - $fabric['mode_class'] = 'red'; - } - - $percent_in = $fabric['cc6kxbarStatisticsInUtil']; - $background_in = \LibreNMS\Util\Color::percentage($percent_in, null); - - $percent_out = $fabric['cc6kxbarStatisticsOutUtil']; - $background_out = \LibreNMS\Util\Color::percentage($percent_out, null); - - $graph_array = []; - $graph_array['height'] = '100'; - $graph_array['width'] = '210'; - $graph_array['to'] = \LibreNMS\Config::get('time.now'); - $graph_array['device'] = $device['device_id']; - $graph_array['mod'] = $index; - $graph_array['chan'] = $subindex; - $graph_array['type'] = 'c6kxbar_util'; - $graph_array['from'] = \LibreNMS\Config::get('time.day'); - $graph_array['legend'] = 'no'; - - $link_array = $graph_array; - $link_array['page'] = 'graphs'; - unset($link_array['height'], $link_array['width'], $link_array['legend']); - $link = \LibreNMS\Util\Url::generate($link_array); - - $text_descr = $entity['entPhysicalName'] . ' - Fabric ' . $subindex; - - $overlib_content = generate_overlib_content($graph_array, $device['hostname'] . ' - ' . $text_descr); - - $graph_array['width'] = 80; - $graph_array['height'] = 20; - $graph_array['bg'] = 'ffffff00'; - // the 00 at the end makes the area transparent. - $minigraph = \LibreNMS\Util\Url::lazyGraphTag($graph_array); - - echo ' - - -
" . $entity['entPhysicalName'] . ""; - - switch ($entry['']['cc6kxbarModuleModeSwitchingMode']) { - case 'busmode': - // echo 'Bus'; - break; - - case 'crossbarmode': - echo 'Crossbar'; - break; - - case 'dcefmode': - echo 'DCEF'; - break; - - default: - echo $entry['']['cc6kxbarModuleModeSwitchingMode']; - } - - echo '
Fabric ' . $subindex . " $entry) { - $group = 'c6kxbar'; - foreach ($entry as $key => $value) { - $subindex = null; - $entPhysical_state[$index][$subindex][$group][$key] = $value; - } -} - -$chan_stats = snmpwalk_cache_oid($device, 'cc6kxbarModuleChannelTable', [], 'CISCO-CAT6K-CROSSBAR-MIB'); -if (! empty($chan_stats)) { - $chan_stats = snmpwalk_cache_oid($device, 'cc6kxbarStatisticsTable', $chan_stats, 'CISCO-CAT6K-CROSSBAR-MIB'); -} - -foreach ($chan_stats as $index => $entry) { - [$index,$subindex] = explode('.', $index, 2); - $group = 'c6kxbar'; - foreach ($entry as $key => $value) { - $entPhysical_state[$index][$subindex][$group][$key] = $value; - } - - $rrd_name = ['c6kxbar', $index, $subindex]; - $rrd_def = RrdDefinition::make() - ->addDataset('inutil', 'GAUGE', 0, 100) - ->addDataset('oututil', 'GAUGE', 0, 100) - ->addDataset('outdropped', 'DERIVE', 0, 125000000000) - ->addDataset('outerrors', 'DERIVE', 0, 125000000000) - ->addDataset('inerrors', 'DERIVE', 0, 125000000000); - - $fields = [ - 'inutil' => $entry['cc6kxbarStatisticsInUtil'], - 'oututil' => $entry['cc6kxbarStatisticsOutUtil'], - 'outdropped' => $entry['cc6kxbarStatisticsOutDropped'], - 'outerrors' => $entry['cc6kxbarStatisticsOutErrors'], - 'inerrors' => $entry['cc6kxbarStatisticsInErrors'], - ]; - - $tags = compact('index', 'subindex', 'rrd_name', 'rrd_def'); - data_update($device, 'c6kxbar', $tags, $fields); -}//end foreach diff --git a/phpstan-baseline-deprecated.neon b/phpstan-baseline-deprecated.neon index f797ed5a2e..7a69673502 100644 --- a/phpstan-baseline-deprecated.neon +++ b/phpstan-baseline-deprecated.neon @@ -2456,14 +2456,6 @@ parameters: count: 1 path: includes/html/graphs/bill/historicbits.inc.php - - - message: """ - #^Call to deprecated function dbFetchRow\\(\\)\\: - Please use Eloquent instead; https\\://laravel\\.com/docs/eloquent$# - """ - count: 1 - path: includes/html/graphs/c6kxbar/auth.inc.php - - message: """ #^Call to deprecated function dbFetchRow\\(\\)\\: