2014-07-31 Miguel de Dios <miguel.dedios@artica.es>

* include/functions_networkmap.php, include/functions_graph.php,
	include/db/postgresql.php, include/db/oracle.php,
	include/functions_api.php, extensions/agents_alerts.php,
	operation/search_main.php, operation/search_agents.getdata.php,
	operation/agentes/status_monitor.php,
	operation/agentes/networkmap.topology.php,
	operation/agentes/ver_agente.php,
	operation/search_modules.getdata.php, operation/search_results.php,
	operation/events/events_list.php,
	godmode/alerts/alert_list.builder.php,
	godmode/alerts/configure_alert_template.php,
	godmode/modules/manage_network_components_form.php,
	godmode/reporting/reporting_builder.php,
	godmode/reporting/map_builder.php: tiny fixes for the improve the
	support of postgreSQL databases.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10368 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2014-07-31 14:27:43 +00:00
parent 61100077c1
commit 862d16ccf9
20 changed files with 192 additions and 82 deletions

View File

@ -1,3 +1,21 @@
2014-07-31 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_networkmap.php, include/functions_graph.php,
include/db/postgresql.php, include/db/oracle.php,
include/functions_api.php, extensions/agents_alerts.php,
operation/search_main.php, operation/search_agents.getdata.php,
operation/agentes/status_monitor.php,
operation/agentes/networkmap.topology.php,
operation/agentes/ver_agente.php,
operation/search_modules.getdata.php, operation/search_results.php,
operation/events/events_list.php,
godmode/alerts/alert_list.builder.php,
godmode/alerts/configure_alert_template.php,
godmode/modules/manage_network_components_form.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/map_builder.php: tiny fixes for the improve the
support of postgreSQL databases.
2014-07-30 Miguel de Dios <miguel.dedios@artica.es>
* include/ajax/module.php: tiny fixes for the improve the support of

View File

