2008-10-17 Sancho Lerena <slerena@gmail.com>

* fgraph.php, db_info.php, db_purge.php: Now show data also
	for string modules.

	* include/config_process.php, index.php: Header update for version
	2.1-dev.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1165 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
slerena 2008-10-17 11:16:53 +00:00
parent 192147a06c
commit 620ab8ad99
6 changed files with 38 additions and 5 deletions

View File

@ -1,3 +1,12 @@
2008-10-17 Sancho Lerena <slerena@gmail.com>
* fgraph.php, db_info.php, db_purge.php: Now show data also
for string modules.
* include/config_process.php, index.php: Header update for version
2.1-dev.
2008-10-16 Evi Vanoost <vanooste@rcbi.rochester.edu>
* include/functions_html.php: Added print_error_message, a function

View File

@ -63,6 +63,10 @@ $table->head[1] = __('Assigned modules');
$table->head[2] = __('Total data');
$sql = "SELECT DISTINCT(id_agente), COUNT(id_agente_datos) AS count FROM tagente_datos GROUP BY id_agente ORDER BY count ASC";
// Not implemented yet
//$sql2 = "SELECT DISTINCT(id_agente), COUNT(id_agente_datos_string) AS count FROM tagente_datos_string GROUP BY id_agente ORDER BY count ASC";
//This query takes 1s on a 1 million entry database. Merging it with tagente
//costs 7 seconds so we rely on the functions to return information on
//id_agente.

View File

@ -172,6 +172,18 @@ $data["1month"] = get_db_sql (sprintf ("SELECT COUNT(id_agente_datos) FROM tagen
$data["3month"] = get_db_sql (sprintf ("SELECT COUNT(id_agente_datos) FROM tagente_datos WHERE utimestamp > %d %s", $time["3month"], $query));
$data["total"] = get_db_sql (sprintf ("SELECT COUNT(id_agente_datos) FROM tagente_datos WHERE 1=1 %s", $query));
$data["1day"] += get_db_sql (sprintf ("SELECT COUNT(id_tagente_datos_string) FROM tagente_datos_string WHERE utimestamp > %d %s", $time["1day"], $query));
$data["3day"] += get_db_sql (sprintf ("SELECT COUNT(id_tagente_datos_string) FROM tagente_datos_string WHERE utimestamp > %d %s", $time["3day"], $query));
$data["1week"] += get_db_sql (sprintf ("SELECT COUNT(id_tagente_datos_string) FROM tagente_datos_string WHERE utimestamp > %d %s", $time["1week"], $query));
$data["2week"] += get_db_sql (sprintf ("SELECT COUNT(id_tagente_datos_string) FROM tagente_datos_string WHERE utimestamp > %d %s", $time["2week"], $query));
$data["1month"] += get_db_sql (sprintf ("SELECT COUNT(id_tagente_datos_string) FROM tagente_datos_string WHERE utimestamp > %d %s", $time["1month"], $query));
$data["3month"] += get_db_sql (sprintf ("SELECT COUNT(id_tagente_datos_string) FROM tagente_datos_string WHERE utimestamp > %d %s", $time["3month"], $query));
$data["total"] += get_db_sql (sprintf ("SELECT COUNT(id_tagente_datos_string) FROM tagente_datos_string WHERE 1=1 %s", $query));
if (isset ($table)) {
unset ($table); //since $table is an object, we make sure it's gone first
}

View File

@ -18,9 +18,9 @@
//Pandora Version
if (!isset ($build_version))
$build_version="PC081014";
$build_version="PC081016";
if (!isset ($pandora_version))
$pandora_version="v2.0";
$pandora_version="v2.1-dev";
// This is directory where placed "/attachment" directory, to upload files stores.
// This MUST be writtable by http server user, and should be in pandora root.

View File

@ -20,8 +20,8 @@
// Silk icon set 1.3 (cc) Mark James, http://www.famfamfam.com/lab/icons/silk/
// Pandora FMS uses Pear Image::Graph code
$build_version="PC081014";
$pandora_version="v2.0";
$build_version="PC081016";
$pandora_version="v2.1-dev";
global $build_version;
global $pandora_version;

View File

@ -1477,6 +1477,14 @@ function grafico_db_agentes_purge ($id_agent, $width, $height) {
$data[2] = get_db_sql (sprintf ("SELECT COUNT(id_agente_datos) FROM tagente_datos WHERE utimestamp > %d %s", $time["1month"], $query));
$data[3] = get_db_sql (sprintf ("SELECT COUNT(id_agente_datos) FROM tagente_datos WHERE utimestamp > %d %s", $time["3month"], $query));
$data[4] = get_db_sql (sprintf ("SELECT COUNT(id_agente_datos) FROM tagente_datos WHERE 1=1 %s", $query));
$data[0] += get_db_sql (sprintf ("SELECT COUNT(id_tagente_datos_string) FROM tagente_datos_string WHERE utimestamp > %d %s", $time["1day"], $query));
$data[1] += get_db_sql (sprintf ("SELECT COUNT(id_tagente_datos_string) FROM tagente_datos_string WHERE utimestamp > %d %s", $time["1week"], $query));
$data[2] += get_db_sql (sprintf ("SELECT COUNT(id_tagente_datos_string) FROM tagente_datos_string WHERE utimestamp > %d %s", $time["1month"], $query));
$data[3] += get_db_sql (sprintf ("SELECT COUNT(id_tagente_datos_string) FROM tagente_datos_string WHERE utimestamp > %d %s", $time["3month"], $query));
$data[4] += get_db_sql (sprintf ("SELECT COUNT(id_tagente_datos_string) FROM tagente_datos_string WHERE 1=1 %s", $query));
$data[4] = $data[4] - $data[3];
generic_pie_graph ($width, $height, $data, $legend);