Skip to content

Commit

Permalink
Fixes from live
Browse files Browse the repository at this point in the history
  • Loading branch information
barryo committed Aug 20, 2020
1 parent 263392b commit 01a63a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions app/Http/Middleware/Services/LookingGlass.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function handle($request, Closure $next )
$router = D2EM::getRepository( RouterEntity::class )->findOneBy( [ 'handle' => $request->handle ] );

if( !$router || !$router->hasApi() ) {
AlertContainer::push( "Handle not found", Alert::DANGER );
AlertContainer::push( "No router with the provided handle was found", Alert::DANGER );
return redirect( route( 'lg::index' ) );
}
} catch( RouterException $e ) {
Expand All @@ -118,8 +118,7 @@ public function handle($request, Closure $next )
}

if( ( $request->net || $request->mask ) && !$this->validateNetworkRoute( $request ) ) {
AlertContainer::push( "Invalid network prefix", Alert::DANGER );
return redirect( route( 'lg::bgp-sum', [ 'handle' => $request->handle ] ) );
abort(404);
}

// let's authorise for access (this throws an exception)
Expand Down
2 changes: 1 addition & 1 deletion resources/views/services/lg/bgp-summary.foil.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<?=$p->neighbor_address?>
</td>
<td class="pr-4">
<?= $t->ee( $p->description_short ) ?? $t->ee( $p->description ) ?? "" ?>
<?= ( $p->description_short ?? false ) ? $t->ee( $p->description_short ) : $t->ee( $p->description ?? "" ) ?>
</td>
<td class="text-right pr-4" data-order="<?= $p->neighbor_as ?>">
<?= $t->asNumber( $p->neighbor_as, false ) ?>
Expand Down

0 comments on commit 01a63a5

Please sign in to comment.