Showing with 1,390 additions and 1,155 deletions.
  1. +2 −0 .gitignore
  2. +2 −0 .idea/IXP-Manager.iml
  3. +19 −1 .idea/php.xml
  4. +4 −0 .phpstorm.meta.php/laravel.meta.php
  5. +31 −31 _ide_helper.php
  6. +5 −2 app/Http/Controllers/PatchPanel/Port/PortController.php
  7. +28 −1 app/Http/Controllers/RouterController.php
  8. +1 −1 app/Http/Requests/StoreRouter.php
  9. +1 −1 app/Models/Aggregators/ContactGroupAggregator.php
  10. +30 −30 app/Models/Aggregators/CustomerAggregator.php
  11. +8 −5 app/Models/Aggregators/PatchPanelPortAggregator.php
  12. +1 −1 app/Models/Aggregators/RouterAggregator.php
  13. +6 −6 app/Models/Aggregators/SwitcherAggregator.php
  14. +6 −10 app/Models/Aggregators/UserAggregator.php
  15. +4 −4 app/Models/Aggregators/VirtualInterfaceAggregator.php
  16. +9 −9 app/Models/Aggregators/VlanAggregator.php
  17. +1 −1 app/Models/Aggregators/VlanInterfaceAggregator.php
  18. +1 −1 app/Models/AtlasRun.php
  19. +4 −4 app/Models/Cabinet.php
  20. +1 −1 app/Models/ConsoleServer.php
  21. +5 −5 app/Models/Contact.php
  22. +1 −1 app/Models/ContactGroup.php
  23. +1 −1 app/Models/CoreBundle.php
  24. +30 −30 app/Models/Customer.php
  25. +1 −1 app/Models/CustomerTag.php
  26. +2 −2 app/Models/CustomerToUser.php
  27. +2 −2 app/Models/DocstoreCustomerDirectory.php
  28. +2 −2 app/Models/DocstoreDirectory.php
  29. +1 −1 app/Models/DocstoreFile.php
  30. +2 −2 app/Models/Infrastructure.php
  31. +1 −1 app/Models/IrrdbConfig.php
  32. +1 −1 app/Models/Location.php
  33. +0 −2 app/Models/Logo.php
  34. +2 −4 app/Models/PatchPanel.php
  35. +4 −4 app/Models/PatchPanelPort.php
  36. +1 −1 app/Models/PatchPanelPortHistory.php
  37. +2 −2 app/Models/PhysicalInterface.php
  38. +1 −1 app/Models/Router.php
  39. +2 −2 app/Models/SwitchPort.php
  40. +6 −6 app/Models/Switcher.php
  41. +6 −10 app/Models/User.php
  42. +2 −2 app/Models/Vendor.php
  43. +4 −4 app/Models/VirtualInterface.php
  44. +9 −9 app/Models/Vlan.php
  45. +1 −1 app/Models/VlanInterface.php
  46. +18 −4 app/Services/Grapher/Backend/Mrtg.php
  47. +6 −5 composer.json
  48. +1,052 −883 composer.lock
  49. +1 −1 data/ci/known-good/ci-apiv4-as112-lan1-ipv4.conf
  50. +1 −1 data/ci/known-good/ci-apiv4-as112-lan1-ipv6.conf
  51. +1 −1 data/ci/known-good/ci-apiv4-as112-lan2-ipv4.conf
  52. +1 −1 data/ci/known-good/ci-apiv4-as112-lan2-ipv6.conf
  53. +0 −3 data/ci/known-good/ci-apiv4-b2-rc1-lan1-ipv4.conf
  54. +0 −2 data/ci/known-good/ci-apiv4-b2-rc1-lan1-ipv6.conf
  55. +0 −1 data/ci/known-good/ci-apiv4-b2-rs1-lan1-ipv6.conf
  56. +14 −14 data/ci/known-good/ci-services-grapher-mrtg.conf
  57. +3 −2 public/vendor/telescope/app-dark.css
  58. +1 −1 public/vendor/telescope/app.css
  59. +1 −1 public/vendor/telescope/app.js
  60. +3 −3 public/vendor/telescope/mix-manifest.json
  61. +1 −1 resources/views/api/v4/router/as112/bird/header.foil.php
  62. +0 −2 resources/views/api/v4/router/collector/bird2/neighbors.foil.php
  63. +3 −1 resources/views/api/v4/router/server/bird2/community-filter.foil.php
  64. +0 −3 resources/views/api/v4/router/server/bird2/neighbor-template.foil.php
  65. +2 −0 resources/views/api/v4/router/server/bird2/neighbors.foil.php
  66. +1 −1 resources/views/console-server-connection/list-preamble.foil.php
  67. +2 −2 resources/views/console-server-connection/page-header-preamble.foil.php
  68. +1 −1 resources/views/contact/edit-form.foil.php
  69. +2 −2 resources/views/contact/page-header-preamble.foil.php
  70. +1 −1 resources/views/customer/overview.foil.php
  71. +2 −2 resources/views/customer/tag/cust.foil.php
  72. +4 −4 resources/views/log/view.foil.php
  73. +10 −0 resources/views/patch-panel/index.foil.php
  74. +1 −1 tests/Services/Grapher/Graph/Access/Web/P2pWebAccessTest.php
  75. +1 −1 tests/Services/Grapher/Graph/Access/Web/PhysicalInterfaceWebAccessTest.php
  76. +1 −1 tests/Services/Grapher/Graph/Access/Web/VirtualInterfaceWebAccessTest.php
  77. +1 −1 tests/Services/Grapher/Renderer/Extensions/GrapherTest.php
  78. +2 −2 version.php
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,5 @@ tools/docker/containers/mysql/docker.sql
.phpunit.result.cache

