mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Added new health admin page for thresholds
This commit is contained in:
28
html/forms/health-update.inc.php
Normal file
28
html/forms/health-update.inc.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Copyright (C) 2013 LibreNMS Contributors librenms-project@googlegroups.com
|
||||
*/
|
||||
|
||||
// FUA
|
||||
|
||||
if(!is_numeric($_POST['device_id']) || !is_numeric($_POST['sensor_id']) || (empty($_POST['data']) || !isset($_POST['data'])))
|
||||
{
|
||||
echo('error with data');
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$update = dbUpdate(array($_POST['value_type'] => $_POST['data']), 'sensors', '`sensor_id` = ? AND `device_id` = ?', array($_POST['sensor_id'],$_POST['device_id']));
|
||||
if(!empty($update) || $update == '0')
|
||||
{
|
||||
echo('success');
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo('error');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user