2008-06-13 19:01:05 +02:00
|
|
|
<?php
|
2008-08-22 20:07:32 +02:00
|
|
|
|
2021-11-04 16:28:15 +01:00
|
|
|
// Pandora FMS - http://pandorafms.com
|
2009-06-08 20:15:58 +02:00
|
|
|
// ==================================================
|
2020-11-27 13:52:35 +01:00
|
|
|
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
2009-06-08 20:15:58 +02:00
|
|
|
// Please see http://pandorafms.org for full contribution list
|
2008-06-13 19:01:05 +02:00
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU General Public License
|
2008-08-22 20:07:32 +02:00
|
|
|
// as published by the Free Software Foundation for version 2.
|
2008-06-13 19:01:05 +02:00
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
// Load global vars
|
2008-07-21 14:23:28 +02:00
|
|
|
check_login();
|
2008-06-13 19:01:05 +02:00
|
|
|
|
2014-12-03 11:52:09 +01:00
|
|
|
if (!isset($id_agente)) {
|
2019-01-30 16:18:44 +01:00
|
|
|
include 'general/noaccess.php';
|
|
|
|
exit;
|
2008-06-13 19:01:05 +02:00
|
|
|
}
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
require_once 'include/functions_events.php';
|
2019-05-28 18:03:01 +02:00
|
|
|
ui_require_css_file('events');
|
2023-01-02 16:50:13 +01:00
|
|
|
|
|
|
|
html_print_div(
|
|
|
|
[
|
2023-01-10 10:18:37 +01:00
|
|
|
'class' => 'agent_details_line',
|
2023-01-02 16:50:13 +01:00
|
|
|
'content' => ui_toggle(
|
|
|
|
'<div class=\'w100p\' id=\'event_list\'>'.html_print_image('images/spinner.gif', true).'</div>',
|
|
|
|
'<span class="subsection_header_title">'.__('Latest events for this agent').'</span>',
|
|
|
|
__('Latest events for this agent'),
|
|
|
|
'latest_events_agent',
|
|
|
|
false,
|
|
|
|
true,
|
2023-03-15 17:02:25 +01:00
|
|
|
'',
|
|
|
|
'box-flat white-box-content no_border',
|
|
|
|
'box-flat white_table_graph w100p'
|
2023-01-02 16:50:13 +01:00
|
|
|
),
|
|
|
|
],
|
2019-01-30 16:18:44 +01:00
|
|
|
);
|
2008-06-13 19:01:05 +02:00
|
|
|
|
2008-07-21 14:23:28 +02:00
|
|
|
?>
|
2014-12-03 11:52:09 +01:00
|
|
|
<script type="text/javascript">
|
2019-01-30 16:18:44 +01:00
|
|
|
$(document).ready(function() {
|
|
|
|
events_table(0);
|
|
|
|
});
|
2017-06-14 12:45:40 +02:00
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
function events_table(all_events_24h){
|
|
|
|
var parameters = {};
|
|
|
|
parameters["table_events"] = 1;
|
|
|
|
parameters["id_agente"] = <?php echo $id_agente; ?>;
|
|
|
|
parameters["page"] = "include/ajax/events";
|
|
|
|
parameters["all_events_24h"] = all_events_24h;
|
|
|
|
|
|
|
|
jQuery.ajax ({
|
|
|
|
data: parameters,
|
|
|
|
type: 'POST',
|
|
|
|
url: "ajax.php",
|
|
|
|
dataType: 'html',
|
|
|
|
success: function (data) {
|
|
|
|
$("#event_list").empty();
|
|
|
|
$("#event_list").html(data);
|
|
|
|
$('#checkbox-all_events_24h').on('change',function(){
|
|
|
|
if( $('#checkbox-all_events_24h').is(":checked") ){
|
|
|
|
$('#checkbox-all_events_24h').val(1);
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
$('#checkbox-all_events_24h').val(0);
|
|
|
|
}
|
|
|
|
all_events_24h = $('#checkbox-all_events_24h').val();
|
|
|
|
events_table(all_events_24h);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
2014-12-03 11:52:09 +01:00
|
|
|
</script>
|