diff --git a/app/Http/Controllers/Api/V4/VlanController.php b/app/Http/Controllers/Api/V4/VlanController.php index 52d7bbd7e..adf1518f1 100644 --- a/app/Http/Controllers/Api/V4/VlanController.php +++ b/app/Http/Controllers/Api/V4/VlanController.php @@ -87,7 +87,6 @@ public function getIPAddresses( Request $request, int $id ) : JsonResponse { * * @see VlanEntity::usedAcrossVlans() for array structure. * - * @param string $ipAddress The IP address to check * @return JsonResponse array of object */ public function usedAcrossVlans( Request $request ) : JsonResponse { diff --git a/app/Http/Controllers/Interfaces/CoreBundleController.php b/app/Http/Controllers/Interfaces/CoreBundleController.php index b0fb113de..291421e40 100644 --- a/app/Http/Controllers/Interfaces/CoreBundleController.php +++ b/app/Http/Controllers/Interfaces/CoreBundleController.php @@ -216,6 +216,7 @@ public function storeWizard( StoreCoreBundle $request ): RedirectResponse { } foreach( [ 'a' => $via , 'b' => $vib ] as $side => $vi ){ + /** @var $vi VirtualInterfaceEntity */ // Set value to the Virtual Interface side A and B $vi->setCustomer( $cust ); $vi->setMtu( $request->input( "mtu" ) ); @@ -223,6 +224,11 @@ public function storeWizard( StoreCoreBundle $request ): RedirectResponse { $vi->setChannelgroup( $request->input( "vi-channel-number-$side" ) ); $vi->setTrunk( $request->input( 'framing' ) ?? false ); $vi->setFastLACP( $request->input( 'fast-lacp' ) ?? false ); + + if( $request->input( "type" ) == CoreBundleEntity::TYPE_L2_LAG ){ + $vi->setLagFraming( true ); + } + } // CHeck if there is at least 1 core link created for the core bundle diff --git a/app/Http/Controllers/RouterController.php b/app/Http/Controllers/RouterController.php index 95594bacb..350435bda 100644 --- a/app/Http/Controllers/RouterController.php +++ b/app/Http/Controllers/RouterController.php @@ -111,7 +111,7 @@ public function edit( int $id = null ): View { // fill the form with router data Former::populate([ 'handle' => array_key_exists( 'handle', $old ) ? $old['handle'] : $rt->getHandle(), - 'vlan' => array_key_exists( 'vlan', $old ) ? $old['vlan'] : $rt->getVlan(), + 'vlan' => array_key_exists( 'vlan', $old ) ? $old['vlan'] : $rt->getVlan()->getId(), 'protocol' => array_key_exists( 'protocol', $old ) ? $old['protocol'] : $rt->getProtocol(), 'type' => array_key_exists( 'type', $old ) ? $old['type'] : $rt->getType(), 'name' => array_key_exists( 'name', $old ) ? $old['name'] : $rt->getName(), diff --git a/database/Proxies/__CG__EntitiesCustomerTag.php b/database/Proxies/__CG__EntitiesCustomerTag.php index 61c36d03a..5b8d28b76 100644 --- a/database/Proxies/__CG__EntitiesCustomerTag.php +++ b/database/Proxies/__CG__EntitiesCustomerTag.php @@ -220,7 +220,7 @@ public function setDisplayAs(string $display_as): \Entities\CustomerTag /** * {@inheritDoc} */ - public function getDescription(): string + public function getDescription() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getDescription', []); @@ -231,7 +231,7 @@ public function getDescription(): string /** * {@inheritDoc} */ - public function setDescription(string $description): \Entities\CustomerTag + public function setDescription($description): \Entities\CustomerTag { $this->__initializer__ && $this->__initializer__->__invoke($this, 'setDescription', [$description]); diff --git a/resources/views/customer/overview-tabs/logins.foil.php b/resources/views/customer/overview-tabs/logins.foil.php index e82626a09..075b11508 100644 --- a/resources/views/customer/overview-tabs/logins.foil.php +++ b/resources/views/customer/overview-tabs/logins.foil.php @@ -15,9 +15,14 @@ c->getUsers() as $u ): ?> - getContact()->getId() . "/cid/". $u->getCustomer()->getId() ) ?>"> + getContact() ): ?> + getContact()->getId() . "/cid/". $u->getCustomer()->getId() ) ?>"> + ee ( $u->getUsername() ) ?> + + + ee ( $u->getUsername() ) ?> - + ee( $u->getEmail() ) ?> diff --git a/resources/views/customer/overview-tabs/ports/port.foil.php b/resources/views/customer/overview-tabs/ports/port.foil.php index 4be546fed..a7f6dc6d0 100644 --- a/resources/views/customer/overview-tabs/ports/port.foil.php +++ b/resources/views/customer/overview-tabs/ports/port.foil.php @@ -320,9 +320,6 @@ vi->isTypePeering() ): ?>

No VLAN interfaces defined. - isSuperUser() ): ?> - $t->vi->getId() ] ) ?>">Add one... -

