Fixed in the report item of sql query in metaconsole. TICKET: #2319
This commit is contained in:
parent
6658104e84
commit
c062bd6a6f
|
@ -440,7 +440,9 @@ switch ($action) {
|
|||
case 'event_report_module':
|
||||
$description = $item['description'];
|
||||
$idAgentModule = $item['id_agent_module'];
|
||||
$idAgent = db_get_value_filter('id_agente', 'tagente_modulo', array('id_agente_modulo' => $idAgentModule));
|
||||
$idAgent = db_get_value_filter('id_agente',
|
||||
'tagente_modulo',
|
||||
array('id_agente_modulo' => $idAgentModule));
|
||||
$period = $item['period'];
|
||||
break;
|
||||
case 'general':
|
||||
|
|
|
@ -1192,15 +1192,39 @@ switch ($action) {
|
|||
$values['period'] = get_parameter('period');
|
||||
$good_format = true;
|
||||
break;
|
||||
default:
|
||||
default:
|
||||
$values['period'] = get_parameter('period');
|
||||
$values['top_n'] = get_parameter('radiobutton_max_min_avg',0);
|
||||
$values['top_n_value'] = get_parameter('quantity');
|
||||
$values['text'] = get_parameter('text');
|
||||
$values['show_graph'] = get_parameter('combo_graph_options');
|
||||
$good_format = true;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$values['server_name'] = get_parameter ('server_name');
|
||||
$server_id = (int)get_parameter('server_id');
|
||||
if ($server_id != 0) {
|
||||
$connection = metaconsole_get_connection_by_id($server_id);
|
||||
|
||||
$values['server_name'] = $connection['server_name'];
|
||||
}
|
||||
if ($values['server_name'] == '')
|
||||
$values['server_name'] = get_parameter ('combo_server');
|
||||
|
||||
|
||||
if (is_metaconsole()) {
|
||||
// For SQL Query check if it is setted in the meta
|
||||
if ($values['type'] == "sql") {
|
||||
if (empty($values['server_name'])) {
|
||||
$good_format = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$values['id_agent'] = get_parameter('id_agent');
|
||||
$values['id_gs'] = get_parameter('id_custom_graph');
|
||||
if (($values['type'] == 'alert_report_agent') or ($values['type'] == 'event_report_agent') or ($values['type'] == 'agent_configuration') or ($values['type'] == 'group_configuration'))
|
||||
|
@ -1247,15 +1271,7 @@ switch ($action) {
|
|||
$values['exception_condition_value'] = get_parameter('exception_condition_value');
|
||||
$values['id_module_group'] = get_parameter('combo_modulegroup');
|
||||
$values['id_group'] = get_parameter ('combo_group');
|
||||
$values['server_name'] = get_parameter ('server_name');
|
||||
$server_id = (int)get_parameter('server_id');
|
||||
if ($server_id != 0) {
|
||||
$connection = metaconsole_get_connection_by_id($server_id);
|
||||
|
||||
$values['server_name'] = $connection['server_name'];
|
||||
}
|
||||
if ($values['server_name'] == '')
|
||||
$values['server_name'] = get_parameter ('combo_server');
|
||||
|
||||
|
||||
if ((($values['type'] == 'custom_graph') or ($values['type'] == 'automatic_custom_graph')) && ($values['id_gs'] == 0 || $values['id_gs'] == '')) {
|
||||
$resultOperationDB = false;
|
||||
|
|
Loading…
Reference in New Issue