2012-06-14 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_agents.php: deprecated the function with bad and crazy name "agents_get_module_id" and changed for the function with more clear mind name "agents_get_agent_id_by_module_id". * godmode/alerts/configure_alert_compound.php, godmode/reporting/reporting_builder.list_items.php: changed the calls of the deprecate function "agents_get_module_id". MERGED FROM 4.0.2 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6547 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
4948486eff
commit
4a44893f0b
|
@ -1,3 +1,15 @@
|
|||
2012-06-14 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_agents.php: deprecated the function with bad and
|
||||
crazy name "agents_get_module_id" and changed for the function with
|
||||
more clear mind name "agents_get_agent_id_by_module_id".
|
||||
|
||||
* godmode/alerts/configure_alert_compound.php,
|
||||
godmode/reporting/reporting_builder.list_items.php: changed the
|
||||
calls of the deprecate function "agents_get_module_id".
|
||||
|
||||
MERGED FROM 4.0.2
|
||||
|
||||
2012-06-14 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* include/functions_graph.php: Merged from 4.0 branch. Added history
|
||||
|
|
|
@ -391,7 +391,7 @@ if ($step == 2) {
|
|||
5, 7, true);
|
||||
|
||||
$table->data[4][0] = __('Actions');
|
||||
switch ($config['dbtype']){
|
||||
switch ($config['dbtype']) {
|
||||
case "mysql":
|
||||
case "postgresql":
|
||||
$table->data[4][1] = html_print_select_from_sql ('SELECT id, name FROM talert_actions ORDER BY name',
|
||||
|
@ -401,8 +401,8 @@ if ($step == 2) {
|
|||
$table->data[4][1] = html_print_select_from_sql ('SELECT id, dbms_lob.substr(name,4000,1) as name FROM talert_actions ORDER BY dbms_lob.substr(name,4000,1)',
|
||||
'action', '', '', __('Select'), 0, true, false, false).' ';
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$table->data[4][1] .= html_print_button (__('Add'), 'add_action', false, '',
|
||||
'class="sub next"', true);
|
||||
$table->data[4][1] .= '<br />';
|
||||
|
@ -416,7 +416,7 @@ if ($step == 2) {
|
|||
$table->data[4][1] .= ' '.__('matches of the alert');
|
||||
$table->data[4][1] .= ui_print_help_icon("alert-matches", true);
|
||||
$table->data[4][1] .= '</span>';
|
||||
*/
|
||||
*/
|
||||
$table->data['actions'][0] = __('Assigned actions');
|
||||
$table->data['actions'][1] = '<ul id="alert_actions">';
|
||||
if ($id) {
|
||||
|
@ -432,7 +432,8 @@ if ($step == 2) {
|
|||
$table->data['actions'][1] .= __('Always');
|
||||
else
|
||||
$table->data['actions'][1] .= __('On').' '.$action['fires_min'];
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
if ($action['fires_min'] == 0)
|
||||
$table->data['actions'][1] .= __('Until').' '.$action['fires_max'];
|
||||
else
|
||||
|
@ -442,14 +443,15 @@ if ($step == 2) {
|
|||
$table->data['actions'][1] .= ')</em>';
|
||||
$table->data['actions'][1] .= '<a href="#" class="remove_action" />';
|
||||
$table->data['actions'][1] .= html_print_image('images/cross.png', true, array("title" => __('Delete')));
|
||||
$table->data['actions'][1] .= '</a>';
|
||||
$table->data['actions'][1] .= '</a>';
|
||||
$table->data['actions'][1] .= html_print_input_hidden ('actions[]', $action['id'], true);
|
||||
$table->data['actions'][1] .= '</li>';
|
||||
}
|
||||
}
|
||||
$table->data['actions'][1] .= '</ul>';
|
||||
|
||||
} else if ($step == 3) {
|
||||
}
|
||||
else if ($step == 3) {
|
||||
/* Alert recover */
|
||||
if (! $recovery_notify) {
|
||||
$table->rowstyle = array ();
|
||||
|
@ -469,7 +471,8 @@ if ($step == 2) {
|
|||
$table->data['field3'][0] = __('Field 3');
|
||||
$table->data['field3'][1] = html_print_textarea ('field3_recovery', 10, 30,
|
||||
$field3_recovery, '', true);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
/* Step 1 by default */
|
||||
$table->size = array ();
|
||||
$table->size[0] = '20%';
|
||||
|
@ -484,7 +487,7 @@ if ($step == 2) {
|
|||
if ($id) {
|
||||
$table->rowstyle['conditions'] = '';
|
||||
}
|
||||
|
||||
|
||||
$table->data[0][0] = __('Name');
|
||||
$table->data[0][1] = html_print_input_text ('name', $name, '', 35, 255, true);
|
||||
|
||||
|
@ -494,7 +497,7 @@ if ($step == 2) {
|
|||
$table->data[2][0] = __('Description');
|
||||
$table->data[2][1] = html_print_textarea ('description', 10, 30,
|
||||
$description, '', true);
|
||||
|
||||
|
||||
$table->data[3][0] = __('Condition');
|
||||
$table->data[3][0] .= '<a name="condition" />';
|
||||
$table->colspan[3][0] = 2;
|
||||
|
@ -526,7 +529,7 @@ if ($step == 2) {
|
|||
$data[0] = '<a href="#" class="remove_alert" id="alert-'.$alert['id'].'" />';
|
||||
$data[0] .= html_print_image("images/delete.png", true);
|
||||
$data[0] .= '</a>';
|
||||
$idAgent = agents_get_module_id($alert['id_agent_module']);
|
||||
$idAgent = agents_get_agent_id_by_module_id($alert['id_agent_module']);
|
||||
$nameAgent = agents_get_name($idAgent);
|
||||
$data[1] = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=' . $idAgent . '">' . $nameAgent . '</a>';
|
||||
$data[2] = modules_get_agentmodule_name ($alert['id_agent_module']);
|
||||
|
@ -550,7 +553,8 @@ if ($step == 2) {
|
|||
/* If it's the last step it will redirect to compound lists */
|
||||
if ($step >= LAST_STEP) {
|
||||
echo '<form method="post" id="alert_form" action="index.php?sec=galertas&sec2=godmode/alerts/alert_compounds">';
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
echo '<form method="post" id="alert_form">';
|
||||
}
|
||||
html_print_table ($table);
|
||||
|
@ -560,13 +564,15 @@ echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
|||
if ($id) {
|
||||
html_print_input_hidden ('id', $id);
|
||||
html_print_input_hidden ('update_compound', 1);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
html_print_input_hidden ('create_compound', 1);
|
||||
}
|
||||
|
||||
if ($step >= LAST_STEP) {
|
||||
html_print_submit_button (__('Finish'), 'finish', false, 'class="sub upd"');
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
html_print_input_hidden ('step', $step + 1);
|
||||
html_print_submit_button (__('Next'), 'next', false, 'class="sub next"');
|
||||
}
|
||||
|
@ -612,7 +618,8 @@ if ($step == 1) {
|
|||
|
||||
if (! $id_agent) {
|
||||
$table_alerts->class = 'invisible';
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$alerts = agents_get_alerts_simple ($id_agent);
|
||||
|
||||
if (empty ($alerts)) {
|
||||
|
|
|
@ -273,7 +273,6 @@ foreach ($items as $item) {
|
|||
$connection = metaconsole_get_connection($server_name);
|
||||
if (metaconsole_load_external_db($connection) != NOERR) {
|
||||
//ui_print_error_message ("Error connecting to ".$server_name);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -284,8 +283,9 @@ foreach ($items as $item) {
|
|||
$row[3] = '';
|
||||
}
|
||||
else {
|
||||
$row[2] = ui_print_truncate_text(agents_get_name(agents_get_module_id($item['id_agent_module'])), 35);
|
||||
$row[3] = ui_print_truncate_text(db_get_value_filter('nombre', 'tagente_modulo', array('id_agente_modulo' => $item['id_agent_module'])), 35);
|
||||
$row[2] = ui_print_truncate_text(agents_get_name(agents_get_agent_id_by_module_id($item['id_agent_module'])), 35);
|
||||
$module_name_db = db_get_value_filter('nombre', 'tagente_modulo', array('id_agente_modulo' => $item['id_agent_module']));
|
||||
$row[3] = ui_print_truncate_text(io_safe_output($module_name_db), 35);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -295,7 +295,8 @@ foreach ($items as $item) {
|
|||
$row [3] = '';
|
||||
}
|
||||
else {
|
||||
$row[3] = ui_print_truncate_text(db_get_value_filter('nombre', 'tagente_modulo', array('id_agente_modulo' => $item['id_agent_module'])),35);
|
||||
$module_name_db = db_get_value_filter('nombre', 'tagente_modulo', array('id_agente_modulo' => $item['id_agent_module']))
|
||||
$row[3] = ui_print_truncate_text(io_safe_output($module_name_db),35);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue