2013-06-06 Sergio Martin <sergio.martin@artica.es>
* include/ajax/events.php: Fix the info of the user that validate a event in the event info that is showed when click on a event on interactive graphs * include/gettext.php: Add a hack to fix the languages change on certain machines, like TSOL one. * operation/events/events.build_table.php: Add a "access node" control to column server name * operation/agentes/status_monitor.php * general/header.php: Add disable possibility in autorefresh combo * godmode/agentes/module_manager_editor_network.php: Fix show/hide fields in the module editor. TCP and SNMP fields were moved from advanced to main options and javascript was broken * godmode/events/event_edit_filter.php godmode/events/custom_events.php godmode/events/event_filter.php: Fix some ACLs problems in events filter editor * godmode/reporting/reporting_builder.item_editor.php: Add an absolute path in a library inclusion to fix metaconsole bug git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8262 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
bfc822b1aa
commit
37f3a29853
|
@ -1,3 +1,30 @@
|
||||||
|
2013-06-06 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
|
* include/ajax/events.php: Fix the info of the
|
||||||
|
user that validate a event in the event info that
|
||||||
|
is showed when click on a event on interactive graphs
|
||||||
|
|
||||||
|
* include/gettext.php: Add a hack to fix the languages change
|
||||||
|
on certain machines, like TSOL one.
|
||||||
|
|
||||||
|
* operation/events/events.build_table.php: Add a "access node"
|
||||||
|
control to column server name
|
||||||
|
|
||||||
|
* operation/agentes/status_monitor.php
|
||||||
|
* general/header.php: Add disable possibility in autorefresh combo
|
||||||
|
|
||||||
|
* godmode/agentes/module_manager_editor_network.php: Fix show/hide fields
|
||||||
|
in the module editor. TCP and SNMP fields were moved from advanced to main
|
||||||
|
options and javascript was broken
|
||||||
|
|
||||||
|
* godmode/events/event_edit_filter.php
|
||||||
|
godmode/events/custom_events.php
|
||||||
|
godmode/events/event_filter.php: Fix some ACLs problems in events
|
||||||
|
filter editor
|
||||||
|
|
||||||
|
* godmode/reporting/reporting_builder.item_editor.php: Add an absolute
|
||||||
|
path in a library inclusion to fix metaconsole bug
|
||||||
|
|
||||||
2013-06-05 Miguel de Dios <miguel.dedios@artica.es>
|
2013-06-05 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
* include/constants.php, include/functions_agents.php,
|
* include/constants.php, include/functions_agents.php,
|
||||||
|
|
|
@ -113,6 +113,7 @@ config_check();
|
||||||
|
|
||||||
$ignored_params['refr'] = '';
|
$ignored_params['refr'] = '';
|
||||||
$values = array (
|
$values = array (
|
||||||
|
'0' => __('Disable'),
|
||||||
'5' => __('5 seconds'),
|
'5' => __('5 seconds'),
|
||||||
'10' => __('10 seconds'),
|
'10' => __('10 seconds'),
|
||||||
'15' => __('15 seconds'),
|
'15' => __('15 seconds'),
|
||||||
|
|
|
@ -55,8 +55,16 @@ $extra_title = __('Network server module');
|
||||||
$data = array ();
|
$data = array ();
|
||||||
$data[0] = __('Target IP');
|
$data[0] = __('Target IP');
|
||||||
$data[1] = html_print_input_text ('ip_target', $ip_target, '', 15, 60, true);
|
$data[1] = html_print_input_text ('ip_target', $ip_target, '', 15, 60, true);
|
||||||
$data[2] = __('Port');
|
|
||||||
$data[3] = html_print_input_text ('tcp_port', $tcp_port, '', 5, 20, true, $disabledBecauseInPolicy);
|
// In ICMP modules, port is not configurable
|
||||||
|
if ($id_module_type >= 6 && $id_module_type <= 7) {
|
||||||
|
$data[2] = '';
|
||||||
|
$data[3] = '';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$data[2] = __('Port');
|
||||||
|
$data[3] = html_print_input_text ('tcp_port', $tcp_port, '', 5, 20, true, $disabledBecauseInPolicy);
|
||||||
|
}
|
||||||
|
|
||||||
push_table_simple ($data, 'target_ip');
|
push_table_simple ($data, 'target_ip');
|
||||||
|
|
||||||
|
@ -118,23 +126,18 @@ push_table_simple ($data, 'tcp_send');
|
||||||
|
|
||||||
$data[0] = __('TCP receive');
|
$data[0] = __('TCP receive');
|
||||||
$data[1] = html_print_textarea ('tcp_rcv', 2, 65, $tcp_rcv, $disabledTextBecauseInPolicy, true);
|
$data[1] = html_print_textarea ('tcp_rcv', 2, 65, $tcp_rcv, $disabledTextBecauseInPolicy, true);
|
||||||
$table_advanced->colspan['tcp_receive'][1] = 3;
|
$table_simple->colspan['tcp_receive'][1] = 3;
|
||||||
|
|
||||||
push_table_simple ($data, 'tcp_receive');
|
push_table_simple ($data, 'tcp_receive');
|
||||||
|
|
||||||
if ($id_module_type >= 15 && $id_module_type <= 18) {
|
if ($id_module_type < 8 || $id_module_type > 11) {
|
||||||
/* SNMP */
|
/* NOT TCP */
|
||||||
$table_advanced->rowstyle['tcp_send'] = 'display: none';
|
$table_simple->rowstyle['tcp_send'] = 'display: none;';
|
||||||
$table_advanced->rowstyle['tcp_receive'] = 'display: none';
|
$table_simple->rowstyle['tcp_receive'] = 'display: none;';
|
||||||
}
|
}
|
||||||
elseif ($id_module_type >= 8 && $id_module_type <= 11) {
|
|
||||||
/* TCP or ICMP */
|
if ($id_module_type < 15 || $id_module_type > 18) {
|
||||||
$table_simple->rowstyle['snmp_1'] = 'display: none';
|
/* NOT SNMP */
|
||||||
$table_simple->rowstyle['snmp_2'] = 'display: none';
|
|
||||||
}
|
|
||||||
elseif (empty ($update_module_id)) {
|
|
||||||
$table_advanced->rowstyle['tcp_send'] = 'display: none';
|
|
||||||
$table_advanced->rowstyle['tcp_receive'] = 'display: none';
|
|
||||||
$table_simple->rowstyle['snmp_1'] = 'display: none';
|
$table_simple->rowstyle['snmp_1'] = 'display: none';
|
||||||
$table_simple->rowstyle['snmp_2'] = 'display: none';
|
$table_simple->rowstyle['snmp_2'] = 'display: none';
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,9 +18,9 @@ global $config;
|
||||||
|
|
||||||
check_login ();
|
check_login ();
|
||||||
|
|
||||||
if (! check_acl($config['id_user'], 0, "PM")) {
|
if (! check_acl($config['id_user'], 0, "EW")) {
|
||||||
db_pandora_audit("ACL Violation",
|
db_pandora_audit("ACL Violation",
|
||||||
"Trying to access Group Management");
|
"Trying to access Custom events Management");
|
||||||
require ("general/noaccess.php");
|
require ("general/noaccess.php");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ check_login ();
|
||||||
|
|
||||||
if (! check_acl ($config["id_user"], 0, "EW")) {
|
if (! check_acl ($config["id_user"], 0, "EW")) {
|
||||||
db_pandora_audit("ACL Violation",
|
db_pandora_audit("ACL Violation",
|
||||||
"Trying to access event viewer");
|
"Trying to access events filter editor");
|
||||||
require ("general/noaccess.php");
|
require ("general/noaccess.php");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -20,7 +20,7 @@ check_login ();
|
||||||
|
|
||||||
if (! check_acl ($config["id_user"], 0, "EW")) {
|
if (! check_acl ($config["id_user"], 0, "EW")) {
|
||||||
db_pandora_audit("ACL Violation",
|
db_pandora_audit("ACL Violation",
|
||||||
"Trying to access event viewer");
|
"Trying to access events filter editor");
|
||||||
require ("general/noaccess.php");
|
require ("general/noaccess.php");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
require_once ('include/functions_custom_graphs.php');
|
require_once ($config['homedir'] . '/include/functions_custom_graphs.php');
|
||||||
|
|
||||||
// Login check
|
// Login check
|
||||||
check_login ();
|
check_login ();
|
||||||
|
|
|
@ -404,7 +404,7 @@ if ($get_events_details) {
|
||||||
$events = db_get_all_rows_filter ('tevento',
|
$events = db_get_all_rows_filter ('tevento',
|
||||||
array ('id_evento' => $event_ids,
|
array ('id_evento' => $event_ids,
|
||||||
'order' => 'utimestamp ASC'),
|
'order' => 'utimestamp ASC'),
|
||||||
array ('evento', 'utimestamp', 'estado', 'criticity'));
|
array ('evento', 'utimestamp', 'estado', 'criticity', 'id_usuario'));
|
||||||
|
|
||||||
$out = '<table class="eventtable" style="width:100%;height:100%;padding:0px 0px 0px 0px; border-spacing: 0px; margin: 0px 0px 0px 0px;">';
|
$out = '<table class="eventtable" style="width:100%;height:100%;padding:0px 0px 0px 0px; border-spacing: 0px; margin: 0px 0px 0px 0px;">';
|
||||||
$out .= '<tr style="font-size:0px; heigth: 0px; background: #ccc;"><td></td><td></td></tr>';
|
$out .= '<tr style="font-size:0px; heigth: 0px; background: #ccc;"><td></td><td></td></tr>';
|
||||||
|
|
|
@ -128,9 +128,9 @@ class gettext_reader {
|
||||||
$magic = $this->readint();
|
$magic = $this->readint();
|
||||||
|
|
||||||
if ($enabled64Bits) {
|
if ($enabled64Bits) {
|
||||||
if ($magic == ($MAGIC1 & 0xFFFFFFFF)) {
|
if ($magic == ($MAGIC1 & 0xFFFFFFFF) || $magic == $MAGIC1) {
|
||||||
$this->BYTEORDER = 0;
|
$this->BYTEORDER = 0;
|
||||||
} elseif ($magic == ($MAGIC2 & 0xFFFFFFFF)) {
|
} elseif ($magic == ($MAGIC2 & 0xFFFFFFFF) || $magic == $MAGIC2) {
|
||||||
$this->BYTEORDER = 1;
|
$this->BYTEORDER = 1;
|
||||||
} else {
|
} else {
|
||||||
$this->error = 1; // not MO file
|
$this->error = 1; // not MO file
|
||||||
|
|
|
@ -58,7 +58,7 @@ $refr = get_parameter('refr', 0);
|
||||||
$sortField = get_parameter('sort_field');
|
$sortField = get_parameter('sort_field');
|
||||||
$sort = get_parameter('sort', 'none');
|
$sort = get_parameter('sort', 'none');
|
||||||
|
|
||||||
echo '<form method="post" action="index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=' . $refr . '&offset=' . $offset . '&ag_group=' . $ag_group . '&ag_freestring=' . $ag_freestring . '&ag_modulename=' . $ag_modulename . '&status=' . $status . '&sort_field=' . $sortField . '&sort=' . $sort .'">';
|
echo '<form method="post" action="index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=' . $refr . '&offset=' . $offset . '&ag_group=' . $ag_group . '&ag_freestring=' . $ag_freestring . '&ag_modulename=' . $ag_modulename . '&status=' . $status . '&sort_field=' . $sortField . '&sort=' . $sort .'&pure=' . $config['pure'] . '">';
|
||||||
|
|
||||||
enterprise_hook('open_meta_frame');
|
enterprise_hook('open_meta_frame');
|
||||||
|
|
||||||
|
@ -163,6 +163,10 @@ if ($tag_filter !== 0) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (defined('METACONSOLE')) {
|
||||||
|
$ag_group = groups_get_id($ag_group);
|
||||||
|
}
|
||||||
|
|
||||||
$sql_conditions_tags = tags_get_acl_tags($config['id_user'], $ag_group, 'AR', 'module_condition', 'AND', 'tagente_modulo');
|
$sql_conditions_tags = tags_get_acl_tags($config['id_user'], $ag_group, 'AR', 'module_condition', 'AND', 'tagente_modulo');
|
||||||
|
|
||||||
// Two modes of filter. All the filters and only ACLs filter
|
// Two modes of filter. All the filters and only ACLs filter
|
||||||
|
|
|
@ -235,7 +235,12 @@ foreach ($result as $event) {
|
||||||
|
|
||||||
if (in_array('server_name',$show_fields)) {
|
if (in_array('server_name',$show_fields)) {
|
||||||
if ($meta) {
|
if ($meta) {
|
||||||
$data[$i] = "<a href='" . $event["server_url"] . "/index.php?sec=estado&sec2=operation/agentes/group_view" . $event['server_url_hash'] . "'>" . $event["server_name"] . "</a>";
|
if (can_user_access_node ()) {
|
||||||
|
$data[$i] = "<a href='" . $event["server_url"] . "/index.php?sec=estado&sec2=operation/agentes/group_view" . $event['server_url_hash'] . "'>" . $event["server_name"] . "</a>";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$data[$i] = $event["server_name"];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$data[$i] = db_get_value('name','tserver');
|
$data[$i] = db_get_value('name','tserver');
|
||||||
|
|
Loading…
Reference in New Issue