From b8fdb1be264762501dae852a04936937893b13b5 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Tue, 21 Sep 2010 08:59:01 +0000 Subject: [PATCH] 2010-09-21 Miguel de Dios * include/functions_html.php: fixed the width by default in the function "print_table", now there isn't a default width (before it was 80%). * include/pchart_graph.php: fixed in the function "add_events" when tryed to add a event out the data. * include/fgraph.php: check the user with the mobile methods. * include/functions_db.php: in function "check_login" check the user with the mobile methods. * images/status_sets/default/severity_warning_pixel.png, images/status_sets/default/severity_normal_pixel.png, images/status_sets/default/severity_informational_pixel.png, images/status_sets/default/severity_maintenance_pixel.png, images/status_sets/default/severity_critical_pixel.png: added the image files for to show in the event mobile's page. * mobile/operation/agents/view_agents.php, mobile/operation/agents/tactical.php, mobile/operation/agents/view_alerts.php, mobile/operation/events/events.php, mobile/operation/servers/view_servers.php, mobile/include/user.class.php, mobile/include/system.class.php: changed the style the some pages to show more clearly the pages in old m$-mobiles. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3265 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 27 ++++++++++ .../default/severity_critical_pixel.png | Bin 0 -> 187 bytes .../default/severity_informational_pixel.png | Bin 0 -> 190 bytes .../default/severity_maintenance_pixel.png | Bin 0 -> 190 bytes .../default/severity_normal_pixel.png | Bin 0 -> 190 bytes .../default/severity_warning_pixel.png | Bin 0 -> 190 bytes pandora_console/include/fgraph.php | 23 +++++--- pandora_console/include/functions_api.php | 15 ++++++ pandora_console/include/functions_db.php | 30 ++++++++--- pandora_console/include/functions_html.php | 9 +++- pandora_console/include/pchart_graph.php | 4 +- .../mobile/include/system.class.php | 6 +++ pandora_console/mobile/include/user.class.php | 3 +- .../mobile/operation/agents/tactical.php | 6 +-- .../mobile/operation/agents/view_agents.php | 29 +++++----- .../mobile/operation/agents/view_alerts.php | 10 ++-- .../mobile/operation/events/events.php | 51 +++++++++--------- .../mobile/operation/servers/view_servers.php | 4 +- 18 files changed, 153 insertions(+), 64 deletions(-) create mode 100755 pandora_console/images/status_sets/default/severity_critical_pixel.png create mode 100755 pandora_console/images/status_sets/default/severity_informational_pixel.png create mode 100644 pandora_console/images/status_sets/default/severity_maintenance_pixel.png create mode 100755 pandora_console/images/status_sets/default/severity_normal_pixel.png create mode 100755 pandora_console/images/status_sets/default/severity_warning_pixel.png diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 6f3546e2ee..9f91824721 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,30 @@ +2010-09-21 Miguel de Dios + + * include/functions_html.php: fixed the width by default in the function + "print_table", now there isn't a default width (before it was 80%). + + * include/pchart_graph.php: fixed in the function "add_events" when tryed + to add a event out the data. + + * include/fgraph.php: check the user with the mobile methods. + + * include/functions_db.php: in function "check_login" check the user with + the mobile methods. + + * images/status_sets/default/severity_warning_pixel.png, + images/status_sets/default/severity_normal_pixel.png, + images/status_sets/default/severity_informational_pixel.png, + images/status_sets/default/severity_maintenance_pixel.png, + images/status_sets/default/severity_critical_pixel.png: added the image + files for to show in the event mobile's page. + + * mobile/operation/agents/view_agents.php, + mobile/operation/agents/tactical.php, + mobile/operation/agents/view_alerts.php, mobile/operation/events/events.php, + mobile/operation/servers/view_servers.php, mobile/include/user.class.php, + mobile/include/system.class.php: changed the style the some pages to show + more clearly the pages in old m$-mobiles. + 2010-09-21 Junichi Satoh * godmode/massive/massive_add_action_alerts.php, diff --git a/pandora_console/images/status_sets/default/severity_critical_pixel.png b/pandora_console/images/status_sets/default/severity_critical_pixel.png new file mode 100755 index 0000000000000000000000000000000000000000..9642d92e6b31c26809e30649dafac3c116bcfd0d GIT binary patch literal 187 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2V6Od#Ihk44ofy`glX(f`uqAoByDx`7I;J!Gca%qgD@k*tT_@uLG}_)Usv{9oT40J0#dV<*a3xPOI#yLobz*Y zQ}ap~oQqNuOHxx5$}>wc6hbmm72G|21Ky{o<^dH7dAc};NL)^~Io!Z+VA$i8%*enz Wm*D~P(K+jYvJ9TCelF{r5}E*`GB6JS literal 0 HcmV?d00001 diff --git a/pandora_console/images/status_sets/default/severity_informational_pixel.png b/pandora_console/images/status_sets/default/severity_informational_pixel.png new file mode 100755 index 0000000000000000000000000000000000000000..985ea828c343d4548e4b1506571c22c71f0b5698 GIT binary patch literal 190 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2V6Od#Ihk44ofy`glX(f`uqAoByDx`7I;J!Gca%qgD@k*tT_@uLG}_)Usv{9oT3~G+Dg55@_|CKC9V-A&iT2y zsd*&~&PAz-C8;S2<(VZJ3LzP(3hti10q;{(^MDFPJzX3_BrYfG%&MQqXr7RCfZJ`A a34`Bc#xKdG55j>87(8A5T-G@yGywp9N-~iE literal 0 HcmV?d00001 diff --git a/pandora_console/images/status_sets/default/severity_maintenance_pixel.png b/pandora_console/images/status_sets/default/severity_maintenance_pixel.png new file mode 100644 index 0000000000000000000000000000000000000000..f6f29456318fac7e37a07559de731a7aed30d69a GIT binary patch literal 190 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2V6Od#Ihk44ofy`glX(f`uqAoByDx`7I;J!Gca%qgD@k*tT_@uLG}_)Usv{9oT40x4AZql@_<6JC9V-A&iT2y zsd*&~&PAz-C8;S2<(VZJ3LzP(3hti10q;{(K?+4ZT^vIsE+^mFS}x6;ci>2acuz+vLV*exJYD@<);T3K0RTziG9CZ` literal 0 HcmV?d00001 diff --git a/pandora_console/images/status_sets/default/severity_normal_pixel.png b/pandora_console/images/status_sets/default/severity_normal_pixel.png new file mode 100755 index 0000000000000000000000000000000000000000..5e4e30f66b74db6d8afc042c310113eacb4a9a5d GIT binary patch literal 190 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2V6Od#Ihk44ofy`glX(f`uqAoByDx`7I;J!Gca%qgD@k*tT_@uLG}_)Usv{9oT40xqQAa>Xax$%mbgZgIOpf) zrskC}I2WZRmZYXAlxLP?D1>CBD!6<42E0#E%>ybF^>lFzk+_`vrYhx7gS3I+16Jiw aDF!At#x48TE;9xyVDNPHb6Mw<&;$VYLo;{) literal 0 HcmV?d00001 diff --git a/pandora_console/images/status_sets/default/severity_warning_pixel.png b/pandora_console/images/status_sets/default/severity_warning_pixel.png new file mode 100755 index 0000000000000000000000000000000000000000..dc1b701573da85296a43efc64c1478a67197b6bd GIT binary patch literal 190 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2V6Od#Ihk44ofy`glX(f`uqAoByDx`7I;J!Gca%qgD@k*tT_@uLG}_)Usv{9oT40x7W*~Ud;ki`mbgZgIOpf) zrskC}I2WZRmZYXAlxLP?D1>CBD!6<42E0#E%>ybF^>lFzk+_`v=kulcjOGbR2e{o< anJ{cw%j7ZdNJ<4z0fVQjpUXO@geCyy3pA+! literal 0 HcmV?d00001 diff --git a/pandora_console/include/fgraph.php b/pandora_console/include/fgraph.php index fd0ca4d939..5402142147 100644 --- a/pandora_console/include/fgraph.php +++ b/pandora_console/include/fgraph.php @@ -48,7 +48,17 @@ error_reporting (E_ALL); if (! isset ($config["id_user"])) { session_start (); session_write_close (); - $config["id_user"] = $_SESSION["id_usuario"]; + if (isset($_SESSION["id_usuario"])) { + $config["id_user"] = $_SESSION["id_usuario"]; + } +} + +if (! isset ($config["id_user"])) { + require_once('../mobile/include/user.class.php'); + session_start (); + session_write_close (); + $user = $_SESSION['user']; + $config["id_user"] = $user->getIdUser(); } //Fixed the graph for cron (that it's login) @@ -1530,7 +1540,7 @@ function grafico_modulo_sparse_mobile ($agent_module_id, $period, $show_events, "utimestamp > $datelimit", "utimestamp < $date", 'order' => 'utimestamp ASC'), - array ('evento', 'utimestamp')); + array ('evento', 'utimestamp', 'event_type')); if ($events === false) { $events = array (); } @@ -1634,6 +1644,7 @@ function grafico_modulo_sparse_mobile ($agent_module_id, $period, $show_events, // Read events and alerts that fall in the current interval $event_value = 0; $alert_value = 0; + while (isset ($events[$k]) && $events[$k]['utimestamp'] >= $timestamp && $events[$k]['utimestamp'] <= ($timestamp + $interval)) { if ($show_events == 1) { $event_value++; @@ -1666,7 +1677,7 @@ function grafico_modulo_sparse_mobile ($agent_module_id, $period, $show_events, $chart[$timestamp]['count'] = 0; $chart[$timestamp]['timestamp_bottom'] = $timestamp; $chart[$timestamp]['timestamp_top'] = $timestamp + $interval; - $chart[$timestamp]['event'] = $event_value; + $chart[$timestamp]['events'] = $event_value; $chart[$timestamp]['alert'] = $alert_value; } @@ -1678,8 +1689,8 @@ function grafico_modulo_sparse_mobile ($agent_module_id, $period, $show_events, // Fix event and alert scale $event_max = $max_value * 1.25; foreach ($chart as $timestamp => $chart_data) { - if ($chart_data['event'] > 0) { - $chart[$timestamp]['event'] = $event_max; + if ($chart_data['events'] > 0) { + $chart[$timestamp]['events'] = $event_max; } if ($chart_data['alert'] > 0) { $chart[$timestamp]['alert'] = $event_max; @@ -1724,7 +1735,7 @@ function grafico_modulo_sparse_mobile ($agent_module_id, $period, $show_events, $engine->show_title = false; //true; $engine->max_value = $max_value; $engine->min_value = $min_value; - $engine->events = (bool) $show_event; + $engine->events = (bool) $show_events; $engine->alert_top = false; $engine->alert_bottom = false;; if (! $pure) { diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index 480b0fd7c5..695a826e4a 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -978,6 +978,21 @@ function set_delete_module($id, $id2, $other, $trash1) { } } +function set_module_data($id, $thrash2, $other, $trash1) { + if ($other['type'] == 'array') { + $idAgentModule = $id; + $data = $other['data'][0]; + $time = $other['data'][1]; + if ($time == 'now') $time = time(); + + + } + else { + returnError('error_parameter', 'Error in the parameters.'); + return; + } +} + function set_new_module($id, $id2, $other, $trash1) { if ($other['type'] == 'string') { returnError('error_parameter', 'Error in the parameters.'); diff --git a/pandora_console/include/functions_db.php b/pandora_console/include/functions_db.php index da210c2260..9098f8397b 100644 --- a/pandora_console/include/functions_db.php +++ b/pandora_console/include/functions_db.php @@ -46,6 +46,17 @@ function check_login () { return 0; } } + else { + require_once('../mobile/include/user.class.php'); + session_start (); + session_write_close (); + $user = $_SESSION['user']; + $id_user = $user->getIdUser(); + + if (is_user ($id_user)) { + return 0; + } + } audit_db ("N/A", getenv ("REMOTE_ADDR"), "No session", "Trying to access without a valid session"); include ($config["homedir"]."/general/noaccess.php"); exit; @@ -2155,9 +2166,11 @@ function get_db_all_rows_filter ($table, $filter = array(), $fields = false, $wh //TODO: Validate and clean filter options if (is_array ($filter)) { $filter = format_array_to_where_clause_sql ($filter, $where_join, ' WHERE '); - } elseif (is_string ($filter)) { + } + elseif (is_string ($filter)) { $filter = 'WHERE '.$filter; - } else { + } + else { $filter = ''; } @@ -2527,6 +2540,7 @@ $sql = 'SELECT * FROM table WHERE '.format_array_to_where_clause_sql ($values, ' * clause of an SQL sentence. */ function format_array_to_where_clause_sql ($values, $join = 'AND', $prefix = false) { + $fields = array (); if (! is_array ($values)) { @@ -2592,13 +2606,17 @@ function format_array_to_where_clause_sql ($values, $join = 'AND', $prefix = fal if (is_null ($value)) { $query .= sprintf ("%s IS NULL", $field); - } elseif (is_int ($value) || is_bool ($value)) { + } + elseif (is_int ($value) || is_bool ($value)) { $query .= sprintf ("%s = %d", $field, $value); - } else if (is_float ($value) || is_double ($value)) { + } + else if (is_float ($value) || is_double ($value)) { $query .= sprintf ("%s = %f", $field, $value); - } elseif (is_array ($value)) { + } + elseif (is_array ($value)) { $query .= sprintf ('%s IN ("%s")', $field, implode ('", "', $value)); - } else { + } + else { if ($value[0] == ">"){ $value = substr($value,1,strlen($value)-1); $query .= sprintf ("%s > '%s'", $field, $value); diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 0777238170..7d8a9c2be9 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -781,7 +781,7 @@ function print_table (&$table, $return = false) { if (empty ($table->width)) { - $table->width = '80%'; + //$table->width = '80%'; } if (empty ($table->border)) { @@ -812,7 +812,12 @@ function print_table (&$table, $return = false) { $tableid = empty ($table->id) ? 'table'.$table_count : $table->id; - $output .= 'tablealign; + if (!empty($table->width)) { + $output .= '
tablealign; + } + else { + $output .= '
tablealign; + } $output .= ' cellpadding="'.$table->cellpadding.'" cellspacing="'.$table->cellspacing.'"'; $output .= ' border="'.$table->border.'" class="'.$table->class.'" id="'.$tableid.'">'; $countcols = 0; diff --git a/pandora_console/include/pchart_graph.php b/pandora_console/include/pchart_graph.php index dd36fa7bdd..a44791f661 100644 --- a/pandora_console/include/pchart_graph.php +++ b/pandora_console/include/pchart_graph.php @@ -509,10 +509,12 @@ class PchartGraph extends PandoraGraphAbstract { foreach ($this->data as $i => $data) { /* Finally, check if there were events */ - if (! $data['events']) continue; + if (!isset($this->dataset->Data[$i])) + continue; + $x1 = (int) ($this->x1 + $i * $this->graph->DivisionWidth); $y1 = (int) ($this->y2 - ($this->dataset->Data[$i][$serie] * $this->graph->DivisionRatio)); $this->graph->drawFilledCircle ($x1, $y1, 1.5, 255, 0, 0); diff --git a/pandora_console/mobile/include/system.class.php b/pandora_console/mobile/include/system.class.php index 6a4aa10a3d..ab5a39244a 100644 --- a/pandora_console/mobile/include/system.class.php +++ b/pandora_console/mobile/include/system.class.php @@ -59,6 +59,12 @@ class System { } } + public function setSessionBase($name, $value) { + session_start(); + $_SESSION[$name] = $value; + session_write_close(); + } + public function setSession($name, $value) { $this->session[$name] = $value; diff --git a/pandora_console/mobile/include/user.class.php b/pandora_console/mobile/include/user.class.php index e9950fe112..90a7edba24 100644 --- a/pandora_console/mobile/include/user.class.php +++ b/pandora_console/mobile/include/user.class.php @@ -39,7 +39,8 @@ class User { if ($this->logged) { //hack to compatibility with pandora global $config; - $config['id_user'] = $this->user; + $config['id_user'] = $this->user; + $this->system->setSessionBase('id_usuario', $this->user); } } diff --git a/pandora_console/mobile/operation/agents/tactical.php b/pandora_console/mobile/operation/agents/tactical.php index cd128d473f..83aac2fc00 100644 --- a/pandora_console/mobile/operation/agents/tactical.php +++ b/pandora_console/mobile/operation/agents/tactical.php @@ -27,7 +27,7 @@ class Tactical { $data = get_group_stats(); $table = null; - $table->width = '100%'; + //$table->width = '100%'; $table->size[0] = '10px'; @@ -77,7 +77,7 @@ class Tactical { $server_performance = get_server_performance(); $table = null; - $table->width = '100%'; + //$table->width = '100%'; $table->align = array(); $table->align[1] = 'right'; @@ -98,7 +98,7 @@ class Tactical { echo "

" . __('Summary') . "

"; $table = null; - $table->width = '100%'; + //$table->width = '100%'; $table->align[1] = 'right'; $table->data[0][0] = '' . __('Total agents') . ''; $table->data[0][1] = '' . $data["total_agents"] . ''; diff --git a/pandora_console/mobile/operation/agents/view_agents.php b/pandora_console/mobile/operation/agents/view_agents.php index 8aed771f4d..de16164e2b 100644 --- a/pandora_console/mobile/operation/agents/view_agents.php +++ b/pandora_console/mobile/operation/agents/view_agents.php @@ -105,7 +105,7 @@ class ViewAgents { $data = array(); - $truncName = printTruncateText($agent['nombre'], 10, true, true); + $truncName = printTruncateText($agent['nombre'], 25, true, true); $data[] = print_group_icon2($agent["id_grupo"], true, "../images/groups_small", '', false); $data[] = '' . $truncName . ''; @@ -125,8 +125,8 @@ class ViewAgents { $moduleInfo .= ''; $data[] = $moduleInfo; - $data[] = ''; - $data[] = ''; + $data[] = ''; + $data[] = ''; $table->data[] = $data; @@ -215,7 +215,7 @@ class ViewAgent { echo "

" . __('Modules') . "

"; $table = null; - $table->width = '100%'; + //$table->width = '100%'; $table->head = array(); $table->head[0] = __('Module'); $table->head[1] = '' . __('S') . ''; @@ -236,7 +236,8 @@ class ViewAgent { $data = array(); - $data[] = '' . printTruncateText($module["nombre"], 10, true, true) . ''; + $data[] = '' . + printTruncateText($module["nombre"], 20, true, true) . ''; $status = STATUS_MODULE_WARNING; $title = ""; @@ -274,8 +275,8 @@ class ViewAgent { $title .= ": " . substr(safe_output($module["datos"]),0,42); } - $data[] = str_replace('.png', '_ball.png', str_replace('images/status_sets', - '../images/status_sets', print_status_image($status, $title, true))); + $data[] = str_replace(array('images/status_sets', 'data[] = $data; } @@ -423,8 +424,8 @@ class viewGraph { return; } - $image = "../include/fgraph.php?tipo=sparse_mobile&draw_alerts=1&draw_events=1' . - '&id=" . $this->idAgentModule . "&zoom=1&label=".safe_output($this->agentModule['nombre']) . + $image = "../include/fgraph.php?tipo=sparse_mobile&draw_alerts=1&draw_events=1" . + '&id=' . $this->idAgentModule . "&zoom=1&label=".safe_output($this->agentModule['nombre']) . "&height=120&width=240&period=" . $this->period . "&avg_only=0"; $image .= "&date=" . get_system_time (); @@ -432,7 +433,7 @@ class viewGraph { echo "

" . get_agentmodule_agent_name($this->idAgentModule)." / ".safe_output($this->agentModule['nombre']) . "

"; echo "

" . __('Graph') . "

"; - print_image ($image, false, array ("border" => 0)); + print_image ($image, false, array ("border" => 0)); echo "

" . __('Data') . "

"; diff --git a/pandora_console/mobile/operation/agents/view_alerts.php b/pandora_console/mobile/operation/agents/view_alerts.php index 695e23afb9..1fe26ffc07 100644 --- a/pandora_console/mobile/operation/agents/view_alerts.php +++ b/pandora_console/mobile/operation/agents/view_alerts.php @@ -23,7 +23,7 @@ class ViewAlerts { public function show() { $table = null; - $table->width = '100%'; + //$table->width = '100%'; $table->head = array(); $table->head[0] = __('Module'); $table->head[1] = __('Template'); @@ -58,9 +58,9 @@ class ViewAlerts { $idAgent = get_agentmodule_agent($alert["id_agent_module"]); - $data[] = '' . printTruncateText(get_agentmodule_name($alert["id_agent_module"]), 10, true, true) . ''; + $data[] = '' . printTruncateText(get_agentmodule_name($alert["id_agent_module"]), 20, true, true) . ''; $template = safe_output(get_alert_template ($alert['id_alert_template'])); - $data[] = printTruncateText(safe_output($template['name']), 10, true, true); + $data[] = printTruncateText(safe_output($template['name']), 20, true, true); $data[] = print_timestamp ($alert["last_fired"], true, array('units' => 'tiny')); $status = STATUS_ALERT_NOT_FIRED; @@ -77,8 +77,8 @@ class ViewAlerts { $title = __('Alert not fired'); } - $data[] = str_replace('.png', '_ball.png', str_replace('images/status_sets', - '../images/status_sets', print_status_image($status, $title, true))); + $data[] = str_replace(array('images/status_sets', 'data[] = $data; } diff --git a/pandora_console/mobile/operation/events/events.php b/pandora_console/mobile/operation/events/events.php index 5bfb537b76..99d852da2d 100644 --- a/pandora_console/mobile/operation/events/events.php +++ b/pandora_console/mobile/operation/events/events.php @@ -123,14 +123,16 @@ class EventsView { $count = get_db_value_sql($sql_count); $rows = get_db_all_rows_sql($sql); + if ($rows === false) + $rows = array(); $table = null; $table->width = '100%'; $table->head = array(); $table->head[0] = '' . __('S') . ''; - $table->head[1] = '' . __('G') . ''; - $table->head[2] = '' . __('T') . ''; +// $table->head[1] = '' . __('G') . ''; +// $table->head[2] = '' . __('T') . ''; $table->head[3] = '' . __('T') . ''; $table->head[4] = '' . __('Des.') . ''; $table->head[5] = '' . __('Agent') . ''; @@ -142,19 +144,19 @@ class EventsView { switch ($row["criticity"]) { default: case 0: - $img = "../images/status_sets/default/severity_maintenance.png"; + $img = "../images/status_sets/default/severity_maintenance_pixel.png"; break; case 1: - $img = "../images/status_sets/default/severity_informational.png"; + $img = "../images/status_sets/default/severity_informational_pixel.png"; break; case 2: - $img = "../images/status_sets/default/severity_normal.png"; + $img = "../images/status_sets/default/severity_normal_pixel.png"; break; case 3: - $img = "../images/status_sets/default/severity_warning.png"; + $img = "../images/status_sets/default/severity_warning_pixel.png"; break; case 4: - $img = "../images/status_sets/default/severity_critical.png"; + $img = "../images/status_sets/default/severity_critical_pixel.png"; break; } @@ -163,34 +165,35 @@ class EventsView { '&severity=' . $row["criticity"] . '&search=' . $search . '">' . print_image ($img, true, array ("class" => "image_status", - "width" => 12, - "height" => 12, + "width" => 15, + "height" => 15, "title" => get_priority_name($row["criticity"]))) . ''; - $data[] = '' . - str_replace('images/', '../images/', print_group_icon ($row["id_grupo"], true, "groups_small", '', false)) - . ''; - - $data[] = '' . - str_replace('images/', '../images/', print_event_type_img($row["event_type"], true)) . - ''; +// $data[] = '' . +// str_replace('images/', '../images/', print_group_icon ($row["id_grupo"], true, "groups_small", '', false)) +// . ''; +// +// $data[] = '' . +// str_replace('images/', '../images/', print_event_type_img($row["event_type"], true)) . +// ''; + $data[] = print_timestamp($row["timestamp"], true, array('units' => 'tiny')); - $data[] = printTruncateText($row["evento"], 8, true, true); + $data[] = printTruncateText($row["evento"], 40, true, true); if ($row["event_type"] == "system") { - $data[] = printTruncateText(__('System'), 8, true, true); + $data[] = printTruncateText(__('System'), 20, true, true); } elseif ($row["id_agente"] > 0) { // Agent name - $data[] = printTruncateText(get_agent_name($row["id_agente"]), 8, true, true); + $data[] = printTruncateText(get_agent_name($row["id_agente"]), 20, true, true); } else { - $data[] = printTruncateText(__('Alert SNMP'), 8, true, true); + $data[] = printTruncateText(__('Alert SNMP'), 20, true, true); } $table->data[] = $data; diff --git a/pandora_console/mobile/operation/servers/view_servers.php b/pandora_console/mobile/operation/servers/view_servers.php index 7d388d8043..f6f515bce3 100644 --- a/pandora_console/mobile/operation/servers/view_servers.php +++ b/pandora_console/mobile/operation/servers/view_servers.php @@ -56,8 +56,8 @@ class ViewServers { $data[] = str_replace('images/', '../images/', $server['img']); $data[] = human_time_comparation ($server["laststart"], 'tiny'); $data[] = human_time_comparation ($server["keepalive"], 'tiny'); - $data[] = str_replace('.png', '_ball.png', str_replace('images/status_sets', - '../images/status_sets', $server_status)); + $data[] = str_replace(array('images/status_sets', 'system->debug($server["name"]); $table->data[] = $data;