mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix errors for some devices loading components (#11527)
* Test WIP * WIP * port getComponents to Eloquent * port more * simpler creation * change to explicit arrays * add missed file * restore commented code * fix inserting null value for component prefs * Fix some bugs in setCompenentPrefs Can't create tests without fixing bugs first :D * another test * another test * Modernize setComponentPrefs * Test for event log entries * Fix delete event * fix invalid values for component toggles * status log too * Use Setters to work around bad data, $casts doesn't do what we want.
This commit is contained in:
@@ -131,3 +131,10 @@ $factory->define(\App\Models\Vminfo::class, function (Faker\Generator $faker) {
|
||||
'vmwVmState' => $faker->randomElement(['powered on', 'powered off', 'suspended']),
|
||||
];
|
||||
});
|
||||
|
||||
$factory->define(\App\Models\Component::class, function (Faker\Generator $faker) {
|
||||
return [
|
||||
'device_id' => $faker->randomDigit,
|
||||
'type' => $faker->regexify('[A-Za-z0-9]{4,20}'),
|
||||
];
|
||||
});
|
||||
|
Reference in New Issue
Block a user