mirror of
https://github.com/librenms/librenms.git
synced 2024-09-22 10:58:42 +00:00
34c35f3627
* webui: Updated remaining display options where we do not show sysName if hostname is IP * renamed function + simplified
69 lines
1.6 KiB
PHP
69 lines
1.6 KiB
PHP
<?php
|
|
|
|
$no_refresh = true;
|
|
|
|
$param = array();
|
|
|
|
if ($vars['action'] == 'expunge' && $_SESSION['userlevel'] >= '10') {
|
|
dbQuery('TRUNCATE TABLE `eventlog`');
|
|
print_message('Event log truncated');
|
|
}
|
|
|
|
$pagetitle[] = 'Eventlog';
|
|
|
|
print_optionbar_start();
|
|
|
|
?>
|
|
|
|
<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']) {
|
|
echo 'selected';
|
|
}
|
|
|
|
echo '>'.format_hostname($data).'</option>';
|
|
}
|
|
}
|
|
?>
|
|
</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>
|
|
|
|
<?php
|
|
print_optionbar_end();
|
|
|
|
require_once 'includes/common/eventlog.inc.php';
|
|
echo implode('', $common_output);
|
|
|
|
?>
|
|
|