@ -172,6 +172,7 @@ function mainAgentsAlerts() {
echo "<th width='20px' style='vertical-align:top; padding-top: 35px;' rowspan='".($nagents+1)."'><a href='index.php?sec=extensions&sec2=extensions/agents_alerts&refr=0&hor_offset=".$new_hor_offset."&offset=".$offset."&group_id=".$group_id."'>".html_print_image("images/darrowleft.png",true, array('title' => __('Previous templates')))."</a> </th>";
}
$templates_raw = array();
if (!empty($templates)) {
$sql = sprintf('SELECT id, name
FROM talert_templates
@ -180,6 +181,9 @@ function mainAgentsAlerts() {
$templates_raw = db_get_all_rows_sql($sql);
}
if (empty($templates_raw))
$templates_raw = array();
$alerts = array();
$ntemplates = 0;
foreach ($templates_raw as $temp) {

View File

@ -80,7 +80,7 @@ $table->data[1][0] = __('Template');
$own_info = get_user_info ($config['id_user']);
if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
$templates = alerts_get_alert_templates (false, array ('id', 'name'));
else{
else {
$usr_groups = users_get_groups($config['id_user'], 'LW', true);
$filter_groups = '';
$filter_groups = implode(',', array_keys($usr_groups));
@ -107,13 +107,17 @@ if (!empty($groups_user)) {
$actions = db_get_all_rows_sql($sql);
}
$table->data[2][1] = '<div class="actions_container">';
$table->data[2][1] .= html_print_select(index_array ($actions, 'id', 'name'),'action_select','','',__('Default action'),'0',true, '', true, '', false, 'width: 250px;');
$table->data[2][1] .= html_print_select(
index_array($actions, 'id', 'name'), 'action_select', '', '',
__('Default action'), '0', true, '', true, '', false,
'width: 250px;');
$table->data[2][1] .= '<span id="advanced_action" class="advanced_actions invisible"><br>';
$table->data[2][1] .= __('Number of alerts match from').' ';
$table->data[2][1] .= html_print_input_text ('fires_min', '', '', 4, 10, true);
$table->data[2][1] .= ' '.__('to').' ';
$table->data[2][1] .= ' ' . __('to') . ' ';
$table->data[2][1] .= html_print_input_text ('fires_max', '', '', 4, 10, true);
$table->data[2][1] .= ui_print_help_icon ("alert-matches", true, ui_get_full_url(false, false, false, false));
$table->data[2][1] .= ui_print_help_icon ("alert-matches", true,
ui_get_full_url(false, false, false, false));
$table->data[2][1] .= '</span>';
$table->data[2][1] .= '</div>';
if (check_acl ($config['id_user'], 0, "LM")) {

View File

@ -394,11 +394,15 @@ if ($create_template) {
}
if ($result) {
//db_pandora_audit("Command management", "Create alert command " . $result, false, false, json_encode($values));
db_pandora_audit("Template alert management", "Create alert template #" . $result, false, false, json_encode($values));
db_pandora_audit("Template alert management",
"Create alert template #" . $result, false, false,
json_encode($values));
}
else {
//db_pandora_audit("Command management", "Fail try to create alert command", false, false, json_encode($values));
db_pandora_audit("Template alert management", "Fail try to create alert template", false, false, json_encode($values));
db_pandora_audit("Template alert management",
"Fail try to create alert template", false, false,
json_encode($values));
}
ui_print_result_message ($result,
@ -455,7 +459,7 @@ if ($id && ! $create_template) {
for ($i = 1; $i <= 10; $i++) {
$fields_recovery[$i] = $template['field'.$i.'_recovery'];
}
$default_action = $template['id_alert_action'];
$priority = $template['priority'];
$id_group = $template['id_group'];
@ -474,6 +478,10 @@ $table->size[0] = '20%';
$table->size[2] = '20%';
if ($step == 2) {
if (!isset($show_matches))
$show_matches = false;
/* Firing conditions and events */
$table->colspan = array ();
$table->colspan[4][1] = 3;
@ -493,7 +501,7 @@ if ($step == 2) {
$table->data[0][1] .= html_print_checkbox ('saturday', 1, $saturday, true);
$table->data[0][1] .= __('Sun');
$table->data[0][1] .= html_print_checkbox ('sunday', 1, $sunday, true);
$table->data[0][2] = __('Use special days list');
$table->data[0][3] = html_print_checkbox ('special_day', 1, $special_day, true);
@ -512,11 +520,11 @@ if ($step == 2) {
'', false, true);
$table->data[3][0] = __('Min. number of alerts');
$table->data[3][1] = html_print_input_text ('min_alerts', $min_alerts, '',
5, 7, true);
$table->data[3][1] = html_print_input_text ('min_alerts',
$min_alerts, '', 5, 7, true);
$table->data[3][2] = __('Max. number of alerts');
$table->data[3][3] = html_print_input_text ('max_alerts', $max_alerts, '',
5, 7, true);
$table->data[3][3] = html_print_input_text ('max_alerts',
$max_alerts, '', 5, 7, true);
$table->data[4][0] = __('Default action');
$usr_groups = implode(',', array_keys(users_get_groups($config['id_user'], 'LM', true)));
@ -529,7 +537,8 @@ if ($step == 2) {
ORDER BY name', $usr_groups);
break;
case "oracle":
$sql_query = sprintf('SELECT id, dbms_lob.substr(name,4000,1) as nombre
$sql_query = sprintf('SELECT id,
dbms_lob.substr(name,4000,1) AS nombre
FROM talert_actions
WHERE id_group IN (%s)
ORDER BY dbms_lob.substr(name,4000,1)', $usr_groups);
@ -543,13 +552,15 @@ if ($step == 2) {
$table->data[5][0] = __('Condition type');
$table->data[5][1] = html_print_select (alerts_get_alert_templates_types (), 'type',
$type, '', __('Select'), 0, true, false, false);
$table->data[5][1] .= '<span id="matches_value" '.($show_matches ? '' : 'style="display: none"').'>';
$table->data[5][1] .= '<span id="matches_value" ' .
($show_matches ? '' : 'style="display: none"').'>';
$table->data[5][1] .= '&nbsp;'.html_print_checkbox ('matches_value', 1, $matches, true);
$table->data[5][1] .= html_print_label (__('Trigger when matches the value'),
$table->data[5][1] .= html_print_label(
__('Trigger when matches the value'),
'checkbox-matches_value', true);
$table->data[5][1] .= '</span>';
$table->colspan[5][1] = 3;
$table->data['value'][0] = __('Value');
$table->data['value'][1] = html_print_input_text ('value', $value, '',
35, 255, true);
@ -566,17 +577,20 @@ if ($step == 2) {
'width' => '20px'));
$table->data['value'][1] .= '</span>';
$table->colspan['value'][1] = 3;
//Min first, then max, that's more logical
$table->data['min'][0] = __('Min.');
$table->data['min'][1] = html_print_input_text ('min', $min, '', 5, 255, true);
$table->data['min'][1] = html_print_input_text ('min', $min, '', 5,
255, true);
$table->colspan['min'][1] = 3;
$table->data['max'][0] = __('Max.');
$table->data['max'][1] = html_print_input_text ('max', $max, '', 5, 255, true);
$table->data['max'][1] = html_print_input_text ('max', $max, '', 5,
255, true);
$table->colspan['max'][1] = 3;
$table->data['example'][1] = ui_print_alert_template_example ($id, true, false);
$table->data['example'][1] = ui_print_alert_template_example($id,
true, false);
$table->colspan['example'][1] = 4;
}
else if ($step == 3) {
@ -585,7 +599,7 @@ else if ($step == 3) {
$table->style[2] = 'font-weight: bold; vertical-align: top';
$table->size = array ();
$table->size[0] = '20%';
/* Alert recover */
if (! $recovery_notify) {
$table->cellstyle['label_fields'][2] = 'display:none;';
@ -610,7 +624,7 @@ else if ($step == 3) {
$table->data['label_fields'][0] = '';
$table->data['label_fields'][1] = __('Firing fields');
$table->data['label_fields'][2] = __('Recovery fields');
for ($i = 1; $i <= 10; $i++) {
if (isset($template[$name])) {
$value = $template[$name];
@ -621,8 +635,9 @@ else if ($step == 3) {
//$table->rowclass['field'.$i] = 'row_field';
$table->data['field'.$i][0] = sprintf(__('Field %s'), $i) . ui_print_help_icon ('alert_macros', true);
$table->data['field'.$i][1] = html_print_textarea ('field'.$i, 1, 1, isset($fields[$i]) ? $fields[$i] : '', 'style="min-height:40px;" class="fields"', true);
$table->data['field'.$i][0] = sprintf(__('Field %s'), $i) .
ui_print_help_icon ('alert_macros', true);
$table->data['field'.$i][1] = html_print_textarea('field'.$i, 1, 1, isset($fields[$i]) ? $fields[$i] : '', 'style="min-height:40px;" class="fields"', true);
// Recovery
$table->data['field'.$i][2] = html_print_textarea ('field'.$i.'_recovery', 1, 1, isset($fields_recovery[$i]) ? $fields_recovery[$i] : '', 'style="min-height:40px" class="fields"', true);
}

View File

@ -489,7 +489,7 @@ $(document).ready (function () {
$("input[name=snmp_community]").css({backgroundColor: '#ddd'});
$("input[name=snmp_community]").attr("disabled",true);
}
else{
else {
$("input[name=snmp3_auth_user]").val("");
$("input[name=snmp3_auth_user]").css({backgroundColor: '#ddd'});
$("input[name=snmp3_auth_user]").attr("disabled", true);

View File

@ -125,7 +125,7 @@ if ($copy_layout) {
ui_print_error_message(__('Not copied. Error copying data'));
}
}
else{
else {
// If the array is empty the copy is completed
ui_print_success_message(__('Successfully copied'));
db_clean_cache();

View File

@ -66,12 +66,12 @@ if ($schedule_report != '') {
'args' => serialize ($parameters),
'scheduled' => $scheduled,
'flag_delete' => 1);
$result = db_process_sql_insert('tuser_task_scheduled', $values);
ui_print_result_message ($result,
__('Your report has been planned, and the system will email you a PDF with the report as soon as its finished'),
__('An error has ocurred'));
__('Your report has been planned, and the system will email you a PDF with the report as soon as its finished'),
__('An error has ocurred'));
echo '<br>';
}
@ -451,9 +451,12 @@ switch ($action) {
$data[2] = '<a href="' . $config['homeurl'] . 'index.php?sec=reporting&sec2=operation/reporting/reporting_viewer&id='.$report['id_report'].'&pure='.$pure.'">' .
html_print_image("images/html.png", true, array('title' => __('HTML view'))) . '</a>';
$data[3] = '<a href="'. ui_get_full_url(false, false, false, false) . 'ajax.php?page=' . $config['homedir'] . '/operation/reporting/reporting_xml&id='.$report['id_report'].'">' . html_print_image("images/xml.png", true, array('title' => __('Export to XML'))) . '</a>'; //I chose ajax.php because it's supposed to give XML anyway
} else {
$data[2] = html_print_image("images/html_disabled.png", true);
$data[3] = html_print_image("images/xml_disabled.png", true);
}
else {
$data[2] = html_print_image(
"images/html_disabled.png", true);
$data[3] = html_print_image(
"images/xml_disabled.png", true);
}
@ -475,7 +478,8 @@ switch ($action) {
$next++;
$data[$next] = ui_print_group_icon($report['id_group'], true, "groups_small", '', !defined('METACONSOLE'));
$data[$next] = ui_print_group_icon(
$report['id_group'], true, "groups_small", '', !defined('METACONSOLE'));
$next++;
}
@ -801,7 +805,7 @@ switch ($action) {
else
$values['id_agent_module'] = get_parameter('id_agent_module');
$values['only_display_wrong'] = get_parameter('checkbox_only_display_wrong');
$values['only_display_wrong'] = (int)get_parameter('checkbox_only_display_wrong', 0);
$values['monday'] = get_parameter('monday', 0);
$values['tuesday'] = get_parameter('tuesday', 0);
$values['wednesday'] = get_parameter('wednesday', 0);
@ -814,7 +818,7 @@ switch ($action) {
$values['group_by_agent'] = get_parameter ('checkbox_row_group_by_agent');
$values['show_resume'] = get_parameter ('checkbox_show_resume');
$values['order_uptodown'] = get_parameter ('radiobutton_order_uptodown');
$values['exception_condition'] = get_parameter('exception_condition');
$values['exception_condition'] = (int)get_parameter('exception_condition', 0);
$values['exception_condition_value'] = get_parameter('exception_condition_value');
$values['show_graph'] = get_parameter('combo_graph_options');
$values['id_module_group'] = get_parameter('combo_modulegroup');
@ -916,7 +920,7 @@ switch ($action) {
if ($good_format) {
$resultOperationDB = db_process_sql_update('treport_content', $values, array('id_rc' => $idItem));
}
else{
else {
$resultOperationDB = false;
}
break;
@ -926,6 +930,7 @@ switch ($action) {
$values['type'] = get_parameter('type', null);
$values['name'] = (string) get_parameter('name');
$values['description'] = get_parameter('description');
// Support for projection graph, prediction date and SLA reports
// 'top_n_value', 'top_n' and 'text' fields will be reused for these types of report
switch ($values['type']) {
@ -1007,15 +1012,15 @@ switch ($action) {
switch ($config['dbtype']) {
case "mysql":
case "postgresql":
$values['only_display_wrong'] = get_parameter('checkbox_only_display_wrong');
$values['only_display_wrong'] = (int)get_parameter('checkbox_only_display_wrong', 0);
break;
case "oracle":
$only_display_wrong_tmp = get_parameter('checkbox_only_display_wrong');
if (empty($only_display_wrong_tmp)) {
$values['only_display_wrong'] = 0;
}
else{
$values['only_display_wrong'] = $only_display_wrong_tmp;
else {
$values['only_display_wrong'] = $only_display_wrong_tmp;
}
break;
}
@ -1040,7 +1045,7 @@ switch ($action) {
$values['group_by_agent'] = get_parameter ('checkbox_row_group_by_agent',0);
$values['show_resume'] = get_parameter ('checkbox_show_resume',0);
$values['order_uptodown'] = get_parameter ('radiobutton_order_uptodown',0);
$values['exception_condition'] = get_parameter('radiobutton_exception_condition');
$values['exception_condition'] = (int)get_parameter('radiobutton_exception_condition', 0);
$values['exception_condition_value'] = get_parameter('exception_condition_value');
$values['show_graph'] = get_parameter('combo_graph_options');
$values['id_module_group'] = get_parameter('combo_modulegroup');
@ -1391,11 +1396,17 @@ switch ($action) {
default:
switch ($config["dbtype"]) {
case "mysql":
$oldOrder = db_get_value_sql('SELECT `order` FROM treport_content WHERE id_rc = ' . $idItem);
$oldOrder = db_get_value_sql('
SELECT `order`
FROM treport_content
WHERE id_rc = ' . $idItem);
break;
case "postgresql":
case "oracle":
$oldOrder = db_get_value_sql('SELECT "order" FROM treport_content WHERE id_rc = ' . $idItem);
$oldOrder = db_get_value_sql('
SELECT "order"
FROM treport_content
WHERE id_rc = ' . $idItem);
break;
}
//db_get_value_filter('order', 'treport_content', array('id_rc' => $idItem));
@ -1413,17 +1424,20 @@ switch ($action) {
case "mysql":
$resultOperationDB = db_process_sql_update('treport_content',
array('`order`' => $oldOrder),
array('`order`' => $newOrder, 'id_report' => $idReport));
array('`order`' => $newOrder,
'id_report' => $idReport));
break;
case "postgresql":
$resultOperationDB = db_process_sql_update('treport_content',
array('"order"' => $oldOrder),
array('"order"' => $newOrder, 'id_report' => $idReport));
array('"order"' => $newOrder,
'id_report' => $idReport));
break;
case "oracle":
$resultOperationDB = db_process_sql_update('treport_content',
array('"order"' => $oldOrder),
array('"order"' => $newOrder, 'id_report' => $idReport),
array('"order"' => $newOrder,
'id_report' => $idReport),
'AND', false);
break;
}
@ -1505,7 +1519,7 @@ if ($enterpriseEnable) {
$resultOperationDB = $result;
}
}
$buttons = array(
'list_reports' => array('active' => false,
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&pure='.$pure.'">' .
@ -1545,15 +1559,21 @@ else {
// Page header for metaconsole
if ($enterpriseEnable and defined('METACONSOLE')) {
// Bread crumbs
ui_meta_add_breadcrumb(array('link' => 'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&pure='.$pure, 'text' => __('Reporting')));
ui_meta_add_breadcrumb(
array('link' =>
'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&pure=' . $pure,
'text' => __('Reporting')));
ui_meta_print_page_header($nav_bar);
// Print header
ui_meta_print_header(__('Reporting'). $textReportName, "", $buttons);
}
else
ui_print_page_header(__('Reporting') . $textReportName, "images/op_reporting.png", false, "reporting_" . $activeTab . "_tab", false, $buttons);
else {
ui_print_page_header(__('Reporting') . $textReportName,
"images/op_reporting.png", false,
"reporting_" . $activeTab . "_tab", false, $buttons);
}
enterprise_hook('open_meta_frame');
@ -1563,13 +1583,16 @@ if ($resultOperationDB !== null) {
switch ($activeTab) {
case 'main':
require_once($config['homedir'] . '/godmode/reporting/reporting_builder.main.php');
require_once($config['homedir'] .
'/godmode/reporting/reporting_builder.main.php');
break;
case 'list_items':
require_once($config['homedir'] . '/godmode/reporting/reporting_builder.list_items.php');
require_once($config['homedir'] .
'/godmode/reporting/reporting_builder.list_items.php');
break;
case 'item_editor':
require_once($config['homedir'] . '/godmode/reporting/reporting_builder.item_editor.php');
require_once($config['homedir'] .
'/godmode/reporting/reporting_builder.item_editor.php');
break;
default:
reporting_enterprise_select_tab($activeTab);

View File

@ -254,7 +254,7 @@ function oracle_db_process_sql($sql, $rettype = "affected_rows", $dbconnection =
else if ($type[0] == '/INSERT'){
$query = oci_parse($config['dbconnection'], substr($sql,1));
}
else{
else {
$query = oci_parse($config['dbconnection'], $sql);
}
}
@ -661,7 +661,7 @@ function oracle_db_format_array_where_clause_sql ($values, $join = 'AND', $prefi
else if ($value[0] == '%') {
$query .= sprintf ("%s LIKE '%s'", $field, $value);
}
else{
else {
$query .= sprintf ("%s = '%s'", $field, $value);
}
}
@ -1009,16 +1009,16 @@ function oracle_db_get_num_rows ($sql) {
global $config;
$type = explode(' ',strtoupper(trim($sql)));
if ($type[0] == 'SELECT'){
if ($type[0] == 'SELECT') {
$sql = "SELECT count(*) as NUM FROM (" . $sql . ")";
}
$query = oci_parse($config['dbconnection'], $sql);
oci_execute($query);
if ($type[0] == 'SELECT'){
if ($type[0] == 'SELECT') {
$row = oci_fetch_assoc($query);
$rows = $row['NUM'];
}
else{
else {
$rows = oci_num_rows($query);
}
@ -1039,13 +1039,19 @@ function oracle_db_get_num_rows ($sql) {
*/
function oracle_db_get_all_rows_field_filter ($table, $field, $condition, $order_field = "") {
if (is_int ($condition) || is_bool ($condition)) {
$sql = sprintf ("SELECT * FROM %s WHERE %s = %d", $table, $field, $condition);
$sql = sprintf ("SELECT *
FROM %s
WHERE %s = %d", $table, $field, $condition);
}
else if (is_float ($condition) || is_double ($condition)) {
$sql = sprintf ("SELECT * FROM %s WHERE %s = %f", $table, $field, $condition);
$sql = sprintf ("SELECT *
FROM %s
WHERE %s = %f", $table, $field, $condition);
}
else {
$sql = sprintf ("SELECT * FROM %s WHERE %s = '%s'", $table, $field, $condition);
$sql = sprintf ("SELECT *
FROM %s
WHERE %s = '%s'", $table, $field, $condition);
}
if ($order_field != "")

View File

@ -349,6 +349,7 @@ function postgresql_db_process_sql_insert($table, $values) {
$query .= ' VALUES (' . $values_str . ')';
//html_debug_print($query);
return db_process_sql($query, 'insert_id');
}

View File

@ -2477,7 +2477,7 @@ function api_get_module_value_all_agents($id, $thrash1, $other, $thrash2) {
if (!$module_values) {
returnError('error_get_module_value_all_agents', 'Error getting module values from all agents.');
}
else{
else {
$data = array('type' => 'array', 'data' => $module_values);
returnData('csv', $data, ';');

View File

@ -582,7 +582,7 @@ function grafico_modulo_sparse_data ($agent_module_id, $period, $show_events,
if (!$projection) {
return fs_error_image ();
}
else{
else {
return fs_error_image ();
}
}

View File

@ -1448,7 +1448,9 @@ function networkmap_create_networkmap ($name, $type = 'topology', $layout = 'rad
$values['show_groups'] = $show_groups;
$values['show_modules'] = $show_modules;
return @db_process_sql_insert ('tnetwork_map', $values);
$values['server_name'] = "";
return @db_process_sql_insert('tnetwork_map', $values);
}
/**

View File

@ -79,9 +79,18 @@ else {
}
else {
fwrite ($fh, $graph);
$graphviz_path = ($config['graphviz_bin_dir']) ? io_safe_output($config['graphviz_bin_dir']."/") : "";
$cmd = escapeshellarg($graphviz_path.$filter) . " -Tcmapx " . escapeshellarg("-o$filename_map") . " -Tpng ". escapeshellarg("-o$filename_img") . " " . escapeshellarg($filename_dot);
$graphviz_path = (isset($config['graphviz_bin_dir'])) ?
io_safe_output($config['graphviz_bin_dir'] . "/")
:
"";
$cmd = escapeshellarg($graphviz_path . $filter) .
" -Tcmapx " . escapeshellarg("-o$filename_map") .
" -Tpng ". escapeshellarg("-o$filename_img") .
" " . escapeshellarg($filename_dot);
$result = system ($cmd);
fclose ($fh);
unlink ($filename_dot);
//~ html_debug_print($cmd);

View File

@ -203,7 +203,7 @@ if ($tag_filter !== 0) {
WHERE ttag_module.id_tag IN (SELECT id_tag FROM ttag where name LIKE '%" . $tag_filter . "%')
)";
}
else{
else {
$sql_conditions .= " AND tagente_modulo.id_agente_modulo IN (
SELECT ttag_module.id_agente_modulo
FROM ttag_module

View File

@ -624,7 +624,7 @@ if (is_ajax ()) {
if ($modulegroup === false) {
echo __('None').'<br />';
}
else{
else {
echo $modulegroup.'<br />';
}
echo '<strong>'.__('Agent').':</strong> ';

View File

@ -340,7 +340,7 @@ $events_filter .= html_print_input_hidden('id_name', $id_name, true);
if ($open_filter) {
$events_filter .= html_print_input_hidden('open_filter', 'true', true);
}
else{
else {
$events_filter .= html_print_input_hidden('open_filter', 'false', true);
}
@ -414,8 +414,18 @@ $table_advanced->data[] = $data;
$table_advanced->rowclass[] = '';
$data = array();
$data[0] = '<fieldset class="databox" style="width: 310px;"><legend>' . __('Events with following tags') . '</legend>' . html_print_table($tabletags_with, true) . '</fieldset>';
$data[1] = '<fieldset class="databox" style="width: 310px;"><legend>' . __('Events without following tags') . '</legend>' . html_print_table($tabletags_without, true) . '</fieldset>';
$data[0] = '<fieldset class="databox" style="width: 310px;">' .
'<legend>' .
__('Events with following tags') .
'</legend>' .
html_print_table($tabletags_with, true) .
'</fieldset>';
$data[1] = '<fieldset class="databox" style="width: 310px;">' .
'<legend>' .
__('Events without following tags') .
'</legend>' .
html_print_table($tabletags_without, true) .
'</fieldset>';
$table_advanced->data[] = $data;
$table_advanced->rowclass[] = '';

View File

@ -173,7 +173,7 @@ if ($searchAgents) {
AND (
t1.nombre LIKE '%%" . $stringSearchSQL . "%%' OR
t2.nombre LIKE '%%" . $stringSearchSQL . "%%' OR
t1.direction LIKE '%%" . $stringSearchSQL . "%%'
t1.direccion LIKE '%%" . $stringSearchSQL . "%%'
)
";
break;

View File

@ -44,6 +44,7 @@ $table->style[8] = 'font-weight: bold; text-align: center;';
$table->style[9] = 'font-weight: bold; text-align: center;';
$table->style[10] = 'font-weight: bold; text-align: center;';
$table->style[11] = 'font-weight: bold; text-align: center;';
$table->style[13] = 'font-weight: bold; text-align: center;';
$table->data[0][0] = html_print_image ("images/agent.png", true, array ("title" => __('Agents found')));
$table->data[0][1] = "<a href='index.php?search_category=agents&keywords=".$keyword."&head_search_keywords=Search'>" .

View File

@ -108,7 +108,7 @@ if ($searchModules) {
)
)
) AND
t1.nombre COLLATE utf8_general_ci LIKE \'%' . $stringSearchSQL . '%\' OR
t1.nombre LIKE \'%' . $stringSearchSQL . '%\' OR
t3.nombre LIKE \'%' . $stringSearchSQL . '%\'';
break;
case "oracle":

View File

@ -58,7 +58,9 @@ $selected = 'border: 1px solid black;';
if ($searchMain) {
$main_tab = array('text' => "<a href='index.php?search_category=main&keywords=".$config['search_keywords']."&head_search_keywords=Search'>"
. html_print_image ("images/zoom_mc.png", true, array ("title" => __('Global search'))) . "</a>", 'active' => $searchTab == "main");
. html_print_image ("images/zoom_mc.png", true,
array ("title" => __('Global search'))) . "</a>",
'active' => $searchTab == "main");
}
else {
$main_tab = '';
@ -66,7 +68,9 @@ else {
if ($searchAgents) {
$agents_tab = array('text' => "<a href='index.php?search_category=agents&keywords=".$config['search_keywords']."&head_search_keywords=Search'>"
. html_print_image ("images/op_monitoring.png", true, array ("title" => __('Agents'))) . "</a>", 'active' => $searchTab == "agents");
. html_print_image ("images/op_monitoring.png", true,
array ("title" => __('Agents'))) . "</a>",
'active' => $searchTab == "agents");
}
else {
$agents_tab = '';
@ -74,7 +78,9 @@ else {
if ($searchUsers) {
$users_tab = array('text' => "<a href='index.php?search_category=users&keywords=".$config['search_keywords']."&head_search_keywords=Search'>"
. html_print_image ("images/op_workspace.png", true, array ("title" => __('Users'))) . "</a>", 'active' => $searchTab == "users");
. html_print_image ("images/op_workspace.png", true,
array ("title" => __('Users'))) . "</a>",
'active' => $searchTab == "users");
}
else {
$users_tab = '';
@ -82,7 +88,9 @@ else {
if ($searchAlerts) {
$alerts_tab = array('text' => "<a href='index.php?search_category=alerts&keywords=".$config['search_keywords']."&head_search_keywords=Search'>"
. html_print_image ("images/op_alerts.png", true, array ("title" => __('Alerts'))) . "</a>", 'active' => $searchTab == "alerts");
. html_print_image ("images/op_alerts.png", true,
array ("title" => __('Alerts'))) . "</a>",
'active' => $searchTab == "alerts");
}
else {
$alerts_tab = '';
@ -90,7 +98,9 @@ else {
if ($searchGraphs) {
$graphs_tab = array('text' => "<a href='index.php?search_category=graphs&keywords=".$config['search_keywords']."&head_search_keywords=Search'>"
. html_print_image ("images/chart.png", true, array ("title" => __('Graphs'))) . "</a>", 'active' => $searchTab == "graphs");
. html_print_image ("images/chart.png", true,
array ("title" => __('Graphs'))) . "</a>",
'active' => $searchTab == "graphs");
}
else {
$graphs_tab = '';
@ -98,7 +108,9 @@ else {
if ($searchReports) {
$reports_tab = array('text' => "<a href='index.php?search_category=reports&keywords=".$config['search_keywords']."&head_search_keywords=Search'>"
. html_print_image ("images/op_reporting.png", true, array ("title" => __('Reports'))) . "</a>", 'active' => $searchTab == "reports");
. html_print_image ("images/op_reporting.png", true,
array ("title" => __('Reports'))) . "</a>",
'active' => $searchTab == "reports");
}
else {
$reports_tab = '';
@ -106,7 +118,9 @@ else {
if ($searchMaps) {
$maps_tab = array('text' => "<a href='index.php?search_category=maps&keywords=".$config['search_keywords']."&head_search_keywords=Search'>"
. html_print_image ("images/visual_console.png", true, array ("title" => __('Maps'))) . "</a>", 'active' => $searchTab == "maps");
. html_print_image ("images/visual_console.png", true,
array ("title" => __('Maps'))) . "</a>",
'active' => $searchTab == "maps");
}
else {
$maps_tab = '';
@ -114,7 +128,9 @@ else {
if ($searchModules) {
$modules_tab = array('text' => "<a href='index.php?search_category=modules&keywords=".$config['search_keywords']."&head_search_keywords=Search'>"
. html_print_image ("images/brick.png", true, array ("title" => __('Modules'))) . "</a>", 'active' => $searchTab == "modules");
. html_print_image ("images/brick.png", true,
array ("title" => __('Modules'))) . "</a>",
'active' => $searchTab == "modules");
}
else {
$modules_tab = '';
@ -135,6 +151,7 @@ $only_count = false;
switch ($searchTab) {
case 'main':
$only_count = true;
require_once('search_agents.getdata.php');
require_once('search_agents.php');
require_once('search_users.getdata.php');