mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Add webinterface support for IPMI poller
git-svn-id: http://www.observium.org/svn/observer/trunk@1766 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
16
html/includes/device-ipmi-edit.inc.php
Normal file
16
html/includes/device-ipmi-edit.inc.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
$ipmi_hostname = mres($_POST['ipmi_hostname']);
|
||||
$ipmi_username = mres($_POST['ipmi_username']);
|
||||
$ipmi_password = mres($_POST['ipmi_password']);
|
||||
|
||||
#FIXME needs more sanity checking! and better feedback
|
||||
|
||||
if ($ipmi_hostname != '') { set_dev_attrib($device, 'ipmi_hostname', $ipmi_hostname); } else { del_dev_attrib($device, 'ipmi_hostname'); }
|
||||
if ($ipmi_username != '') { set_dev_attrib($device, 'ipmi_username', $ipmi_username); } else { del_dev_attrib($device, 'ipmi_username'); }
|
||||
if ($ipmi_password != '') { set_dev_attrib($device, 'ipmi_password', $ipmi_password); } else { del_dev_attrib($device, 'ipmi_password'); }
|
||||
|
||||
$update_message = "Device IPMI data updated.";
|
||||
$updated = 1;
|
||||
|
||||
?>
|
||||
@@ -320,12 +320,12 @@ function humanspeed($speed)
|
||||
|
||||
function print_error($text)
|
||||
{
|
||||
echo('<table class="errorbox" cellpadding="3"><tr><td><img src="/images/15/exclamation.png" align="absmiddle">'.$text.'</td></tr></table>');
|
||||
echo('<table class="errorbox" cellpadding="3"><tr><td><img src="/images/15/exclamation.png" align="absmiddle"> '.$text.'</td></tr></table>');
|
||||
}
|
||||
|
||||
function print_message($text)
|
||||
{
|
||||
echo('<table class="messagebox" cellpadding="3"><tr><td><img src="/images/16/tick.png" align="absmiddle">'.$text.'</td></tr></table>');
|
||||
echo('<table class="messagebox" cellpadding="3"><tr><td><img src="/images/16/tick.png" align="absmiddle"> '.$text.'</td></tr></table>');
|
||||
}
|
||||
|
||||
function devclass($device)
|
||||
|
||||
Reference in New Issue
Block a user