From 9d4d46c72a644551661c8d848cca967cb186e68b Mon Sep 17 00:00:00 2001 From: Barry O'Donovan Date: Thu, 19 Aug 2021 14:18:59 +0100 Subject: [PATCH] [BF] Issue displaying private VLANs without a physical interface Thanks to @listerr for working through with me. --- .../views/customer/overview-tabs/private-vlans.foil.php | 7 ++++--- resources/views/vlan/private.foil.php | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/resources/views/customer/overview-tabs/private-vlans.foil.php b/resources/views/customer/overview-tabs/private-vlans.foil.php index f9dec4d8c..c2be81fab 100644 --- a/resources/views/customer/overview-tabs/private-vlans.foil.php +++ b/resources/views/customer/overview-tabs/private-vlans.foil.php @@ -32,10 +32,11 @@ $pv ): ?> virtualInterface->physicalInterfaces; - $switcher = $pis[ 0 ]->switchPort->switcher; - ?> + $switcher = $pis->count() ? $pis[ 0 ]->switchPort->switcher : null; + ?> ee( $vli->vlan->name )?> @@ -44,7 +45,7 @@ ee( $vli->vlan->number )?> - 0 ): ?> + count() ): ?> ee( $switcher->cabinet->location->name ) ?> diff --git a/resources/views/vlan/private.foil.php b/resources/views/vlan/private.foil.php index 144d4810a..b781ac167 100644 --- a/resources/views/vlan/private.foil.php +++ b/resources/views/vlan/private.foil.php @@ -79,12 +79,12 @@ interface details vlanInterfaces as $vli ): ?> - ee( $vli->virtualInterface->physicalInterfaces[ 0 ]->switchPort->switcher->cabinet->location->name ) ?>
+ virtualInterface->physicalInterfaces->count() ?: $t->ee( $vli->virtualInterface->physicalInterfaces[ 0 ]->switchPort->switcher->cabinet->location->name ) ?>
vlanInterfaces as $vli ): ?> - ee( $vli->virtualInterface->physicalInterfaces[ 0 ]->switchPort->switcher->name ) ?>
+ virtualInterface->physicalInterfaces->count() ?: $t->ee( $vli->virtualInterface->physicalInterfaces[ 0 ]->switchPort->switcher->name ) ?>