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:
Tony Murray
2020-06-08 08:27:03 -05:00
committed by GitHub
parent 946e90b68d
commit 300645388f
29 changed files with 1134 additions and 86 deletions

View File

@@ -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');