Removed empty help icons in modules

This commit is contained in:
manuel 2019-05-24 12:59:25 +02:00
parent f5586d7b70
commit 0ee2ed6f5e
3 changed files with 20 additions and 23 deletions

View File

@ -81,7 +81,6 @@ function add_component_selection($id_network_component_type)
$data = [];
$data[0] = __('Using module component').' ';
$data[0] .= ui_print_help_icon('network_component', true);
$component_groups = network_components_get_groups($id_network_component_type);
$data[1] = '<span id="component_group" class="left">';
@ -384,7 +383,7 @@ if ($disabledBecauseInPolicy) {
$table_simple->data[2][3] .= html_print_input_hidden('id_module_group', $id_module_group, true);
}
$table_simple->data[3][0] = __('Dynamic Threshold Interval').' '.ui_print_help_icon('dynamic_threshold', true);
$table_simple->data[3][0] = __('Dynamic Threshold Interval');
$table_simple->data[3][1] = html_print_extended_select_for_time('dynamic_interval', $dynamic_interval, '', 'None', '0', 10, true, 'width:150px', false, $classdisabledBecauseInPolicy, $disabledBecauseInPolicy);
$table_simple->data[3][1] .= '<a onclick=advanced_option_dynamic()>'.html_print_image('images/cog.png', true, ['title' => __('Advanced options Dynamic Threshold')]).'</a>';
if ($in_policy) {
@ -424,7 +423,7 @@ $table_simple->data[3][2] .= html_print_input_text(
$table_simple->data[3][3] = '<span><em>'.__('Dynamic Threshold Two Tailed: ').'</em>';
$table_simple->data[3][3] .= html_print_checkbox('dynamic_two_tailed', 1, $dynamic_two_tailed, true, $disabledBecauseInPolicy);
$table_simple->data[4][0] = __('Warning status').' '.ui_print_help_icon('warning_status', true);
$table_simple->data[4][0] = __('Warning status');
if (!modules_is_string_type($id_module_type) || $edit) {
$table_simple->data[4][1] .= '<span id="minmax_warning"><em>'.__('Min. ').'</em>';
$table_simple->data[4][1] .= html_print_input_text(
@ -477,7 +476,7 @@ if (!modules_is_string_type($id_module_type) || $edit) {
$table_simple->data[4][2] = '<svg id="svg_dinamic" width="500" height="300"> </svg>';
}
$table_simple->data[5][0] = __('Critical status').' '.ui_print_help_icon('critical_status', true);
$table_simple->data[5][0] = __('Critical status');
if (!modules_is_string_type($id_module_type) || $edit) {
$table_simple->data[5][1] .= '<span id="minmax_critical"><em>'.__('Min. ').'</em>';
$table_simple->data[5][1] .= html_print_input_text(
@ -528,7 +527,6 @@ $table_simple->data[5][1] .= html_print_checkbox('critical_inverse', 1, $critica
// FF stands for Flip-flop.
$table_simple->data[6][0] = __('FF threshold').' ';
$table_simple->data[6][0] .= ui_print_help_icon('ff_threshold', true);
$table_simple->data[6][1] .= __('Keep counters');
$table_simple->data[6][1] .= html_print_checkbox(
@ -703,15 +701,15 @@ if ($moduletype == MODULE_DATA) {
if (isset($id_agente)) {
$agent_interval = agents_get_interval($id_agente);
$interval_factor = ($interval / $agent_interval);
$table_advanced->data[2][1] = human_time_description_raw($interval).' ('.sprintf(__('Agent interval x %s'), $interval_factor).') '.ui_print_help_icon('module_interval_factor', true);
$table_advanced->data[2][1] = human_time_description_raw($interval).' ('.sprintf(__('Agent interval x %s'), $interval_factor).') ';
} else {
$table_advanced->data[2][1] = sprintf(__('Agent interval x %s'), $interval_factor).ui_print_help_icon('module_interval_factor', true);
$table_advanced->data[2][1] = sprintf(__('Agent interval x %s'), $interval_factor);
}
if ($__code_from == 'policies') {
// If is the policy form, module_interval will store the factor (not the seconds).
// So server will transform it to interval in seconds
$table_advanced->data[2][1] = sprintf(__('Default').': 1', $interval_factor).ui_print_help_icon('module_interval_factor', true);
$table_advanced->data[2][1] = sprintf(__('Default').': 1', $interval_factor);
$table_advanced->data[2][1] .= html_print_input_hidden('module_interval', $interval_factor, true);
} else if ($module_id_policy_module != 0) {
$table_advanced->data[2][1] .= ui_print_help_tip(__('The policy modules of data type will only update their intervals when policy is applied.'), true);
@ -720,14 +718,14 @@ if ($moduletype == MODULE_DATA) {
// If it is a non policy form, the module_interval will not provided and will
// be taken the agent interval (this code is at configurar_agente.php)
} else {
$table_advanced->data[2][0] = __('Interval').ui_print_help_icon('module_interval', true);
$table_advanced->data[2][0] = __('Interval');
$table_advanced->colspan[2][1] = 2;
$table_advanced->data[2][1] = html_print_extended_select_for_time('module_interval', $interval, '', '', '0', false, true, false, false, $classdisabledBecauseInPolicy, $disabledBecauseInPolicy);
}
$table_advanced->data[2][1] .= html_print_input_hidden('moduletype', $moduletype, true);
$table_advanced->data[2][3] = __('Post process').' '.ui_print_help_icon('postprocess', true);
$table_advanced->data[2][3] = __('Post process');
$table_advanced->data[2][4] = html_print_extended_select_for_post_process(
'post_process',
$post_process,
@ -793,7 +791,7 @@ $table_advanced->data[4][4] = html_print_checkbox(
);
$table_advanced->colspan[4][4] = 3;
$table_advanced->data[5][0] = __('FF interval').' '.ui_print_help_icon('ff_interval', true);
$table_advanced->data[5][0] = __('FF interval');
$table_advanced->data[5][1] = html_print_input_text(
'module_ff_interval',
$ff_interval,
@ -808,7 +806,7 @@ $table_advanced->data[5][1] = html_print_input_text(
).ui_print_help_tip(__('Module execution flip flop time interval (in secs).'), true);
$table_advanced->colspan[5][1] = 2;
$table_advanced->data[5][3] = __('FF timeout').' '.ui_print_help_icon('ff_timeout', true);
$table_advanced->data[5][3] = __('FF timeout');
$module_type_name = modules_get_type_name($id_module_type);
$table_advanced->data[5][4] = '';
@ -1010,7 +1008,7 @@ $table_advanced->colspan[10][1] = 6;
if (isset($id_agente) && $moduletype == MODULE_DATA) {
$has_remote_conf = enterprise_hook('config_agents_has_remote_configuration', [$agent['id_agente']]);
if ($has_remote_conf) {
$table_advanced->data[11][0] = __('Cron from').ui_print_help_icon('cron', true);
$table_advanced->data[11][0] = __('Cron from');
$table_advanced->data[11][1] = html_print_extended_select_for_cron($hour_from, $minute_from, $mday_from, $month_from, $wday_from, true, $disabledBecauseInPolicy);
$table_advanced->colspan[11][1] = 6;
@ -1018,7 +1016,7 @@ if (isset($id_agente) && $moduletype == MODULE_DATA) {
$table_advanced->data[12][1] = html_print_extended_select_for_cron($hour_to, $minute_to, $mday_to, $month_to, $wday_to, true, $disabledBecauseInPolicy, true);
$table_advanced->colspan[12][1] = 6;
} else {
$table_advanced->data[11][0] = __('Cron from').ui_print_help_icon('cron', true);
$table_advanced->data[11][0] = __('Cron from');
$table_advanced->data[11][1] = html_print_extended_select_for_cron($hour_from, $minute_from, $mday_from, $month_from, $wday_from, true, true);
$table_advanced->colspan[11][1] = 6;
@ -1027,7 +1025,7 @@ if (isset($id_agente) && $moduletype == MODULE_DATA) {
$table_advanced->colspan[12][1] = 6;
}
} else {
$table_advanced->data[11][0] = __('Cron from').ui_print_help_icon('cron', true);
$table_advanced->data[11][0] = __('Cron from');
$table_advanced->data[11][1] = html_print_extended_select_for_cron($hour_from, $minute_from, $mday_from, $month_from, $wday_from, true, $disabledBecauseInPolicy);
$table_advanced->colspan[11][1] = 6;

View File

@ -128,7 +128,7 @@ $snmp_versions['2c'] = 'v. 2c';
$snmp_versions['3'] = 'v. 3';
$data = [];
$data[0] = __('SNMP community').ui_print_help_icon('column_macros', true);
$data[0] = __('SNMP community');
$adopt = false;
if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK && isset($id_agent_module)) {
$adopt = policies_is_module_adopt($id_agent_module);
@ -233,7 +233,7 @@ push_table_simple($data, 'snmp_2');
// Advanced stuff
$data = [];
$data[0] = __('TCP send').' '.ui_print_help_icon('tcp_send', true);
$data[0] = __('TCP send');
$data[1] = html_print_textarea('tcp_send', 2, 65, $tcp_send, $disabledTextBecauseInPolicy, true, $largeclassdisabledBecauseInPolicy);
$table_simple->colspan['tcp_send'][1] = 3;
@ -277,7 +277,7 @@ if (!isset($id_agent_module)) {
}
$data = [];
$data[0] = __('Auth user').ui_print_help_icon('column_macros', true);
$data[0] = __('Auth user');
$data[1] = html_print_input_text(
'snmp3_auth_user',
$snmp3_auth_user,
@ -290,7 +290,7 @@ $data[1] = html_print_input_text(
'',
$classdisabledBecauseInPolicy
);
$data[2] = __('Auth password').ui_print_help_icon('column_macros', true).ui_print_help_tip(__('The pass length must be eight character minimum.'), true);
$data[2] = __('Auth password').ui_print_help_tip(__('The pass length must be eight character minimum.'), true);
$data[3] = html_print_input_password(
'snmp3_auth_pass',
$snmp3_auth_pass,
@ -312,7 +312,7 @@ push_table_simple($data, 'field_snmpv3_row1');
$data = [];
$data[0] = __('Privacy method');
$data[1] = html_print_select(['DES' => __('DES'), 'AES' => __('AES')], 'snmp3_privacy_method', $snmp3_privacy_method, '', '', '', true, false, false, '', $disabledBecauseInPolicy);
$data[2] = __('Privacy pass').ui_print_help_icon('column_macros', true).ui_print_help_tip(__('The pass length must be eight character minimum.'), true);
$data[2] = __('Privacy pass').ui_print_help_tip(__('The pass length must be eight character minimum.'), true);
$data[3] = html_print_input_password(
'snmp3_privacy_pass',
$snmp3_privacy_pass,

View File

@ -60,7 +60,7 @@ $data[3] = html_print_input_text(
push_table_simple($data, 'target_ip');
$data = [];
$data[0] = __('Username').ui_print_help_icon('column_macros', true);
$data[0] = __('Username');
$data[1] = html_print_input_text(
'plugin_user',
$plugin_user,
@ -73,7 +73,7 @@ $data[1] = html_print_input_text(
'',
$classdisabledBecauseInPolicy
);
$data[2] = __('Password').ui_print_help_icon('column_macros', true);
$data[2] = __('Password');
$data[3] = html_print_input_password(
'plugin_pass',
$plugin_pass,
@ -91,7 +91,6 @@ push_table_simple($data, 'user_pass');
$data = [];
$data[0] = __('WMI query');
$data[0] .= ui_print_help_icon('wmiquery', true);
$data[1] = html_print_input_text(
'snmp_oid',
$snmp_oid,