mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Dispatcher Service settings (#11760)
* Poller settings WIP * Poller settings WIP2 * working on SettingMultiple * setting multiple working * settings sent with all required info * fix translation * Fix keys * fix groups setting * Apply settings to service fixes and validations for setting * don't error when no poller_cluster entry exists * hid tab when no poller cluster entries * Authorization * make prod * daily maintenance toggle should be advanced * Update schema def
This commit is contained in:
@@ -41,12 +41,17 @@ class PollerGroup extends Model
|
||||
parent::boot();
|
||||
|
||||
static::deleting(function (PollerGroup $pollergroup) {
|
||||
// handle device pollergroup fallback to default poller
|
||||
// handle device poller group fallback to default poller
|
||||
$default_poller_id = \LibreNMS\Config::get('default_poller_group');
|
||||
$pollergroup->devices()->update(['poller_group' => $default_poller_id]);
|
||||
});
|
||||
}
|
||||
|
||||
public static function list()
|
||||
{
|
||||
return self::query()->pluck('group_name', 'id')->prepend(__('General'), 0);
|
||||
}
|
||||
|
||||
public function devices()
|
||||
{
|
||||
return $this->hasMany(\App\Models\Device::class, 'poller_group', 'id');
|
||||
|
Reference in New Issue
Block a user