2010-09-20 16:00:49 +02:00
|
|
|
<?php
|
|
|
|
// Pandora FMS - http://pandorafms.com
|
|
|
|
// ==================================================
|
|
|
|
// 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
|
|
|
|
// modify it under the terms of the GNU General Public License
|
|
|
|
// as published by the Free Software Foundation for version 2.
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
|
|
|
|
require_once('../include/functions_events.php');
|
|
|
|
|
|
|
|
class EventsView {
|
|
|
|
private $system;
|
|
|
|
|
|
|
|
function __construct() {
|
|
|
|
global $system;
|
|
|
|
|
|
|
|
$this->system = $system;
|
|
|
|
}
|
|
|
|
|
|
|
|
function show() {
|
2010-09-21 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php: in function "print_select_groups" and function
"print_select_from_sql" added source code to check $config['text_char_long']
for show small text in this widgets.
* include/functions.php: in function "get_event_types" and "get_priorities"
added source code to check $config['text_char_long'] for show small text in
this widgets. And in function "get_priority_class" cleaned source code.
* operation/agentes/status_monitor.php, operation/events/events.php: cleaned
source code style.
* images/pandora.ico.gif: added image file for to use in the mobile footer.
* mobile/operation/agents/monitor_status.php,
mobile/operation/agents/view_agents.php,
mobile/operation/agents/tactical.php,
mobile/operation/agents/group_view.php, mobile/operation/events/events.php,
mobile/include/style/main.css, mobile/include/functions_web.php,
mobile/index.php, general/footer.php: continued the develop, yep the
Pandora Console Mobile is complete (only rest the bugs).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3269 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-09-21 20:02:11 +02:00
|
|
|
global $config;
|
2011-03-09 Miguel de Dios <miguel.dedios@artica.es>
* install.php, operation/incidents/incident.php,
operation/agentes/status_monitor.php, operation/agentes/datos_agente.php,
operation/servers/view_server.php, operation/snmpconsole/snmp_view.php,
operation/events/events_rss.php, operation/events/events_list.php,
operation/events/events_marquee.php, operation/search_users.php,
mobile/operation/agents/monitor_status.php,
mobile/operation/agents/view_agents.php,
mobile/operation/agents/view_alerts.php, mobile/operation/events/events.php,
mobile/include/functions_web.php, godmode/admin_access_logs.php,
godmode/agentes/modificar_agente.php, godmode/alerts/alert_actions.php,
godmode/reporting/reporting_builder.list_items.php: changed and addded in
the source, the SQL queries for the "LIMIT x, x" to "LIMIT x OFFSET x", that
it is standard for PostgreSQL.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4080 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-09 18:55:37 +01:00
|
|
|
|
2010-09-21 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php: in function "print_select_groups" and function
"print_select_from_sql" added source code to check $config['text_char_long']
for show small text in this widgets.
* include/functions.php: in function "get_event_types" and "get_priorities"
added source code to check $config['text_char_long'] for show small text in
this widgets. And in function "get_priority_class" cleaned source code.
* operation/agentes/status_monitor.php, operation/events/events.php: cleaned
source code style.
* images/pandora.ico.gif: added image file for to use in the mobile footer.
* mobile/operation/agents/monitor_status.php,
mobile/operation/agents/view_agents.php,
mobile/operation/agents/tactical.php,
mobile/operation/agents/group_view.php, mobile/operation/events/events.php,
mobile/include/style/main.css, mobile/include/functions_web.php,
mobile/index.php, general/footer.php: continued the develop, yep the
Pandora Console Mobile is complete (only rest the bugs).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3269 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-09-21 20:02:11 +02:00
|
|
|
$config['text_char_long'] = 12;
|
|
|
|
|
2010-09-20 16:00:49 +02:00
|
|
|
$offset = $this->system->getRequest("offset", 0);
|
|
|
|
$ev_group = $this->system->getRequest("ev_group", 0); //0 = all
|
|
|
|
$event_type = get_parameter ("event_type", ''); // 0 all
|
|
|
|
$severity = $this->system->getRequest("severity", -1); // -1 all
|
|
|
|
$search = preg_replace ("/&([A-Za-z]{0,4}\w{2,3};|#[0-9]{2,3};)/", "%", rawurldecode ($this->system->getRequest("search", '')));
|
|
|
|
|
|
|
|
$event_view_hr = 24; //Last day of events
|
|
|
|
|
|
|
|
$types = get_event_types();
|
|
|
|
// Expand standard array to add not_normal (not exist in the array, used only for searches)
|
|
|
|
$types["not_normal"] = __("Not normal");
|
|
|
|
|
|
|
|
|
|
|
|
$table = null;
|
|
|
|
$table->width = '100%';
|
|
|
|
|
|
|
|
$table->colspan[1][2] = 2;
|
|
|
|
|
|
|
|
$table->data[0][0] = '<span alt="' . __('Group') . '" title="' . __('Group') . '"><b>' . __('G') . '</b></span>';
|
|
|
|
$table->data[0][1] = print_select_groups($this->system->getConfig("id_user"), "IR", true, 'ev_group', $ev_group, '', '', 0, true, false, false, 'w130');
|
|
|
|
$table->data[0][2] = '<span alt="' . __('Event type') . '" title="' . __('Event type') . '"><b>' . __('E') . '</b></span>';
|
|
|
|
$table->data[0][3] = print_select ($types, 'event_type', $event_type, '', __('All'), '', true);
|
|
|
|
$table->data[1][0] = '<span alt="' . __('Severity') . '" title="' . __('Severity') . '"><b>' . __('S') . '</b></span>';
|
|
|
|
$table->data[1][1] = print_select (get_priorities (), "severity", $severity, '', __('All'), '-1', true);
|
2010-09-21 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php: in function "print_select_groups" and function
"print_select_from_sql" added source code to check $config['text_char_long']
for show small text in this widgets.
* include/functions.php: in function "get_event_types" and "get_priorities"
added source code to check $config['text_char_long'] for show small text in
this widgets. And in function "get_priority_class" cleaned source code.
* operation/agentes/status_monitor.php, operation/events/events.php: cleaned
source code style.
* images/pandora.ico.gif: added image file for to use in the mobile footer.
* mobile/operation/agents/monitor_status.php,
mobile/operation/agents/view_agents.php,
mobile/operation/agents/tactical.php,
mobile/operation/agents/group_view.php, mobile/operation/events/events.php,
mobile/include/style/main.css, mobile/include/functions_web.php,
mobile/index.php, general/footer.php: continued the develop, yep the
Pandora Console Mobile is complete (only rest the bugs).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3269 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-09-21 20:02:11 +02:00
|
|
|
$table->data[1][2] = print_input_text('search', $search, '', 5, 20, true);
|
2010-09-20 16:00:49 +02:00
|
|
|
$table->data[1][2] .= "<input type='submit' class='button_filter' name='submit_button' value='' alt='" . __('Filter') . "' title='" . __('Filter') . "' />";
|
|
|
|
|
|
|
|
echo "<form method='post'>";
|
|
|
|
print_table($table);
|
|
|
|
echo "</form>";
|
|
|
|
|
|
|
|
|
|
|
|
$groups = get_user_groups ($this->system->getConfig("id_user"), "IR");
|
|
|
|
$sqlGroups = '';
|
|
|
|
//Group selection
|
|
|
|
if ($ev_group > 0 && in_array ($ev_group, array_keys ($groups))) {
|
|
|
|
//If a group is selected and it's in the groups allowed
|
|
|
|
$sqlGroups = " AND id_grupo = $ev_group";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if (is_user_admin ($this->system->getConfig("id_user"))) {
|
|
|
|
//Do nothing if you're admin, you get full access
|
|
|
|
$sqlGroups = "";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
//Otherwise select all groups the user has rights to.
|
|
|
|
$sqlGroups = " AND id_grupo IN (".implode (",", array_keys ($groups)).")";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$sqlEventType = '';
|
|
|
|
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") {
|
|
|
|
$sqlEventType = " AND event_type LIKE '%$event_type%' ";
|
|
|
|
}
|
|
|
|
elseif ($event_type == "not_normal") {
|
|
|
|
$sqlEventType = " AND event_type LIKE '%warning%' OR event_type LIKE '%critical%' OR event_type LIKE '%unknown%' ";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$sqlEventType = " AND event_type = '".$event_type."'";
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$sqlSeverity = '';
|
|
|
|
if ($severity != -1)
|
|
|
|
$sqlSeverity = " AND criticity >= ".$severity;
|
|
|
|
|
|
|
|
|
|
|
|
$sqlFreeSearch = '';
|
|
|
|
if ($search != "")
|
|
|
|
$sqlFreeSearch .= " AND evento LIKE '%".$search."%'";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$unixtime = get_system_time () - ($event_view_hr * 3600); //Put hours in seconds
|
|
|
|
$sqlTimestamp = " AND utimestamp > ".$unixtime;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$sql = 'SELECT *
|
|
|
|
FROM tevento
|
|
|
|
WHERE 1=1 ' . $sqlGroups . $sqlEventType . $sqlSeverity .
|
|
|
|
$sqlFreeSearch . $sqlTimestamp . ' AND estado = 0 ORDER BY utimestamp DESC';
|
|
|
|
|
|
|
|
$sql_count = str_replace('*', 'COUNT(*)', $sql);
|
|
|
|
|
2011-03-09 Miguel de Dios <miguel.dedios@artica.es>
* install.php, operation/incidents/incident.php,
operation/agentes/status_monitor.php, operation/agentes/datos_agente.php,
operation/servers/view_server.php, operation/snmpconsole/snmp_view.php,
operation/events/events_rss.php, operation/events/events_list.php,
operation/events/events_marquee.php, operation/search_users.php,
mobile/operation/agents/monitor_status.php,
mobile/operation/agents/view_agents.php,
mobile/operation/agents/view_alerts.php, mobile/operation/events/events.php,
mobile/include/functions_web.php, godmode/admin_access_logs.php,
godmode/agentes/modificar_agente.php, godmode/alerts/alert_actions.php,
godmode/reporting/reporting_builder.list_items.php: changed and addded in
the source, the SQL queries for the "LIMIT x, x" to "LIMIT x OFFSET x", that
it is standard for PostgreSQL.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4080 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-09 18:55:37 +01:00
|
|
|
switch ($config["dbtype"]) {
|
|
|
|
case "mysql":
|
|
|
|
$sql = $sql . sprintf(' LIMIT %d,%d', $offset, $this->system->getPageSize());
|
|
|
|
break;
|
|
|
|
case "postgresql":
|
|
|
|
$sql = $sql . sprintf(' LIMIT %d OFFSET %d', $this->system->getPageSize(), $offset);
|
|
|
|
break;
|
|
|
|
}
|
2010-09-20 16:00:49 +02:00
|
|
|
|
|
|
|
$count = get_db_value_sql($sql_count);
|
|
|
|
|
|
|
|
$rows = get_db_all_rows_sql($sql);
|
2010-09-21 Miguel de Dios <miguel.dedios@artica.es>
* 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
2010-09-21 10:59:01 +02:00
|
|
|
if ($rows === false)
|
|
|
|
$rows = array();
|
2010-09-20 16:00:49 +02:00
|
|
|
|
|
|
|
|
|
|
|
$table = null;
|
|
|
|
$table->width = '100%';
|
|
|
|
$table->head = array();
|
|
|
|
$table->head[3] = '<span title="' . __('Timestamp') . '" alt="' . __('Timestamp') . '">' . __('T') . '</span>';
|
|
|
|
$table->head[4] = '<span title="' . __('Description') . '" alt="' . __('Description') . '">' . __('Des.') . '</span>';
|
|
|
|
$table->head[5] = '<span title="' . __('Agent') . '" alt="' . __('Agent') . '">' . __('Agent') . '</span>';
|
|
|
|
|
|
|
|
$table->data = array();
|
2010-09-21 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php: in function "print_select_groups" and function
"print_select_from_sql" added source code to check $config['text_char_long']
for show small text in this widgets.
* include/functions.php: in function "get_event_types" and "get_priorities"
added source code to check $config['text_char_long'] for show small text in
this widgets. And in function "get_priority_class" cleaned source code.
* operation/agentes/status_monitor.php, operation/events/events.php: cleaned
source code style.
* images/pandora.ico.gif: added image file for to use in the mobile footer.
* mobile/operation/agents/monitor_status.php,
mobile/operation/agents/view_agents.php,
mobile/operation/agents/tactical.php,
mobile/operation/agents/group_view.php, mobile/operation/events/events.php,
mobile/include/style/main.css, mobile/include/functions_web.php,
mobile/index.php, general/footer.php: continued the develop, yep the
Pandora Console Mobile is complete (only rest the bugs).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3269 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-09-21 20:02:11 +02:00
|
|
|
$iterator = 0;
|
2010-09-20 16:00:49 +02:00
|
|
|
foreach ($rows as $row) {
|
|
|
|
$data = array();
|
|
|
|
|
|
|
|
switch ($row["criticity"]) {
|
|
|
|
default:
|
|
|
|
case 0:
|
2010-09-21 Miguel de Dios <miguel.dedios@artica.es>
* 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
2010-09-21 10:59:01 +02:00
|
|
|
$img = "../images/status_sets/default/severity_maintenance_pixel.png";
|
2010-09-20 16:00:49 +02:00
|
|
|
break;
|
|
|
|
case 1:
|
2010-09-21 Miguel de Dios <miguel.dedios@artica.es>
* 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
2010-09-21 10:59:01 +02:00
|
|
|
$img = "../images/status_sets/default/severity_informational_pixel.png";
|
2010-09-20 16:00:49 +02:00
|
|
|
break;
|
|
|
|
case 2:
|
2010-09-21 Miguel de Dios <miguel.dedios@artica.es>
* 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
2010-09-21 10:59:01 +02:00
|
|
|
$img = "../images/status_sets/default/severity_normal_pixel.png";
|
2010-09-20 16:00:49 +02:00
|
|
|
break;
|
|
|
|
case 3:
|
2010-09-21 Miguel de Dios <miguel.dedios@artica.es>
* 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
2010-09-21 10:59:01 +02:00
|
|
|
$img = "../images/status_sets/default/severity_warning_pixel.png";
|
2010-09-20 16:00:49 +02:00
|
|
|
break;
|
|
|
|
case 4:
|
2010-09-21 Miguel de Dios <miguel.dedios@artica.es>
* 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
2010-09-21 10:59:01 +02:00
|
|
|
$img = "../images/status_sets/default/severity_critical_pixel.png";
|
2010-09-20 16:00:49 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2010-09-21 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php: in function "print_select_groups" and function
"print_select_from_sql" added source code to check $config['text_char_long']
for show small text in this widgets.
* include/functions.php: in function "get_event_types" and "get_priorities"
added source code to check $config['text_char_long'] for show small text in
this widgets. And in function "get_priority_class" cleaned source code.
* operation/agentes/status_monitor.php, operation/events/events.php: cleaned
source code style.
* images/pandora.ico.gif: added image file for to use in the mobile footer.
* mobile/operation/agents/monitor_status.php,
mobile/operation/agents/view_agents.php,
mobile/operation/agents/tactical.php,
mobile/operation/agents/group_view.php, mobile/operation/events/events.php,
mobile/include/style/main.css, mobile/include/functions_web.php,
mobile/index.php, general/footer.php: continued the develop, yep the
Pandora Console Mobile is complete (only rest the bugs).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3269 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-09-21 20:02:11 +02:00
|
|
|
$table->rowclass[$iterator] = get_priority_class($row["criticity"]);
|
|
|
|
$iterator++;
|
2010-09-21 Miguel de Dios <miguel.dedios@artica.es>
* 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
2010-09-21 10:59:01 +02:00
|
|
|
|
2010-09-20 16:00:49 +02:00
|
|
|
$data[] = print_timestamp($row["timestamp"], true, array('units' => 'tiny'));
|
|
|
|
|
2010-09-21 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php: in function "print_select_groups" and function
"print_select_from_sql" added source code to check $config['text_char_long']
for show small text in this widgets.
* include/functions.php: in function "get_event_types" and "get_priorities"
added source code to check $config['text_char_long'] for show small text in
this widgets. And in function "get_priority_class" cleaned source code.
* operation/agentes/status_monitor.php, operation/events/events.php: cleaned
source code style.
* images/pandora.ico.gif: added image file for to use in the mobile footer.
* mobile/operation/agents/monitor_status.php,
mobile/operation/agents/view_agents.php,
mobile/operation/agents/tactical.php,
mobile/operation/agents/group_view.php, mobile/operation/events/events.php,
mobile/include/style/main.css, mobile/include/functions_web.php,
mobile/index.php, general/footer.php: continued the develop, yep the
Pandora Console Mobile is complete (only rest the bugs).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3269 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-09-21 20:02:11 +02:00
|
|
|
$data[] = $row["evento"];
|
2010-09-20 16:00:49 +02:00
|
|
|
|
|
|
|
if ($row["event_type"] == "system") {
|
2010-09-21 Miguel de Dios <miguel.dedios@artica.es>
* 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
2010-09-21 10:59:01 +02:00
|
|
|
$data[] = printTruncateText(__('System'), 20, true, true);
|
2010-09-20 16:00:49 +02:00
|
|
|
}
|
|
|
|
elseif ($row["id_agente"] > 0) {
|
|
|
|
// Agent name
|
2010-09-21 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php: in function "print_select_groups" and function
"print_select_from_sql" added source code to check $config['text_char_long']
for show small text in this widgets.
* include/functions.php: in function "get_event_types" and "get_priorities"
added source code to check $config['text_char_long'] for show small text in
this widgets. And in function "get_priority_class" cleaned source code.
* operation/agentes/status_monitor.php, operation/events/events.php: cleaned
source code style.
* images/pandora.ico.gif: added image file for to use in the mobile footer.
* mobile/operation/agents/monitor_status.php,
mobile/operation/agents/view_agents.php,
mobile/operation/agents/tactical.php,
mobile/operation/agents/group_view.php, mobile/operation/events/events.php,
mobile/include/style/main.css, mobile/include/functions_web.php,
mobile/index.php, general/footer.php: continued the develop, yep the
Pandora Console Mobile is complete (only rest the bugs).
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3269 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2010-09-21 20:02:11 +02:00
|
|
|
$data[] = '<a href="index.php?page=agent&id=' . $row["id_agente"] . '">' . printTruncateText(get_agent_name($row["id_agente"]), 20, true, true) . '</a>';
|
2010-09-20 16:00:49 +02:00
|
|
|
}
|
|
|
|
else {
|
2010-09-21 Miguel de Dios <miguel.dedios@artica.es>
* 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
2010-09-21 10:59:01 +02:00
|
|
|
$data[] = printTruncateText(__('Alert SNMP'), 20, true, true);
|
2010-09-20 16:00:49 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
$table->data[] = $data;
|
|
|
|
}
|
|
|
|
|
|
|
|
print_table($table);
|
|
|
|
|
|
|
|
$pagination = pagination ($count,
|
|
|
|
get_url_refresh(array("offset" => $offset, "ev_group" => $ev_group,
|
|
|
|
"event_type" => $event_type, "severity" => $severity,
|
|
|
|
"search" => $search)), 0, 0, true);
|
|
|
|
|
|
|
|
$pagination = str_replace('images/go_first.png', '../images/go_first.png', $pagination);
|
|
|
|
$pagination = str_replace('images/go_previous.png', '../images/go_previous.png', $pagination);
|
|
|
|
$pagination = str_replace('images/go_next.png', '../images/go_next.png', $pagination);
|
|
|
|
$pagination = str_replace('images/go_last.png', '../images/go_last.png', $pagination);
|
|
|
|
|
|
|
|
echo $pagination;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|