diff --git a/resources/views/customer/overview-tabs/users.foil.php b/resources/views/customer/overview-tabs/users.foil.php index d14b6b62b..e54cba99f 100644 --- a/resources/views/customer/overview-tabs/users.foil.php +++ b/resources/views/customer/overview-tabs/users.foil.php @@ -46,7 +46,7 @@ - diff --git a/resources/views/interfaces/common/vli/ipv4.foil.php b/resources/views/interfaces/common/vli/ipv4.foil.php index ef9ba5d2c..7ba6a09d0 100644 --- a/resources/views/interfaces/common/vli/ipv4.foil.php +++ b/resources/views/interfaces/common/vli/ipv4.foil.php @@ -9,7 +9,7 @@ label( 'IPv4 Address' ) ->placeholder( 'Choose an IPv4 Address' ) - ->class( "chzn-select-deselect" ) + ->class( "chzn-select-deselect-tag" ) ->blockHelp( 'Select the IP address to assign to this VLAN interface. If empty, ensure you have selected a VLAN above and that the VLAN has available addresses. ' . 'You can also create a new IPv4 address by entering it here but please use clue as validation is minimal.'); ?> diff --git a/resources/views/interfaces/common/vli/ipv6.foil.php b/resources/views/interfaces/common/vli/ipv6.foil.php index 4e1b0dbd8..47337be06 100644 --- a/resources/views/interfaces/common/vli/ipv6.foil.php +++ b/resources/views/interfaces/common/vli/ipv6.foil.php @@ -9,7 +9,7 @@ label( 'IPv6 Address' ) ->placeholder( 'Choose an IPv6 Address' ) - ->class( "chzn-select-deselect" ) + ->class( "chzn-select-deselect-tag" ) ->blockHelp( 'Select the IP address to assign to this VLAN interface. If empty, ensure you have selected a VLAN above and that the VLAN has available addresses.' . 'You can also create a new IPv6 address by entering it here but please use clue as validation is minimal. Also ensure you use standard short form with lower case letters.' ); ?> diff --git a/resources/views/patch-panel-port/index.foil.php b/resources/views/patch-panel-port/index.foil.php index 579cec69c..57627fbb0 100644 --- a/resources/views/patch-panel-port/index.foil.php +++ b/resources/views/patch-panel-port/index.foil.php @@ -22,10 +22,10 @@
pp ): ?> - + - + diff --git a/resources/views/patch-panel-port/js/action-dd.foil.php b/resources/views/patch-panel-port/js/action-dd.foil.php index 8bb74143a..b1fd0bcab 100644 --- a/resources/views/patch-panel-port/js/action-dd.foil.php +++ b/resources/views/patch-panel-port/js/action-dd.foil.php @@ -223,15 +223,17 @@ function popup( pppId, action, url ) { function uploadPopup( pppid ){ - let html = '
/' + pppid + '" enctype="multipart/form-data">' + - '
Drop Files Here  ' + - ' ' + - ' Browse
' + - ' (max size maxFileUploadSize() ?> ' + - ' ' + - '
' + - '' + - '
'; + + let html = `
+
Drop Files Here   + + Browse
+ (max size maxFileUploadSize() ?> + +
+ +
`; + let dialog = bootbox.dialog({ message: html, @@ -291,9 +293,9 @@ function uploadPopup( pppid ){ tpl.addClass( 'success' ); tpl.attr( 'id','uploaded-file-' + result.id ); tpl.find( 'span' ).addClass( 'success' ); - tpl.append( '' ); - tpl.append( '' ); - tpl.find('p').append( '' + result.message + '' ); + tpl.append( `` ); + tpl.append( `` ); + tpl.find('p').append( `${result.message}` ); $('#uploaded-file-toggle-private-' + result.id).on( 'click', toggleFilePrivacy ); $('#uploaded-file-delete-' + result.id).on( 'click', deleteFile ); diff --git a/resources/views/patch-panel-port/js/edit.foil.php b/resources/views/patch-panel-port/js/edit.foil.php index fa0a98e63..7d708e859 100644 --- a/resources/views/patch-panel-port/js/edit.foil.php +++ b/resources/views/patch-panel-port/js/edit.foil.php @@ -93,7 +93,7 @@ * set data to the switch dropdown related to the customer selected */ dd_customer.change( function(){ - dd_switch.html( "\n" ).trigger('change.select2'); + dd_switch.html( `` ).trigger('change.select2'); dd_switch_port.html("").trigger('change.select2'); let customerId = dd_customer.val(); @@ -107,9 +107,9 @@ }) .done( function( data ) { if( data.switchesFound ){ - let options = "\n"; + let options = ``; $.each( data.switches, function( key, value ){ - options += "\n"; + options += ``; }); dd_switch.html( options ); } @@ -131,11 +131,11 @@ */ $( ".reset-btn" ).click( function(){ let $switch; - let options = "\n"; + let options = ``; switches as $id => $switch ): ?> - $switch = ''; - options += "\n"; + $switch = ``; + options += ``; dd_switch.html( options ).trigger('change.select2'); @@ -164,7 +164,7 @@ function setSwitchPort(){ let spOption = false; let spOptionset = false; - dd_switch_port.html( "\n" ).trigger('change.select2'); + dd_switch_port.html( `` ).trigger('change.select2'); prewired): ?> url = "/" + switchId + "/switch-port-prewired"; @@ -277,12 +277,12 @@ function setSwitchPort(){ function setCustomer(){ if( dd_switch.val() != ''){ let switchPortId = dd_switch_port.val(); - dd_customer.html( "\n" ); + dd_customer.html( `` ); dd_customer.trigger('change.select2'); $.ajax( "/" + switchPortId + "/customer" ) .done( function( data ) { if( data.customerFound ) { - dd_customer.html( '\n" ); + dd_customer.html( `` ); } else { dd_customer.html(""); } @@ -305,8 +305,8 @@ function resetCustomer(){ let options = "\n"; customers as $id => $customer ): ?> - customer = ''; - options += "\n"; + customer = ``; + options += ``; dd_customer.html( options ).trigger('change.select2'); } diff --git a/resources/views/patch-panel-port/js/move.foil.php b/resources/views/patch-panel-port/js/move.foil.php index 15579f8c3..efd610c8d 100644 --- a/resources/views/patch-panel-port/js/move.foil.php +++ b/resources/views/patch-panel-port/js/move.foil.php @@ -43,9 +43,9 @@ function setPPP(){ type: 'POST' }) .done( function( data ) { - let options = "\n"; + let options = ``; $.each( data.listPorts, function( key, value ){ - options += "\n"; + options += ``; }); dd_master.html( options ); ppp->hasSlavePort() ): ?> diff --git a/routes/apiv4.php b/routes/apiv4.php index 1d3df3195..1312f333d 100644 --- a/routes/apiv4.php +++ b/routes/apiv4.php @@ -90,27 +90,28 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // ASN Number // -Route::get( 'aut-num/{asn}', function( $asn) { - return response()->json( Cache::remember('aut-num', 120, function() use( $asn ) { - $infos = []; - if( $values = file_get_contents("https://rest.db.ripe.net/ripe/aut-num/". $asn . ".json" ) ) { - $i = 0; - - foreach( json_decode( $values)->objects->object[0]->attributes->attribute as $val ) { - $infos[ $i ][ 'name' ] = $val->name; - $infos[ $i ][ 'value' ] = $val->value; - if( isset( $val->link ) ){ - $infos[ $i ][ 'link' ] = $val->link->href; - } +Route::get( 'aut-num/{asn}', function( $asn ) { - if( isset( $val->comment ) ){ - $infos[ $i ][ 'comment' ] = $val->comment; - } + $infos = []; + + if( $values = file_get_contents("https://rest.db.ripe.net/ripe/aut-num/". $asn . ".json" ) ) { + $i = 0; + + foreach( json_decode( $values)->objects->object[0]->attributes->attribute as $val ) { + $infos[ $i ][ 'name' ] = $val->name; + $infos[ $i ][ 'value' ] = $val->value; + if( isset( $val->link ) ){ + $infos[ $i ][ 'link' ] = $val->link->href; + } - $i++; + if( isset( $val->comment ) ){ + $infos[ $i ][ 'comment' ] = $val->comment; } + + $i++; } - return $infos; - })); + } + + return response()->json( $infos ); })->name('api-v4-aut-num');