mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 07:44:35 +02:00
2012-03-25 Junichi Satoh <junichi@rworks.jp>
* include/functions_graph.php, operation/events/events_list.php: Fixed SQL error with PostgreSQL. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5833 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
8d999ead87
commit
cce5eed769
@ -1,3 +1,8 @@
|
|||||||
|
2012-03-25 Junichi Satoh <junichi@rworks.jp>
|
||||||
|
|
||||||
|
* include/functions_graph.php, operation/events/events_list.php: Fixed
|
||||||
|
SQL error with PostgreSQL.
|
||||||
|
|
||||||
2012-03-25 Junichi Satoh <junichi@rworks.jp>
|
2012-03-25 Junichi Satoh <junichi@rworks.jp>
|
||||||
|
|
||||||
* include/db/postgresql.sql: Removed unnecessary quotes for making
|
* include/db/postgresql.sql: Removed unnecessary quotes for making
|
||||||
|
@ -1419,11 +1419,11 @@ function grafico_eventos_grupo ($width = 300, $height = 200, $url = "") {
|
|||||||
//is required if both DISTINCT() and COUNT() are in the statement
|
//is required if both DISTINCT() and COUNT() are in the statement
|
||||||
switch ($config["dbtype"]) {
|
switch ($config["dbtype"]) {
|
||||||
case "mysql":
|
case "mysql":
|
||||||
case "postgresql":
|
|
||||||
$sql = sprintf ('SELECT DISTINCT(id_agente) AS id_agente, id_grupo, COUNT(id_agente) AS count
|
$sql = sprintf ('SELECT DISTINCT(id_agente) AS id_agente, id_grupo, COUNT(id_agente) AS count
|
||||||
FROM tevento WHERE 1=1 %s
|
FROM tevento WHERE 1=1 %s
|
||||||
GROUP BY id_agente ORDER BY count DESC', $url);
|
GROUP BY id_agente ORDER BY count DESC', $url);
|
||||||
break;
|
break;
|
||||||
|
case "postgresql":
|
||||||
case "oracle":
|
case "oracle":
|
||||||
$sql = sprintf ('SELECT DISTINCT(id_agente) AS id_agente, id_grupo, COUNT(id_agente) AS count
|
$sql = sprintf ('SELECT DISTINCT(id_agente) AS id_agente, id_grupo, COUNT(id_agente) AS count
|
||||||
FROM tevento WHERE 1=1 %s
|
FROM tevento WHERE 1=1 %s
|
||||||
|
@ -466,7 +466,7 @@ else {
|
|||||||
MIN(estado) AS min_estado, MAX(estado) AS max_estado, COUNT(*) AS event_rep, MAX(utimestamp) AS timestamp_rep
|
MIN(estado) AS min_estado, MAX(estado) AS max_estado, COUNT(*) AS event_rep, MAX(utimestamp) AS timestamp_rep
|
||||||
FROM tevento
|
FROM tevento
|
||||||
WHERE 1=1 ".$sql_post."
|
WHERE 1=1 ".$sql_post."
|
||||||
GROUP BY evento, id_agentmodule
|
GROUP BY evento, id_agentmodule, id_evento, id_agente, id_usuario, id_grupo, estado, timestamp, utimestamp, event_type, id_alert_am, criticity, user_comment, tags, source, id_extra
|
||||||
ORDER BY timestamp_rep DESC LIMIT ".$pagination." OFFSET ".$offset;
|
ORDER BY timestamp_rep DESC LIMIT ".$pagination." OFFSET ".$offset;
|
||||||
break;
|
break;
|
||||||
case "oracle":
|
case "oracle":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user