tests/Browser/ExampleTest.php
app/Console/Commands/Redcentric.php
.env.sage
2 changes: 2 additions & 0 deletions .idea/IXP-Manager.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 19 additions & 1 deletion .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .phpstorm.meta.php/laravel.meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -2618,6 +2618,10 @@
]));


override(\Illuminate\Foundation\Testing\Concerns\InteractsWithContainer::mock(0), map(["" => "@&\Mockery\MockInterface"]));
override(\Illuminate\Foundation\Testing\Concerns\InteractsWithContainer::partialMock(0), map(["" => "@&\Mockery\MockInterface"]));
override(\Illuminate\Foundation\Testing\Concerns\InteractsWithContainer::instance(0), type(1));
override(\Illuminate\Foundation\Testing\Concerns\InteractsWithContainer::spy(0), map(["" => "@&\Mockery\MockInterface"]));
override(\Illuminate\Support\Arr::add(0), type(0));
override(\Illuminate\Support\Arr::except(0), type(0));
override(\Illuminate\Support\Arr::first(0), elementType(0));
Expand Down
62 changes: 31 additions & 31 deletions _ide_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

/**
* A helper file for Laravel, to provide autocomplete information to your IDE
* Generated for Laravel 8.83.25.
* Generated for Laravel 8.83.27.
*
* This file should not be included in your code, only analyzed by your IDE!
*
Expand Down Expand Up @@ -3938,28 +3938,6 @@ public static function macroCall($method, $parameters)
{
/** @var \Illuminate\Cache\Repository $instance */
return $instance->macroCall($method, $parameters);
}
/**
* Remove all items from the cache.
*
* @return bool
* @static
*/
public static function flush()
{
/** @var \Illuminate\Cache\ArrayStore $instance */
return $instance->flush();
}
/**
* Get the cache key prefix.
*
* @return string
* @static
*/
public static function getPrefix()
{
/** @var \Illuminate\Cache\ArrayStore $instance */
return $instance->getPrefix();
}
/**
* Get a lock instance.
Expand All @@ -3972,7 +3950,7 @@ public static function getPrefix()
*/
public static function lock($name, $seconds = 0, $owner = null)
{
/** @var \Illuminate\Cache\ArrayStore $instance */
/** @var \Illuminate\Cache\NullStore $instance */
return $instance->lock($name, $seconds, $owner);
}
/**
Expand All @@ -3985,8 +3963,30 @@ public static function lock($name, $seconds = 0, $owner = null)
*/
public static function restoreLock($name, $owner)
{
/** @var \Illuminate\Cache\ArrayStore $instance */
/** @var \Illuminate\Cache\NullStore $instance */
return $instance->restoreLock($name, $owner);
}
/**
* Remove all items from the cache.
*
* @return bool
* @static
*/
public static function flush()
{
/** @var \Illuminate\Cache\NullStore $instance */
return $instance->flush();
}
/**
* Get the cache key prefix.
*
* @return string
* @static
*/
public static function getPrefix()
{
/** @var \Illuminate\Cache\NullStore $instance */
return $instance->getPrefix();
}

}
Expand Down Expand Up @@ -9605,12 +9605,12 @@ public static function createFromBase($request)
* Clones a request and overrides some of its parameters.
*
* @return static
* @param array $query The GET parameters
* @param array $request The POST parameters
* @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...)
* @param array $cookies The COOKIE parameters
* @param array $files The FILES parameters
* @param array $server The SERVER parameters
* @param array|null $query The GET parameters
* @param array|null $request The POST parameters
* @param array|null $attributes The request attributes (parameters parsed from the PATH_INFO, ...)
* @param array|null $cookies The COOKIE parameters
* @param array|null $files The FILES parameters
* @param array|null $server The SERVER parameters
* @return static
* @static
*/
Expand Down
7 changes: 5 additions & 2 deletions app/Http/Controllers/PatchPanel/Port/PortController.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,19 @@ public function advancedIndex( Request $r ): View
$cabinet = is_numeric( $r->cabinet ) ? (int) $r->cabinet : 0;
$cabletype = is_numeric( $r->type ) ? (int) $r->type : 0;
$availableForUse = (bool) $r->available;
$prewiredOnly = (bool) $r->prewiredOnly;

