Added helps

Former-commit-id: 54292202ea50b6a15c909875853b52fe2f1a045a
This commit is contained in:
manuel 2019-05-06 16:59:31 +02:00
parent b1dd6edc64
commit 00b5fc0a2c
3 changed files with 82 additions and 21 deletions

View File

@ -11,7 +11,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Load global vars
// Load global vars.
check_login();
if (! check_acl($config['id_user'], 0, 'AW')) {
@ -123,6 +123,7 @@ switch ($tab) {
case 'massive_modules':
$options = $options_modules;
$help_header = 'massive_modules_tab';
break;
case 'massive_users':
@ -131,6 +132,7 @@ switch ($tab) {
case 'massive_policies':
$options = $options_policies;
$help_header = 'massive_policies_tab';
break;
case 'massive_snmp':
@ -144,9 +146,13 @@ switch ($tab) {
case 'massive_plugins':
$options = $options_plugins;
break;
default:
// Default.
break;
}
// Set the default option of the category
// Set the default option of the category.
if ($option == '') {
$option = array_shift(array_keys($options));
}
@ -243,9 +249,9 @@ ui_print_page_header(
'massivemodal'
);
// Checks if the PHP configuration is correctly
// Checks if the PHP configuration is correctly.
if ((get_cfg_var('max_execution_time') != 0)
or (get_cfg_var('max_input_time') != -1)
|| (get_cfg_var('max_input_time') != -1)
) {
echo '<div id="notify_conf" class="notify">';
echo __('In order to perform massive operations, PHP needs a correct configuration in timeout parameters. Please, open your PHP configuration file (php.ini) for example: <i>sudo vi /etc/php5/apache2/php.ini;</i><br> And set your timeout parameters to a correct value: <br><i> max_execution_time = 0</i> and <i>max_input_time = -1</i>');
@ -257,7 +263,7 @@ if ($tab == 'massive_policies' && is_central_policies_on_node()) {
return;
}
// Catch all submit operations in this view to display Wait banner
// Catch all submit operations in this view to display Wait banner.
$submit_action = get_parameter('go');
$submit_update = get_parameter('updbutton');
$submit_del = get_parameter('del');

View File

@ -13,7 +13,7 @@
* GNU General Public License for more details.
*/
// Load global vars
// Load global vars.
global $config;
check_login();
@ -35,8 +35,14 @@ echo '<form action="index.php?sec=gsetup&sec2=godmode/setup/gis_step_2" method="
switch ($action) {
case 'create_connection_map':
// Header
ui_print_page_header(__('Create new map connection'), '', false, 'gis_setup_map_connection', true);
// Header.
ui_print_page_header(
__('Create new map connection'),
'',
false,
'',
true
);
$mapConnection_name = '';
$mapConnection_group = '';
@ -55,8 +61,14 @@ switch ($action) {
break;
case 'edit_connection_map':
// Header
ui_print_page_header(__('Edit map connection'), '', false, 'gis_setup_map_connection', true);
// Header.
ui_print_page_header(
__('Edit map connection'),
'',
false,
'',
true
);
$idConnectionMap = get_parameter('id_connection_map');
$mapConnection = db_get_row_sql('SELECT * FROM tgis_map_connection WHERE id_tmap_connection = '.$idConnectionMap);
@ -142,9 +154,13 @@ switch ($action) {
'layers' => $layers,
];
break;
default:
// Default.
break;
}
// TODO VALIDATE PARAMETERS
// TODO VALIDATE PARAMETERS.
if ($mapConnection_name != '' && $mapConnection_type != '') {
gis_save_map_connection(
$mapConnection_name,
@ -170,6 +186,9 @@ switch ($action) {
return;
break;
default:
// Default.
break;
}
$table->width = '90%';
@ -188,7 +207,7 @@ $table->data[2][1] = html_print_input_text('num_levels_zoom', $mapConnection_num
$table->data[3][0] = __('Default zoom level').ui_print_help_tip(__('Zoom level used when the map is opened'), true).':';
$table->data[3][1] = html_print_input_text('initial_zoom', $mapConnection_defaultZoom, '', 4, 10, true);
echo '<h4>'.__('Basic configuration').'</h4>';
echo '<h4>'.__('Basic configuration').' '.ui_print_help_icon('gis_basic_configurations_tab', true).'</h4>';
html_print_table($table);
$table->width = '60%';
@ -200,7 +219,7 @@ $types['WMS'] = __('WMS Server');
$table->data[0][0] = __('Type').':';
$table->data[0][1] = html_print_select($types, 'sel_type', $mapConnection_type, 'selMapConnectionType();', __('Please select the connection type'), 0, true);
echo '<h4>'.__('Map connection type').'</h4>';
echo '<h4>'.__('Map connection type').' '.ui_print_help_icon('gis_map_connection_tab', true).'</h4>';
html_print_table($table);
$optionsConnectionTypeTable = '';
@ -239,22 +258,26 @@ if ($mapConnectionData != null) {
$mapConnectionDataUrl = $mapConnectionData['url'];
$layers = $mapConnectionData['layers'];
break;
default:
// Default.
break;
}
}
// Open Street Map Connection
// Open Street Map Connection.
$optionsConnectionOSMTable = '<table class="databox" border="0" cellpadding="4" cellspacing="4" width="50%">'.'<tr class="row_0">'.'<td>'.htmlentities(__('Tile Server URL'), ENT_QUOTES, 'UTF-8').':</td>'.'<td><input id="type" type="hidden" name="type" value="OSM" />'.html_print_input_text('url', $mapConnectionDataUrl, '', 45, 90, true).'</td>'.'</tr>'.'</table>';
// Google Maps Connection
// Google Maps Connection.
$gmaps_types['G_PHYSICAL_MAP'] = __('Google Physical');
$gmaps_types['G_HYBRID_MAP'] = __('Google Hybrid');
$gmaps_types['G_SATELITE_MAP'] = __('Google Satelite');
// TODO: Use label tags for the forms.
$optionsConnectionGmapTable = '<table class="databox" border="0" cellpadding="4" cellspacing="4" width="90%">'.'<tr class="row_0">'.'<td>'.__('Google Map Type').':</td>'.'<td><input id="type" type="hidden" name="type" value="Gmap" />'.trim(html_print_select($gmaps_types, 'gmap_type', $gmap_type, '', '', 0, true)).'</td>'.'</tr>'.'<tr class="row_2">'.'<td>'.__('Google Maps Key').':</td>'.'</tr>'.'<tr class="row_3">'.'<td colspan="2">'.html_print_input_text('gmap_key', $gmap_key, '', 90, 128, true).'</td>'.'</tr>'.'</table>';
// Image Map Connection
// Image Map Connection.
$optionsConnectionImageTable = '<table class="databox" border="0" cellpadding="4" cellspacing="4" width="50%">'.'<tr class="row_0">'.'<td>'.__('Image URL').':</td>'.'<td colspan="3"><input id="type" type="hidden" name="type" value="Static_Image" />'.html_print_input_text('url', $mapConnectionDataUrl, '', 45, 90, true).'</td>'.'</tr>'.'<tr class="row_1">'.'<td colspan="4"><strong>'.__('Corners of the area of the image').':</strong></td>'.'</tr>'.'<tr class="row_2">'.'<td>'.__('Left').':</td>'.'<td>'.html_print_input_text('bb_left', $bb_left, '', 25, 25, true).'</td>'.'<td>'.__('Bottom').':</td>'.'<td>'.html_print_input_text('bb_bottom', $bb_bottom, '', 25, 25, true).'</td>'.'</tr>'.'<tr class="row_3">'.'<td>'.__('Right').':</td>'.'<td>'.html_print_input_text('bb_right', $bb_right, '', 25, 25, true).'</td>'.'<td>'.__('Top').':</td>'.'<td>'.html_print_input_text('bb_top', $bb_top, '', 25, 25, true).'</td>'.'</tr>'.'<tr class="row_4">'.'<td colspan="4"><strong>'.__('Image Size').':</strong></td>'.'</tr>'.'<tr class="row_5">'.'<td>'.__('Width').':</td>'.'<td>'.html_print_input_text('image_width', $image_width, '', 25, 25, true).'</td>'.'<td>'.__('Height').':</td>'.'<td>'.html_print_input_text('image_height', $image_height, '', 25, 25, true).'</td>'.'</tr>'.'</table>';
// WMS Server Connection
// WMS Server Connection.
$optionsConnectionWMSTable = '<table class="databox" border="0" cellpadding="4" cellspacing="4" width="50%">'.'<tr class="row_0">'.'<td>'.__('WMS Server URL').'</td>'.'<td>'.'<input id="type" type="hidden" name="type" value="WMS" />'.html_print_input_text('url', $mapConnectionDataUrl, '', 90, 255, true).'</td>'.'</tr>'.'<tr class="row_1">'.'<td>'.__('Layers').ui_print_help_tip(__('Enter a single element or a comma separated list'), true).'</td>'.'<td>'.html_print_input_text('layers', $layers, '', 90, 255, true).'</td>'.'</tr>'.'</table>';
if ($mapConnectionData != null) {
@ -274,6 +297,10 @@ if ($mapConnectionData != null) {
case 'WMS':
$optionsConnectionTypeTable = $optionsConnectionWMSTable;
break;
default:
// Default.
break;
}
}

View File

@ -4288,10 +4288,6 @@ function get_help_info($section_name)
break;
case 'gis_setup_map_connection':
break;
case 'gis_tab':
if ($es) {
$result .= 'Pandora_GIS&printable=yes#Configuraci.C3.B3n_del_Agent_GIS';
@ -5391,6 +5387,22 @@ function get_help_info($section_name)
}
break;
case 'massive_modules_tab':
if ($es) {
$result .= 'Operaciones_Masivas&printable=yes#Edici.C3.B3n_masiva_de_m.C3.B3dulos';
} else {
$result .= 'Massive_Operations&printable=yes#Modules_massive_edition';
}
break;
case 'massive_policies_tab':
if ($es) {
$result .= 'Operaciones_Masivas&printable=yes#Editar_m.C3.B3dulos_de_pol.C3.ADticas_masivamente';
} else {
$result .= 'Massive_Operations&printable=yes#Edit_policy_modules_massively';
}
break;
case 'alert_templates_tab':
if ($es) {
$result .= 'Alertas&printable=yes#Introducci.C3.B3n_4';
@ -5495,6 +5507,22 @@ function get_help_info($section_name)
}
break;
case 'gis_basic_configurations_tab':
if ($es) {
$result .= 'Pandora_GIS&printable=yes#Configuraci.C3.B3n_B.C3.A1sica';
} else {
$result .= 'GIS&printable=yes#Basic_Configuration';
}
break;
case 'gis_map_connection_tab':
if ($es) {
$result .= 'Pandora_GIS&printable=yes#Mapas_Open_Street';
} else {
$result .= 'GIS&printable=yes#Open_Street_Maps';
}
break;
case 'web_checks':
break;