mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix missing use statements (#8614)
This commit is contained in:
@@ -1650,7 +1650,7 @@ function get_zfs_pools($device_id)
|
||||
* Returns the sysname of a device with a html line break prepended.
|
||||
* if the device has an empty sysname it will return device's hostname instead
|
||||
* And finally if the device has no hostname it will return an empty string
|
||||
* @param device array
|
||||
* @param array device
|
||||
* @return string
|
||||
*/
|
||||
function get_device_name($device)
|
||||
|
@@ -25,6 +25,8 @@
|
||||
* )
|
||||
*/
|
||||
|
||||
use LibreNMS\Config;
|
||||
|
||||
if (file_exists(Config::get('install_dir') . "/includes/discovery/ntp/{$device['os_group']}.inc.php")) {
|
||||
include Config::get('install_dir') . "/includes/discovery/ntp/{$device['os_group']}.inc.php";
|
||||
}
|
||||
|
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
|
||||
// Pre-cache the existing state of VLANs for this device from the database
|
||||
use LibreNMS\Config;
|
||||
|
||||
$vlans_db_raw = dbFetchRows('SELECT * FROM `vlans` WHERE `device_id` = ?', array($device['device_id']));
|
||||
foreach ($vlans_db_raw as $vlan_db) {
|
||||
$vlans_db[$vlan_db['vlan_domain']][$vlan_db['vlan_vlan']] = $vlan_db;
|
||||
|
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
use LibreNMS\Config;
|
||||
|
||||
if ($config['enable_inventory']) {
|
||||
if (file_exists(Config::get('install_dir') . "/includes/polling/entity-physical/{$device['os']}.inc.php")) {
|
||||
include Config::get('install_dir') . "/includes/polling/entity-physical/{$device['os']}.inc.php";
|
||||
|
@@ -18,6 +18,8 @@
|
||||
* DS:dispersion:GAUGE:'.$config['rrd']['heartbeat'].':0:U
|
||||
*/
|
||||
|
||||
use LibreNMS\Config;
|
||||
|
||||
if (file_exists(Config::get('install_dir') . "/includes/polling/ntp/{$device['os_group']}.inc.php")) {
|
||||
include Config::get('install_dir') . "/includes/polling/ntp/{$device['os_group']}.inc.php";
|
||||
}
|
||||
|
Reference in New Issue
Block a user