$summary = "Filtered for: ";
$summary .= $location ? Location::find( $location )->name : 'all locations';
$summary .= ', ' . ( $cabinet ? Cabinet::find( $cabinet )->name : 'all cabinets' );
$summary .= ', ' . ( $cabletype ? PatchPanel::$CABLE_TYPES[ $cabletype ] : 'all cable types' );
$summary .= ( $availableForUse ? ', available for use.' : '.' );
$summary .= ( $availableForUse ? ', available for use' : '' );
$summary .= ( $prewiredOnly ? ', prewired only' : '' );
$summary .= '.';

return view( 'patch-panel-port/index' )->with([
'patchPanelPorts' => PatchPanelPortAggregator::list(
null, true, $location, $cabinet, $cabletype, $availableForUse
null, true, $location, $cabinet, $cabletype, $availableForUse, $prewiredOnly
),
'pp' => false,
'summary' => $summary,
Expand Down
29 changes: 28 additions & 1 deletion app/Http/Controllers/RouterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@ public function store( StoreRouter $r ): RedirectResponse
return Redirect::to( route( 'router@create' ) )->withInput( $r->all() );
}

Router::create( $r->all() );
$router = Router::create( $r->all() );

$this->checkASN32( $router );

AlertContainer::push( 'Router created.', Alert::SUCCESS );
return Redirect::to( route( "router@list" ) );
}
Expand Down Expand Up @@ -181,6 +184,9 @@ public function edit( Router $router ): View
public function update( StoreRouter $r, Router $router ): RedirectResponse
{
$router->update( $r->all() );

$this->checkASN32( $router );

AlertContainer::push( 'Router updated.', Alert::SUCCESS );
return Redirect::to( route( "router@list" ) );
}
Expand Down Expand Up @@ -214,4 +220,25 @@ public function delete( Router $router): RedirectResponse
AlertContainer::push( 'Router deleted.', Alert::SUCCESS );
return Redirect::to( route( "router@list" ) );
}

/**
* Warning about asn32's with route servers.
*
*
*
* @param Router $router
* @return void
*/
private function checkASN32( Router $router )
{
if( $router->type == Router::TYPE_ROUTE_SERVER && $router->asn > 65535 ) {
AlertContainer::push( 'You are strongly advised to use / request a dedicated 16-bit ASN from your RIR '
. 'for route server use and in our experience, all RIRs understand this and accommodate it. The route server '
. 'configurations will support an asn32 but to our knowledge, this has never been used in production. '
. 'Also, withouot an asn16, you will be unable to offer your members standard community based filtering. ',
Alert::WARNING
);
}
}

}
2 changes: 1 addition & 1 deletion app/Http/Requests/StoreRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function rules(): array
'operating_system_version' => 'nullable|string|max:255',
'mgmt_host' => 'required|string|max:255',
'api_type' => 'required|integer|in:' . implode( ',', array_keys( Router::$API_TYPES ) ),
'api' => ( $this->api_type !== Router::API_TYPE_NONE ? 'url|required|regex:/.*[^\/]$/' : '' ),
'api' => ( $this->api_type != Router::API_TYPE_NONE ? 'url|required|regex:/.*[^\/]$/' : '' ),
'lg_access' => 'integer' . ( $this->api ? '|required|in:' . implode( ',', array_keys( User::$PRIVILEGES_ALL ) ) : '' ),
];
}
Expand Down
2 changes: 1 addition & 1 deletion app/Models/Aggregators/ContactGroupAggregator.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
* @property int $limited_to
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Illuminate\Database\Eloquent\Collection|\IXP\Models\Contact[] $contacts
* @property-read \Illuminate\Database\Eloquent\Collection<int, \IXP\Models\Contact> $contacts
* @property-read int|null $contacts_count
* @method static Builder|ContactGroupAggregator newModelQuery()
* @method static Builder|ContactGroupAggregator newQuery()
Expand Down
Loading