2009-03-24 Esteban Sanchez <estebans@artica.es>
* general/pandora_help.php: Added support for enterprise help files. * include/javascript/pandora.js: Renamed pandora_help() to open_help(). * include/functions_ui.php: Renamed event function on print_help_icon(). Removed deprecated pandora_help(). * godmode/agentes/module_manager.php: Added enterprise hooks. * godmode/agentes/module_manager_editor.php: Added categories construction here. Added enterprise hooks. * godmode/agentes/module_manager_editor_common.php: Replaced deprecated pandora_help() with print_help_icon(). Moved categories construction to module_manager_editor. * include/config_process.php: Updated build version. * include/styles/pandora.css: Fixed textarea height. * godmode/agentes/manage_config_remote.php, godmode/agentes/massive_config.php, godmode/agentes/massive_edit_modules.php, godmode/agentes/module_manager_editor_network.php, godmode/agentes/module_manager_editor_plugin.php, godmode/agentes/module_manager_editor_prediction.php, godmode/agentes/module_manager_editor_wmi.php, godmode/agentes/planned_downtime.php, godmode/alerts/alert_list.php, godmode/alerts/configure_alert_compound.php, godmode/modules/manage_network_components_form_network.php, godmode/modules/manage_network_components_form_wmi.php, godmode/reporting/map_builder.php, godmode/servers/manage_export_form.php, godmode/servers/manage_recontask_form.php, godmode/servers/plugin.php, godmode/setup/setup.php, operation/agentes/alerts_status.php, operation/agentes/tactical.php, godmode/agentes/agent_manager.php: Replaced deprecated pandora_help() with print_help_icon(). git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1557 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
2257df6d99
commit
409083efb7
|
@ -1,3 +1,45 @@
|
|||
2009-03-24 Esteban Sanchez <estebans@artica.es>
|
||||
|
||||
* general/pandora_help.php: Added support for enterprise help files.
|
||||
|
||||
* include/javascript/pandora.js: Renamed pandora_help() to
|
||||
open_help().
|
||||
|
||||
* include/functions_ui.php: Renamed event function on
|
||||
print_help_icon(). Removed deprecated pandora_help().
|
||||
|
||||
* godmode/agentes/module_manager.php: Added enterprise hooks.
|
||||
|
||||
* godmode/agentes/module_manager_editor.php: Added categories
|
||||
construction here. Added enterprise hooks.
|
||||
|
||||
* godmode/agentes/module_manager_editor_common.php: Replaced
|
||||
deprecated pandora_help() with print_help_icon(). Moved categories
|
||||
construction to module_manager_editor.
|
||||
|
||||
* include/config_process.php: Updated build version.
|
||||
|
||||
* include/styles/pandora.css: Fixed textarea height.
|
||||
|
||||
* godmode/agentes/manage_config_remote.php,
|
||||
godmode/agentes/massive_config.php,
|
||||
godmode/agentes/massive_edit_modules.php,
|
||||
godmode/agentes/module_manager_editor_network.php,
|
||||
godmode/agentes/module_manager_editor_plugin.php,
|
||||
godmode/agentes/module_manager_editor_prediction.php,
|
||||
godmode/agentes/module_manager_editor_wmi.php,
|
||||
godmode/agentes/planned_downtime.php, godmode/alerts/alert_list.php,
|
||||
godmode/alerts/configure_alert_compound.php,
|
||||
godmode/modules/manage_network_components_form_network.php,
|
||||
godmode/modules/manage_network_components_form_wmi.php,
|
||||
godmode/reporting/map_builder.php,
|
||||
godmode/servers/manage_export_form.php,
|
||||
godmode/servers/manage_recontask_form.php, godmode/servers/plugin.php,
|
||||
godmode/setup/setup.php, operation/agentes/alerts_status.php,
|
||||
operation/agentes/tactical.php,
|
||||
godmode/agentes/agent_manager.php: Replaced deprecated pandora_help()
|
||||
with print_help_icon().
|
||||
|
||||
2009-03-24 Esteban Sanchez <estebans@artica.es>
|
||||
|
||||
* godmode/alerts/configure_alert_compound.php: Fixed clean up div for
|
||||
|
|
|
@ -24,11 +24,18 @@ echo '<link rel="stylesheet" href="../include/styles/'.$config['style'].'.css" t
|
|||
echo '<body>';
|
||||
|
||||
$id = get_parameter ('id');
|
||||
$help_file = $config["homedir"]."/include/help/".$config["language"]."/help_".$id.".php";
|
||||
|
||||
// Default to english
|
||||
if (! file_exists ($help_file)) {
|
||||
$help_file = $config["homedir"]."/include/help/en/help_".$id.".php";
|
||||
/* Possible file locations */
|
||||
$files = array ($config["homedir"]."/include/help/".$config["language"]."/help_".$id.".php",
|
||||
$config["homedir"].ENTERPRISE_DIR."/include/help/".$config["language"]."/help_".$id.".php",
|
||||
$config["homedir"].ENTERPRISE_DIR."/include/help/en/help_".$id.".php",
|
||||
$config["homedir"]."/include/help/en/help_".$id.".php");
|
||||
$help_file = '';
|
||||
foreach ($files as $file) {
|
||||
if (file_exists ($file)) {
|
||||
$help_file = $file;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (! $id || ! file_exists ($help_file)) {
|
||||
|
|
|
@ -138,7 +138,7 @@ $table->data[12][0] = '<b>'.__('Description').'</b>';
|
|||
$table->data[12][1] = print_input_text ('comentarios', $comentarios, '', 45, 255, true);
|
||||
|
||||
// Learn mode / Normal mode
|
||||
$table->data[13][0] = '<b>'.__('Module definition').'</b>'.pandora_help("module_definition", true);
|
||||
$table->data[13][0] = '<b>'.__('Module definition').'</b>'.print_help_icon("module_definition", true);
|
||||
$table->data[13][1] = __('Learning mode').' '.print_radio_button_extended ("modo", 1, '', $modo, false, '', 'style="margin-right: 40px;"', true);
|
||||
$table->data[13][1] .= __('Normal mode').' '.print_radio_button_extended ("modo", 0, '', $modo, false, '', 'style="margin-right: 40px;"', true);
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ if ((isset($_GET["operacion"])) AND ($update_agent == -1) AND ($update_group ==
|
|||
|
||||
// Source agent
|
||||
echo '<b>'. __('Source agent').'</b>';
|
||||
pandora_help ('duplicateconfig');
|
||||
print_help_icon ('duplicateconfig');
|
||||
echo '<br><br>';
|
||||
|
||||
// Show combo with SOURCE agents
|
||||
|
|
|
@ -73,7 +73,7 @@ echo '<form id="manage_config_form" method="post">';
|
|||
|
||||
echo '<fieldset id="fieldset_source">';
|
||||
echo '<legend><span>'.__('Source');
|
||||
pandora_help ('manageconfig');
|
||||
print_help_icon ('manageconfig');
|
||||
echo '</span></legend>';
|
||||
print_table ($table);
|
||||
echo '</fieldset>';
|
||||
|
|
|
@ -140,7 +140,7 @@ $table->data['edit1'][3] .= '<br /><em>'.__('Max.').'</em>';
|
|||
$table->data['edit1'][3] .= print_input_text ('max_critical', '', '', 5, 15, true);
|
||||
|
||||
/* FF stands for Flip-flop */
|
||||
$table->data['edit2'][0] = __('FF threshold').' '.pandora_help ('ff_threshold', true);
|
||||
$table->data['edit2'][0] = __('FF threshold').' '.print_help_icon ('ff_threshold', true);
|
||||
$table->data['edit2'][1] = print_input_text ('ff_event', '', '', 5, 15, true);
|
||||
$table->data['edit2'][2] = __('Historical data');
|
||||
$table->data['edit2'][3] = print_checkbox ("history_data", 1, '', true);
|
||||
|
|
|
@ -22,12 +22,11 @@ if (!isset ($id_agente)) {
|
|||
die ("Not Authorized");
|
||||
}
|
||||
|
||||
enterprise_include ('godmode/agentes/module_manager.php');
|
||||
|
||||
echo "<h2>".__('Agent configuration')." > ".__('Modules')."</h2>";
|
||||
|
||||
// ==========================
|
||||
// Create module/type combo
|
||||
// ==========================
|
||||
|
||||
echo '<table width="300" cellpadding="4" cellspacing="4" class="databox">';
|
||||
echo '<form name="modulo" method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=module&id_agente='.$id_agente.'">';
|
||||
echo "<tr><td class='datos'>";
|
||||
|
@ -47,17 +46,18 @@ if ($develop_bypass) {
|
|||
$prediction_available = 1;
|
||||
}
|
||||
|
||||
$servers = array ();
|
||||
$servers['dataserver'] = __('Create a new data server module');
|
||||
$modules = array ();
|
||||
$modules['dataserver'] = __('Create a new data server module');
|
||||
if ($network_available)
|
||||
$servers['networkserver'] = __('Create a new network server module');
|
||||
$modules['networkserver'] = __('Create a new network server module');
|
||||
if ($plugin_available)
|
||||
$servers['pluginserver'] = __('Create a new plugin Server module');
|
||||
$modules['pluginserver'] = __('Create a new plugin Server module');
|
||||
if ($wmi_available)
|
||||
$servers['wmiserver'] = __('Create a new WMI Server module');
|
||||
$modules['wmiserver'] = __('Create a new WMI Server module');
|
||||
if ($prediction_available)
|
||||
$servers['predictionserver'] = __('Create a new prediction Server module');
|
||||
print_select ($servers, 'moduletype', '', '', '', '', false, false, false);
|
||||
$modules['predictionserver'] = __('Create a new prediction Server module');
|
||||
enterprise_hook ('set_enterprise_module_types', array (&$modules));
|
||||
print_select ($modules, 'moduletype', '', '', '', '', false, false, false);
|
||||
print_input_hidden ('edit_module', 1);
|
||||
echo '</td>';
|
||||
echo '<td class="datos">';
|
||||
|
|
|
@ -157,40 +157,51 @@ switch ($moduletype) {
|
|||
case "dataserver":
|
||||
$moduletype = 1;
|
||||
case 1:
|
||||
/* Categories is an array containing the allowed module types
|
||||
(generic_data, generic_string, etc) from ttipo_modulo (field categoria) */
|
||||
$categories = array (0, 1, 2, 6, 7, 8, 9, -1);
|
||||
require ('module_manager_editor_common.php');
|
||||
require ('module_manager_editor_data.php');
|
||||
break;
|
||||
case "networkserver":
|
||||
$moduletype = 2;
|
||||
case 2:
|
||||
$categories = array (3, 4, 5);
|
||||
require ('module_manager_editor_common.php');
|
||||
require ('module_manager_editor_network.php');
|
||||
break;
|
||||
case "pluginserver":
|
||||
$moduletype = 4;
|
||||
case 4:
|
||||
$categories = array (0, 1, 2, 9);
|
||||
require ('module_manager_editor_common.php');
|
||||
require ('module_manager_editor_plugin.php');
|
||||
break;
|
||||
case "predictionserver":
|
||||
$moduletype = 5;
|
||||
case 5:
|
||||
$categories = array (1, 2);
|
||||
require ('module_manager_editor_common.php');
|
||||
require ('module_manager_editor_prediction.php');
|
||||
break;
|
||||
case "wmiserver":
|
||||
$moduletype = 6;
|
||||
case 6:
|
||||
$categories = array (0, 1, 2);
|
||||
require ('module_manager_editor_common.php');
|
||||
require ('module_manager_editor_wmi.php');
|
||||
break;
|
||||
/* WARNING: type 7 is reserved on enterprise */
|
||||
default:
|
||||
echo '<h3 class="error">DEBUG: Invalid module type specified in '.__FILE__.':'.__LINE__.'</h3>';
|
||||
echo 'Most likely you have recently upgraded from an earlier version of Pandora and either <br />
|
||||
1) forgot to use the database converter<br />
|
||||
2) used a bad version of the database converter (see Bugreport #2124706 for the solution)<br />
|
||||
3) found a new bug - please report a way to duplicate this error';
|
||||
return; //We return control to the invoking script so the page finishes rendering
|
||||
if (enterprise_include ('godmode/agentes/module_manager_editor.php') === ENTERPRISE_NOT_HOOK) {
|
||||
echo '<h3 class="error">DEBUG: Invalid module type specified in '.__FILE__.':'.__LINE__.'</h3>';
|
||||
echo 'Most likely you have recently upgraded from an earlier version of Pandora and either <br />
|
||||
1) forgot to use the database converter<br />
|
||||
2) used a bad version of the database converter (see Bugreport #2124706 for the solution)<br />
|
||||
3) found a new bug - please report a way to duplicate this error';
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
echo '<h3>'.__('Module assignment');
|
||||
|
|
|
@ -69,7 +69,7 @@ function add_component_selection ($id_network_component_type) {
|
|||
|
||||
$data = array ();
|
||||
$data[0] = __('Using module component').' ';
|
||||
$data[0] .= pandora_help ('network_component', true);
|
||||
$data[0] .= print_help_icon ('network_component', true);
|
||||
|
||||
$component_groups = get_network_component_groups ($id_network_component_type);
|
||||
$data[1] = '<span id="component_group" class="left">';
|
||||
|
@ -105,41 +105,18 @@ $table_simple->class = 'databox_color';
|
|||
$table_simple->data = array ();
|
||||
$table_simple->colspan = array ();
|
||||
$table_simple->style = array ();
|
||||
$table_simple->style[0] = 'font-weight: bold';
|
||||
$table_simple->style[2] = 'font-weight: bold';
|
||||
$table_simple->style[0] = 'font-weight: bold; vertical-align: top';
|
||||
$table_simple->style[2] = 'font-weight: bold; vertical-align: top';
|
||||
|
||||
$table_simple->data[0][0] = __('Name');
|
||||
$table_simple->data[0][1] = print_input_text ('name', $name, '', 20, 100, true);
|
||||
$table_simple->data[0][2] = __('Disabled');
|
||||
$table_simple->data[0][3] = print_checkbox ("disabled", 1, $disabled, true);
|
||||
|
||||
$table_simple->data[1][0] = __('Type').' '.pandora_help ('module_type', true);
|
||||
$table_simple->data[1][0] = __('Type').' '.print_help_icon ('module_type', true);
|
||||
if ($id_agent_module) {
|
||||
$table_simple->data[1][1] = '<em>'.get_moduletype_description ($id_module_type).'</em>';
|
||||
} else {
|
||||
switch ($moduletype) {
|
||||
case 1:
|
||||
case "dataserver":
|
||||
$categories = array (0, 1, 2, 6, 7, 8, 9, -1);
|
||||
break;
|
||||
case 2:
|
||||
case "networkserver":
|
||||
$categories = array (3, 4, 5);
|
||||
break;
|
||||
case 4:
|
||||
case "pluginserver":
|
||||
$categories = array (0, 1, 2, 9);
|
||||
break;
|
||||
case 5:
|
||||
case "predictionserver":
|
||||
$categories = array (1, 2);
|
||||
break;
|
||||
case 6:
|
||||
case "wmiserver":
|
||||
$categories = array (0, 1, 2);
|
||||
break;
|
||||
}
|
||||
|
||||
$sql = sprintf ('SELECT id_tipo, descripcion
|
||||
FROM ttipo_modulo
|
||||
WHERE categoria IN (%s)
|
||||
|
@ -170,7 +147,7 @@ $table_simple->data[2][3] .= print_input_text ('max_critical', $max_critical,
|
|||
'', 5, 15, true);
|
||||
|
||||
/* FF stands for Flip-flop */
|
||||
$table_simple->data[3][0] = __('FF threshold').' '.pandora_help ('ff_threshold', true);
|
||||
$table_simple->data[3][0] = __('FF threshold').' '.print_help_icon ('ff_threshold', true);
|
||||
$table_simple->data[3][1] = print_input_text ('ff_event', $ff_event,
|
||||
'', 5, 15, true);
|
||||
$table_simple->data[3][2] = __('Historical data');
|
||||
|
@ -182,8 +159,8 @@ $table_advanced->width = '90%';
|
|||
$table_advanced->class = 'databox_color';
|
||||
$table_advanced->data = array ();
|
||||
$table_advanced->style = array ();
|
||||
$table_advanced->style[0] = 'font-weight: bold';
|
||||
$table_advanced->style[2] = 'font-weight: bold';
|
||||
$table_advanced->style[0] = 'font-weight: bold; vertical-align: top';
|
||||
$table_advanced->style[2] = 'font-weight: bold; vertical-align: top';
|
||||
$table_advanced->colspan = array ();
|
||||
|
||||
$table_advanced->data[0][0] = __('Description');
|
||||
|
@ -199,7 +176,7 @@ $table_advanced->data[2][0] = __('Interval');
|
|||
$table_advanced->data[2][1] = print_input_text ('module_interval', $interval,
|
||||
'', 5, 10, true);
|
||||
|
||||
$table_advanced->data[2][2] = __('Post process').' '.pandora_help ('postprocess', true);
|
||||
$table_advanced->data[2][2] = __('Post process').' '.print_help_icon ('postprocess', true);
|
||||
$table_advanced->data[2][3] = print_input_text ('post_process',
|
||||
$post_process, '', 5, 5, true);
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ $data[1] .= '<img src="images/spinner.gif" />';
|
|||
$data[1] .= '</span>';
|
||||
$data[1] .= print_button (__('SNMP walk'), 'snmp_walk', $ip_target == '', '',
|
||||
'class="sub next"', true);
|
||||
$data[1] .= pandora_help ('snmpwalk', true);
|
||||
$data[1] .= print_help_icon ('snmpwalk', true);
|
||||
$data[1] .= '</span>';
|
||||
$table_simple->colspan['snmp_2'][1] = 3;
|
||||
|
||||
|
@ -83,7 +83,7 @@ push_table_simple ($data, 'snmp_2');
|
|||
|
||||
/* Advanced stuff */
|
||||
$data = array ();
|
||||
$data[0] = __('TCP send').' '.pandora_help ("tcp_send", true);
|
||||
$data[0] = __('TCP send').' '.print_help_icon ("tcp_send", true);
|
||||
$data[1] = print_textarea ('tcp_send', 2, 65,
|
||||
$tcp_send, '', true);
|
||||
$table_advanced->colspan['tcp_send'][1] = 3;
|
||||
|
|
|
@ -51,7 +51,7 @@ push_table_simple ($data, 'plugin_2');
|
|||
|
||||
$data = array ();
|
||||
$data[0] = __('Plugin parameters');
|
||||
$data[0] .= pandora_help ('plugin_parameters', true);
|
||||
$data[0] .= print_help_icon ('plugin_parameters', true);
|
||||
$data[1] = print_input_text ('plugin_parameter', $plugin_parameter, '', 30, 60, true);
|
||||
$table_simple->colspan['plugin_3'][1] = 3;
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ $extra_title = __('Prediction server module');
|
|||
|
||||
$data = array ();
|
||||
$data[0] = __('Source module');
|
||||
$data[0] .= pandora_help ('prediction_source_module', true);
|
||||
$data[0] .= print_help_icon ('prediction_source_module', true);
|
||||
$agents = get_group_agents (array_keys (get_user_groups ($config["id_user"], "AW")));
|
||||
$fields = array ();
|
||||
foreach ($agents as $agent_id => $agent_name) {
|
||||
|
|
|
@ -36,7 +36,7 @@ $data = array ();
|
|||
$data[0] = __('Target IP');
|
||||
$data[1] = print_input_text ('ip_target', $ip_target, '', 15, 60, true);
|
||||
$data[2] = _('Namespace');
|
||||
$data[2] .= pandora_help ('wminamespace', true);
|
||||
$data[2] .= print_help_icon ('wminamespace', true);
|
||||
$data[3] = print_input_text ('tcp_send', $tcp_send, '', 5, 20, true);
|
||||
|
||||
push_table_simple ($data, 'target_ip');
|
||||
|
@ -51,7 +51,7 @@ push_table_simple ($data, 'user_pass');
|
|||
|
||||
$data = array ();
|
||||
$data[0] = __('WMI Query');
|
||||
$data[0] .= pandora_help ('wmiquery', true);
|
||||
$data[0] .= print_help_icon ('wmiquery', true);
|
||||
$data[1] = print_input_text ('snmp_oid', $snmp_oid, '', 35, 255, true);
|
||||
$table_simple->colspan['wmi_query'][1] = 3;
|
||||
|
||||
|
@ -59,10 +59,10 @@ push_table_simple ($data, 'wmi_query');
|
|||
|
||||
$data = array ();
|
||||
$data[0] = __('Key string');
|
||||
$data[0] .= pandora_help ('wmikey', true);
|
||||
$data[0] .= print_help_icon ('wmikey', true);
|
||||
$data[1] = print_input_text ('snmp_community', $snmp_community, '', 20, 60, true);
|
||||
$data[2] = __('Field number');
|
||||
$data[2] .= pandora_help ('wmifield', true);
|
||||
$data[2] .= print_help_icon ('wmifield', true);
|
||||
$data[3] = print_input_text ('tcp_port', $tcp_port, '', 5, 15, true);
|
||||
|
||||
push_table_simple ($data, 'key_field');
|
||||
|
|
|
@ -160,10 +160,9 @@ if ($create_downtime || $update_downtime) {
|
|||
}
|
||||
|
||||
//Editor form
|
||||
echo '<h3>'.__('Planned Downtime Form').' <img class="img_help" src="images/help.png" onClick="pandora_help(\'planned_downtime\')" alt="help" /></h3>';
|
||||
echo '<h3>'.__('Planned Downtime Form').' '.print_help_icon ('planned_downtime', true).'</h3>';
|
||||
print_table ($table);
|
||||
|
||||
|
||||
|
||||
print_input_hidden ('id_agent', $id_agent);
|
||||
echo '<div class="action-buttons" style="width: 90%">';
|
||||
if ($id_downtime) {
|
||||
|
|
|
@ -394,7 +394,7 @@ print_input_text ('fires_min', -1, '', 4, 10);
|
|||
echo ' '.__('to').' ';
|
||||
print_input_text ('fires_max', -1, '', 4, 10);
|
||||
echo ' '.__('matches of the alert');
|
||||
echo pandora_help ("alert-matches", true);
|
||||
echo print_help_icon ("alert-matches", true);
|
||||
echo '</span>';
|
||||
echo '<div class="right">';
|
||||
print_submit_button (__('Add'), 'add_action', false, 'class="sub next"');
|
||||
|
|
|
@ -361,7 +361,7 @@ if ($step == 2) {
|
|||
$table->data[4][1] .= ' '.__('to').' ';
|
||||
$table->data[4][1] .= print_input_text ('fires_max', 0, '', 4, 10, true);
|
||||
$table->data[4][1] .= ' '.__('matches of the alert');
|
||||
$table->data[4][1] .= pandora_help("alert-matches", true);
|
||||
$table->data[4][1] .= print_help_icon("alert-matches", true);
|
||||
$table->data[4][1] .= '</span>';
|
||||
*/
|
||||
$table->data['actions'][0] = __('Assigned actions');
|
||||
|
|
|
@ -241,7 +241,7 @@ echo '<input type="text" name="module_interval" size="5" value="'.$module_interv
|
|||
<td class="datos2">
|
||||
<input type="text" name="tcp_port" size="5" value="<?php echo $tcp_port ?>">
|
||||
</td></tr>
|
||||
<tr><td class="datos"><?php echo __('SNMP OID') ?><?php pandora_help("snmpoid"); ?></td>
|
||||
<tr><td class="datos"><?php echo __('SNMP OID') ?><?php print_help_icon("snmpoid"); ?></td>
|
||||
<td class="datos">
|
||||
<input type="text" name="snmp_oid" size="25" value="<?php echo $snmp_oid ?>">
|
||||
</td>
|
||||
|
|
|
@ -142,7 +142,7 @@ echo '</td></tr>';
|
|||
|
||||
// WMI Query
|
||||
echo '<tr><td class="datos">' . __('WMI Query') ;
|
||||
pandora_help("wmiquery");
|
||||
print_help_icon("wmiquery");
|
||||
echo '</td>';
|
||||
echo '<td class="datos">';
|
||||
echo '<input type="text" name="snmp_oid" size="25" value="' . $snmp_oid . '">';
|
||||
|
@ -150,7 +150,7 @@ echo '</td>';
|
|||
|
||||
// Key string
|
||||
echo '<td class="datos">' . __('Key string');
|
||||
pandora_help("wmikey");
|
||||
print_help_icon("wmikey");
|
||||
echo '</td>';
|
||||
echo '<td class="datos">';
|
||||
echo '<input type="text" name="snmp_community" size="25" value="' . $snmp_community . '">';
|
||||
|
@ -158,7 +158,7 @@ echo '</td></tr>';
|
|||
|
||||
// Field
|
||||
echo '<td class="datos2">' . __('Field number');
|
||||
pandora_help("wmifield");
|
||||
print_help_icon("wmifield");
|
||||
echo '</td>';
|
||||
echo '<td class="datos2">';
|
||||
echo '<input type="text" name="tcp_port" size="5" value="' . $tcp_port . '">';
|
||||
|
@ -166,7 +166,7 @@ echo '</td>';
|
|||
|
||||
// Namespace
|
||||
echo '<td class="datos2">' . __('Namespace');
|
||||
pandora_help("wminamespace");
|
||||
print_help_icon("wminamespace");
|
||||
echo '</td>';
|
||||
echo '<td class="datos2">';
|
||||
echo '<input type="text" name="tcp_send" size="25" value="' . $tcp_send . '">';
|
||||
|
|
|
@ -252,7 +252,7 @@ if ($id_layout) {
|
|||
}
|
||||
|
||||
echo "<h2>".__('Reporting')." > ".__('Map builder');
|
||||
pandora_help ("map_builder");
|
||||
print_help_icon ("map_builder");
|
||||
echo "</h2>";
|
||||
|
||||
if (! $edit_layout && ! $id_layout) {
|
||||
|
|
|
@ -59,7 +59,7 @@ else {
|
|||
}
|
||||
|
||||
echo '<h2>'.__('Pandora servers').' > '.__('export targets');
|
||||
//pandora_help ("exportserver");
|
||||
//print_help_icon ("exportserver");
|
||||
echo '</h2>';
|
||||
|
||||
$table->width=700;
|
||||
|
|
|
@ -54,7 +54,7 @@ if (isset ($_GET["update"])) { // Edit mode
|
|||
}
|
||||
|
||||
echo '<h2>'.__('Pandora servers').' > '.__('Manage recontask');
|
||||
pandora_help ("recontask");
|
||||
print_help_icon ("recontask");
|
||||
echo '</h2>';
|
||||
|
||||
$table->width=700;
|
||||
|
|
|
@ -139,7 +139,7 @@ if (($create != "") OR ($view != "")){
|
|||
echo __('Plugin update');
|
||||
$plugin_id = get_parameter ("view","");
|
||||
}
|
||||
pandora_help("plugin_definition");
|
||||
print_help_icon("plugin_definition");
|
||||
echo "</h2>";
|
||||
|
||||
if ($create == "")
|
||||
|
|
|
@ -50,7 +50,7 @@ $table->data[0][0] = __('Language code for Pandora');
|
|||
$table->data[0][1] = print_select_from_sql ('SELECT id_language, name FROM tlanguage',
|
||||
'language', $config["language"], '', '', '', true);
|
||||
|
||||
$table->data[1][0] = __('Date format string') . pandora_help("date_format", true);
|
||||
$table->data[1][0] = __('Date format string') . print_help_icon("date_format", true);
|
||||
$table->data[1][1] = '<em>'.__('Example').'</em> '.date ($config["date_format"]);
|
||||
$table->data[1][1] .= print_input_text ('date_format', $config["date_format"], '', 30, 100, true);
|
||||
|
||||
|
@ -93,13 +93,13 @@ $table->data[14][1] = print_input_text ('block_size', $config["block_size"], '',
|
|||
$table->data[15][0] = __('Default hours for event view');
|
||||
$table->data[15][1] = print_input_text ('event_view_hr', $config["event_view_hr"], '', 5, 5, true);
|
||||
|
||||
$table->data[16][0] = __('Timestamp or time comparation') . pandora_help ("time_stamp-comparation", true);
|
||||
$table->data[16][0] = __('Timestamp or time comparation') . print_help_icon ("time_stamp-comparation", true);
|
||||
$table->data[16][1] = __('Comparation in rollover').' ';
|
||||
$table->data[16][1] .= print_radio_button ('prominent_time', "timestamp", '', $config["prominent_time"], true);
|
||||
$table->data[16][1] .= '<br />'.__('Timestamp in rollover').' ';
|
||||
$table->data[16][1] .= print_radio_button ('prominent_time', "comparation", '', $config["prominent_time"], true);
|
||||
|
||||
$table->data[17][0] = __('Time source') . pandora_help ("timesource", true);
|
||||
$table->data[17][0] = __('Time source') . print_help_icon ("timesource", true);
|
||||
$sources["system"] = __('System');
|
||||
$sources["sql"] = __('Database');
|
||||
$table->data[17][1] = print_select ($sources, 'timesource', $config["timesource"], '', '', '', true);
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
//Pandora Version
|
||||
$build_version = 'PC090312';
|
||||
$build_version = 'PC090324';
|
||||
$pandora_version = 'v3.0-dev';
|
||||
|
||||
$config['start_time'] = microtime (true);
|
||||
|
|
|
@ -397,13 +397,6 @@ function print_alert_template_example ($id_alert_template, $return = false, $pri
|
|||
echo $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use print_help_icon to avoid confusion with pandora_help javascript function
|
||||
*/
|
||||
function pandora_help ($help_id, $return = false) {
|
||||
return print_help_icon ($help_id, $return);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints a help tip icon.
|
||||
*
|
||||
|
@ -413,7 +406,10 @@ function pandora_help ($help_id, $return = false) {
|
|||
* @return string The help tip
|
||||
*/
|
||||
function print_help_icon ($help_id, $return = false) {
|
||||
$output = ' '.print_image ("images/help.png", true, array ("class" => "img_help", "title" => __('Help'), "onclick" => "pandora_help ('".$help_id."')"));
|
||||
$output = ' '.print_image ("images/help.png", true,
|
||||
array ("class" => "img_help",
|
||||
"title" => __('Help'),
|
||||
"onclick" => "open_help ('".$help_id."')"));
|
||||
if (!$return)
|
||||
echo $output;
|
||||
|
||||
|
@ -927,13 +923,19 @@ function debug ($var, $backtrace = true) {
|
|||
* @return string An HTML string with the icon. Printed if return is false
|
||||
*/
|
||||
function print_moduletype_icon ($id_moduletype, $return = false) {
|
||||
global $config;
|
||||
|
||||
$type = get_db_row ("ttipo_modulo", "id_tipo", (int) $id_moduletype, array ("nombre", "icon"));
|
||||
if ($type === false) {
|
||||
$type = array ();
|
||||
$type["nombre"] = __('Unknown Type');
|
||||
$type["icon"] = 'b_down.png';
|
||||
}
|
||||
return print_image ("images/".$type["icon"], $return, array ("border" => 0, "title" => $type["nombre"]));
|
||||
$imagepath = 'images/'.$type["icon"];
|
||||
if (! file_exists ($config['homedir'].'/'.$imagepath))
|
||||
$imagepath = ENTERPRISE_DIR.'/'.$imagepath;
|
||||
|
||||
return print_image ($imagepath, $return, array ("border" => 0, "title" => $type["nombre"]));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -15,7 +15,7 @@ function winopeng (url, wid) {
|
|||
status =wid;
|
||||
}
|
||||
|
||||
function pandora_help (help_id) {
|
||||
function open_help (help_id) {
|
||||
open ("general/pandora_help.php?id="+help_id, "pandorahelp", "width=650,height=500,status=0,toolbar=0,menubar=0,scrollbars=1,location=0");
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ input, textarea {
|
|||
}
|
||||
textarea {
|
||||
padding: 5px;
|
||||
height: 100px;
|
||||
min-height: 100px;
|
||||
width: 100%;
|
||||
}
|
||||
textarea.conf_editor {
|
||||
|
|
|
@ -132,7 +132,7 @@ $table->head[1] = ''; //Placeholder for name
|
|||
$table->head[2] = __('Template');
|
||||
$table->head[3] = __('Last fired');
|
||||
$table->head[4] = __('Status');
|
||||
$table->head[5] = __('Validate').pandora_help ('alert_validation', true);
|
||||
$table->head[5] = __('Validate').print_help_icon ('alert_validation', true);
|
||||
$table->title = __('Single alerts');
|
||||
|
||||
if ($print_agent == 0) {
|
||||
|
|
|
@ -169,7 +169,7 @@ if ($serverinfo) {
|
|||
<th style="font-weight:none;">'.__('Name').'</th>
|
||||
<th style="font-weight:none;">'.__('Status').'</th>
|
||||
<th style="font-weight:none;">'.__('Load').'</th>
|
||||
<th style="font-weight:none;">'.__('Lag').pandora_help ("serverlag", true).'</th>
|
||||
<th style="font-weight:none;">'.__('Lag').print_help_icon ("serverlag", true).'</th>
|
||||
</tr></thead><tbody>';
|
||||
|
||||
foreach ($serverinfo as $server_id => $server_info) {
|
||||
|
|
Loading…
Reference in New Issue