mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Module status cleanups (#15461)
* Module status helper * Correct reference * Rename function to make it more explicit * Same for exists checks, normalize argument names * Use new functions
This commit is contained in:
@@ -46,7 +46,7 @@ class Slas implements Module
|
||||
|
||||
public function shouldDiscover(OS $os, ModuleStatus $status): bool
|
||||
{
|
||||
return $status->isEnabled() && ! $os->getDevice()->snmp_disable && $os->getDevice()->status && $os instanceof SlaDiscovery;
|
||||
return $status->isEnabledAndDeviceUp($os->getDevice()) && $os instanceof SlaDiscovery;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -66,7 +66,7 @@ class Slas implements Module
|
||||
|
||||
public function shouldPoll(OS $os, ModuleStatus $status): bool
|
||||
{
|
||||
return $status->isEnabled() && ! $os->getDevice()->snmp_disable && $os->getDevice()->status && $os instanceof SlaPolling;
|
||||
return $status->isEnabledAndDeviceUp($os->getDevice()) && $os instanceof SlaPolling;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user