From 56852380cc8fef19fc59f1300391baa2585f5968 Mon Sep 17 00:00:00 2001 From: Anders Lowinger Date: Mon, 5 Oct 2020 02:51:21 +0200 Subject: [PATCH] Additional fix for Cisco Crossbar overview missing (#12185) * Additional fix for Cisco Crossbar overview missing * Fix code style --- includes/html/pages/device/overview.inc.php | 3 +++ includes/html/pages/device/overview/c6kxbar.inc.php | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/includes/html/pages/device/overview.inc.php b/includes/html/pages/device/overview.inc.php index c21cbd9a3a..5cd85a4e2b 100644 --- a/includes/html/pages/device/overview.inc.php +++ b/includes/html/pages/device/overview.inc.php @@ -34,6 +34,9 @@ require 'overview/processors.inc.php'; require 'overview/mempools.inc.php'; require 'overview/storage.inc.php'; +if (! isset($entity_state)) { + $entity_state = get_dev_entity_state($device['device_id']); +} if (is_array($entity_state['group']['c6kxbar'])) { require 'overview/c6kxbar.inc.php'; } diff --git a/includes/html/pages/device/overview/c6kxbar.inc.php b/includes/html/pages/device/overview/c6kxbar.inc.php index 566e029e14..0bec7ef6ee 100644 --- a/includes/html/pages/device/overview/c6kxbar.inc.php +++ b/includes/html/pages/device/overview/c6kxbar.inc.php @@ -10,7 +10,9 @@ echo ' C echo ' '; -$entity_state = get_dev_entity_state($device['device_id']); +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]);