2010-05-31 Raul Mateos <raulofpandora@gmail.com>

* operation/agentes/estado_agente.php, operation/agentes/exportdata.php,
	operation/agentes/status_monitor.php: Added icon to search button.

git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2820 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
raulmateos 2010-05-31 11:41:10 +00:00
parent 74aa1fb61f
commit 3d14643359
4 changed files with 20 additions and 18 deletions

View File

@ -1,3 +1,8 @@
2010-05-31 Raúl Mateos <raulofpandora@gmail.com>
* operation/agentes/estado_agente.php, operation/agentes/exportdata.php,
operation/agentes/status_monitor.php: Added icon to search button.
2010-05-31 Ramon Novoa <rnovoa@artica.es>
* include/fgraph.php: Fixed some min and max calculation issues related

View File

@ -2,7 +2,7 @@
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
@ -91,7 +91,7 @@ print_input_text ("search", $search, '', 15);
echo '</td><td style="white-space:nowrap;">';
print_submit_button (__('Search'), "srcbutton", '', array ("class" => "sub"));
print_submit_button (__('Search'), "srcbutton", '', array ("class" => "sub search"));
echo '</td><td style="width:40%;">&nbsp;</td></tr></table></form>';
@ -128,7 +128,7 @@ if (! empty ($agent_names)) {
array ('id_agente',
'id_grupo',
'id_os',
'ultimo_contacto',
'ultimo_contacto',
'intervalo'));}
if (empty ($agents)) {
@ -219,19 +219,19 @@ foreach ($agents as $agent) {
$data[6] = $agent_info["alert_img"];
$last_time = strtotime ($agent["ultimo_contacto"]);
$last_time = strtotime ($agent["ultimo_contacto"]);
$now = time ();
$diferencia = $now - $last_time;
$time = print_timestamp ($last_time, true);
$style = '';
if ($diferencia > ($agent["intervalo"] * 2))
$data[7] = '<b><span style="color: #ff0000">'.$time.'</span></b>';
else
$data[7] = $time;
$data[7] = '<b><span style="color: #ff0000">'.$time.'</span></b>';
else
$data[7] = $time;
// This old code was returning "never" on agents without modules, BAD !!
// And does not print outdated agents in red. WRONG !!!!
// $data[7] = print_timestamp ($agent_info["last_contact"], true);
// This old code was returning "never" on agents without modules, BAD !!
// And does not print outdated agents in red. WRONG !!!!
// $data[7] = print_timestamp ($agent_info["last_contact"], true);
array_push ($table->data, $data);
}

View File

@ -2,7 +2,7 @@
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
@ -68,9 +68,6 @@ require_javascript_file ('calendar');
// Header
print_page_header (__("Export data"), "images/bricks.png");
echo "<h2>".__('Pandora agents')." &raquo; ".__('Export data')."</h2>";
$group = get_parameter_post ('group', 0);
//$agent = get_parameter_post ('agent', 0);
$agentName = get_parameter_post ('agent', 0);

View File

@ -3,7 +3,7 @@
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
@ -79,7 +79,7 @@ echo '<td valign="middle">';
print_input_text ("ag_freestring", $ag_freestring, '', 15,30, false);
echo '</td><td valign="middle">';
print_submit_button (__('Show'), "uptbutton", false, 'class="sub"');
print_submit_button (__('Show'), "uptbutton", false, 'class="sub search"');
echo "</form>";
echo "</table>";
@ -93,7 +93,7 @@ $sql = " FROM tagente, tagente_modulo, tagente_estado
// Agent group selector
if ($ag_group > 0 && give_acl ($config["id_user"], $ag_group, "AR")) {
$sql .= sprintf (" AND tagente.id_grupo = %d", $ag_group);
$sql .= sprintf (" AND tagente.id_grupo = %d", $ag_group);
} else {
// User has explicit permission on group 1 ?
$sql .= " AND tagente.id_grupo IN (".implode (",", array_keys (get_user_groups ())).")";
@ -214,7 +214,7 @@ foreach ($result as $row) {
$data = array ();
$data[1] = '<strong><a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$row["id_agent"].'">';
$data[1] .= substr ($row["agent_name"], 0, 25);
$data[1] .= substr ($row["agent_name"], 0, 25);
$data[1] .= '</a></strong>';
$data[2] = '<img src="images/'.show_icon_type ($row["module_type"]).'" border="0" />';