2010-11-04 Miguel de Dios <miguel.dedios@artica.es>

* include/functions_db.php: in function __ fixed when the Pandora don't
	have extensions.
	
	* operation/events/events_rss.php: cleaned source code.
	
	* operation/events/events_list.php: added more info in the hidden expanded
	row.
	
	Fixes: #3102826



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3523 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2010-11-04 17:41:37 +00:00
parent f300fd0a1f
commit 2bd122e423
4 changed files with 35 additions and 10 deletions

View File

@ -1,3 +1,15 @@
2010-11-04 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_db.php: in function __ fixed when the Pandora don't
have extensions.
* operation/events/events_rss.php: cleaned source code.
* operation/events/events_list.php: added more info in the hidden expanded
row.
Fixes: #3102826
2010-11-04 Miguel de Dios <miguel.dedios@artica.es>
* extensions/module_groups.php: fixed a unset $fired var.

View File

@ -3018,6 +3018,7 @@ function __ ($string /*, variable arguments */) {
global $l10n;
$extensions = get_extensions();
if (empty($extensions)) $extensions = array();
global $config;

View File

@ -478,26 +478,36 @@ foreach ($result as $event) {
if ($event["id_agentmodule"] != 0) {
$string .= '<td align="left" valign="top" width="15%">';
$string .= '<a href="index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente='.$event["id_agente"].'&amp;tab=data">';
$string .= '<b>' . __('Agent module source') . ':</b></td><td align="left">';
$string .= print_image ("images/bricks.png", true,
array ("title" => __('Go to data overview')));
$string .= '<a href="index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente='.$event["id_agente"].'&amp;tab=data">';
$string .= get_db_value('nombre', 'tagente_modulo', 'id_agente_modulo', $event["id_agentmodule"]);
$string .= '</a></td></tr><tr>';
}
if ($event["id_alert_am"] != 0) {
$string .= '<td align="left" valign="top" width="15%">';
$string .= '<a href="index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente='.$event["id_agente"].'&amp;tab=alert">';
$string .= '<b>' . __('Alert source') . ':</b></td><td align="left">';
$string .= '<a href="index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente='.$event["id_agente"].'&amp;tab=alert">';
$standby = get_db_value('standby', 'talert_template_modules', 'id', $event["id_alert_am"]);
if(!$standby) {
$string .= print_image ("images/bell.png", true,
array ("title" => __('Go to data overview')));
}else {
}
else {
$string .= print_image ("images/bell_pause.png", true,
array ("title" => __('Go to data overview')));
}
$sql = 'SELECT name
FROM talert_templates
WHERE id IN (SELECT id_alert_template
FROM talert_template_modules
WHERE id = ' . $event["id_alert_am"] . ');';
$templateName = get_db_sql($sql);
$string .= $templateName;
$string .= '</a></td></tr><tr>';
}

View File

@ -20,6 +20,7 @@ require_once "../../include/functions.php";
require_once "../../include/functions_db.php";
require_once "../../include/functions_api.php";
ini_set ('display_errors', 0); //Don't display other errors, messes up XML
$ipOrigin = $_SERVER['REMOTE_ADDR'];
@ -35,7 +36,7 @@ $hashup = get_parameter('hashup');
$pss = get_user_info($user);
$hashup2 = md5($user.$pss['password']);
if($hashup != $hashup2){
if ($hashup != $hashup2) {
exit;
}
@ -97,13 +98,13 @@ switch($status) {
if ($search != "")
$sql_post .= " AND `tevento`.`evento` LIKE '%$search%'";
if ($event_type != ""){
if ($event_type != "") {
// If normal, warning, could be several (going_up_warning, going_down_warning... too complex
// for the user so for him is presented only "warning, critical and normal"
if ($event_type == "warning" || $event_type == "critical" || $event_type == "normal"){
if ($event_type == "warning" || $event_type == "critical" || $event_type == "normal") {
$sql_post .= " AND `tevento`.`event_type` LIKE '%$event_type%' ";
}
elseif ($event_type == "not_normal"){
elseif ($event_type == "not_normal") {
$sql_post .= " AND `tevento`.`event_type` LIKE '%warning%' OR `tevento`.`event_type` LIKE '%critical%' OR `tevento`.`event_type` LIKE '%unknown%' ";
}
else
@ -176,7 +177,8 @@ $selfurl = $base.$_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'];
if (empty ($result)) {
$lastbuild = 0; //Last build in 1970
} else {
}
else {
$lastbuild = (int) $result[0]['unix_timestamp'];
}