Skip to content

Commit

Permalink
renderDataIntegrityReport: catch EntityNotFound exceptions (#1439)
Browse files Browse the repository at this point in the history
  • Loading branch information
adoom42 committed Mar 21, 2015
1 parent 45ab2f0 commit f2500a8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
1 change: 1 addition & 0 deletions ChangeLog
@@ -1,6 +1,7 @@
0.20.11
bugfix: Tag Picker does not display the full tag list as a tree (#1403)
bugfix: race conditions in 802.Q deploy (switch remained synced after recalc)
bugfix: catch EntityNotFound exceptions in data integrity report (#1439)
update: SNMP support for Cisco C2960-Plus series
update: ability to delete a VLAN keeping it in the VLAN ranges on 802.1Q ports
new feature: VLAN domain groups.
Expand Down
24 changes: 20 additions & 4 deletions wwwroot/inc/interface.php
Expand Up @@ -9350,9 +9350,17 @@ function renderDataIntegrityReport ()
foreach ($orphans as $orphan)
{
$realm_name = formatRealmName ($orphan['parent_entity_type']);
$parent = spotEntity ($orphan['parent_entity_type'], $orphan['parent_entity_id']);
try
{
$parent = spotEntity ($orphan['parent_entity_type'], $orphan['parent_entity_id']);
$parent_name = $parent['name'];
}
catch (EntityNotFoundException $e)
{
$parent_name = 'missing from DB';
}
echo "<tr class=row_${order}>";
echo "<td>${realm_name}: ${parent['name']}</td>";
echo "<td>${realm_name}: ${parent_name}</td>";
echo "<td>${orphan['child_entity_type']}</td>";
echo "<td>${orphan['child_entity_id']}</td>";
echo "</tr>\n";
Expand Down Expand Up @@ -9387,9 +9395,17 @@ function renderDataIntegrityReport ()
foreach ($orphans as $orphan)
{
$realm_name = formatRealmName ($orphan['child_entity_type']);
$child = spotEntity ($orphan['child_entity_type'], $orphan['child_entity_id']);
try
{
$child = spotEntity ($orphan['child_entity_type'], $orphan['child_entity_id']);
$child_name = $child['name'];
}
catch (EntityNotFoundException $e)
{
$child_name = 'missing from DB';
}
echo "<tr class=row_${order}>";
echo "<td>${realm_name}: ${child['name']}</td>";
echo "<td>${realm_name}: ${child_name}</td>";
echo "<td>${orphan['parent_entity_type']}</td>";
echo "<td>${orphan['parent_entity_id']}</td>";
echo "</tr>\n";
Expand Down

0 comments on commit f2500a8

Please sign in to comment.