mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix syslog widget priority filtering (#13411)
* Fix widget filtering syslog stores priority as a string filter strings, not numbers * Add enums for SyslogSeverity and CheckStatus
This commit is contained in:
@@ -5,6 +5,7 @@ namespace Database\Factories;
|
||||
use App\Models\Syslog;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use LibreNMS\Enum\SyslogSeverity;
|
||||
|
||||
/** @extends Factory<Syslog> */
|
||||
class SyslogFactory extends Factory
|
||||
@@ -24,7 +25,7 @@ class SyslogFactory extends Factory
|
||||
public function definition()
|
||||
{
|
||||
$facilities = ['kern', 'user', 'mail', 'daemon', 'auth', 'syslog', 'lpr', 'news', 'uucp', 'cron', 'authpriv', 'ftp', 'ntp', 'security', 'console', 'solaris-cron', 'local0', 'local1', 'local2', 'local3', 'local4', 'local5', 'local6', 'local7'];
|
||||
$levels = ['emerg', 'alert', 'crit', 'err', 'warning', 'notice', 'info', 'debug'];
|
||||
$levels = SyslogSeverity::LEVELS;
|
||||
|
||||
return [
|
||||
'facility' => $this->faker->randomElement($facilities),
|
||||
|
Reference in New Issue
Block a user