mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
rejig events system (still not great. meh) clean up some pages.
git-svn-id: http://www.observium.org/svn/observer/trunk@1223 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -1,15 +1,17 @@
|
||||
<?php
|
||||
|
||||
$descr = $_POST['descr'];
|
||||
$ignore = $_POST['ignore'];
|
||||
$type = $_POST['type'];
|
||||
$disabled = $_POST['disabled'];
|
||||
$community = $_POST['community'];
|
||||
$snmpver = $_POST['snmpver'];
|
||||
$descr = mres($_POST['descr']);
|
||||
$ignore = mres($_POST['ignore']);
|
||||
$type = mres($_POST['type']);
|
||||
$disabled = mres($_POST['disabled']);
|
||||
$community = mres($_POST['community']);
|
||||
$snmpver = mres($_POST['snmpver']);
|
||||
$port = mres($_POST['port']);
|
||||
|
||||
#FIXME needs more sanity checking!
|
||||
$sql = "UPDATE `devices` SET `purpose` = '" . mysql_escape_string($descr) . "', `community` = '" . mysql_escape_string($community) . "', `type` = '$type'";
|
||||
$sql .= ", `snmpver` = '" . mysql_escape_string($snmpver) . "', `ignore` = '$ignore', `disabled` = '$disabled' WHERE `device_id` = '$_GET[id]'";
|
||||
#FIXME needs more sanity checking! and better feedback
|
||||
|
||||
$sql = "UPDATE `devices` SET `purpose` = '" . $descr . "', `community` = '" . $community . "', `type` = '$type'";
|
||||
$sql .= ", `snmpver` = '" . $snmpver . "', `ignore` = '$ignore', `disabled` = '$disabled', `port` = '$port' WHERE `device_id` = '".$device['device_id']."'";
|
||||
$query = mysql_query($sql);
|
||||
|
||||
$rows_updated = mysql_affected_rows();
|
||||
|
@@ -24,11 +24,15 @@ if(isset($bg) && $bg == $list_colour_a) { $bg = $list_colour_b; } else { $bg=$li
|
||||
</td>");
|
||||
}
|
||||
|
||||
echo('<td class="syslog" width="100">');
|
||||
if($entry['interface']) {
|
||||
echo(generateiflink(getifbyid($entry['interface'])));
|
||||
}
|
||||
echo("</td><td>" . htmlspecialchars($entry['message']) . "</td>
|
||||
if($entry['type'] == "interface") {
|
||||
$entry['link'] = "<b>".generateiflink(getifbyid($entry['reference']))."</b>";
|
||||
} else {
|
||||
$entry['link'] = "System";
|
||||
}
|
||||
|
||||
echo("<td>".$entry['link']."</td>");
|
||||
|
||||
echo("<td>".htmlspecialchars($entry['message']) . "</td>
|
||||
</tr>");
|
||||
|
||||
|
||||
|
@@ -11,7 +11,7 @@ if(!is_integer($syslog_iter/2)) { $bg_colour = $list_colour_a; } else { $bg_colo
|
||||
echo("<tr style=\"background-color: $bg_colour\">
|
||||
<td width=0></td>");
|
||||
|
||||
echo("<td class=syslog width=125>" . $entry['date'] . "</td>");
|
||||
echo("<td class=syslog width=140>" . $entry['date'] . "</td>");
|
||||
|
||||
$entry['hostname'] = shorthost($entry['hostname'], 20);
|
||||
|
||||
|
Reference in New Issue
Block a user