From da554652236d67f9098db2f7a4edecb800c1cd6e Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Thu, 11 Jul 2013 08:15:48 +0000 Subject: [PATCH] 2013-07-11 Miguel de Dios * mobile/operation/agents.php, mobile/operation/agent.php, include/functions_graph.php: fixed the show static graphs in mobile. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8513 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 6 ++++++ pandora_console/include/functions_graph.php | 5 +++-- pandora_console/mobile/operation/agent.php | 4 ++-- pandora_console/mobile/operation/agents.php | 4 ++-- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 88a1fa7a43..66aedead9d 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2013-07-11 Miguel de Dios + + * mobile/operation/agents.php, mobile/operation/agent.php, + include/functions_graph.php: fixed the show static graphs in + mobile. + 2013-07-10 Ramon Novoa * extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index a827b11e95..eaf68da691 100755 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -1425,8 +1425,9 @@ function graph_agent_status ($id_agent = false, $width = 300, $height = 200, $re $data = array(); } - $out = pie2d_graph($config['flash_charts'], $data, $width, $height, __("other"), - '', '', $config['fontpath'], $config['font_size'], 1, "hidden", $colors); + $out = pie2d_graph($config['flash_charts'], $data, $width, $height, + __("other"), + ui_get_full_url(false), '', $config['fontpath'], $config['font_size'], 1, "hidden", $colors); if ($return) { return $out; diff --git a/pandora_console/mobile/operation/agent.php b/pandora_console/mobile/operation/agent.php index 8e69d6214e..1f8f22a2e5 100644 --- a/pandora_console/mobile/operation/agent.php +++ b/pandora_console/mobile/operation/agent.php @@ -100,7 +100,7 @@ class Agent { $addresses = agents_get_addresses($this->id); $address = agents_get_address($this->id); foreach ($addresses as $k => $add) { - if($add == $address) { + if ($add == $address) { unset($addresses[$k]); } } @@ -131,7 +131,7 @@ class Agent { $html = $graph_js . $html; $html .= "" . __('Events (24h)') . "
"; $html .= graph_graphic_agentevents( - $this->id, 250, 15, 86400, '', true); + $this->id, 250, 15, 86400, ui_get_full_url(false), true); $ui->contentGridAddCell($html); $ui->contentEndGrid(); diff --git a/pandora_console/mobile/operation/agents.php b/pandora_console/mobile/operation/agents.php index 7642066851..ef690031f1 100644 --- a/pandora_console/mobile/operation/agents.php +++ b/pandora_console/mobile/operation/agents.php @@ -262,9 +262,9 @@ class Agents { $img_status = agents_tree_view_status_img ($agent["critical_count"], - $agent["warning_count"], $agent["unknown_count"]); + $agent["warning_count"], $agent["unknown_count"], $agent['total_count'], $agent['notinit_count']); - $img_alert = agents_tree_view_alert_img ($agent_info["monitor_alertsfired"]); + $img_alert = agents_tree_view_alert_img ($agent["fired_count"]); $row[0] = $row[__('Agent')] =