Files
librenms-librenms/html/pages/eventlog.inc.php
T

69 lines
1.6 KiB
PHP
Raw Normal View History

2009-09-07 11:07:59 +00:00
<?php
2007-04-03 14:10:23 +00:00
2015-07-13 20:10:26 +02:00
$no_refresh = true;
2011-10-08 22:04:56 +00:00
$param = array();
2015-07-13 20:10:26 +02:00
if ($vars['action'] == 'expunge' && $_SESSION['userlevel'] >= '10') {
dbQuery('TRUNCATE TABLE `eventlog`');
print_message('Event log truncated');
2011-10-08 22:04:56 +00:00
}
2015-07-13 20:10:26 +02:00
$pagetitle[] = 'Eventlog';
2011-10-18 14:41:19 +00:00
2011-10-08 22:04:56 +00:00
print_optionbar_start();
?>
2014-11-02 20:20:25 +00:00
<form method="post" action="" class="form-inline" role="form" id="result_form">
<div class="form-group">
<label>
<strong>Device</strong>
</label>
<select name="device" id="device" class="form-control input-sm">
<option value="">All Devices</option>
<?php
foreach (get_all_devices() as $data) {
if (device_permitted($data['device_id'])) {
echo "<option value='".$data['device_id']."'";
if ($data['device_id'] == $_POST['device']) {
2015-07-13 20:10:26 +02:00
echo 'selected';
}
echo '>'.format_hostname($data).'</option>';
2015-07-13 20:10:26 +02:00
}
}
?>
</select>
</div>
<div class="form-group">
<label>
<strong>Type: </strong>
</label>
<select name="eventtype" id="eventtype" class="form-control input-sm">
<option value="">All types</option>
<?php
foreach (dbFetchColumn("SELECT `type` FROM `eventlog` GROUP BY `type`") as $type) {
echo "<option value='$type'";
if ($type === $_POST['eventtype']) {
echo ' selected';
}
echo ">$type</option>";
}
?>
</select>
</div>
<button type="submit" class="btn btn-default input-sm">Filter</button>
</form>
2011-10-08 22:04:56 +00:00
<?php
print_optionbar_end();
require_once 'includes/common/eventlog.inc.php';
2016-08-18 20:28:22 -05:00
echo implode('', $common_output);
?>