mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* Added support for ping only devices. * Renamed sql-schema/206 to 207. * Discovery tried to detect the OS when it shouldn't. * Updated db_schema.yaml * Added ping icon. * Don't show unused graphs and tabs when SNMP is disabled. * Allow the user to specify OS of ping only devices. * Removing custom OS now changes it to 'ping'. * Removed unnecessary use of mres(). * UI select box for SNMP enable/disable. * Hide device_ping_perf if ping is disable on device. * Fixed SNMP settings update status messages. * Added functionality to add ping only devices via the web ui. * Added ping only option to addhost.php * Added ping only support to snmp-scan.py * Moved sql 208 to 211 * Fixed scrutinizer issues. * Fixed broken ossearch. * Added ping only support to the API. * Updated API doc. * Added (optional) to OS and hardware description. Hid Port Settings, Applications, Modules, Storage, Processors, Memory and Components from the edit menu * Style fix. * Updated ping icon. * clean() instead of mres(). More escaping. Better help in snmp-scan.py and addhost.php * Fixed scrutinizer issue. * Always try SNMP in snmp-scan.py, new option for it in addhost.php. Slice instead of chunk in ajax_ossuggest.php. Other minor style changes. * Updated sql modifications to insert the new column in the same place as in db_schema.yaml.
84 lines
2.2 KiB
PHP
84 lines
2.2 KiB
PHP
<?php
|
|
|
|
$no_refresh = true;
|
|
$config['memcached']['enable'] = false;
|
|
|
|
$link_array = array('page' => 'device',
|
|
'device' => $device['device_id'],
|
|
'tab' => 'edit');
|
|
|
|
if ($_SESSION['userlevel'] < '7') {
|
|
print_error("Insufficient Privileges");
|
|
} else {
|
|
$panes['device'] = 'Device Settings';
|
|
$panes['snmp'] = 'SNMP';
|
|
if (!$device['snmp_disable']) {
|
|
$panes['ports'] = 'Port Settings';
|
|
}
|
|
|
|
if (count($config['os'][$device['os']]['icons'])) {
|
|
$panes['icon'] = 'Icon';
|
|
}
|
|
|
|
if (!$device['snmp_disable']) {
|
|
$panes['apps'] = 'Applications';
|
|
}
|
|
$panes['alerts'] = 'Alert Settings';
|
|
$panes['alert-rules'] = 'Alert Rules';
|
|
if (!$device['snmp_disable']) {
|
|
$panes['modules'] = 'Modules';
|
|
}
|
|
|
|
if ($config['show_services']) {
|
|
$panes['services'] = 'Services';
|
|
}
|
|
|
|
$panes['ipmi'] = 'IPMI';
|
|
|
|
if (dbFetchCell("SELECT COUNT(*) FROM `sensors` WHERE `device_id` = ? AND `sensor_deleted`='0' LIMIT 1", array($device['device_id'])) > 0) {
|
|
$panes['health'] = 'Health';
|
|
}
|
|
|
|
if (dbFetchCell("SELECT COUNT(*) FROM `wireless_sensors` WHERE `device_id` = ? AND `sensor_deleted`='0' LIMIT 1", array($device['device_id'])) > 0) {
|
|
$panes['wireless-sensors'] = 'Wireless Sensors';
|
|
}
|
|
|
|
if (!$device['snmp_disable']) {
|
|
$panes['storage'] = 'Storage';
|
|
$panes['processors'] = 'Processors';
|
|
$panes['mempools'] = 'Memory';
|
|
}
|
|
$panes['misc'] = 'Misc';
|
|
|
|
$panes['component'] = 'Components';
|
|
|
|
print_optionbar_start();
|
|
|
|
unset($sep);
|
|
foreach ($panes as $type => $text) {
|
|
if (!isset($vars['section'])) {
|
|
$vars['section'] = $type;
|
|
}
|
|
echo($sep);
|
|
if ($vars['section'] == $type) {
|
|
echo("<span class='pagemenu-selected'>");
|
|
} else {
|
|
}
|
|
|
|
echo(generate_link($text, $link_array, array('section'=>$type)));
|
|
|
|
if ($vars['section'] == $type) {
|
|
echo("</span>");
|
|
}
|
|
$sep = " | ";
|
|
}
|
|
|
|
print_optionbar_end();
|
|
|
|
if (is_file("pages/device/edit/".mres($vars['section']).".inc.php")) {
|
|
require "pages/device/edit/".mres($vars['section']).".inc.php";
|
|
}
|
|
}
|
|
|
|
$pagetitle[] = "Settings";
|