mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-23 13:55:43 +02:00
2009-09-16 Miguel de Dios <miguel.dedios@artica.es>
* operation/events/events.php: cleanup the source code and add many comments git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1947 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
bd11f96020
commit
a416c8fe49
@ -1,3 +1,8 @@
|
|||||||
|
2009-09-16 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
|
* operation/events/events.php: cleanup the source code and add many
|
||||||
|
comments
|
||||||
|
|
||||||
2009-09-15 Miguel de Dios <miguel.dedios@artica.es>
|
2009-09-15 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
* include/javascript/pandora_alerts.js: fix the id for access to jquery
|
* include/javascript/pandora_alerts.js: fix the id for access to jquery
|
||||||
|
@ -169,7 +169,13 @@ if ($event_view_hr > 0) {
|
|||||||
$sql_post .= " AND utimestamp > ".$unixtime;
|
$sql_post .= " AND utimestamp > ".$unixtime;
|
||||||
}
|
}
|
||||||
|
|
||||||
$url = "index.php?sec=eventos&sec2=operation/events/events&search=".rawurlencode($search)."&event_type=".$event_type."&severity=".$severity."&status=".$status."&ev_group=".$ev_group."&refr=".$config["refr"]."&id_agent=".$id_agent."&id_event=".$id_event."&pagination=".$pagination."&group_rep=".$group_rep."&event_view_hr=".$event_view_hr."&id_user_ack=".$id_user_ack;
|
$url = "index.php?sec=eventos&sec2=operation/events/events&search=" .
|
||||||
|
rawurlencode($search) . "&event_type=" . $event_type .
|
||||||
|
"&severity=" . $severity . "&status=" . $status . "&ev_group=" .
|
||||||
|
$ev_group . "&refr=" . $config["refr"] . "&id_agent=" .
|
||||||
|
$id_agent . "&id_event=" . $id_event . "&pagination=" .
|
||||||
|
$pagination . "&group_rep=" . $group_rep . "&event_view_hr=" .
|
||||||
|
$event_view_hr . "&id_user_ack=" . $id_user_ack;
|
||||||
|
|
||||||
echo '<h3 id="result" style="display:none"> </h3>';
|
echo '<h3 id="result" style="display:none"> </h3>';
|
||||||
|
|
||||||
@ -330,6 +336,7 @@ if ($group_rep == 0) {
|
|||||||
$sql = "SELECT *, COUNT(*) AS event_rep, MAX(utimestamp) AS timestamp_rep FROM tevento WHERE 1=1 ".$sql_post." GROUP BY evento, id_agentmodule ORDER BY timestamp_rep DESC LIMIT ".$offset.",".$pagination;
|
$sql = "SELECT *, COUNT(*) AS event_rep, MAX(utimestamp) AS timestamp_rep FROM tevento WHERE 1=1 ".$sql_post." GROUP BY evento, id_agentmodule ORDER BY timestamp_rep DESC LIMIT ".$offset.",".$pagination;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Extract the events by filter (or not) from db
|
||||||
$result = get_db_all_rows_sql ($sql);
|
$result = get_db_all_rows_sql ($sql);
|
||||||
|
|
||||||
if ($group_rep == 0) {
|
if ($group_rep == 0) {
|
||||||
@ -338,6 +345,7 @@ if ($group_rep == 0) {
|
|||||||
$sql = "SELECT COUNT(DISTINCT(evento)) FROM tevento WHERE 1=1 ".$sql_post;
|
$sql = "SELECT COUNT(DISTINCT(evento)) FROM tevento WHERE 1=1 ".$sql_post;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Count the events with this filter (TODO but not utimestamp).
|
||||||
$total_events = (int) get_db_sql ($sql);
|
$total_events = (int) get_db_sql ($sql);
|
||||||
|
|
||||||
if (empty ($result)) {
|
if (empty ($result)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user