Merge branch 'develop' of https://192.168.50.5:8081/artica/pandorafms into develop
This commit is contained in:
commit
724b2e469d
|
@ -148,11 +148,11 @@ $module_macros = array ();
|
|||
|
||||
// Create agent
|
||||
if ($create_agent) {
|
||||
$nombre_agente = md5($alias . $direccion_agente);
|
||||
$alias = (string) get_parameter_post("alias",'');
|
||||
$direccion_agente = (string) get_parameter_post("direccion",'');
|
||||
$direccion_agente = trim(io_safe_output($direccion_agente));
|
||||
$direccion_agente = io_safe_input($direccion_agente);
|
||||
$nombre_agente = hash("sha256",$alias . "|" .$direccion_agente ."|". time() ."|". sprintf("%04d", rand(0,10000)));
|
||||
$grupo = (int) get_parameter_post ("grupo");
|
||||
$intervalo = (string) get_parameter_post ("intervalo", SECONDS_5MINUTES);
|
||||
$comentarios = (string) get_parameter_post ("comentarios", '');
|
||||
|
|
|
@ -554,7 +554,7 @@ if ($step == 2) {
|
|||
$table->data[3][1] = html_print_input_text ('min_alerts',
|
||||
$min_alerts, '', 5, 7, true);
|
||||
|
||||
$table->data[3][2] = __('Reset counter when alert is not continuously') . ui_print_help_tip(__('Enable this option if you want to reset the counter for minimum number of alerts when the alert state is not continuously even if it\'s in the time threshold.'), true);;
|
||||
$table->data[3][2] = __('Reset counter for non-sustained alerts') . ui_print_help_tip(__('Enable this option if you want the counter to be reset when the alert is not being fired consecutively, even if it\'s within the time threshold'), true);
|
||||
$table->data[3][3] = html_print_checkbox ('min_alerts_reset_counter', 1, $min_alerts_reset_counter, true);
|
||||
|
||||
$table->data[4][0] = __('Max. number of alerts');
|
||||
|
@ -585,7 +585,7 @@ if ($step == 2) {
|
|||
'default_action', $default_action, '', __('None'), 0,
|
||||
true, false, false, false, false, false, 0) .
|
||||
ui_print_help_tip (
|
||||
__('In case you fill any Field 1, Field 2 or Field 3 above, those will replace the corresponding fields of this associated "Default action".'), true);
|
||||
__('Unless they\'re left blank, the fields from the action will override those set on the template.'), true);
|
||||
|
||||
$table->data[6][0] = __('Condition type');
|
||||
$table->data[6][1] = html_print_select (alerts_get_alert_templates_types (), 'type',
|
||||
|
|
|
@ -76,7 +76,7 @@ $table->data[9][1] = html_print_input_text ('days_autodisable_deletion', $config
|
|||
$table->data[10][0] = __('Retention period of past special days') . ui_print_help_tip(__('This number is days to keep past special days. 0 means never remove.'), true);
|
||||
$table->data[10][1] = html_print_input_text ('num_past_special_days', $config["num_past_special_days"], '', 5, 5, true);
|
||||
|
||||
$table->data[11][0] = __('Max. macro data fields') . ui_print_help_tip(__('Number of macro fields in alerts and templates between 1 and 50'), true);
|
||||
$table->data[11][0] = __('Max. macro data fields') . ui_print_help_tip(__('Number of macro fields in alerts and templates between 1 and 15'), true);
|
||||
$table->data[11][1] = html_print_input_text ('max_macro_fields', $config["max_macro_fields"], '', 5, 5, true, false, false, "onChange=\"change_macro_fields()\"");
|
||||
|
||||
if (enterprise_installed ()) {
|
||||
|
|
|
@ -100,8 +100,8 @@ $table_behaviour->data[$row][1] = html_print_input_text ('render_proc_fail', $co
|
|||
$row++;
|
||||
|
||||
//Daniel maya 02/06/2016 Display menu with click --INI
|
||||
$table_behaviour->data[$row][0] = __('Display lateral menus with click').
|
||||
ui_print_help_tip(__('If you check this option, the lateral menus display with left click. Otherwise it will show by placing the mouse over'), true);
|
||||
$table_behaviour->data[$row][0] = __('Click to display lateral menus').
|
||||
ui_print_help_tip(__('When enabled, the lateral menus are shown when left clicking them, instead of hovering over them'), true);
|
||||
$table_behaviour->data[$row][1] = __('Yes') . ' ' .
|
||||
html_print_radio_button ('click_display', 1, '',
|
||||
$config["click_display"], true) .
|
||||
|
@ -117,7 +117,7 @@ if (enterprise_installed()) {
|
|||
$table_behaviour->data[$row][1] = html_print_input_text ('service_label_font_size', $config["service_label_font_size"], '', 5, 5, true);
|
||||
$row++;
|
||||
|
||||
$table_behaviour->data[$row][0] = __('Service item padding size');
|
||||
$table_behaviour->data[$row][0] = __('Space between items in Service maps');
|
||||
$table_behaviour->data[$row][1] = html_print_input_text ('service_item_padding_size', $config["service_item_padding_size"], '', 5, 5, true);
|
||||
$row++;
|
||||
}
|
||||
|
@ -183,7 +183,7 @@ $table_styles->data[$row][1] .= " " .
|
|||
html_print_button(__("View"), 'login_background_preview', false, '', 'class="sub camera"', true);
|
||||
$row++;
|
||||
|
||||
$table_styles->data[$row][0] = __('Custom logo') . ui_print_help_icon("custom_logo", true);
|
||||
$table_styles->data[$row][0] = __('Custom logo (header)') . ui_print_help_icon("custom_logo", true);
|
||||
|
||||
if(enterprise_installed()){
|
||||
$ent_files = list_files('enterprise/images/custom_logo', "png", 1, 0);
|
||||
|
@ -202,7 +202,7 @@ else{
|
|||
$table_styles->data[$row][1] .= " " . html_print_button(__("View"), 'custom_logo_preview', $open, '', 'class="sub camera"', true,false,$open,'visualmodal');
|
||||
$row++;
|
||||
|
||||
$table_styles->data[$row][0] = __('Custom logo in login') . ui_print_help_icon("custom_logo_login", true);
|
||||
$table_styles->data[$row][0] = __('Custom logo (login)') . ui_print_help_icon("custom_logo_login", true);
|
||||
|
||||
|
||||
$table_styles->data[$row][1] = html_print_select(
|
||||
|
@ -355,7 +355,7 @@ $table_font->data[$row][1] = html_print_input_text('item_title_size_text',
|
|||
$config["item_title_size_text"], '', 3, 3, true);
|
||||
$row++;
|
||||
|
||||
$table_font->data[$row][0] = __('Show units in values report') .
|
||||
$table_font->data[$row][0] = __('Show unit along with value in reports') .
|
||||
ui_print_help_tip(__('This enabling this, max, min and avg values will be shown with units.'), true);
|
||||
$table_font->data[$row][1] = __('Yes') . ' ' .
|
||||
html_print_radio_button ('simple_module_value', 1, '', $config["simple_module_value"], true).' ';
|
||||
|
@ -432,7 +432,7 @@ if (!enterprise_installed()) {
|
|||
}
|
||||
|
||||
$table_chars->data[$row][0] = __('Data precision for reports');
|
||||
$table_chars->data[$row][0] .= ui_print_help_tip(__('Precision must be a integer number between 0 and 5'), true);
|
||||
$table_chars->data[$row][0] .= ui_print_help_tip(__('Number of decimals shown in reports. It must be a number between 0 and 5'), true);
|
||||
$table_chars->data[$row][1] = html_print_input_text ('graph_precision', $config["graph_precision"], '', 5, 5, true, $disabled_graph_precision, false, "onChange=\"change_precision()\"");
|
||||
$row++;
|
||||
|
||||
|
@ -486,15 +486,15 @@ $table_chars->data[$row][1] .= __('Line').' ' .
|
|||
$row++;
|
||||
|
||||
$table_chars->data[$row][0] = __('Show only average');
|
||||
$table_chars->data[$row][0] .= ui_print_help_tip(__('Allows only show the average in graphs'), true);
|
||||
$table_chars->data[$row][0] .= ui_print_help_tip(__('Hide Max and Min values in graphs'), true);
|
||||
$table_chars->data[$row][1] = __('Yes').' ' .
|
||||
html_print_radio_button ('only_average', 1, '', $config["only_average"], true).' ';
|
||||
$table_chars->data[$row][1] .= __('No').' ' .
|
||||
html_print_radio_button ('only_average', 0, '', $config["only_average"], true);
|
||||
$row++;
|
||||
|
||||
$table_chars->data[$row][0] = __('Percentil');
|
||||
$table_chars->data[$row][0] .= ui_print_help_tip(__('Allows only show the average in graphs'), true);
|
||||
$table_chars->data[$row][0] = __('Percentile');
|
||||
$table_chars->data[$row][0] .= ui_print_help_tip(__('Show percentile 95 in graphs'), true);
|
||||
$table_chars->data[$row][1] = html_print_input_text ('percentil', $config['percentil'], '', 20, 20, true);
|
||||
$row++;
|
||||
|
||||
|
@ -637,10 +637,6 @@ $table_other->data[$row][1] .= __('No') . ' ' .
|
|||
$config["show_group_name"], true);
|
||||
$row++;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$table_other->data[$row][0] = __('Date format string') . ui_print_help_icon("date_format", true);
|
||||
$table_other->data[$row][1] = '<em>'.__('Example').'</em> '.date ($config["date_format"]);
|
||||
$table_other->data[$row][1] .= html_print_input_text ('date_format', $config["date_format"], '', 30, 100, true);
|
||||
|
|
|
@ -2017,10 +2017,7 @@ function events_page_details ($event, $server = "") {
|
|||
$data = array();
|
||||
$data[0] = '<div style="font-weight:normal; margin-left: 20px;">'.__('Name').'</div>';
|
||||
if (can_user_access_node ()) {
|
||||
//$data[1] = ui_print_agent_name ($event["id_agente"], true, 'agent_medium', '', false, $serverstring, $hashstring, $agent['nombre']);
|
||||
$alias = db_get_row ("tagente","id_agente",$event["id_agente"]);
|
||||
$data[1] = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=' . $event["id_agente"] . '" title='.$alias['nombre']. '>';
|
||||
$data[1] .= '<b>' . $alias['alias'] . '</a></b>';
|
||||
$data[1] = ui_print_agent_name($event["id_agente"], true, 'agent_medium', '', false, $serverstring, $hashstring, $agent['alias']);
|
||||
}
|
||||
else {
|
||||
$data[1] = ui_print_truncate_text($agent['alias'], 'agent_medium', true, true, true);
|
||||
|
@ -3799,7 +3796,7 @@ function events_list_events_grouped_agents($sql) {
|
|||
}
|
||||
}
|
||||
else {
|
||||
$data[$i] .= ui_print_agent_name ($event["id_agente"], true);
|
||||
$data[$i] .= ui_print_agent_name($event["id_agente"], true);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -7974,10 +7974,11 @@ function reporting_tiny_stats ($counts_info, $return = false, $type = 'agent', $
|
|||
switch ($type) {
|
||||
case 'modules':
|
||||
$template_title['total_count'] = __('%d Total modules');
|
||||
$template_title['normal_count'] = __('%d Normal modules');
|
||||
$template_title['critical_count'] = __('%d Critical modules');
|
||||
$template_title['warning_count'] = __('%d Warning modules');
|
||||
$template_title['unknown_count'] = __('%d Unknown modules');
|
||||
$template_title['normal_count'] = __('%d Modules in normal status');
|
||||
$template_title['critical_count'] = __('%d Modules in critical status');
|
||||
$template_title['warning_count'] = __('%d Modules in warning status');
|
||||
$template_title['unknown_count'] = __('%d Modules in unknown status');
|
||||
$template_title['not_init_count'] = __('%d Not init modules');
|
||||
break;
|
||||
case 'agent':
|
||||
$template_title['total_count'] = __('%d Total modules');
|
||||
|
|
|
@ -671,18 +671,30 @@ function ui_print_os_icon ($id_os, $name = true, $return = false,
|
|||
* @param string extra parameters to concatenate in the link
|
||||
* @param string name of the agent to avoid the query in some cases
|
||||
* @param bool if the agent will provided with link or not
|
||||
* @param bool use the agent alias or the name
|
||||
*
|
||||
* @return string HTML with agent name and link
|
||||
*/
|
||||
function ui_print_agent_name ($id_agent, $return = false, $cutoff = 'agent_medium', $style = '', $cutname = false, $server_url = '', $extra_params = '', $known_agent_name = false, $link = true) {
|
||||
function ui_print_agent_name ($id_agent, $return = false, $cutoff = 'agent_medium', $style = '', $cutname = false, $server_url = '', $extra_params = '', $known_agent_name = false, $link = true, $alias = true) {
|
||||
if ($known_agent_name === false) {
|
||||
$agent_name = (string) agents_get_name ($id_agent);
|
||||
if ($alias) {
|
||||
$agent_name = (string) agents_get_alias($id_agent);
|
||||
}
|
||||
else {
|
||||
$agent_name = (string) agents_get_name($id_agent);
|
||||
}
|
||||
}
|
||||
else {
|
||||
$agent_name = $known_agent_name;
|
||||
}
|
||||
|
||||
$agent_name_full = $agent_name;
|
||||
if ($alias) {
|
||||
$agent_name_full = (string) agents_get_name($id_agent);
|
||||
}
|
||||
else {
|
||||
$agent_name_full = $agent_name;
|
||||
}
|
||||
|
||||
if ($cutname) {
|
||||
$agent_name = ui_print_truncate_text($agent_name, $cutoff, true, true, true, '[…]', $style);
|
||||
}
|
||||
|
|
|
@ -152,7 +152,7 @@ class Events {
|
|||
$event['agent'] = "<a style='color: black;'" .
|
||||
"href='index.php?page=agent&id=" .
|
||||
$event['id_agente'] . "'>" .
|
||||
agents_get_name($event['id_agente']) .
|
||||
agents_get_alias($event['id_agente']) .
|
||||
"</a>";
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -601,7 +601,7 @@ foreach ($agents as $agent) {
|
|||
|
||||
$data[4] = ui_print_group_icon ($agent["id_grupo"], true);
|
||||
$agent['not_init_count'] = $agent['notinit_count'];
|
||||
$data[5] = reporting_tiny_stats($agent, true, 'agent', ':', $strict_user);
|
||||
$data[5] = reporting_tiny_stats($agent, true, 'modules', ':', $strict_user);
|
||||
|
||||
|
||||
$data[6] = $status_img;
|
||||
|
|
|
@ -73,12 +73,7 @@ $table_agent->styleTable = 'padding:0px;';
|
|||
$table_agent->data = array();
|
||||
$data = array();
|
||||
|
||||
/*$agent_name = ui_print_agent_name ($agent["id_agente"], true, 500,
|
||||
"font-size: medium;", true);*/
|
||||
|
||||
$agent_name = "<a alt =".$agent["nombre"]." href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=" . $agent["id_agente"] . "'>" .
|
||||
'<span style="font-size: medium;font-weight:bold" title="' . $agent["nombre"] . '">'.$agent["alias"].'</span>' .
|
||||
"</a>";
|
||||
$agent_name = ui_print_agent_name($agent["id_agente"], true, 500, "font-size: medium;font-weight:bold", true);
|
||||
|
||||
if ($agent['disabled']) {
|
||||
$agent_name = "<em>" . $agent_name . "</em>" . ui_print_help_tip(__('Disabled'), true);
|
||||
|
|
Loading…
Reference in New Issue