Laravel 9.x Shift (#14504)
* Move `resources/lang` folder * Shift registered middleware * Remove `fruitcake/laravel-cors` dependency * Streamline `$commands` property * Upgrade to Flysystem 3.0 * Shift core files * Convert `optional()` to nullsafe operator * Remove unnecessary `$model` property * Convert route options to fluent methods Laravel 8 adopts the tuple syntax for controller actions. Since the old options array is incompatible with this syntax, Shift converted them to use modern, fluent methods. * Convert deprecated `$dates` property to `$casts` * Shift config files * Default config files In an effort to make upgrading the constantly changing config files easier, Shift defaulted them and merged your true customizations - where ENV variables may not be used. * Bump Laravel dependencies * Use `<env>` tags for configuration `<env>` tags have a lower precedence than system environment variables making it easier to overwrite PHPUnit configuration values in additional environments, such a CI. Review this blog post for more details on configuration precedence when testing Laravel: https://jasonmccreary.me/articles/laravel-testing-configuration-precedence/ * Fix error provider * Match new symfony syntax * Match upstream syntax * Fix route syntax * generate composer.lock * Sync back configs * routes * composer * Fix more flare * fix cors * sync lang * Apply fixes from StyleCI (#14517) Co-authored-by: StyleCI Bot <bot@styleci.io> * bump larastan * update packages * wip * Temporarily lower phpstan level * Update phpstan.neon * wip * wip * wip * Apply fixes from StyleCI (#14592) Co-authored-by: StyleCI Bot <bot@styleci.io> * test * Update CiHelper.php * Update test.yml * Update CiHelper.php * Update CiHelper.php * Apply fixes from StyleCI (#14616) Co-authored-by: StyleCI Bot <bot@styleci.io> * test? * fix phpstan problems * dont run snmpsim on github ci * Fix whitespace * More whitespace * More whitespace ??? * I think the space broke it * fix the reset of the whitespace * hard code auth guard --------- Co-authored-by: Shift <shift@laravelshift.com> Co-authored-by: StyleCI Bot <bot@styleci.io> Co-authored-by: Tony Murray <murraytony@gmail.com>
This commit is contained in:
parent
8941153c58
commit
0a351b49fd
|
@ -155,7 +155,7 @@ class Datastore
|
|||
/**
|
||||
* Get the measurements for all datastores, keyed by datastore name
|
||||
*
|
||||
* @return \Illuminate\Support\Collection<\App\Polling\Measure\MeasurementCollection>
|
||||
* @return \Illuminate\Support\Collection
|
||||
*/
|
||||
public function getStats(): Collection
|
||||
{
|
||||
|
|
|
@ -132,7 +132,7 @@ class WirelessSensor extends Sensor
|
|||
*/
|
||||
public static function getTypes($valid = false, $device_id = null)
|
||||
{
|
||||
// Add new types here translations/descriptions/units in resources/lang/<lang>/wireless.php
|
||||
// Add new types here translations/descriptions/units in lang/<lang>/wireless.php
|
||||
// FIXME I'm really bad with icons, someone please help!
|
||||
static $types = [
|
||||
'ap-count' => [
|
||||
|
|
|
@ -92,7 +92,7 @@ class Os implements Module
|
|||
|
||||
if (! empty($location)) { // legacy support, remove when no longer needed
|
||||
$deviceModel->setLocation($location);
|
||||
optional($deviceModel->location)->save();
|
||||
$deviceModel->location?->save();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -127,7 +127,7 @@ class Os implements Module
|
|||
|
||||
$device->icon = basename(Url::findOsImage($device->os, $device->features, null, 'images/os/'));
|
||||
|
||||
echo trans('device.attributes.location') . ': ' . optional($device->location)->display() . PHP_EOL;
|
||||
echo trans('device.attributes.location') . ': ' . $device->location?->display() . PHP_EOL;
|
||||
foreach (['hardware', 'version', 'features', 'serial'] as $attribute) {
|
||||
if (isset($device->$attribute)) {
|
||||
$device->$attribute = trim($device->$attribute);
|
||||
|
@ -143,7 +143,7 @@ class Os implements Module
|
|||
$device = $os->getDevice();
|
||||
$new_location = $device->override_sysLocation ? new Location() : $os->fetchLocation(); // fetch location data from device
|
||||
$device->setLocation($new_location, true); // set location and lookup coordinates if needed
|
||||
optional($device->location)->save();
|
||||
$device->location?->save();
|
||||
}
|
||||
|
||||
private function sysContact(\LibreNMS\OS $os): void
|
||||
|
|
|
@ -88,24 +88,23 @@ class ObjectCache implements ArrayAccess
|
|||
* Get Data-Object
|
||||
*
|
||||
* @param mixed $obj Name of Data-Object
|
||||
* @return mixed
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($obj)
|
||||
public function offsetGet($obj): mixed
|
||||
{
|
||||
if (isset($this->data[$obj])) {
|
||||
if (isset($this->data[$obj]['value'])) {
|
||||
return $this->data[$obj]['value'];
|
||||
} elseif (isset($GLOBALS['_ObjCache'][$this->obj][$obj]['value'])) {
|
||||
return $GLOBALS['_ObjCache'][$this->obj][$obj]['value'];
|
||||
} else {
|
||||
$GLOBALS['_ObjCache'][$this->obj][$obj]['value'] = dbFetchRows($this->data[$obj]['query'], isset($this->data[$obj]['params']) ? $this->data[$obj]['params'] : []);
|
||||
if (sizeof($GLOBALS['_ObjCache'][$this->obj][$obj]['value']) == 1 && sizeof($GLOBALS['_ObjCache'][$this->obj][$obj]['value'][0]) == 1) {
|
||||
$GLOBALS['_ObjCache'][$this->obj][$obj]['value'] = current($GLOBALS['_ObjCache'][$this->obj][$obj]['value'][0]);
|
||||
}
|
||||
|
||||
return $GLOBALS['_ObjCache'][$this->obj][$obj]['value'];
|
||||
if (! isset($this->data[$obj])) {
|
||||
return null;
|
||||
}
|
||||
if (isset($this->data[$obj]['value'])) {
|
||||
return $this->data[$obj]['value'];
|
||||
} elseif (isset($GLOBALS['_ObjCache'][$this->obj][$obj]['value'])) {
|
||||
return $GLOBALS['_ObjCache'][$this->obj][$obj]['value'];
|
||||
} else {
|
||||
$GLOBALS['_ObjCache'][$this->obj][$obj]['value'] = dbFetchRows($this->data[$obj]['query'], isset($this->data[$obj]['params']) ? $this->data[$obj]['params'] : []);
|
||||
if (sizeof($GLOBALS['_ObjCache'][$this->obj][$obj]['value']) == 1 && sizeof($GLOBALS['_ObjCache'][$this->obj][$obj]['value'][0]) == 1) {
|
||||
$GLOBALS['_ObjCache'][$this->obj][$obj]['value'] = current($GLOBALS['_ObjCache'][$this->obj][$obj]['value'][0]);
|
||||
}
|
||||
|
||||
return $GLOBALS['_ObjCache'][$this->obj][$obj]['value'];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -178,7 +178,7 @@ class CiHelper
|
|||
*/
|
||||
public function checkUnit()
|
||||
{
|
||||
$phpunit_cmd = [$this->checkPhpExec('phpunit'), '--colors=always'];
|
||||
$phpunit_cmd = [$this->checkPhpExec('phpunit'), '--colors=always', '--debug'];
|
||||
|
||||
if ($this->flags['fail-fast']) {
|
||||
array_push($phpunit_cmd, '--stop-on-error', '--stop-on-failure');
|
||||
|
@ -391,10 +391,18 @@ class CiHelper
|
|||
$proc->setTimeout(7200)->setIdleTimeout(3600);
|
||||
if (! ($silence || $quiet)) {
|
||||
echo PHP_EOL;
|
||||
$proc->setTty(Process::isTtySupported());
|
||||
}
|
||||
|
||||
$proc->run();
|
||||
if (Process::isTtySupported()) {
|
||||
$proc->setTty(true);
|
||||
$proc->run();
|
||||
} else {
|
||||
$proc->run(function ($type, $buffer) {
|
||||
echo $buffer;
|
||||
});
|
||||
}
|
||||
} else {
|
||||
$proc->run();
|
||||
}
|
||||
|
||||
$duration = sprintf('%.2fs', microtime(true) - $start);
|
||||
if ($proc->getExitCode() > 0) {
|
||||
|
|
|
@ -225,7 +225,7 @@ class DynamicConfigItem implements \ArrayAccess
|
|||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
public function offsetGet($offset): mixed
|
||||
{
|
||||
return isset($this->$offset) ? $this->$offset : null;
|
||||
}
|
||||
|
|
|
@ -141,7 +141,7 @@ class Url
|
|||
$text = $label;
|
||||
}
|
||||
|
||||
$content = '<div class=list-large>' . addslashes(htmlentities(optional($port->device)->displayName() . ' - ' . $label)) . '</div>';
|
||||
$content = '<div class=list-large>' . addslashes(htmlentities($port->device?->displayName() . ' - ' . $label)) . '</div>';
|
||||
if ($description = $port->getDescription()) {
|
||||
$content .= addslashes(htmlentities($description)) . '<br />';
|
||||
}
|
||||
|
|
|
@ -65,11 +65,11 @@ class DeviceAdd extends LnmsCommand
|
|||
$this->addOption('port', 'r', InputOption::VALUE_REQUIRED);
|
||||
$this->addOption('transport', 't', InputOption::VALUE_REQUIRED);
|
||||
$this->addOption('display-name', 'd', InputOption::VALUE_REQUIRED);
|
||||
$this->addOption('security-name', 'u', InputOption::VALUE_REQUIRED, null, 'root');
|
||||
$this->addOption('security-name', 'u', InputOption::VALUE_REQUIRED, '', 'root');
|
||||
$this->addOption('auth-password', 'A', InputOption::VALUE_REQUIRED);
|
||||
$this->addOption('auth-protocol', 'a', InputOption::VALUE_REQUIRED, null, 'MD5');
|
||||
$this->addOption('auth-protocol', 'a', InputOption::VALUE_REQUIRED, '', 'MD5');
|
||||
$this->addOption('privacy-password', 'X', InputOption::VALUE_REQUIRED);
|
||||
$this->addOption('privacy-protocol', 'x', InputOption::VALUE_REQUIRED, null, 'AES');
|
||||
$this->addOption('privacy-protocol', 'x', InputOption::VALUE_REQUIRED, '', 'AES');
|
||||
$this->addOption('force', 'f', InputOption::VALUE_NONE);
|
||||
$this->addOption('ping-fallback', 'b', InputOption::VALUE_NONE);
|
||||
$this->addOption('poller-group', 'g', InputOption::VALUE_REQUIRED);
|
||||
|
|
|
@ -42,7 +42,7 @@ class DynamicInputOption extends InputOption
|
|||
parent::__construct($name, $shortcut, $mode, $description, $default);
|
||||
}
|
||||
|
||||
public function getDescription()
|
||||
public function getDescription(): string
|
||||
{
|
||||
$description = parent::getDescription();
|
||||
|
||||
|
@ -53,7 +53,7 @@ class DynamicInputOption extends InputOption
|
|||
return $description;
|
||||
}
|
||||
|
||||
public function getDefault()
|
||||
public function getDefault(): array|string|int|float|bool|null
|
||||
{
|
||||
if (is_callable($this->defaultCallable)) {
|
||||
return call_user_func($this->defaultCallable);
|
||||
|
|
|
@ -9,15 +9,6 @@ use LibreNMS\Util\Version;
|
|||
|
||||
class Kernel extends ConsoleKernel
|
||||
{
|
||||
/**
|
||||
* The Artisan commands provided by your application.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $commands = [
|
||||
//
|
||||
];
|
||||
|
||||
/**
|
||||
* Define the application's command schedule.
|
||||
*
|
||||
|
|
|
@ -71,10 +71,10 @@ abstract class LnmsCommand extends Command
|
|||
*
|
||||
* @throws InvalidArgumentException When argument mode is not valid
|
||||
*/
|
||||
public function addArgument($name, $mode = null, $description = null, $default = null)
|
||||
public function addArgument(string $name, ?int $mode = null, string $description = '', mixed $default = null): static
|
||||
{
|
||||
// use a generated translation location by default
|
||||
if (is_null($description)) {
|
||||
if (empty($description)) {
|
||||
$description = __('commands.' . $this->getName() . '.arguments.' . $name);
|
||||
}
|
||||
|
||||
|
@ -96,10 +96,10 @@ abstract class LnmsCommand extends Command
|
|||
*
|
||||
* @throws InvalidArgumentException If option mode is invalid or incompatible
|
||||
*/
|
||||
public function addOption($name, $shortcut = null, $mode = null, $description = null, $default = null)
|
||||
public function addOption(string $name, array|string|null $shortcut = null, ?int $mode = null, string $description = '', mixed $default = null): static
|
||||
{
|
||||
// use a generated translation location by default
|
||||
if (is_null($description)) {
|
||||
if (empty($description)) {
|
||||
$description = __('commands.' . $this->getName() . '.options.' . $name);
|
||||
}
|
||||
|
||||
|
|
|
@ -9,8 +9,6 @@ class Handler extends ExceptionHandler
|
|||
{
|
||||
/**
|
||||
* A list of the exception types that are not reported.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $dontReport = [
|
||||
\Illuminate\Auth\AuthenticationException::class,
|
||||
|
@ -50,7 +48,7 @@ class Handler extends ExceptionHandler
|
|||
|
||||
// try to upgrade generic exceptions to more specific ones
|
||||
if (! config('app.debug')) {
|
||||
if ($exception instanceof \Illuminate\View\ViewException || $exception instanceof \Facade\Ignition\Exceptions\ViewException) {
|
||||
if ($exception instanceof \Illuminate\View\ViewException || $exception instanceof \Spatie\LaravelIgnition\Exceptions\ViewException) {
|
||||
$base = $exception->getPrevious(); // get real exception
|
||||
}
|
||||
|
||||
|
|
|
@ -57,20 +57,20 @@ class DeviceSearchController extends SearchController
|
|||
$baseQuery->leftJoin('ports', 'ports.device_id', '=', 'devices.device_id')
|
||||
->leftJoin('ipv4_addresses', 'ipv4_addresses.port_id', 'ports.port_id');
|
||||
|
||||
$query->orWhere('ipv4_address', '=', $search)
|
||||
$query->orWhere('ipv4_addresses.ipv4_address', '=', $search)
|
||||
->orWhere('overwrite_ip', '=', $search)
|
||||
->orWhere('ip', '=', inet_pton($search));
|
||||
} elseif (\LibreNMS\Util\IPv6::isValid($search, false)) {
|
||||
$baseQuery->leftJoin('ports', 'ports.device_id', '=', 'devices.device_id')
|
||||
->leftJoin('ipv6_addresses', 'ipv6_addresses.port_id', 'ports.port_id');
|
||||
|
||||
$query->orWhere('ipv6_address', '=', $search)
|
||||
$query->orWhere('ipv6_addresses.ipv6_address', '=', $search)
|
||||
->orWhere('overwrite_ip', '=', $search)
|
||||
->orWhere('ip', '=', inet_pton($search));
|
||||
} elseif (ctype_xdigit($mac_search = str_replace([':', '-', '.'], '', $search))) {
|
||||
$baseQuery->leftJoin('ports', 'ports.device_id', '=', 'devices.device_id');
|
||||
|
||||
$query->orWhere('ifPhysAddress', 'LIKE', "%$mac_search%");
|
||||
$query->orWhere('ports.ifPhysAddress', 'LIKE', "%$mac_search%");
|
||||
}
|
||||
|
||||
return $query;
|
||||
|
|
|
@ -57,7 +57,9 @@ class RipeNccApiController extends Controller
|
|||
if (isset($response['messages'])) {
|
||||
$message .= ': ' . collect($response['messages'])
|
||||
->flatten()
|
||||
->reject('error')
|
||||
->reject(function ($value, $key) {
|
||||
return $value != 'error';
|
||||
})
|
||||
->implode(', ');
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ class RegisterController extends Controller
|
|||
protected function create(array $data)
|
||||
{
|
||||
return User::create([
|
||||
'name' => $data['name'],
|
||||
'realname' => $data['name'],
|
||||
'email' => $data['email'],
|
||||
'password' => Hash::make($data['password']),
|
||||
]);
|
||||
|
|
|
@ -126,7 +126,7 @@ class InstallationController extends Controller
|
|||
$db['port'] ?? 3306,
|
||||
$db['socket'] ?? null
|
||||
);
|
||||
config(['database.default', $this->connection]);
|
||||
config('database.default', $this->connection);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -107,8 +107,8 @@ class PortsController extends TableController
|
|||
->where('deleted', $request->get('deleted', 0)) // always filter deleted
|
||||
->when($request->get('hostname'), function (Builder $query, $hostname) {
|
||||
$query->where(function (Builder $query) use ($hostname) {
|
||||
$query->where('hostname', 'like', "%$hostname%")
|
||||
->orWhere('sysName', 'like', "%$hostname%");
|
||||
$query->where('devices.hostname', 'like', "%$hostname%")
|
||||
->orWhere('devices.sysName', 'like', "%$hostname%");
|
||||
});
|
||||
})
|
||||
->when($request->get('ifAlias'), function (Builder $query, $ifAlias) {
|
||||
|
@ -160,7 +160,7 @@ class PortsController extends TableController
|
|||
'status' => $status,
|
||||
'device' => Url::deviceLink($port->device),
|
||||
'port' => Url::portLink($port),
|
||||
'secondsIfLastChange' => ceil(optional($port->device)->uptime - ($port->ifLastChange / 100)),
|
||||
'secondsIfLastChange' => ceil($port->device?->uptime - ($port->ifLastChange / 100)),
|
||||
'ifConnectorPresent' => ($port->ifConnectorPresent == 'true') ? 'yes' : 'no',
|
||||
'ifSpeed' => $port->ifSpeed,
|
||||
'ifMtu' => $port->ifMtu,
|
||||
|
|
|
@ -61,7 +61,7 @@ class TopErrorsController extends WidgetController
|
|||
->where(function ($query) {
|
||||
return $query
|
||||
->where('ifInErrors_rate', '>', 0)
|
||||
->orwhere('ifOutErrors_rate', '>', 0);
|
||||
->orWhere('ifOutErrors_rate', '>', 0);
|
||||
})
|
||||
->isUp()
|
||||
->when($data['device_group'], function ($query) use ($data) {
|
||||
|
|
|
@ -25,11 +25,11 @@
|
|||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Asm89\Stack\CorsService;
|
||||
use Fruitcake\Cors\CorsService;
|
||||
use Illuminate\Contracts\Container\Container;
|
||||
use Illuminate\Support\Arr;
|
||||
|
||||
class HandleCors extends \Fruitcake\Cors\HandleCors
|
||||
class HandleCors extends \Illuminate\Http\Middleware\HandleCors
|
||||
{
|
||||
private $map = [
|
||||
'allowmethods' => 'allowed_methods',
|
||||
|
@ -38,7 +38,7 @@ class HandleCors extends \Fruitcake\Cors\HandleCors
|
|||
'exposeheaders' => 'exposed_headers',
|
||||
];
|
||||
|
||||
public function __construct(Container $container)
|
||||
public function __construct(Container $container, CorsService $cors)
|
||||
{
|
||||
// load legacy config settings before booting the CorsService
|
||||
if (\LibreNMS\Config::get('api.cors.enabled')) {
|
||||
|
@ -58,7 +58,6 @@ class HandleCors extends \Fruitcake\Cors\HandleCors
|
|||
$container['config']->set('cors', $laravel_config);
|
||||
}
|
||||
|
||||
$cors = $container->make(CorsService::class);
|
||||
parent::__construct($cors, $container);
|
||||
parent::__construct($container, $cors);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ class TrimStrings extends Middleware
|
|||
/**
|
||||
* The names of the attributes that should not be trimmed.
|
||||
*
|
||||
* @var array
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $except = [
|
||||
'current_password',
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Routing\Middleware\ValidateSignature as Middleware;
|
||||
|
||||
class ValidateSignature extends Middleware
|
||||
{
|
||||
/**
|
||||
* The names of the query string parameters that should be ignored.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $except = [
|
||||
// 'fbclid',
|
||||
// 'utm_campaign',
|
||||
// 'utm_content',
|
||||
// 'utm_medium',
|
||||
// 'utm_source',
|
||||
// 'utm_term',
|
||||
];
|
||||
}
|
|
@ -40,6 +40,6 @@ class TwoFactorManagementRequest extends FormRequest
|
|||
$auth_user = auth()->user();
|
||||
|
||||
// don't allow admins to bypass security for themselves
|
||||
return $auth_user->isAdmin() && ! $user->is($auth_user);
|
||||
return $auth_user->isAdmin() && ! $auth_user->is($user);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,13 +25,13 @@
|
|||
|
||||
namespace App\Logging\Reporting\Middleware;
|
||||
|
||||
use Facade\FlareClient\Report;
|
||||
use LibreNMS\Util\Git;
|
||||
use Spatie\FlareClient\Report;
|
||||
|
||||
class AddGitInformation
|
||||
class AddGitInformation implements \Spatie\FlareClient\FlareMiddleware\FlareMiddleware
|
||||
{
|
||||
/**
|
||||
* @param \Facade\FlareClient\Report $report
|
||||
* @param \Spatie\FlareClient\Report $report
|
||||
* @param callable $next next in the pipeline
|
||||
* @return mixed
|
||||
*/
|
||||
|
|
|
@ -25,14 +25,14 @@
|
|||
|
||||
namespace App\Logging\Reporting\Middleware;
|
||||
|
||||
use Facade\FlareClient\Report;
|
||||
use Spatie\FlareClient\Report;
|
||||
|
||||
class CleanContext
|
||||
class CleanContext implements \Spatie\FlareClient\FlareMiddleware\FlareMiddleware
|
||||
{
|
||||
/**
|
||||
* Middleware to remove sensitive data from the context.
|
||||
*
|
||||
* @param \Facade\FlareClient\Report $report
|
||||
* @param \Spatie\FlareClient\Report $report
|
||||
* @param callable $next
|
||||
* @return mixed
|
||||
*/
|
||||
|
|
|
@ -25,15 +25,15 @@
|
|||
|
||||
namespace App\Logging\Reporting\Middleware;
|
||||
|
||||
use Facade\FlareClient\Report;
|
||||
use LibreNMS\Util\Version;
|
||||
use Spatie\FlareClient\Report;
|
||||
|
||||
class SetGroups
|
||||
class SetGroups implements \Spatie\FlareClient\FlareMiddleware\FlareMiddleware
|
||||
{
|
||||
/**
|
||||
* Middleware to set LibreNMS and Tools grouping data
|
||||
*
|
||||
* @param \Facade\FlareClient\Report $report
|
||||
* @param \Spatie\FlareClient\Report $report
|
||||
* @param callable $next
|
||||
* @return mixed
|
||||
*/
|
||||
|
|
|
@ -23,14 +23,14 @@
|
|||
namespace App\Logging\Reporting\Middleware;
|
||||
|
||||
use App\Providers\ErrorReportingProvider;
|
||||
use Facade\FlareClient\Report;
|
||||
use Spatie\FlareClient\Report;
|
||||
|
||||
class SetInstanceId
|
||||
class SetInstanceId implements \Spatie\FlareClient\FlareMiddleware\FlareMiddleware
|
||||
{
|
||||
/**
|
||||
* Middleware to add instance ID, piggybacks on the "user id" feature.
|
||||
*
|
||||
* @param \Facade\FlareClient\Report $report
|
||||
* @param \Spatie\FlareClient\Report $report
|
||||
* @param callable $next
|
||||
* @return mixed
|
||||
*/
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasManyThrough;
|
||||
|
||||
class AlertTemplate extends BaseModel
|
||||
|
@ -33,7 +34,7 @@ class AlertTemplate extends BaseModel
|
|||
|
||||
// ---- Define Relationships ----
|
||||
|
||||
public function map()
|
||||
public function map(): HasMany
|
||||
{
|
||||
return $this->hasMany(\App\Models\AlertTemplateMap::class, 'alert_templates_id', 'id');
|
||||
}
|
||||
|
|
|
@ -31,5 +31,7 @@ class AuthLog extends Model
|
|||
{
|
||||
public $timestamps = false;
|
||||
protected $table = 'authlog';
|
||||
protected $dates = ['datetime'];
|
||||
protected $casts = [
|
||||
'datetime' => 'datetime',
|
||||
];
|
||||
}
|
||||
|
|
|
@ -413,7 +413,7 @@ class Device extends BaseModel
|
|||
return;
|
||||
}
|
||||
|
||||
if (! $this->relationLoaded('location') || optional($this->location)->location !== $new_location->location) {
|
||||
if (! $this->relationLoaded('location') || $this->location?->location !== $new_location->location) {
|
||||
if (! $new_location->exists) { // don't fetch if new location persisted to the DB, just use it
|
||||
$new_location = Location::firstOrCreate(['location' => $new_location->location], $coord);
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ class Port extends DeviceRelatedModel
|
|||
DB::table('links')->where('local_port_id', $port->port_id)->orWhere('remote_port_id', $port->port_id)->delete();
|
||||
DB::table('ports_stack')->where('port_id_low', $port->port_id)->orWhere('port_id_high', $port->port_id)->delete();
|
||||
|
||||
\Rrd::purge(optional($port->device)->hostname, \Rrd::portName($port->port_id)); // purge all port rrd files
|
||||
\Rrd::purge($port->device?->hostname, \Rrd::portName($port->port_id)); // purge all port rrd files
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ class Port extends DeviceRelatedModel
|
|||
*/
|
||||
public function getLabel()
|
||||
{
|
||||
$os = optional($this->device)->os;
|
||||
$os = $this->device?->os;
|
||||
|
||||
if (\LibreNMS\Config::getOsSetting($os, 'ifname')) {
|
||||
$label = $this->ifName;
|
||||
|
|
|
@ -162,7 +162,7 @@ class ServiceTemplate extends BaseModel
|
|||
}
|
||||
|
||||
$template_ids = static::query()
|
||||
->with(['device_groups' => function ($query) {
|
||||
->with(['groups' => function ($query) {
|
||||
$query->select('device_groups.id');
|
||||
}])
|
||||
->get()
|
||||
|
|
|
@ -12,7 +12,7 @@ class AuthServiceProvider extends ServiceProvider
|
|||
/**
|
||||
* The policy mappings for the application.
|
||||
*
|
||||
* @var array
|
||||
* @var array<class-string, class-string>
|
||||
*/
|
||||
protected $policies = [
|
||||
\App\Models\User::class => \App\Policies\UserPolicy::class,
|
||||
|
|
|
@ -31,14 +31,14 @@ use App\Logging\Reporting\Middleware\SetGroups;
|
|||
use App\Logging\Reporting\Middleware\SetInstanceId;
|
||||
use App\Models\Callback;
|
||||
use ErrorException;
|
||||
use Facade\FlareClient\Report;
|
||||
use Facade\Ignition\Facades\Flare;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Str;
|
||||
use LibreNMS\Config;
|
||||
use LibreNMS\Util\Git;
|
||||
use Spatie\FlareClient\Report;
|
||||
use Spatie\LaravelIgnition\Facades\Flare;
|
||||
|
||||
class ErrorReportingProvider extends \Facade\Ignition\IgnitionServiceProvider
|
||||
class ErrorReportingProvider extends \Spatie\LaravelIgnition\IgnitionServiceProvider
|
||||
{
|
||||
/** @var int */
|
||||
protected $errorReportingLevel = E_ALL & ~E_NOTICE;
|
||||
|
@ -52,7 +52,7 @@ class ErrorReportingProvider extends \Facade\Ignition\IgnitionServiceProvider
|
|||
public function boot(): void
|
||||
{
|
||||
/* @phpstan-ignore-next-line */
|
||||
if (! method_exists(\Facade\FlareClient\Flare::class, 'filterReportsUsing')) {
|
||||
if (! method_exists(\Spatie\FlareClient\Flare::class, 'filterReportsUsing')) {
|
||||
Log::debug("Flare client too old, disabling Ignition to avoid bug.\n");
|
||||
|
||||
return;
|
||||
|
|
|
@ -44,4 +44,14 @@ class EventServiceProvider extends ServiceProvider
|
|||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if events and listeners should be automatically discovered.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function shouldDiscoverEvents()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,49 +27,49 @@
|
|||
"ext-zlib": "*",
|
||||
"amenadiel/jpgraph": "^4",
|
||||
"clue/socket-raw": "^1.4",
|
||||
"dapphp/radius": "^2.0",
|
||||
"doctrine/dbal": "^2.11",
|
||||
"dapphp/radius": "^3.0",
|
||||
"doctrine/dbal": "^2.13",
|
||||
"easybook/geshi": "^1.0.8",
|
||||
"ezyang/htmlpurifier": "^4.8",
|
||||
"facade/ignition": "^2.17.6",
|
||||
"fico7489/laravel-pivot": "^3.0",
|
||||
"fruitcake/laravel-cors": "^2.0",
|
||||
"guzzlehttp/guzzle": "^7.0.1",
|
||||
"influxdb/influxdb-php": "^1.14",
|
||||
"guzzlehttp/guzzle": "^7.2",
|
||||
"influxdb/influxdb-php": "^1.15",
|
||||
"justinrainbow/json-schema": "^5.2",
|
||||
"laravel-notification-channels/webpush": "^7.0",
|
||||
"laravel/framework": "^8.12",
|
||||
"laravel/tinker": "^2.5",
|
||||
"laravel/ui": "^3.0",
|
||||
"laravel/framework": "^9.36",
|
||||
"laravel/tinker": "^2.7",
|
||||
"laravel/ui": "^4.0",
|
||||
"librenms/laravel-vue-i18n-generator": "^0.1.46",
|
||||
"mews/purifier": "^3.3",
|
||||
"nunomaduro/laravel-console-summary": "^1.7",
|
||||
"nunomaduro/laravel-console-summary": "^1.8",
|
||||
"pear/console_color2": "^0.1",
|
||||
"pear/console_table": "^1.3",
|
||||
"pear/net_dns2": "^1.5",
|
||||
"php-amqplib/php-amqplib": "^3.0",
|
||||
"php-amqplib/php-amqplib": "^3.1",
|
||||
"php-flasher/flasher-laravel": "^0.9",
|
||||
"phpmailer/phpmailer": "~6.0",
|
||||
"predis/predis": "^1.1",
|
||||
"predis/predis": "^2.0",
|
||||
"socialiteproviders/manager": "^4.1",
|
||||
"symfony/yaml": "^4.0",
|
||||
"spatie/laravel-ignition": "^1.4",
|
||||
"symfony/yaml": "^6.0",
|
||||
"tecnickcom/tcpdf": "^6.4",
|
||||
"tightenco/ziggy": "^0.9"
|
||||
},
|
||||
"require-dev": {
|
||||
"barryvdh/laravel-debugbar": "^3.5",
|
||||
"barryvdh/laravel-ide-helper": "^2.8",
|
||||
"barryvdh/laravel-debugbar": "^3.6",
|
||||
"barryvdh/laravel-ide-helper": "^2.12",
|
||||
"composer/composer": "^2.4",
|
||||
"fakerphp/faker": "^1.9.1",
|
||||
"friendsofphp/php-cs-fixer": "^v3.4",
|
||||
"laravel/dusk": "^6.15",
|
||||
"mockery/mockery": "^1.4.2",
|
||||
"nunomaduro/collision": "^5.0",
|
||||
"nunomaduro/larastan": "^1.0",
|
||||
"laravel/dusk": "^7.1",
|
||||
"mockery/mockery": "^1.4.4",
|
||||
"nunomaduro/collision": "^6.3",
|
||||
"nunomaduro/larastan": "^2.0",
|
||||
"php-parallel-lint/php-parallel-lint": "^1.1",
|
||||
"phpstan/phpstan-deprecation-rules": "^1.0",
|
||||
"phpstan/phpstan-mockery": "^1.0",
|
||||
"phpunit/phpunit": "^9.3.3",
|
||||
"staudenmeir/dusk-updater": "^1.1"
|
||||
"phpunit/phpunit": "^9.5.10",
|
||||
"staudenmeir/dusk-updater": "^1.2"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-gmp": "Used for browser push notifications",
|
||||
|
|
File diff suppressed because it is too large
Load Diff
228
config/app.php
228
config/app.php
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
/*
|
||||
| !!!! DO NOT EDIT THIS FILE !!!!
|
||||
|
|
||||
| You can change settings by setting them in the environment or .env
|
||||
|
@ -8,9 +8,11 @@
|
|||
| request an environment variable to be created upstream or send a pull request.
|
||||
*/
|
||||
|
||||
return [
|
||||
use Illuminate\Support\Facades\Facade;
|
||||
|
||||
/*
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -21,9 +23,9 @@
|
|||
|
|
||||
*/
|
||||
|
||||
'name' => env('APP_NAME', 'LibreNMS'),
|
||||
'name' => env('APP_NAME', 'LibreNMS'),
|
||||
|
||||
/*
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Environment
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -34,9 +36,9 @@
|
|||
|
|
||||
*/
|
||||
|
||||
'env' => env('APP_ENV', 'production'),
|
||||
'env' => env('APP_ENV', 'production'),
|
||||
|
||||
/*
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Debug Mode
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -47,9 +49,9 @@
|
|||
|
|
||||
*/
|
||||
|
||||
'debug' => (bool) env('APP_DEBUG', false),
|
||||
'debug' => (bool) env('APP_DEBUG', false),
|
||||
|
||||
/*
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application URL
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -60,11 +62,11 @@
|
|||
|
|
||||
*/
|
||||
|
||||
'url' => env('APP_URL', 'http://localhost'),
|
||||
'url' => env('APP_URL', 'http://localhost'),
|
||||
|
||||
'asset_url' => env('ASSET_URL', null),
|
||||
'asset_url' => env('ASSET_URL', null),
|
||||
|
||||
/*
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Timezone
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -75,9 +77,9 @@
|
|||
|
|
||||
*/
|
||||
|
||||
'timezone' => ini_get('date.timezone') ?: 'UTC', // use existing timezone
|
||||
'timezone' => ini_get('date.timezone') ?: 'UTC', // use existing timezone
|
||||
|
||||
/*
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Locale Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -88,9 +90,9 @@
|
|||
|
|
||||
*/
|
||||
|
||||
'locale' => env('APP_LOCALE', 'en'),
|
||||
'locale' => env('APP_LOCALE', 'en'),
|
||||
|
||||
/*
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Fallback Locale
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -101,9 +103,9 @@
|
|||
|
|
||||
*/
|
||||
|
||||
'fallback_locale' => 'en',
|
||||
'fallback_locale' => 'en',
|
||||
|
||||
/*
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Faker Locale
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -114,9 +116,9 @@
|
|||
|
|
||||
*/
|
||||
|
||||
'faker_locale' => 'en_US',
|
||||
'faker_locale' => 'en_US',
|
||||
|
||||
/*
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Encryption Key
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -127,71 +129,89 @@
|
|||
|
|
||||
*/
|
||||
|
||||
'key' => env('APP_KEY'),
|
||||
'key' => env('APP_KEY'),
|
||||
|
||||
'cipher' => 'AES-256-CBC',
|
||||
'cipher' => 'AES-256-CBC',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Autoloaded Service Providers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The service providers listed here will be automatically loaded on the
|
||||
| request to your application. Feel free to add your own services to
|
||||
| this array to grant expanded functionality to your applications.
|
||||
|
|
||||
*/
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Maintenance Mode Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These configuration options determine the driver used to determine and
|
||||
| manage Laravel's "maintenance mode" status. The "cache" driver will
|
||||
| allow maintenance mode to be controlled across multiple machines.
|
||||
|
|
||||
| Supported drivers: "file", "cache"
|
||||
|
|
||||
*/
|
||||
|
||||
'providers' => [
|
||||
'maintenance' => [
|
||||
'driver' => 'file',
|
||||
// 'store' => 'redis',
|
||||
],
|
||||
|
||||
/*
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Autoloaded Service Providers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The service providers listed here will be automatically loaded on the
|
||||
| request to your application. Feel free to add your own services to
|
||||
| this array to grant expanded functionality to your applications.
|
||||
|
|
||||
*/
|
||||
|
||||
'providers' => [
|
||||
|
||||
/*
|
||||
* Laravel Framework Service Providers...
|
||||
*/
|
||||
Illuminate\Auth\AuthServiceProvider::class,
|
||||
Illuminate\Broadcasting\BroadcastServiceProvider::class,
|
||||
Illuminate\Bus\BusServiceProvider::class,
|
||||
Illuminate\Cache\CacheServiceProvider::class,
|
||||
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
|
||||
Illuminate\Cookie\CookieServiceProvider::class,
|
||||
Illuminate\Database\DatabaseServiceProvider::class,
|
||||
Illuminate\Encryption\EncryptionServiceProvider::class,
|
||||
Illuminate\Filesystem\FilesystemServiceProvider::class,
|
||||
Illuminate\Foundation\Providers\FoundationServiceProvider::class,
|
||||
Illuminate\Hashing\HashServiceProvider::class,
|
||||
Illuminate\Mail\MailServiceProvider::class,
|
||||
Illuminate\Notifications\NotificationServiceProvider::class,
|
||||
Illuminate\Pagination\PaginationServiceProvider::class,
|
||||
Illuminate\Pipeline\PipelineServiceProvider::class,
|
||||
Illuminate\Queue\QueueServiceProvider::class,
|
||||
Illuminate\Redis\RedisServiceProvider::class,
|
||||
Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
|
||||
Illuminate\Session\SessionServiceProvider::class,
|
||||
Illuminate\Translation\TranslationServiceProvider::class,
|
||||
Illuminate\Validation\ValidationServiceProvider::class,
|
||||
Illuminate\View\ViewServiceProvider::class,
|
||||
Illuminate\Auth\AuthServiceProvider::class,
|
||||
Illuminate\Broadcasting\BroadcastServiceProvider::class,
|
||||
Illuminate\Bus\BusServiceProvider::class,
|
||||
Illuminate\Cache\CacheServiceProvider::class,
|
||||
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
|
||||
Illuminate\Cookie\CookieServiceProvider::class,
|
||||
Illuminate\Database\DatabaseServiceProvider::class,
|
||||
Illuminate\Encryption\EncryptionServiceProvider::class,
|
||||
Illuminate\Filesystem\FilesystemServiceProvider::class,
|
||||
Illuminate\Foundation\Providers\FoundationServiceProvider::class,
|
||||
Illuminate\Hashing\HashServiceProvider::class,
|
||||
Illuminate\Mail\MailServiceProvider::class,
|
||||
Illuminate\Notifications\NotificationServiceProvider::class,
|
||||
Illuminate\Pagination\PaginationServiceProvider::class,
|
||||
Illuminate\Pipeline\PipelineServiceProvider::class,
|
||||
Illuminate\Queue\QueueServiceProvider::class,
|
||||
Illuminate\Redis\RedisServiceProvider::class,
|
||||
Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
|
||||
Illuminate\Session\SessionServiceProvider::class,
|
||||
Illuminate\Translation\TranslationServiceProvider::class,
|
||||
Illuminate\Validation\ValidationServiceProvider::class,
|
||||
Illuminate\View\ViewServiceProvider::class,
|
||||
|
||||
/*
|
||||
/*
|
||||
* Package Service Providers...
|
||||
*/
|
||||
|
||||
/*
|
||||
/*
|
||||
* LibreNMS Service Providers...
|
||||
*/
|
||||
App\Providers\ConfigServiceProvider::class,
|
||||
App\Providers\ErrorReportingProvider::class, // This should always be after the config is loaded
|
||||
App\Providers\AppServiceProvider::class,
|
||||
App\Providers\CliServiceProvider::class,
|
||||
App\Providers\AuthServiceProvider::class,
|
||||
// App\Providers\BroadcastServiceProvider::class,
|
||||
App\Providers\EventServiceProvider::class,
|
||||
App\Providers\RouteServiceProvider::class,
|
||||
App\Providers\ComposerServiceProvider::class,
|
||||
App\Providers\DatastoreServiceProvider::class,
|
||||
App\Providers\SnmptrapProvider::class,
|
||||
App\Providers\PluginProvider::class,
|
||||
],
|
||||
App\Providers\ConfigServiceProvider::class,
|
||||
App\Providers\ErrorReportingProvider::class, // This should always be after the config is loaded
|
||||
App\Providers\AppServiceProvider::class,
|
||||
App\Providers\CliServiceProvider::class,
|
||||
App\Providers\AuthServiceProvider::class,
|
||||
// App\Providers\BroadcastServiceProvider::class,
|
||||
App\Providers\EventServiceProvider::class,
|
||||
App\Providers\RouteServiceProvider::class,
|
||||
App\Providers\ComposerServiceProvider::class,
|
||||
App\Providers\DatastoreServiceProvider::class,
|
||||
App\Providers\SnmptrapProvider::class,
|
||||
App\Providers\PluginProvider::class,
|
||||
],
|
||||
|
||||
/*
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Class Aliases
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -202,56 +222,18 @@
|
|||
|
|
||||
*/
|
||||
|
||||
'aliases' => [
|
||||
'aliases' => Facade::defaultAliases()->merge([
|
||||
'Debugbar' => Barryvdh\Debugbar\Facades\Debugbar::class,
|
||||
'Flare' => Spatie\LaravelIgnition\Facades\Flare::class,
|
||||
'Redis' => Illuminate\Support\Facades\Redis::class,
|
||||
|
||||
'App' => Illuminate\Support\Facades\App::class,
|
||||
'Arr' => Illuminate\Support\Arr::class,
|
||||
'Artisan' => Illuminate\Support\Facades\Artisan::class,
|
||||
'Auth' => Illuminate\Support\Facades\Auth::class,
|
||||
'Blade' => Illuminate\Support\Facades\Blade::class,
|
||||
'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
|
||||
'Bus' => Illuminate\Support\Facades\Bus::class,
|
||||
'Cache' => Illuminate\Support\Facades\Cache::class,
|
||||
'Config' => Illuminate\Support\Facades\Config::class,
|
||||
'Cookie' => Illuminate\Support\Facades\Cookie::class,
|
||||
'Crypt' => Illuminate\Support\Facades\Crypt::class,
|
||||
'Date' => Illuminate\Support\Facades\Date::class,
|
||||
'DB' => Illuminate\Support\Facades\DB::class,
|
||||
'Eloquent' => Illuminate\Database\Eloquent\Model::class,
|
||||
'Event' => Illuminate\Support\Facades\Event::class,
|
||||
'File' => Illuminate\Support\Facades\File::class,
|
||||
'Gate' => Illuminate\Support\Facades\Gate::class,
|
||||
'Hash' => Illuminate\Support\Facades\Hash::class,
|
||||
'Http' => Illuminate\Support\Facades\Http::class,
|
||||
'Lang' => Illuminate\Support\Facades\Lang::class,
|
||||
'Log' => Illuminate\Support\Facades\Log::class,
|
||||
'Mail' => Illuminate\Support\Facades\Mail::class,
|
||||
'Notification' => Illuminate\Support\Facades\Notification::class,
|
||||
'Password' => Illuminate\Support\Facades\Password::class,
|
||||
'Queue' => Illuminate\Support\Facades\Queue::class,
|
||||
'RateLimiter' => Illuminate\Support\Facades\RateLimiter::class,
|
||||
'Redirect' => Illuminate\Support\Facades\Redirect::class,
|
||||
'Redis' => Illuminate\Support\Facades\Redis::class,
|
||||
'Request' => Illuminate\Support\Facades\Request::class,
|
||||
'Response' => Illuminate\Support\Facades\Response::class,
|
||||
'Route' => Illuminate\Support\Facades\Route::class,
|
||||
'Schema' => Illuminate\Support\Facades\Schema::class,
|
||||
'Session' => Illuminate\Support\Facades\Session::class,
|
||||
'Storage' => Illuminate\Support\Facades\Storage::class,
|
||||
'Str' => Illuminate\Support\Str::class,
|
||||
'URL' => Illuminate\Support\Facades\URL::class,
|
||||
'Validator' => Illuminate\Support\Facades\Validator::class,
|
||||
'View' => Illuminate\Support\Facades\View::class,
|
||||
'Debugbar' => Barryvdh\Debugbar\Facades\Debugbar::class,
|
||||
'Flare' => Facade\Ignition\Facades\Flare::class,
|
||||
// LibreNMS
|
||||
'DeviceCache' => \App\Facades\DeviceCache::class,
|
||||
'Permissions' => \App\Facades\Permissions::class,
|
||||
'PluginManager' => \App\Facades\PluginManager::class,
|
||||
'Rrd' => \App\Facades\Rrd::class,
|
||||
'SnmpQuery' => \App\Facades\FacadeAccessorSnmp::class,
|
||||
])->toArray(),
|
||||
|
||||
// LibreNMS
|
||||
'Permissions' => \App\Facades\Permissions::class,
|
||||
'PluginManager' => \App\Facades\PluginManager::class,
|
||||
'DeviceCache' => \App\Facades\DeviceCache::class,
|
||||
'Rrd' => \App\Facades\Rrd::class,
|
||||
'SnmpQuery' => \App\Facades\FacadeAccessorSnmp::class,
|
||||
],
|
||||
|
||||
'charset' => env('CHARSET', ini_get('php.output_encoding') ?: ini_get('default_charset') ?: 'UTF-8'),
|
||||
];
|
||||
'charset' => env('CHARSET', ini_get('php.output_encoding') ?: ini_get('default_charset') ?: 'UTF-8'),
|
||||
];
|
||||
|
|
128
config/auth.php
128
config/auth.php
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
/*
|
||||
| !!!! DO NOT EDIT THIS FILE !!!!
|
||||
|
|
||||
| You can change settings by setting them in the environment or .env
|
||||
|
@ -8,9 +8,9 @@
|
|||
| request an environment variable to be created upstream or send a pull request.
|
||||
*/
|
||||
|
||||
return [
|
||||
return [
|
||||
|
||||
/*
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication Defaults
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -21,12 +21,12 @@
|
|||
|
|
||||
*/
|
||||
|
||||
'defaults' => [
|
||||
'guard' => 'web',
|
||||
'passwords' => 'users',
|
||||
],
|
||||
'defaults' => [
|
||||
'guard' => 'web',
|
||||
'passwords' => 'users',
|
||||
],
|
||||
|
||||
/*
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication Guards
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -43,26 +43,26 @@
|
|||
|
|
||||
*/
|
||||
|
||||
'guards' => [
|
||||
'web' => [
|
||||
'driver' => 'session',
|
||||
'provider' => 'legacy',
|
||||
],
|
||||
'guards' => [
|
||||
'web' => [
|
||||
'driver' => 'session',
|
||||
'provider' => 'legacy',
|
||||
],
|
||||
|
||||
'api' => [
|
||||
'driver' => 'token',
|
||||
'provider' => 'users',
|
||||
'hash' => false,
|
||||
],
|
||||
'api' => [
|
||||
'driver' => 'token',
|
||||
'provider' => 'users',
|
||||
'hash' => false,
|
||||
],
|
||||
|
||||
'token' => [
|
||||
'driver' => 'token_driver',
|
||||
'provider' => 'token_provider',
|
||||
'hash' => false,
|
||||
],
|
||||
],
|
||||
'token' => [
|
||||
'driver' => 'token_driver',
|
||||
'provider' => 'token_provider',
|
||||
'hash' => false,
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| User Providers
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -79,48 +79,48 @@
|
|||
|
|
||||
*/
|
||||
|
||||
'providers' => [
|
||||
'users' => [
|
||||
'driver' => 'eloquent',
|
||||
'model' => App\Models\User::class,
|
||||
],
|
||||
'providers' => [
|
||||
'users' => [
|
||||
'driver' => 'eloquent',
|
||||
'model' => App\Models\User::class,
|
||||
],
|
||||
|
||||
'legacy' => [
|
||||
'driver' => 'legacy',
|
||||
'model' => App\Models\User::class,
|
||||
],
|
||||
'legacy' => [
|
||||
'driver' => 'legacy',
|
||||
'model' => App\Models\User::class,
|
||||
],
|
||||
|
||||
// 'users' => [
|
||||
// 'driver' => 'database',
|
||||
// 'table' => 'users',
|
||||
// ],
|
||||
],
|
||||
// 'users' => [
|
||||
// 'driver' => 'database',
|
||||
// 'table' => 'users',
|
||||
// ],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Resetting Passwords
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You may specify multiple password reset configurations if you have more
|
||||
| than one user table or model in the application and you want to have
|
||||
| separate password reset settings based on the specific user types.
|
||||
|
|
||||
| The expire time is the number of minutes that the reset token should be
|
||||
| considered valid. This security feature keeps tokens short-lived so
|
||||
| they have less time to be guessed. You may change this as needed.
|
||||
|
|
||||
*/
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Resetting Passwords
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You may specify multiple password reset configurations if you have more
|
||||
| than one user table or model in the application and you want to have
|
||||
| separate password reset settings based on the specific user types.
|
||||
|
|
||||
| The expire time is the number of minutes that each reset token will be
|
||||
| considered valid. This security feature keeps tokens short-lived so
|
||||
| they have less time to be guessed. You may change this as needed.
|
||||
|
|
||||
*/
|
||||
|
||||
'passwords' => [
|
||||
'users' => [
|
||||
'provider' => 'users',
|
||||
'table' => 'password_resets',
|
||||
'expire' => 60,
|
||||
'throttle' => 60,
|
||||
],
|
||||
],
|
||||
'passwords' => [
|
||||
'users' => [
|
||||
'provider' => 'users',
|
||||
'table' => 'password_resets',
|
||||
'expire' => 60,
|
||||
'throttle' => 60,
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Password Confirmation Timeout
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -131,6 +131,6 @@
|
|||
|
|
||||
*/
|
||||
|
||||
'password_timeout' => 10800,
|
||||
'password_timeout' => 10800,
|
||||
|
||||
];
|
||||
];
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
/*
|
||||
| !!!! DO NOT EDIT THIS FILE !!!!
|
||||
|
|
||||
| You can change settings by setting them in the environment or .env
|
||||
|
@ -8,9 +8,9 @@
|
|||
| request an environment variable to be created upstream or send a pull request.
|
||||
*/
|
||||
|
||||
return [
|
||||
return [
|
||||
|
||||
/*
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Broadcaster
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -23,9 +23,9 @@
|
|||
|
|
||||
*/
|
||||
|
||||
'default' => env('BROADCAST_DRIVER', 'null'),
|
||||
'default' => env('BROADCAST_DRIVER', 'null'),
|
||||
|
||||
/*
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Broadcast Connections
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -36,37 +36,43 @@
|
|||
|
|
||||
*/
|
||||
|
||||
'connections' => [
|
||||
'connections' => [
|
||||
|
||||
'pusher' => [
|
||||
'driver' => 'pusher',
|
||||
'key' => env('PUSHER_APP_KEY'),
|
||||
'secret' => env('PUSHER_APP_SECRET'),
|
||||
'app_id' => env('PUSHER_APP_ID'),
|
||||
'options' => [
|
||||
'cluster' => env('PUSHER_APP_CLUSTER'),
|
||||
'useTLS' => true,
|
||||
],
|
||||
],
|
||||
'pusher' => [
|
||||
'driver' => 'pusher',
|
||||
'key' => env('PUSHER_APP_KEY'),
|
||||
'secret' => env('PUSHER_APP_SECRET'),
|
||||
'app_id' => env('PUSHER_APP_ID'),
|
||||
'options' => [
|
||||
'host' => env('PUSHER_HOST', 'api-' . env('PUSHER_APP_CLUSTER', 'mt1') . '.pusher.com') ?: 'api-' . env('PUSHER_APP_CLUSTER', 'mt1') . '.pusher.com',
|
||||
'port' => env('PUSHER_PORT', 443),
|
||||
'scheme' => env('PUSHER_SCHEME', 'https'),
|
||||
'encrypted' => true,
|
||||
'useTLS' => env('PUSHER_SCHEME', 'https') === 'https',
|
||||
],
|
||||
'client_options' => [
|
||||
// Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html
|
||||
],
|
||||
],
|
||||
|
||||
'ably' => [
|
||||
'driver' => 'ably',
|
||||
'key' => env('ABLY_KEY'),
|
||||
],
|
||||
'ably' => [
|
||||
'driver' => 'ably',
|
||||
'key' => env('ABLY_KEY'),
|
||||
],
|
||||
|
||||
'redis' => [
|
||||
'driver' => 'redis',
|
||||
'connection' => 'default',
|
||||
],
|
||||
'redis' => [
|
||||
'driver' => 'redis',
|
||||
'connection' => 'default',
|
||||
],
|
||||
|
||||
'log' => [
|
||||
'driver' => 'log',
|
||||
],
|
||||
'log' => [
|
||||
'driver' => 'log',
|
||||
],
|
||||
|
||||
'null' => [
|
||||
'driver' => 'null',
|
||||
],
|
||||
'null' => [
|
||||
'driver' => 'null',
|
||||
],
|
||||
|
||||
],
|
||||
],
|
||||
|
||||
];
|
||||
];
|
||||
|
|
184
config/cache.php
184
config/cache.php
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
/*
|
||||
| !!!! DO NOT EDIT THIS FILE !!!!
|
||||
|
|
||||
| You can change settings by setting them in the environment or .env
|
||||
|
@ -8,111 +8,111 @@
|
|||
| request an environment variable to be created upstream or send a pull request.
|
||||
*/
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
return [
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Cache Store
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default cache connection that gets used while
|
||||
| using this caching library. This connection is used when another is
|
||||
| not explicitly specified when executing a given caching function.
|
||||
|
|
||||
*/
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Cache Store
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default cache connection that gets used while
|
||||
| using this caching library. This connection is used when another is
|
||||
| not explicitly specified when executing a given caching function.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('CACHE_DRIVER', 'database'),
|
||||
'default' => env('CACHE_DRIVER', 'database'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Stores
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may define all of the cache "stores" for your application as
|
||||
| well as their drivers. You may even define multiple stores for the
|
||||
| same cache driver to group types of items stored in your caches.
|
||||
|
|
||||
| Supported drivers: "apc", "array", "database", "file",
|
||||
| "memcached", "redis", "dynamodb", "octane", "null"
|
||||
|
|
||||
*/
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Stores
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may define all of the cache "stores" for your application as
|
||||
| well as their drivers. You may even define multiple stores for the
|
||||
| same cache driver to group types of items stored in your caches.
|
||||
|
|
||||
| Supported drivers: "apc", "array", "database", "file",
|
||||
| "memcached", "redis", "dynamodb", "octane", "null"
|
||||
|
|
||||
*/
|
||||
|
||||
'stores' => [
|
||||
'stores' => [
|
||||
|
||||
'apc' => [
|
||||
'driver' => 'apc',
|
||||
],
|
||||
'apc' => [
|
||||
'driver' => 'apc',
|
||||
],
|
||||
|
||||
'array' => [
|
||||
'driver' => 'array',
|
||||
'serialize' => false,
|
||||
],
|
||||
'array' => [
|
||||
'driver' => 'array',
|
||||
'serialize' => false,
|
||||
],
|
||||
|
||||
'database' => [
|
||||
'driver' => 'database',
|
||||
'table' => 'cache',
|
||||
'connection' => null,
|
||||
'lock_connection' => null,
|
||||
],
|
||||
'database' => [
|
||||
'driver' => 'database',
|
||||
'table' => 'cache',
|
||||
'connection' => null,
|
||||
'lock_connection' => null,
|
||||
],
|
||||
|
||||
'file' => [
|
||||
'driver' => 'file',
|
||||
'path' => storage_path('framework/cache/data'),
|
||||
],
|
||||
'file' => [
|
||||
'driver' => 'file',
|
||||
'path' => storage_path('framework/cache/data'),
|
||||
],
|
||||
|
||||
'memcached' => [
|
||||
'driver' => 'memcached',
|
||||
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
|
||||
'sasl' => [
|
||||
env('MEMCACHED_USERNAME'),
|
||||
env('MEMCACHED_PASSWORD'),
|
||||
],
|
||||
'options' => [
|
||||
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
|
||||
],
|
||||
'servers' => [
|
||||
[
|
||||
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
|
||||
'port' => env('MEMCACHED_PORT', 11211),
|
||||
'weight' => 100,
|
||||
],
|
||||
],
|
||||
],
|
||||
'memcached' => [
|
||||
'driver' => 'memcached',
|
||||
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
|
||||
'sasl' => [
|
||||
env('MEMCACHED_USERNAME'),
|
||||
env('MEMCACHED_PASSWORD'),
|
||||
],
|
||||
'options' => [
|
||||
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
|
||||
],
|
||||
'servers' => [
|
||||
[
|
||||
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
|
||||
'port' => env('MEMCACHED_PORT', 11211),
|
||||
'weight' => 100,
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
'redis' => [
|
||||
'driver' => 'redis',
|
||||
'connection' => 'cache',
|
||||
'lock_connection' => 'default',
|
||||
],
|
||||
'redis' => [
|
||||
'driver' => 'redis',
|
||||
'connection' => 'cache',
|
||||
'lock_connection' => 'default',
|
||||
],
|
||||
|
||||
'dynamodb' => [
|
||||
'driver' => 'dynamodb',
|
||||
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
|
||||
'endpoint' => env('DYNAMODB_ENDPOINT'),
|
||||
],
|
||||
'dynamodb' => [
|
||||
'driver' => 'dynamodb',
|
||||
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
|
||||
'endpoint' => env('DYNAMODB_ENDPOINT'),
|
||||
],
|
||||
|
||||
'octane' => [
|
||||
'driver' => 'octane',
|
||||
],
|
||||
'octane' => [
|
||||
'driver' => 'octane',
|
||||
],
|
||||
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Key Prefix
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When utilizing a RAM based store such as APC or Memcached, there might
|
||||
| be other applications utilizing the same cache. So, we'll specify a
|
||||
| value to get prefixed to all our keys so we can avoid collisions.
|
||||
|
|
||||
*/
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Key Prefix
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When utilizing the APC, database, memcached, Redis, or DynamoDB cache
|
||||
| stores there might be other applications using the same cache. For
|
||||
| that reason, you may prefix every cache key to avoid collisions.
|
||||
|
|
||||
*/
|
||||
|
||||
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_cache'),
|
||||
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_cache_'),
|
||||
|
||||
];
|
||||
];
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
| !!!! DO NOT EDIT THIS FILE !!!!
|
||||
|
|
||||
| You can change settings by setting them in the environment or .env
|
||||
| If there is something you need to change, but is not available as an environment setting,
|
||||
| request an environment variable to be created upstream or send a pull request.
|
||||
*/
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|
@ -15,44 +23,20 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
/*
|
||||
* You can enable CORS for 1 or multiple paths.
|
||||
* Example: ['api/*']
|
||||
*/
|
||||
'paths' => [],
|
||||
|
||||
/*
|
||||
* Matches the request method. `[*]` allows all methods.
|
||||
*/
|
||||
'allowed_methods' => ['*'],
|
||||
|
||||
/*
|
||||
* Matches the request origin. `[*]` allows all origins. Wildcards can be used, eg `*.mydomain.com`
|
||||
*/
|
||||
'allowed_origins' => [],
|
||||
|
||||
/*
|
||||
* Patterns that can be used with `preg_match` to match the origin.
|
||||
*/
|
||||
'allowed_origins_patterns' => [],
|
||||
|
||||
/*
|
||||
* Sets the Access-Control-Allow-Headers response header. `[*]` allows all headers.
|
||||
*/
|
||||
'allowed_headers' => ['*'],
|
||||
|
||||
/*
|
||||
* Sets the Access-Control-Expose-Headers response header with these headers.
|
||||
*/
|
||||
'exposed_headers' => [],
|
||||
|
||||
/*
|
||||
* Sets the Access-Control-Max-Age response header when > 0.
|
||||
*/
|
||||
'max_age' => 0,
|
||||
|
||||
/*
|
||||
* Sets the Access-Control-Allow-Credentials header.
|
||||
*/
|
||||
'supports_credentials' => false,
|
||||
|
||||
];
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
/*
|
||||
| !!!! DO NOT EDIT THIS FILE !!!!
|
||||
|
|
||||
| You can change settings by setting them in the environment or .env
|
||||
|
@ -8,189 +8,189 @@
|
|||
| request an environment variable to be created upstream or send a pull request.
|
||||
*/
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
return [
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Database Connection Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify which of the database connections below you wish
|
||||
| to use as your default connection for all database work. Of course
|
||||
| you may use many connections at once using the Database library.
|
||||
|
|
||||
*/
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Database Connection Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify which of the database connections below you wish
|
||||
| to use as your default connection for all database work. Of course
|
||||
| you may use many connections at once using the Database library.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('DB_CONNECTION', env('DBTEST') ? 'testing' : 'mysql'),
|
||||
'default' => env('DB_CONNECTION', env('DBTEST') ? 'testing' : 'mysql'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Database Connections
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here are each of the database connections setup for your application.
|
||||
| Of course, examples of configuring each database platform that is
|
||||
| supported by Laravel is shown below to make development simple.
|
||||
|
|
||||
|
|
||||
| All database work in Laravel is done through the PHP PDO facilities
|
||||
| so make sure you have the driver for your particular database of
|
||||
| choice installed on your machine before you begin development.
|
||||
|
|
||||
*/
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Database Connections
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here are each of the database connections setup for your application.
|
||||
| Of course, examples of configuring each database platform that is
|
||||
| supported by Laravel is shown below to make development simple.
|
||||
|
|
||||
|
|
||||
| All database work in Laravel is done through the PHP PDO facilities
|
||||
| so make sure you have the driver for your particular database of
|
||||
| choice installed on your machine before you begin development.
|
||||
|
|
||||
*/
|
||||
|
||||
'connections' => [
|
||||
'connections' => [
|
||||
|
||||
'sqlite' => [
|
||||
'driver' => 'sqlite',
|
||||
'url' => env('DATABASE_URL'),
|
||||
'database' => env('DB_DATABASE', storage_path('librenms.sqlite')),
|
||||
'prefix' => '',
|
||||
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
|
||||
],
|
||||
'sqlite' => [
|
||||
'driver' => 'sqlite',
|
||||
'url' => env('DATABASE_URL'),
|
||||
'database' => env('DB_DATABASE', storage_path('librenms.sqlite')),
|
||||
'prefix' => '',
|
||||
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
|
||||
],
|
||||
|
||||
'mysql' => [
|
||||
'driver' => 'mysql',
|
||||
'url' => env('DATABASE_URL'),
|
||||
'host' => env('DB_HOST', 'localhost'),
|
||||
'port' => env('DB_PORT', '3306'),
|
||||
'database' => env('DB_DATABASE', 'librenms'),
|
||||
'username' => env('DB_USERNAME', 'librenms'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'unix_socket' => env('DB_SOCKET', ''),
|
||||
'charset' => 'utf8mb4',
|
||||
'collation' => 'utf8mb4_unicode_ci',
|
||||
'prefix' => '',
|
||||
'prefix_indexes' => true,
|
||||
'strict' => true,
|
||||
'engine' => null,
|
||||
'sslmode' => env('DB_SSLMODE', 'disabled'),
|
||||
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
||||
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
|
||||
]) : [],
|
||||
],
|
||||
'mysql' => [
|
||||
'driver' => 'mysql',
|
||||
'url' => env('DATABASE_URL'),
|
||||
'host' => env('DB_HOST', 'localhost'),
|
||||
'port' => env('DB_PORT', '3306'),
|
||||
'database' => env('DB_DATABASE', 'librenms'),
|
||||
'username' => env('DB_USERNAME', 'librenms'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'unix_socket' => env('DB_SOCKET', ''),
|
||||
'charset' => 'utf8mb4',
|
||||
'collation' => 'utf8mb4_unicode_ci',
|
||||
'prefix' => '',
|
||||
'prefix_indexes' => true,
|
||||
'strict' => true,
|
||||
'engine' => null,
|
||||
'sslmode' => env('DB_SSLMODE', 'disabled'),
|
||||
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
||||
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
|
||||
]) : [],
|
||||
],
|
||||
|
||||
'mysql_cluster' => [
|
||||
'read' => [
|
||||
'host' => [
|
||||
env('DB_HOST', 'localhost'),
|
||||
env('DB_HOST_R2', ''),
|
||||
env('DB_HOST_R3', ''),
|
||||
env('DB_HOST_R4', ''),
|
||||
env('DB_HOST_R5', ''),
|
||||
env('DB_HOST_R6', ''),
|
||||
env('DB_HOST_R7', ''),
|
||||
env('DB_HOST_R8', ''),
|
||||
env('DB_HOST_R9', ''),
|
||||
],
|
||||
],
|
||||
'write' => [
|
||||
'host' => [
|
||||
env('DB_HOST', 'localhost'),
|
||||
env('DB_HOST_W2', ''),
|
||||
env('DB_HOST_W3', ''),
|
||||
env('DB_HOST_W4', ''),
|
||||
env('DB_HOST_W5', ''),
|
||||
env('DB_HOST_W6', ''),
|
||||
env('DB_HOST_W7', ''),
|
||||
env('DB_HOST_W8', ''),
|
||||
env('DB_HOST_W9', ''),
|
||||
],
|
||||
],
|
||||
'sticky' => env('DB_STICKY', null),
|
||||
'driver' => 'mysql',
|
||||
'host' => env('DB_HOST', 'localhost'),
|
||||
'port' => env('DB_PORT', '3306'),
|
||||
'database' => env('DB_DATABASE', 'librenms'),
|
||||
'username' => env('DB_USERNAME', 'librenms'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'unix_socket' => env('DB_SOCKET', ''),
|
||||
'charset' => 'utf8mb4',
|
||||
'collation' => 'utf8mb4_unicode_ci',
|
||||
'prefix' => '',
|
||||
'prefix_indexes' => true,
|
||||
'strict' => true,
|
||||
'engine' => null,
|
||||
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
||||
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
|
||||
]) : [],
|
||||
],
|
||||
'mysql_cluster' => [
|
||||
'read' => [
|
||||
'host' => [
|
||||
env('DB_HOST', 'localhost'),
|
||||
env('DB_HOST_R2', ''),
|
||||
env('DB_HOST_R3', ''),
|
||||
env('DB_HOST_R4', ''),
|
||||
env('DB_HOST_R5', ''),
|
||||
env('DB_HOST_R6', ''),
|
||||
env('DB_HOST_R7', ''),
|
||||
env('DB_HOST_R8', ''),
|
||||
env('DB_HOST_R9', ''),
|
||||
],
|
||||
],
|
||||
'write' => [
|
||||
'host' => [
|
||||
env('DB_HOST', 'localhost'),
|
||||
env('DB_HOST_W2', ''),
|
||||
env('DB_HOST_W3', ''),
|
||||
env('DB_HOST_W4', ''),
|
||||
env('DB_HOST_W5', ''),
|
||||
env('DB_HOST_W6', ''),
|
||||
env('DB_HOST_W7', ''),
|
||||
env('DB_HOST_W8', ''),
|
||||
env('DB_HOST_W9', ''),
|
||||
],
|
||||
],
|
||||
'sticky' => env('DB_STICKY', null),
|
||||
'driver' => 'mysql',
|
||||
'host' => env('DB_HOST', 'localhost'),
|
||||
'port' => env('DB_PORT', '3306'),
|
||||
'database' => env('DB_DATABASE', 'librenms'),
|
||||
'username' => env('DB_USERNAME', 'librenms'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'unix_socket' => env('DB_SOCKET', ''),
|
||||
'charset' => 'utf8mb4',
|
||||
'collation' => 'utf8mb4_unicode_ci',
|
||||
'prefix' => '',
|
||||
'prefix_indexes' => true,
|
||||
'strict' => true,
|
||||
'engine' => null,
|
||||
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
||||
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
|
||||
]) : [],
|
||||
],
|
||||
|
||||
'testing' => [
|
||||
'driver' => env('DB_TEST_DRIVER', 'mysql'),
|
||||
'host' => env('DB_TEST_HOST', 'localhost'),
|
||||
'port' => env('DB_TEST_PORT', '3306'),
|
||||
'database' => env('DB_TEST_DATABASE', 'librenms_phpunit_78hunjuybybh'),
|
||||
'username' => env('DB_TEST_USERNAME', 'root'),
|
||||
'password' => env('DB_TEST_PASSWORD', ''),
|
||||
'unix_socket' => env('DB_TEST_SOCKET', ''),
|
||||
'charset' => 'utf8mb4',
|
||||
'collation' => 'utf8mb4_unicode_ci',
|
||||
'prefix' => '',
|
||||
'strict' => true,
|
||||
'engine' => null,
|
||||
],
|
||||
'testing' => [
|
||||
'driver' => env('DB_TEST_DRIVER', 'mysql'),
|
||||
'host' => env('DB_TEST_HOST', 'localhost'),
|
||||
'port' => env('DB_TEST_PORT', '3306'),
|
||||
'database' => env('DB_TEST_DATABASE', 'librenms_phpunit_78hunjuybybh'),
|
||||
'username' => env('DB_TEST_USERNAME', 'root'),
|
||||
'password' => env('DB_TEST_PASSWORD', ''),
|
||||
'unix_socket' => env('DB_TEST_SOCKET', ''),
|
||||
'charset' => 'utf8mb4',
|
||||
'collation' => 'utf8mb4_unicode_ci',
|
||||
'prefix' => '',
|
||||
'strict' => true,
|
||||
'engine' => null,
|
||||
],
|
||||
|
||||
'pgsql' => [
|
||||
'driver' => 'pgsql',
|
||||
'url' => env('DATABASE_URL'),
|
||||
'host' => env('DB_HOST', '127.0.0.1'),
|
||||
'port' => env('DB_PORT', '5432'),
|
||||
'database' => env('DB_DATABASE', 'forge'),
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'charset' => 'utf8',
|
||||
'prefix' => '',
|
||||
'prefix_indexes' => true,
|
||||
'schema' => 'public',
|
||||
'sslmode' => 'prefer',
|
||||
],
|
||||
'pgsql' => [
|
||||
'driver' => 'pgsql',
|
||||
'url' => env('DATABASE_URL'),
|
||||
'host' => env('DB_HOST', '127.0.0.1'),
|
||||
'port' => env('DB_PORT', '5432'),
|
||||
'database' => env('DB_DATABASE', 'forge'),
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'charset' => 'utf8',
|
||||
'prefix' => '',
|
||||
'prefix_indexes' => true,
|
||||
'search_path' => 'public',
|
||||
'sslmode' => 'prefer',
|
||||
],
|
||||
|
||||
'sqlsrv' => [
|
||||
'driver' => 'sqlsrv',
|
||||
'url' => env('DATABASE_URL'),
|
||||
'host' => env('DB_HOST', 'localhost'),
|
||||
'port' => env('DB_PORT', '1433'),
|
||||
'database' => env('DB_DATABASE', 'forge'),
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'charset' => 'utf8',
|
||||
'prefix' => '',
|
||||
'prefix_indexes' => true,
|
||||
],
|
||||
'sqlsrv' => [
|
||||
'driver' => 'sqlsrv',
|
||||
'url' => env('DATABASE_URL'),
|
||||
'host' => env('DB_HOST', 'localhost'),
|
||||
'port' => env('DB_PORT', '1433'),
|
||||
'database' => env('DB_DATABASE', 'forge'),
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'charset' => 'utf8',
|
||||
'prefix' => '',
|
||||
'prefix_indexes' => true,
|
||||
],
|
||||
|
||||
'testing_memory' => [
|
||||
'driver' => 'sqlite',
|
||||
'database' => ':memory:',
|
||||
'prefix' => '',
|
||||
'foreign_key_constraints' => true,
|
||||
],
|
||||
'testing_memory' => [
|
||||
'driver' => 'sqlite',
|
||||
'database' => ':memory:',
|
||||
'prefix' => '',
|
||||
'foreign_key_constraints' => true,
|
||||
],
|
||||
|
||||
'testing_persistent' => [
|
||||
'driver' => 'sqlite',
|
||||
'database' => storage_path('testing.sqlite'),
|
||||
'prefix' => '',
|
||||
'foreign_key_constraints' => true,
|
||||
],
|
||||
'testing_persistent' => [
|
||||
'driver' => 'sqlite',
|
||||
'database' => storage_path('testing.sqlite'),
|
||||
'prefix' => '',
|
||||
'foreign_key_constraints' => true,
|
||||
],
|
||||
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Migration Repository Table
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This table keeps track of all the migrations that have already run for
|
||||
| your application. Using this information, we can determine which of
|
||||
| the migrations on disk haven't actually been run in the database.
|
||||
|
|
||||
*/
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Migration Repository Table
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This table keeps track of all the migrations that have already run for
|
||||
| your application. Using this information, we can determine which of
|
||||
| the migrations on disk haven't actually been run in the database.
|
||||
|
|
||||
*/
|
||||
|
||||
'migrations' => 'migrations',
|
||||
'migrations' => 'migrations',
|
||||
|
||||
/*
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Redis Databases
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -201,32 +201,32 @@
|
|||
|
|
||||
*/
|
||||
|
||||
'redis' => [
|
||||
'redis' => [
|
||||
|
||||
'client' => env('REDIS_CLIENT', 'predis'),
|
||||
'client' => env('REDIS_CLIENT', 'predis'),
|
||||
|
||||
'options' => [
|
||||
'cluster' => env('REDIS_CLUSTER', 'redis'),
|
||||
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_database_'),
|
||||
],
|
||||
'options' => [
|
||||
'cluster' => env('REDIS_CLUSTER', 'redis'),
|
||||
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_database_'),
|
||||
],
|
||||
|
||||
'default' => [
|
||||
'scheme' => env('REDIS_SCHEME', 'tcp'),
|
||||
'url' => env('REDIS_URL'),
|
||||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||
'password' => env('REDIS_PASSWORD', null),
|
||||
'port' => env('REDIS_PORT', '6379'),
|
||||
'database' => env('REDIS_DB', '0'),
|
||||
],
|
||||
'default' => [
|
||||
'scheme' => env('REDIS_SCHEME', 'tcp'),
|
||||
'url' => env('REDIS_URL'),
|
||||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||
'password' => env('REDIS_PASSWORD', null),
|
||||
'port' => env('REDIS_PORT', '6379'),
|
||||
'database' => env('REDIS_DB', '0'),
|
||||
],
|
||||
|
||||
'cache' => [
|
||||
'url' => env('REDIS_URL'),
|
||||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||
'password' => env('REDIS_PASSWORD', null),
|
||||
'port' => env('REDIS_PORT', '6379'),
|
||||
'database' => env('REDIS_CACHE_DB', '1'),
|
||||
],
|
||||
'cache' => [
|
||||
'url' => env('REDIS_URL'),
|
||||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||
'password' => env('REDIS_PASSWORD', null),
|
||||
'port' => env('REDIS_PORT', '6379'),
|
||||
'database' => env('REDIS_CACHE_DB', '1'),
|
||||
],
|
||||
|
||||
],
|
||||
],
|
||||
|
||||
];
|
||||
];
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
/*
|
||||
| !!!! DO NOT EDIT THIS FILE !!!!
|
||||
|
|
||||
| You can change settings by setting them in the environment or .env
|
||||
|
@ -8,9 +8,9 @@
|
|||
| request an environment variable to be created upstream or send a pull request.
|
||||
*/
|
||||
|
||||
return [
|
||||
return [
|
||||
|
||||
/*
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Filesystem Disk
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -21,54 +21,57 @@
|
|||
|
|
||||
*/
|
||||
|
||||
'default' => env('FILESYSTEM_DRIVER', 'local'),
|
||||
'default' => env('FILESYSTEM_DISK', 'local'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Filesystem Disks
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure as many filesystem "disks" as you wish, and you
|
||||
| may even configure multiple disks of the same driver. Defaults have
|
||||
| been setup for each driver as an example of the required options.
|
||||
|
|
||||
| Supported Drivers: "local", "ftp", "sftp", "s3"
|
||||
|
|
||||
*/
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Filesystem Disks
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure as many filesystem "disks" as you wish, and you
|
||||
| may even configure multiple disks of the same driver. Defaults have
|
||||
| been set up for each driver as an example of the required values.
|
||||
|
|
||||
| Supported Drivers: "local", "ftp", "sftp", "s3"
|
||||
|
|
||||
*/
|
||||
|
||||
'disks' => [
|
||||
'disks' => [
|
||||
|
||||
'local' => [
|
||||
'driver' => 'local',
|
||||
'root' => storage_path('app'),
|
||||
],
|
||||
'local' => [
|
||||
'driver' => 'local',
|
||||
'root' => storage_path('app'),
|
||||
'throw' => false,
|
||||
],
|
||||
|
||||
'base' => [
|
||||
'driver' => 'local',
|
||||
'root' => base_path(),
|
||||
],
|
||||
'base' => [
|
||||
'driver' => 'local',
|
||||
'root' => base_path(),
|
||||
],
|
||||
|
||||
'public' => [
|
||||
'driver' => 'local',
|
||||
'root' => storage_path('app/public'),
|
||||
'url' => env('APP_URL') . '/storage',
|
||||
'visibility' => 'public',
|
||||
],
|
||||
'public' => [
|
||||
'driver' => 'local',
|
||||
'root' => storage_path('app/public'),
|
||||
'url' => env('APP_URL') . '/storage',
|
||||
'visibility' => 'public',
|
||||
'throw' => false,
|
||||
],
|
||||
|
||||
's3' => [
|
||||
'driver' => 's3',
|
||||
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||
'region' => env('AWS_DEFAULT_REGION'),
|
||||
'bucket' => env('AWS_BUCKET'),
|
||||
'url' => env('AWS_URL'),
|
||||
'endpoint' => env('AWS_ENDPOINT'),
|
||||
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
|
||||
],
|
||||
's3' => [
|
||||
'driver' => 's3',
|
||||
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||
'region' => env('AWS_DEFAULT_REGION'),
|
||||
'bucket' => env('AWS_BUCKET'),
|
||||
'url' => env('AWS_URL'),
|
||||
'endpoint' => env('AWS_ENDPOINT'),
|
||||
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
|
||||
'throw' => false,
|
||||
],
|
||||
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Symbolic Links
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -79,8 +82,8 @@
|
|||
|
|
||||
*/
|
||||
|
||||
'links' => [
|
||||
public_path('storage') => storage_path('app/public'),
|
||||
],
|
||||
'links' => [
|
||||
public_path('storage') => storage_path('app/public'),
|
||||
],
|
||||
|
||||
];
|
||||
];
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
/*
|
||||
| !!!! DO NOT EDIT THIS FILE !!!!
|
||||
|
|
||||
| You can change settings by setting them in the environment or .env
|
||||
|
@ -8,8 +8,20 @@
|
|||
| request an environment variable to be created upstream or send a pull request.
|
||||
*/
|
||||
|
||||
return [
|
||||
/*
|
||||
use Spatie\FlareClient\FlareMiddleware\AddGitInformation;
|
||||
use Spatie\FlareClient\FlareMiddleware\CensorRequestBodyFields;
|
||||
use Spatie\FlareClient\FlareMiddleware\CensorRequestHeaders;
|
||||
use Spatie\FlareClient\FlareMiddleware\RemoveRequestIp;
|
||||
use Spatie\LaravelIgnition\FlareMiddleware\AddDumps;
|
||||
use Spatie\LaravelIgnition\FlareMiddleware\AddEnvironmentInformation;
|
||||
use Spatie\LaravelIgnition\FlareMiddleware\AddExceptionInformation;
|
||||
use Spatie\LaravelIgnition\FlareMiddleware\AddJobs;
|
||||
use Spatie\LaravelIgnition\FlareMiddleware\AddLogs;
|
||||
use Spatie\LaravelIgnition\FlareMiddleware\AddNotifierName;
|
||||
use Spatie\LaravelIgnition\FlareMiddleware\AddQueries;
|
||||
|
||||
return [
|
||||
/*
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Flare API key
|
||||
|
@ -21,33 +33,59 @@
|
|||
|
|
||||
*/
|
||||
|
||||
'key' => env('FLARE_KEY', 'quYFBTFNKHLBqFCoeo5yDVOQNbs6muV1'),
|
||||
'key' => env('FLARE_KEY', 'quYFBTFNKHLBqFCoeo5yDVOQNbs6muV1'),
|
||||
|
||||
/*
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Reporting Options
|
||||
| Middleware
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These options determine which information will be transmitted to Flare.
|
||||
| These middleware will modify the contents of the report sent to Flare.
|
||||
|
|
||||
*/
|
||||
|
||||
'reporting' => [
|
||||
'anonymize_ips' => true,
|
||||
'collect_git_information' => false,
|
||||
'report_queries' => true,
|
||||
'maximum_number_of_collected_queries' => 50,
|
||||
'report_query_bindings' => true,
|
||||
'report_view_data' => true,
|
||||
'grouping_type' => null,
|
||||
'report_logs' => false,
|
||||
'maximum_number_of_collected_logs' => 50,
|
||||
'censor_request_body_fields' => ['username', 'password', 'sysContact', 'community', 'authname', 'authpass', 'cryptopass'],
|
||||
],
|
||||
'flare_middleware' => [
|
||||
RemoveRequestIp::class,
|
||||
//AddGitInformation::class,
|
||||
AddNotifierName::class,
|
||||
AddEnvironmentInformation::class,
|
||||
AddExceptionInformation::class,
|
||||
AddDumps::class,
|
||||
/*
|
||||
AddLogs::class => [
|
||||
'maximum_number_of_collected_logs' => 200,
|
||||
],
|
||||
*/
|
||||
AddQueries::class => [
|
||||
'maximum_number_of_collected_queries' => 50,
|
||||
'report_query_bindings' => true,
|
||||
],
|
||||
AddJobs::class => [
|
||||
'max_chained_job_reporting_depth' => 5,
|
||||
],
|
||||
CensorRequestBodyFields::class => [
|
||||
'censor_fields' => [
|
||||
'password',
|
||||
'password_confirmation',
|
||||
// LibreNMS
|
||||
'username',
|
||||
'sysContact',
|
||||
'community',
|
||||
'authname',
|
||||
'authpass',
|
||||
'cryptopass',
|
||||
],
|
||||
],
|
||||
CensorRequestHeaders::class => [
|
||||
'headers' => [
|
||||
'API-KEY',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Reporting Log statements
|
||||
| Reporting log statements
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If this setting is `false` log statements won't be sent as events to Flare,
|
||||
|
@ -55,16 +93,5 @@
|
|||
|
|
||||
*/
|
||||
|
||||
'send_logs_as_events' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Censor request body fields
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These fields will be censored from your request when sent to Flare.
|
||||
|
|
||||
*/
|
||||
|
||||
'censor_request_body_fields' => ['username', 'password', 'sysContact', 'community', 'authname', 'authpass', 'cryptopass'],
|
||||
];
|
||||
'send_logs_as_events' => false,
|
||||
];
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
/*
|
||||
| !!!! DO NOT EDIT THIS FILE !!!!
|
||||
|
|
||||
| You can change settings by setting them in the environment or .env
|
||||
|
@ -8,9 +8,9 @@
|
|||
| request an environment variable to be created upstream or send a pull request.
|
||||
*/
|
||||
|
||||
return [
|
||||
return [
|
||||
|
||||
/*
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Hash Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -23,9 +23,9 @@
|
|||
|
|
||||
*/
|
||||
|
||||
'driver' => 'bcrypt',
|
||||
'driver' => 'bcrypt',
|
||||
|
||||
/*
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Bcrypt Options
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -36,11 +36,11 @@
|
|||
|
|
||||
*/
|
||||
|
||||
'bcrypt' => [
|
||||
'rounds' => env('BCRYPT_ROUNDS', 10),
|
||||
],
|
||||
'bcrypt' => [
|
||||
'rounds' => env('BCRYPT_ROUNDS', 10),
|
||||
],
|
||||
|
||||
/*
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Argon Options
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -51,10 +51,10 @@
|
|||
|
|
||||
*/
|
||||
|
||||
'argon' => [
|
||||
'memory' => 1024,
|
||||
'threads' => 2,
|
||||
'time' => 2,
|
||||
],
|
||||
'argon' => [
|
||||
'memory' => 1024,
|
||||
'threads' => 2,
|
||||
'time' => 2,
|
||||
],
|
||||
|
||||
];
|
||||
];
|
||||
|
|
|
@ -1,126 +1,241 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
| !!!! DO NOT EDIT THIS FILE !!!!
|
||||
|
|
||||
| You can change settings by setting them in the environment or .env
|
||||
| If there is something you need to change, but is not available as an environment setting,
|
||||
| request an environment variable to be created upstream or send a pull request.
|
||||
*/
|
||||
|
||||
use Spatie\Ignition\Solutions\SolutionProviders\BadMethodCallSolutionProvider;
|
||||
use Spatie\Ignition\Solutions\SolutionProviders\MergeConflictSolutionProvider;
|
||||
use Spatie\Ignition\Solutions\SolutionProviders\UndefinedPropertySolutionProvider;
|
||||
use Spatie\LaravelIgnition\Recorders\DumpRecorder\DumpRecorder;
|
||||
use Spatie\LaravelIgnition\Recorders\JobRecorder\JobRecorder;
|
||||
use Spatie\LaravelIgnition\Recorders\LogRecorder\LogRecorder;
|
||||
use Spatie\LaravelIgnition\Recorders\QueryRecorder\QueryRecorder;
|
||||
use Spatie\LaravelIgnition\Solutions\SolutionProviders\DefaultDbNameSolutionProvider;
|
||||
use Spatie\LaravelIgnition\Solutions\SolutionProviders\GenericLaravelExceptionSolutionProvider;
|
||||
use Spatie\LaravelIgnition\Solutions\SolutionProviders\IncorrectValetDbCredentialsSolutionProvider;
|
||||
use Spatie\LaravelIgnition\Solutions\SolutionProviders\InvalidRouteActionSolutionProvider;
|
||||
use Spatie\LaravelIgnition\Solutions\SolutionProviders\MissingAppKeySolutionProvider;
|
||||
use Spatie\LaravelIgnition\Solutions\SolutionProviders\MissingColumnSolutionProvider;
|
||||
use Spatie\LaravelIgnition\Solutions\SolutionProviders\MissingImportSolutionProvider;
|
||||
use Spatie\LaravelIgnition\Solutions\SolutionProviders\MissingLivewireComponentSolutionProvider;
|
||||
use Spatie\LaravelIgnition\Solutions\SolutionProviders\MissingMixManifestSolutionProvider;
|
||||
use Spatie\LaravelIgnition\Solutions\SolutionProviders\MissingViteManifestSolutionProvider;
|
||||
use Spatie\LaravelIgnition\Solutions\SolutionProviders\RunningLaravelDuskInProductionProvider;
|
||||
use Spatie\LaravelIgnition\Solutions\SolutionProviders\TableNotFoundSolutionProvider;
|
||||
use Spatie\LaravelIgnition\Solutions\SolutionProviders\UndefinedViewVariableSolutionProvider;
|
||||
use Spatie\LaravelIgnition\Solutions\SolutionProviders\UnknownValidationSolutionProvider;
|
||||
use Spatie\LaravelIgnition\Solutions\SolutionProviders\ViewNotFoundSolutionProvider;
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Editor
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Choose your preferred editor to use when clicking any edit button.
|
||||
|
|
||||
| Supported: "phpstorm", "vscode", "vscode-insiders", "vscodium", "textmate", "emacs",
|
||||
| "sublime", "atom", "nova", "macvim", "idea", "netbeans",
|
||||
| "xdebug"
|
||||
|
|
||||
*/
|
||||
|--------------------------------------------------------------------------
|
||||
| Editor
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Choose your preferred editor to use when clicking any edit button.
|
||||
|
|
||||
| Supported: "phpstorm", "vscode", "vscode-insiders", "textmate", "emacs",
|
||||
| "sublime", "atom", "nova", "macvim", "idea", "netbeans",
|
||||
| "xdebug"
|
||||
|
|
||||
*/
|
||||
|
||||
'editor' => env('IGNITION_EDITOR', 'phpstorm'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Theme
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify which theme Ignition should use.
|
||||
|
|
||||
| Supported: "light", "dark", "auto"
|
||||
|
|
||||
*/
|
||||
|--------------------------------------------------------------------------
|
||||
| Theme
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify which theme Ignition should use.
|
||||
|
|
||||
| Supported: "light", "dark", "auto"
|
||||
|
|
||||
*/
|
||||
|
||||
'theme' => env('IGNITION_THEME', 'auto'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Sharing
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You can share local errors with colleagues or others around the world.
|
||||
| Sharing is completely free and doesn't require an account on Flare.
|
||||
|
|
||||
| If necessary, you can completely disable sharing below.
|
||||
|
|
||||
*/
|
||||
|--------------------------------------------------------------------------
|
||||
| Sharing
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You can share local errors with colleagues or others around the world.
|
||||
| Sharing is completely free and doesn't require an account on Flare.
|
||||
|
|
||||
| If necessary, you can completely disable sharing below.
|
||||
|
|
||||
*/
|
||||
|
||||
'enable_share_button' => env('IGNITION_SHARING_ENABLED', true),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Register Ignition commands
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Ignition comes with an additional make command that lets you create
|
||||
| new solution classes more easily. To keep your default Laravel
|
||||
| installation clean, this command is not registered by default.
|
||||
|
|
||||
| You can enable the command registration below.
|
||||
|
|
||||
*/
|
||||
|--------------------------------------------------------------------------
|
||||
| Register Ignition commands
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Ignition comes with an additional make command that lets you create
|
||||
| new solution classes more easily. To keep your default Laravel
|
||||
| installation clean, this command is not registered by default.
|
||||
|
|
||||
| You can enable the command registration below.
|
||||
|
|
||||
*/
|
||||
|
||||
'register_commands' => env('REGISTER_IGNITION_COMMANDS', false),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Ignored Solution Providers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You may specify a list of solution providers (as fully qualified class
|
||||
| names) that shouldn't be loaded. Ignition will ignore these classes
|
||||
| and possible solutions provided by them will never be displayed.
|
||||
|
|
||||
*/
|
||||
|--------------------------------------------------------------------------
|
||||
| Solution Providers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You may specify a list of solution providers (as fully qualified class
|
||||
| names) that shouldn't be loaded. Ignition will ignore these classes
|
||||
| and possible solutions provided by them will never be displayed.
|
||||
|
|
||||
*/
|
||||
|
||||
'ignored_solution_providers' => [
|
||||
\Facade\Ignition\SolutionProviders\MissingPackageSolutionProvider::class,
|
||||
'solution_providers' => [
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Runnable Solutions
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Some solutions that Ignition displays are runnable and can perform
|
||||
| various tasks. Runnable solutions are enabled when your app has
|
||||
| debug mode enabled. You may also fully disable this feature.
|
||||
|
|
||||
*/
|
||||
|--------------------------------------------------------------------------
|
||||
| Ignored Solution Providers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You may specify a list of solution providers (as fully qualified class
|
||||
| names) that shouldn't be loaded. Ignition will ignore these classes
|
||||
| and possible solutions provided by them will never be displayed.
|
||||
|
|
||||
*/
|
||||
|
||||
'ignored_solution_providers' => [
|
||||
// from spatie/ignition
|
||||
BadMethodCallSolutionProvider::class,
|
||||
MergeConflictSolutionProvider::class,
|
||||
UndefinedPropertySolutionProvider::class,
|
||||
|
||||
// from spatie/laravel-ignition
|
||||
IncorrectValetDbCredentialsSolutionProvider::class,
|
||||
MissingAppKeySolutionProvider::class,
|
||||
DefaultDbNameSolutionProvider::class,
|
||||
TableNotFoundSolutionProvider::class,
|
||||
MissingImportSolutionProvider::class,
|
||||
InvalidRouteActionSolutionProvider::class,
|
||||
ViewNotFoundSolutionProvider::class,
|
||||
RunningLaravelDuskInProductionProvider::class,
|
||||
MissingColumnSolutionProvider::class,
|
||||
UnknownValidationSolutionProvider::class,
|
||||
MissingMixManifestSolutionProvider::class,
|
||||
MissingViteManifestSolutionProvider::class,
|
||||
MissingLivewireComponentSolutionProvider::class,
|
||||
UndefinedViewVariableSolutionProvider::class,
|
||||
GenericLaravelExceptionSolutionProvider::class,
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Runnable Solutions
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Some solutions that Ignition displays are runnable and can perform
|
||||
| various tasks. By default, runnable solutions are only enabled when your
|
||||
| app has debug mode enabled and the environment is `local` or
|
||||
| `development`.
|
||||
|
|
||||
| Using the `IGNITION_ENABLE_RUNNABLE_SOLUTIONS` environment variable, you
|
||||
| can override this behaviour and enable or disable runnable solutions
|
||||
| regardless of the application's environment.
|
||||
|
|
||||
| Default: env('IGNITION_ENABLE_RUNNABLE_SOLUTIONS')
|
||||
|
|
||||
*/
|
||||
|
||||
'enable_runnable_solutions' => env('IGNITION_ENABLE_RUNNABLE_SOLUTIONS', false),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Remote Path Mapping
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If you are using a remote dev server, like Laravel Homestead, Docker, or
|
||||
| even a remote VPS, it will be necessary to specify your path mapping.
|
||||
|
|
||||
| Leaving one, or both of these, empty or null will not trigger the remote
|
||||
| URL changes and Ignition will treat your editor links as local files.
|
||||
|
|
||||
| "remote_sites_path" is an absolute base path for your sites or projects
|
||||
| in Homestead, Vagrant, Docker, or another remote development server.
|
||||
|
|
||||
| Example value: "/home/vagrant/Code"
|
||||
|
|
||||
| "local_sites_path" is an absolute base path for your sites or projects
|
||||
| on your local computer where your IDE or code editor is running on.
|
||||
|
|
||||
| Example values: "/Users/<name>/Code", "C:\Users\<name>\Documents\Code"
|
||||
|
|
||||
*/
|
||||
|--------------------------------------------------------------------------
|
||||
| Remote Path Mapping
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If you are using a remote dev server, like Laravel Homestead, Docker, or
|
||||
| even a remote VPS, it will be necessary to specify your path mapping.
|
||||
|
|
||||
| Leaving one, or both of these, empty or null will not trigger the remote
|
||||
| URL changes and Ignition will treat your editor links as local files.
|
||||
|
|
||||
| "remote_sites_path" is an absolute base path for your sites or projects
|
||||
| in Homestead, Vagrant, Docker, or another remote development server.
|
||||
|
|
||||
| Example value: "/home/vagrant/Code"
|
||||
|
|
||||
| "local_sites_path" is an absolute base path for your sites or projects
|
||||
| on your local computer where your IDE or code editor is running on.
|
||||
|
|
||||
| Example values: "/Users/<name>/Code", "C:\Users\<name>\Documents\Code"
|
||||
|
|
||||
*/
|
||||
|
||||
'remote_sites_path' => env('IGNITION_REMOTE_SITES_PATH', ''),
|
||||
'remote_sites_path' => env('IGNITION_REMOTE_SITES_PATH', base_path()),
|
||||
'local_sites_path' => env('IGNITION_LOCAL_SITES_PATH', ''),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Housekeeping Endpoint Prefix
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Ignition registers a couple of routes when it is enabled. Below you may
|
||||
| specify a route prefix that will be used to host all internal links.
|
||||
|
|
||||
*/
|
||||
|--------------------------------------------------------------------------
|
||||
| Housekeeping Endpoint Prefix
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Ignition registers a couple of routes when it is enabled. Below you may
|
||||
| specify a route prefix that will be used to host all internal links.
|
||||
|
|
||||
*/
|
||||
|
||||
'housekeeping_endpoint_prefix' => '_ignition',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Settings File
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Ignition allows you to save your settings to a specific global file.
|
||||
|
|
||||
| If no path is specified, a file with settings will be saved to the user's
|
||||
| home directory. The directory depends on the OS and its settings but it's
|
||||
| typically `~/.ignition.json`. In this case, the settings will be applied
|
||||
| to all of your projects where Ignition is used and the path is not
|
||||
| specified.
|
||||
|
|
||||
| However, if you want to store your settings on a project basis, or you
|
||||
| want to keep them in another directory, you can specify a path where
|
||||
| the settings file will be saved. The path should be an existing directory
|
||||
| with correct write access.
|
||||
| For example, create a new `ignition` folder in the storage directory and
|
||||
| use `storage_path('ignition')` as the `settings_file_path`.
|
||||
|
|
||||
| Default value: '' (empty string)
|
||||
*/
|
||||
|
||||
'settings_file_path' => '',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Recorders
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Ignition registers a couple of recorders when it is enabled. Below you may
|
||||
| specify a recorders will be used to record specific events.
|
||||
|
|
||||
*/
|
||||
|
||||
'recorders' => [
|
||||
DumpRecorder::class,
|
||||
JobRecorder::class,
|
||||
LogRecorder::class,
|
||||
QueryRecorder::class,
|
||||
],
|
||||
];
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
/*
|
||||
| !!!! DO NOT EDIT THIS FILE !!!!
|
||||
|
|
||||
| You can change settings by setting them in the environment or .env
|
||||
|
@ -8,144 +8,161 @@
|
|||
| request an environment variable to be created upstream or send a pull request.
|
||||
*/
|
||||
|
||||
use Monolog\Handler\NullHandler;
|
||||
use Monolog\Handler\StreamHandler;
|
||||
use Monolog\Handler\SyslogUdpHandler;
|
||||
use Monolog\Handler\NullHandler;
|
||||
use Monolog\Handler\StreamHandler;
|
||||
use Monolog\Handler\SyslogUdpHandler;
|
||||
|
||||
return [
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Log Channel
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option defines the default log channel that gets used when writing
|
||||
| messages to the logs. The name specified in this option should match
|
||||
| one of the channels defined in the "channels" configuration array.
|
||||
|
|
||||
*/
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Log Channel
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option defines the default log channel that gets used when writing
|
||||
| messages to the logs. The name specified in this option should match
|
||||
| one of the channels defined in the "channels" configuration array.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('LOG_CHANNEL', 'stack'),
|
||||
'default' => env('LOG_CHANNEL', 'stack'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Log Channels
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure the log channels for your application. Out of
|
||||
| the box, Laravel uses the Monolog PHP logging library. This gives
|
||||
| you a variety of powerful log handlers / formatters to utilize.
|
||||
|
|
||||
| Available Drivers: "single", "daily", "slack", "syslog",
|
||||
| "errorlog", "monolog",
|
||||
| "custom", "stack"
|
||||
|
|
||||
*/
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Deprecations Log Channel
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the log channel that should be used to log warnings
|
||||
| regarding deprecated PHP and library features. This allows you to get
|
||||
| your application ready for upcoming major versions of dependencies.
|
||||
|
|
||||
*/
|
||||
|
||||
'channels' => [
|
||||
'stack' => [
|
||||
'driver' => 'stack',
|
||||
'channels' => ['single', 'flare'],
|
||||
'ignore_exceptions' => false,
|
||||
],
|
||||
'deprecations' => [
|
||||
'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
|
||||
'trace' => false,
|
||||
],
|
||||
|
||||
'console' => [
|
||||
'driver' => 'stack',
|
||||
'channels' => ['single', 'stdout', 'flare'],
|
||||
'ignore_exceptions' => false,
|
||||
],
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Log Channels
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure the log channels for your application. Out of
|
||||
| the box, Laravel uses the Monolog PHP logging library. This gives
|
||||
| you a variety of powerful log handlers / formatters to utilize.
|
||||
|
|
||||
| Available Drivers: "single", "daily", "slack", "syslog",
|
||||
| "errorlog", "monolog",
|
||||
| "custom", "stack"
|
||||
|
|
||||
*/
|
||||
|
||||
'console_debug' => [
|
||||
'driver' => 'stack',
|
||||
'channels' => ['single', 'stdout_debug'],
|
||||
'ignore_exceptions' => false,
|
||||
],
|
||||
'channels' => [
|
||||
'stack' => [
|
||||
'driver' => 'stack',
|
||||
'channels' => ['single', 'flare'],
|
||||
'ignore_exceptions' => false,
|
||||
],
|
||||
|
||||
'single' => [
|
||||
'driver' => 'single',
|
||||
'path' => env('APP_LOG', \LibreNMS\Config::get('log_file', base_path('logs/librenms.log'))),
|
||||
'formatter' => \App\Logging\NoColorFormatter::class,
|
||||
'level' => env('LOG_LEVEL', 'error'),
|
||||
],
|
||||
'console' => [
|
||||
'driver' => 'stack',
|
||||
'channels' => ['single', 'stdout', 'flare'],
|
||||
'ignore_exceptions' => false,
|
||||
],
|
||||
|
||||
'daily' => [
|
||||
'driver' => 'daily',
|
||||
'path' => env('APP_LOG', \LibreNMS\Config::get('log_file', base_path('logs/librenms.log'))),
|
||||
'formatter' => \App\Logging\NoColorFormatter::class,
|
||||
'level' => env('LOG_LEVEL', 'error'),
|
||||
'days' => 14,
|
||||
],
|
||||
'console_debug' => [
|
||||
'driver' => 'stack',
|
||||
'channels' => ['single', 'stdout_debug'],
|
||||
'ignore_exceptions' => false,
|
||||
],
|
||||
|
||||
'slack' => [
|
||||
'driver' => 'slack',
|
||||
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
||||
'username' => 'Laravel Log',
|
||||
'emoji' => ':boom:',
|
||||
'level' => env('LOG_LEVEL', 'critical'),
|
||||
],
|
||||
'single' => [
|
||||
'driver' => 'single',
|
||||
'path' => env('APP_LOG', \LibreNMS\Config::get('log_file', base_path('logs/librenms.log'))),
|
||||
'formatter' => \App\Logging\NoColorFormatter::class,
|
||||
'level' => env('LOG_LEVEL', 'error'),
|
||||
],
|
||||
|
||||
'papertrail' => [
|
||||
'driver' => 'monolog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'handler' => SyslogUdpHandler::class,
|
||||
'handler_with' => [
|
||||
'host' => env('PAPERTRAIL_URL'),
|
||||
'port' => env('PAPERTRAIL_PORT'),
|
||||
],
|
||||
],
|
||||
'daily' => [
|
||||
'driver' => 'daily',
|
||||
'path' => env('APP_LOG', \LibreNMS\Config::get('log_file', base_path('logs/librenms.log'))),
|
||||
'formatter' => \App\Logging\NoColorFormatter::class,
|
||||
'level' => env('LOG_LEVEL', 'error'),
|
||||
'days' => 14,
|
||||
],
|
||||
|
||||
'stderr' => [
|
||||
'driver' => 'monolog',
|
||||
'handler' => StreamHandler::class,
|
||||
'formatter' => \App\Logging\CliColorFormatter::class,
|
||||
'with' => [
|
||||
'stream' => 'php://stderr',
|
||||
],
|
||||
'level' => 'debug',
|
||||
],
|
||||
'slack' => [
|
||||
'driver' => 'slack',
|
||||
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
||||
'username' => 'Laravel Log',
|
||||
'emoji' => ':boom:',
|
||||
'level' => env('LOG_LEVEL', 'critical'),
|
||||
],
|
||||
|
||||
'stdout_debug' => [
|
||||
'driver' => 'monolog',
|
||||
'handler' => StreamHandler::class,
|
||||
'formatter' => \App\Logging\CliColorFormatter::class,
|
||||
'with' => [
|
||||
'stream' => 'php://output',
|
||||
],
|
||||
'level' => 'debug',
|
||||
],
|
||||
'papertrail' => [
|
||||
'driver' => 'monolog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
|
||||
'handler_with' => [
|
||||
'host' => env('PAPERTRAIL_URL'),
|
||||
'port' => env('PAPERTRAIL_PORT'),
|
||||
'connectionString' => 'tls://' . env('PAPERTRAIL_URL') . ':' . env('PAPERTRAIL_PORT'),
|
||||
],
|
||||
],
|
||||
|
||||
'stdout' => [
|
||||
'driver' => 'monolog',
|
||||
'handler' => StreamHandler::class,
|
||||
'formatter' => \App\Logging\CliColorFormatter::class,
|
||||
'with' => [
|
||||
'stream' => 'php://output',
|
||||
],
|
||||
'level' => 'info',
|
||||
],
|
||||
'stderr' => [
|
||||
'driver' => 'monolog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'handler' => StreamHandler::class,
|
||||
'formatter' => env('LOG_STDERR_FORMATTER', \App\Logging\CliColorFormatter::class),
|
||||
'with' => [
|
||||
'stream' => 'php://stderr',
|
||||
],
|
||||
],
|
||||
|
||||
'syslog' => [
|
||||
'driver' => 'syslog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
],
|
||||
'stdout_debug' => [
|
||||
'driver' => 'monolog',
|
||||
'handler' => StreamHandler::class,
|
||||
'formatter' => \App\Logging\CliColorFormatter::class,
|
||||
'with' => [
|
||||
'stream' => 'php://output',
|
||||
],
|
||||
'level' => 'debug',
|
||||
],
|
||||
|
||||
'errorlog' => [
|
||||
'driver' => 'errorlog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
],
|
||||
'stdout' => [
|
||||
'driver' => 'monolog',
|
||||
'handler' => StreamHandler::class,
|
||||
'formatter' => \App\Logging\CliColorFormatter::class,
|
||||
'with' => [
|
||||
'stream' => 'php://output',
|
||||
],
|
||||
'level' => 'info',
|
||||
],
|
||||
|
||||
'null' => [
|
||||
'driver' => 'monolog',
|
||||
'handler' => NullHandler::class,
|
||||
],
|
||||
'syslog' => [
|
||||
'driver' => 'syslog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
],
|
||||
|
||||
'emergency' => [
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
],
|
||||
'errorlog' => [
|
||||
'driver' => 'errorlog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
],
|
||||
|
||||
'flare' => [
|
||||
'driver' => 'flare',
|
||||
],
|
||||
],
|
||||
'null' => [
|
||||
'driver' => 'monolog',
|
||||
'handler' => NullHandler::class,
|
||||
],
|
||||
|
||||
];
|
||||
'emergency' => [
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
],
|
||||
|
||||
'flare' => [
|
||||
'driver' => 'flare',
|
||||
],
|
||||
],
|
||||
|
||||
];
|
||||
|
|
|
@ -37,7 +37,7 @@ return [
|
|||
| mailers below. You are free to add additional mailers as required.
|
||||
|
|
||||
| Supported: "smtp", "sendmail", "mailgun", "ses",
|
||||
| "postmark", "log", "array"
|
||||
| "postmark", "log", "array", "failover"
|
||||
|
|
||||
*/
|
||||
|
||||
|
@ -50,7 +50,7 @@ return [
|
|||
'username' => env('MAIL_USERNAME'),
|
||||
'password' => env('MAIL_PASSWORD'),
|
||||
'timeout' => null,
|
||||
'auth_mode' => null,
|
||||
'local_domain' => env('MAIL_EHLO_DOMAIN'),
|
||||
],
|
||||
|
||||
'ses' => [
|
||||
|
@ -67,7 +67,7 @@ return [
|
|||
|
||||
'sendmail' => [
|
||||
'transport' => 'sendmail',
|
||||
'path' => '/usr/sbin/sendmail -bs',
|
||||
'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'),
|
||||
],
|
||||
|
||||
'log' => [
|
||||
|
|
100
config/queue.php
100
config/queue.php
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
/*
|
||||
| !!!! DO NOT EDIT THIS FILE !!!!
|
||||
|
|
||||
| You can change settings by setting them in the environment or .env
|
||||
|
@ -8,9 +8,9 @@
|
|||
| request an environment variable to be created upstream or send a pull request.
|
||||
*/
|
||||
|
||||
return [
|
||||
return [
|
||||
|
||||
/*
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Queue Connection Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -21,9 +21,9 @@
|
|||
|
|
||||
*/
|
||||
|
||||
'default' => env('QUEUE_CONNECTION', 'sync'),
|
||||
'default' => env('QUEUE_CONNECTION', 'sync'),
|
||||
|
||||
/*
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Queue Connections
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -36,52 +36,52 @@
|
|||
|
|
||||
*/
|
||||
|
||||
'connections' => [
|
||||
'connections' => [
|
||||
|
||||
'sync' => [
|
||||
'driver' => 'sync',
|
||||
],
|
||||
'sync' => [
|
||||
'driver' => 'sync',
|
||||
],
|
||||
|
||||
'database' => [
|
||||
'driver' => 'database',
|
||||
'table' => 'jobs',
|
||||
'queue' => 'default',
|
||||
'retry_after' => 90,
|
||||
'after_commit' => false,
|
||||
],
|
||||
'database' => [
|
||||
'driver' => 'database',
|
||||
'table' => 'jobs',
|
||||
'queue' => 'default',
|
||||
'retry_after' => 90,
|
||||
'after_commit' => false,
|
||||
],
|
||||
|
||||
'beanstalkd' => [
|
||||
'driver' => 'beanstalkd',
|
||||
'host' => 'localhost',
|
||||
'queue' => 'default',
|
||||
'retry_after' => 90,
|
||||
'block_for' => 0,
|
||||
'after_commit' => false,
|
||||
],
|
||||
'beanstalkd' => [
|
||||
'driver' => 'beanstalkd',
|
||||
'host' => 'localhost',
|
||||
'queue' => 'default',
|
||||
'retry_after' => 90,
|
||||
'block_for' => 0,
|
||||
'after_commit' => false,
|
||||
],
|
||||
|
||||
'sqs' => [
|
||||
'driver' => 'sqs',
|
||||
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
|
||||
'queue' => env('SQS_QUEUE', 'default'),
|
||||
'suffix' => env('SQS_SUFFIX'),
|
||||
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||
'after_commit' => false,
|
||||
],
|
||||
'sqs' => [
|
||||
'driver' => 'sqs',
|
||||
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
|
||||
'queue' => env('SQS_QUEUE', 'default'),
|
||||
'suffix' => env('SQS_SUFFIX'),
|
||||
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||
'after_commit' => false,
|
||||
],
|
||||
|
||||
'redis' => [
|
||||
'driver' => 'redis',
|
||||
'connection' => 'default',
|
||||
'queue' => env('REDIS_QUEUE', 'default'),
|
||||
'retry_after' => 90,
|
||||
'block_for' => null,
|
||||
'after_commit' => false,
|
||||
],
|
||||
'redis' => [
|
||||
'driver' => 'redis',
|
||||
'connection' => 'default',
|
||||
'queue' => env('REDIS_QUEUE', 'default'),
|
||||
'retry_after' => 90,
|
||||
'block_for' => null,
|
||||
'after_commit' => false,
|
||||
],
|
||||
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Failed Queue Jobs
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -92,10 +92,10 @@
|
|||
|
|
||||
*/
|
||||
|
||||
'failed' => [
|
||||
'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
|
||||
'database' => env('DB_CONNECTION', 'mysql'),
|
||||
'table' => 'failed_jobs',
|
||||
],
|
||||
'failed' => [
|
||||
'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
|
||||
'database' => env('DB_CONNECTION', 'mysql'),
|
||||
'table' => 'failed_jobs',
|
||||
],
|
||||
|
||||
];
|
||||
];
|
||||
|
|
|
@ -1,16 +1,8 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
| !!!! DO NOT EDIT THIS FILE !!!!
|
||||
|
|
||||
| You can change settings by setting them in the environment or .env
|
||||
| If there is something you need to change, but is not available as an environment setting,
|
||||
| request an environment variable to be created upstream or send a pull request.
|
||||
*/
|
||||
return [
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Third Party Services
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -22,20 +14,21 @@
|
|||
|
|
||||
*/
|
||||
|
||||
'mailgun' => [
|
||||
'domain' => env('MAILGUN_DOMAIN'),
|
||||
'secret' => env('MAILGUN_SECRET'),
|
||||
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
|
||||
],
|
||||
'mailgun' => [
|
||||
'domain' => env('MAILGUN_DOMAIN'),
|
||||
'secret' => env('MAILGUN_SECRET'),
|
||||
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
|
||||
'scheme' => 'https',
|
||||
],
|
||||
|
||||
'postmark' => [
|
||||
'token' => env('POSTMARK_TOKEN'),
|
||||
],
|
||||
'postmark' => [
|
||||
'token' => env('POSTMARK_TOKEN'),
|
||||
],
|
||||
|
||||
'ses' => [
|
||||
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||
],
|
||||
'ses' => [
|
||||
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||
],
|
||||
|
||||
];
|
||||
];
|
||||
|
|
|
@ -80,7 +80,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'connection' => env('SESSION_CONNECTION', null),
|
||||
'connection' => env('SESSION_CONNECTION'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -108,7 +108,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'store' => env('SESSION_STORE', null),
|
||||
'store' => env('SESSION_STORE'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -163,7 +163,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'domain' => env('SESSION_DOMAIN', null),
|
||||
'domain' => env('SESSION_DOMAIN'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
@ -11,7 +11,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'langPath' => '/resources/lang',
|
||||
'langPath' => '/lang',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
@ -8,13 +8,6 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
|||
/** @extends Factory<AlertSchedule> */
|
||||
class AlertScheduleFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = AlertSchedule::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
|
|
|
@ -2,14 +2,11 @@
|
|||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\AlertTransport;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use LibreNMS\Alert\Transport;
|
||||
|
||||
class AlertTransportFactory extends Factory
|
||||
{
|
||||
protected $model = AlertTransport::class;
|
||||
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
|
|
|
@ -8,13 +8,6 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
|||
/** @extends Factory<BgpPeer> */
|
||||
class BgpPeerFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = BgpPeer::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
|
|
|
@ -8,13 +8,6 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
|||
/** @extends Factory<Bill> */
|
||||
class BillFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = Bill::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
|
|
|
@ -8,13 +8,6 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
|||
/** @extends Factory<Component> */
|
||||
class ComponentFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = Component::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
|
|
|
@ -8,13 +8,6 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
|||
/** @extends Factory<Device> */
|
||||
class DeviceFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = Device::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
|
|
|
@ -8,13 +8,6 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
|||
/** @extends Factory<DeviceGroup> */
|
||||
class DeviceGroupFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = DeviceGroup::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
|
|
|
@ -11,13 +11,6 @@ use LibreNMS\Util\IPv4;
|
|||
/** @extends Factory<Ipv4Address> */
|
||||
class Ipv4AddressFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = Ipv4Address::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
|
|
|
@ -8,13 +8,6 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
|||
/** @extends Factory<Ipv4Network> */
|
||||
class Ipv4NetworkFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = Ipv4Network::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
|
|
|
@ -8,13 +8,6 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
|||
/** @extends Factory<Location> */
|
||||
class LocationFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = Location::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
|
|
|
@ -8,13 +8,6 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
|||
/** @extends Factory<OspfNbr> */
|
||||
class OspfNbrFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = OspfNbr::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
|
|
|
@ -8,13 +8,6 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
|||
/** @extends Factory<OspfPort> */
|
||||
class OspfPortFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = OspfPort::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
|
|
|
@ -8,13 +8,6 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
|||
/** @extends Factory<Port> */
|
||||
class PortFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = Port::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
|
|
|
@ -8,13 +8,6 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
|||
/** @extends Factory<Sensor> */
|
||||
class SensorFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = Sensor::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
|
|
|
@ -10,13 +10,6 @@ use LibreNMS\Enum\SyslogSeverity;
|
|||
/** @extends Factory<Syslog> */
|
||||
class SyslogFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = Syslog::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
|
|
|
@ -8,13 +8,6 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
|||
/** @extends Factory<User> */
|
||||
class UserFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = User::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
|
|
|
@ -9,13 +9,6 @@ use LibreNMS\Enum\PowerState;
|
|||
/** @extends Factory<Vminfo> */
|
||||
class VminfoFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = Vminfo::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
|
|
|
@ -12,6 +12,7 @@ class UpdateUsersWidgetsSettings extends Migration
|
|||
*/
|
||||
public function up()
|
||||
{
|
||||
/** @phpstan-ignore-next-line */
|
||||
$widgets = UserWidget::where('widget_id', 1)->get();
|
||||
foreach ($widgets as $widget) {
|
||||
$settings = $widget->settings;
|
||||
|
@ -31,6 +32,7 @@ class UpdateUsersWidgetsSettings extends Migration
|
|||
*/
|
||||
public function down()
|
||||
{
|
||||
/** @phpstan-ignore-next-line */
|
||||
$widgets = UserWidget::where('widget_id', 1)->get();
|
||||
foreach ($widgets as $widget) {
|
||||
$settings = $widget->settings;
|
||||
|
|
|
@ -304,7 +304,7 @@ entry for the sensor class.
|
|||
- `includes/html/pages/device/overview.inc.php`: add `require 'overview/sensors/$class.inc.php'`
|
||||
in the desired order for the device overview page.
|
||||
- `includes/html/pages/health.inc.php`: add a $type_text[] entry for the sensor class.
|
||||
- `resources/lang/en/sensors.php`: add human-readable names and units for the sensor class
|
||||
- `lang/en/sensors.php`: add human-readable names and units for the sensor class
|
||||
in English, feel free to do so for other languages as well.
|
||||
|
||||
Create and populate new files for the sensor class in the following places:
|
||||
|
@ -316,7 +316,7 @@ files are stored. Not used for yaml discovery.
|
|||
- `includes/html/pages/device/overview.inc.php`: add `require 'overview/sensors/$class.inc.php'` in the desired
|
||||
order for the device overview page.
|
||||
- `includes/html/pages/health.inc.php`: add a $type_text[] entry for the sensor class.
|
||||
- `resources/lang/en/sensors.php`: add human-readable names and units for the sensor class in English, feel
|
||||
- `lang/en/sensors.php`: add human-readable names and units for the sensor class in English, feel
|
||||
free to do so for other languages as well.
|
||||
|
||||
Create and populate new files for the sensor class in the following places:
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
use LibreNMS\Config;
|
||||
|
||||
$language = \config('app.locale');
|
||||
$settings = (include Config::get('install_dir') . '/resources/lang/' . $language . '/settings.php')['settings'];
|
||||
$settings = (include Config::get('install_dir') . '/lang/' . $language . '/settings.php')['settings'];
|
||||
|
||||
$attribs = get_dev_attribs($device['device_id']);
|
||||
$poller_module_names = $settings['poller_modules'];
|
||||
|
|
|
@ -15,6 +15,7 @@ return [
|
|||
|
||||
'title' => 'Auth',
|
||||
'failed' => 'These credentials do not match our records.',
|
||||
'password' => 'The provided password is incorrect.',
|
||||
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
|
||||
'disabled' => 'Your Account is disabled, please contact Admin.',
|
||||
];
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue