Skip to content

Commit

Permalink
[BF] Issue displaying private VLANs without a physical interface
Browse files Browse the repository at this point in the history
Thanks to @listerr for working through with me.
  • Loading branch information
barryo committed Aug 19, 2021
1 parent 2fbdee0 commit 9d4d46c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions resources/views/customer/overview-tabs/private-vlans.foil.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@
<tbody>
<?php foreach( $pvlans as $vlanid => $pv ): ?>
<?php foreach( $pv[ "vlis" ] as $vli ):

/** @var $vli \IXP\Models\VlanInterface */
$pis = $vli->virtualInterface->physicalInterfaces;
$switcher = $pis[ 0 ]->switchPort->switcher;
?>
$switcher = $pis->count() ? $pis[ 0 ]->switchPort->switcher : null;
?>
<tr>
<td>
<?= $t->ee( $vli->vlan->name )?>
Expand All @@ -44,7 +45,7 @@
<?= $t->ee( $vli->vlan->number )?>
</td>

<?php if( count( $pis ) > 0 ): ?>
<?php if( $pis->count() ): ?>
<td>
<?= $t->ee( $switcher->cabinet->location->name ) ?>
</td>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/vlan/private.foil.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ interface details
</td>
<td>
<?php foreach( $row->vlanInterfaces as $vli ): ?>
<?= $t->ee( $vli->virtualInterface->physicalInterfaces[ 0 ]->switchPort->switcher->cabinet->location->name ) ?><br />
<?= !$vli->virtualInterface->physicalInterfaces->count() ?: $t->ee( $vli->virtualInterface->physicalInterfaces[ 0 ]->switchPort->switcher->cabinet->location->name ) ?><br />
<?php endforeach; ?>
</td>
<td>
<?php foreach( $row->vlanInterfaces as $vli ): ?>
<?= $t->ee( $vli->virtualInterface->physicalInterfaces[ 0 ]->switchPort->switcher->name ) ?><br />
<?= !$vli->virtualInterface->physicalInterfaces->count() ?: $t->ee( $vli->virtualInterface->physicalInterfaces[ 0 ]->switchPort->switcher->name ) ?><br />
<?php endforeach; ?>
</td>
</tr>
Expand Down

0 comments on commit 9d4d46c

Please sign in to comment.