mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Cleanup functions.inc.php (#11835)
This commit is contained in:
@@ -1273,7 +1273,7 @@ function get_postgres_databases($device_id)
|
||||
*
|
||||
* @param array $device device for which we get the rrd's
|
||||
* @param int $app_id application id on the device
|
||||
* @param string $category which category of seafile graphs are searched
|
||||
* @param string $category which category of graphs are searched
|
||||
* @return array list of entry data
|
||||
*/
|
||||
function get_arrays_with_application($device, $app_id, $app_name, $category = null)
|
||||
@@ -1303,63 +1303,6 @@ function get_arrays_with_application($device, $app_id, $app_name, $category = nu
|
||||
return $entries;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all certificate names from the collected
|
||||
* rrd files.
|
||||
*
|
||||
* @param array $device device for which we get the rrd's
|
||||
* @param int $app_id application id on the device
|
||||
* @return array list of certificate names
|
||||
*/
|
||||
function get_domains_with_certificates($device, $app_id)
|
||||
{
|
||||
$app_name = 'certificate';
|
||||
return get_arrays_with_application($device, $app_id, $app_name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all seafile data from the collected
|
||||
* rrd files.
|
||||
*
|
||||
* @param array $device device for which we get the rrd's
|
||||
* @param int $app_id application id on the device
|
||||
* @param string $category which category of seafile graphs are searched
|
||||
* @return array list of seafile data
|
||||
*/
|
||||
function get_arrays_with_seafile($device, $app_id, $category)
|
||||
{
|
||||
$app_name = 'seafile';
|
||||
return get_arrays_with_application($device, $app_id, $app_name, $category);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all mdadm arrays from the collected
|
||||
* rrd files.
|
||||
*
|
||||
* @param array $device device for which we get the rrd's
|
||||
* @param int $app_id application id on the device
|
||||
* @return array list of raid-arrays
|
||||
*/
|
||||
function get_arrays_with_mdadm($device, $app_id)
|
||||
{
|
||||
$app_name = 'mdadm';
|
||||
return get_arrays_with_application($device, $app_id, $app_name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all disks (disk serial numbers) from the collected
|
||||
* rrd files.
|
||||
*
|
||||
* @param array $device device for which we get the rrd's
|
||||
* @param int $app_id application id on the device
|
||||
* @return array list of disks
|
||||
*/
|
||||
function get_disks_with_smart($device, $app_id)
|
||||
{
|
||||
$app_name = 'smart';
|
||||
return get_arrays_with_application($device, $app_id, $app_name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all dashboards the user can access
|
||||
* adds in the keys:
|
||||
|
@@ -10,7 +10,7 @@ $transparency = 15;
|
||||
if (isset($vars['cert_name'])) {
|
||||
$cert_name_list=array($vars['cert_name']);
|
||||
} else {
|
||||
$cert_name_list=get_domains_with_certificates($device, $app['app_id']);
|
||||
$cert_name_list = get_arrays_with_application($device, $app_id, $name);
|
||||
}
|
||||
|
||||
$int=0;
|
||||
|
@@ -10,7 +10,7 @@ $transparency = 15;
|
||||
if (isset($vars['array'])) {
|
||||
$arrays=array($vars['array']);
|
||||
} else {
|
||||
$arrays=get_arrays_with_mdadm($device, $app['app_id']);
|
||||
$arrays = get_arrays_with_application($device, $app_id, $name);
|
||||
}
|
||||
|
||||
$int=0;
|
||||
|
@@ -10,7 +10,7 @@ $transparency = 15;
|
||||
if (isset($vars['array'])) {
|
||||
$arrays=array($vars['array']);
|
||||
} else {
|
||||
$arrays=get_arrays_with_seafile($device, $app['app_id'], $category);
|
||||
$arrays = get_arrays_with_application($device, $app_id, $name, $category);
|
||||
}
|
||||
|
||||
$int=0;
|
||||
|
@@ -10,7 +10,7 @@ $transparency = 15;
|
||||
if (isset($vars['disk'])) {
|
||||
$disks=array($vars['disk']);
|
||||
} else {
|
||||
$disks=get_disks_with_smart($device, $app['app_id']);
|
||||
$disks = get_arrays_with_application($device, $app_id, $name);
|
||||
}
|
||||
|
||||
$smart_enhancements = array('id9');
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
$domain_list = get_domains_with_certificates($device, $app['app_id']);
|
||||
$domain_list = get_arrays_with_application($device, $app['app_id'], 'certificate');
|
||||
|
||||
print_optionbar_start();
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
$mdadm_arrays = get_arrays_with_mdadm($device, $app['app_id']);
|
||||
$mdadm_arrays = get_arrays_with_application($device, $app['app_id'], 'mdadm');
|
||||
|
||||
print_optionbar_start();
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
$disks=get_disks_with_smart($device, $app['app_id']);
|
||||
$disks = get_arrays_with_application($device, $app['app_id'], 'smart');
|
||||
|
||||
print_optionbar_start();
|
||||
|
||||
|
Reference in New Issue
Block a user