2013-07-30 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/lib/functions.ajax.php, godmode/agentes/configurar_agente.php, include/functions_html.php, include/functions_networkmap.php: cleaned source code and removed the debug traces. * godmode/agentes/module_manager_editor_prediction.php, include/constants.php: fixed the repeat operator and added some constants for to make more easy the code. Fixes: #2279 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8597 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
c7e78e0190
commit
c06108fb2f
|
@ -1,3 +1,14 @@
|
|||
2013-07-30 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* extensions/update_manager/lib/functions.ajax.php,
|
||||
godmode/agentes/configurar_agente.php
|
||||
|
||||
|
||||
godmode/agentes/module_manager_editor_prediction.php
|
||||
include/functions_html.php
|
||||
include/constants.php
|
||||
include/functions_networkmap.php
|
||||
|
||||
2013-07-30 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* mobile/operation/networkmap.php, godmode/users/user_list.php,
|
||||
|
|
|
@ -402,7 +402,7 @@ function update_pandora_install_package() {
|
|||
// bsdtar use stderr for verbose output
|
||||
if ($tar_type === 'BSD')
|
||||
$command .= ' 2>&1';
|
||||
|
||||
|
||||
print_debug_message_trace($command);
|
||||
//html_debug_print($command, true);
|
||||
|
||||
|
|
|
@ -984,7 +984,8 @@ if ($update_module) {
|
|||
}
|
||||
else {
|
||||
if ($prediction_module == 3) {
|
||||
enterprise_hook('modules_create_synthetic_operations', array($id_agent_module, $serialize_ops));
|
||||
enterprise_hook('modules_create_synthetic_operations',
|
||||
array($id_agent_module, $serialize_ops));
|
||||
}
|
||||
|
||||
// Update the module interval
|
||||
|
|
|
@ -38,16 +38,26 @@ if ($row !== false && is_array($row)) {
|
|||
// Services are an Enterprise feature.
|
||||
$custom_integer_1 = $row['custom_integer_1'];
|
||||
|
||||
switch($prediction_module) {
|
||||
case 2:
|
||||
switch ($prediction_module) {
|
||||
case MODULE_PREDICTION_SERVICE:
|
||||
$is_service = true;
|
||||
$custom_integer_2 = 0;
|
||||
break;
|
||||
case 3:
|
||||
$ops_json = enterprise_hook('modules_get_synthetic_operations', array($id_agente_modulo));
|
||||
case MODULE_PREDICTION_SYNTHETIC:
|
||||
$ops_json = enterprise_hook('modules_get_synthetic_operations',
|
||||
array($id_agente_modulo));
|
||||
|
||||
|
||||
$ops = json_decode($ops_json, true);
|
||||
|
||||
$first_op = explode('_', reset(array_keys($ops)));
|
||||
|
||||
|
||||
//Erase the key of array serialize as <num>**
|
||||
$chunks = explode('**', reset(array_keys($ops)));
|
||||
|
||||
$first_op = explode('_', $chunks[1]);
|
||||
|
||||
|
||||
|
||||
if (isset($first_op[1]) && $first_op[1] == 'avg') {
|
||||
$is_synthetic_avg = true;
|
||||
|
@ -59,7 +69,7 @@ if ($row !== false && is_array($row)) {
|
|||
$custom_integer_1 = 0;
|
||||
$custom_integer_2 = 0;
|
||||
break;
|
||||
case 4:
|
||||
case MODULE_PREDICTION_NETFLOW:
|
||||
$is_netflow = true;
|
||||
$custom_integer_2 = 0;
|
||||
break;
|
||||
|
@ -189,9 +199,10 @@ if ($netflow_module_form !== ENTERPRISE_NOT_HOOK) {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Removed common useless parameter */
|
||||
unset ($table_advanced->data[3]);
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
|
|
|
@ -253,6 +253,11 @@ define ('MODULE_PREDICTION', 5);
|
|||
define ('MODULE_WMI', 6);
|
||||
define ('MODULE_WEB', 7);
|
||||
|
||||
/* Type of Modules of Prediction */
|
||||
define ('MODULE_PREDICTION_SERVICE', 2);
|
||||
define ('MODULE_PREDICTION_SYNTHETIC', 3);
|
||||
define ('MODULE_PREDICTION_NETFLOW', 4);
|
||||
|
||||
/* SNMP CONSTANTS */
|
||||
define ('SNMP_DIR_MIBS', "attachment/mibs");
|
||||
|
||||
|
|
|
@ -1632,7 +1632,7 @@ function html_print_image ($src, $return = false, $options = false, $return_src
|
|||
|
||||
if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) {
|
||||
$skin_path = enterprise_hook('skins_get_image_path',array($src));
|
||||
//html_debug_print($skin_path);
|
||||
|
||||
if ($skin_path)
|
||||
$src = $skin_path;
|
||||
}
|
||||
|
@ -1671,16 +1671,16 @@ function html_print_image ($src, $return = false, $options = false, $return_src
|
|||
if (!empty ($options)) {
|
||||
//Deprecated or value-less attributes
|
||||
if (isset ($options["align"])) {
|
||||
$style .= 'align:'.$options["align"].';'; //Align is deprecated, use styles.
|
||||
$style .= 'align:' . $options["align"] . ';'; //Align is deprecated, use styles.
|
||||
}
|
||||
|
||||
if (isset ($options["border"])) {
|
||||
$style .= 'border:'.$options["border"].'px;'; //Border is deprecated, use styles
|
||||
$style .= 'border:' . $options["border"] . 'px;'; //Border is deprecated, use styles
|
||||
}
|
||||
|
||||
if (isset ($options["hspace"])) {
|
||||
$style .= 'margin-left:'.$options["hspace"].'px;'; //hspace is deprecated, use styles
|
||||
$style .= 'margin-right:'.$options["hspace"].'px;';
|
||||
$style .= 'margin-left:' . $options["hspace"] . 'px;'; //hspace is deprecated, use styles
|
||||
$style .= 'margin-right:' . $options["hspace"] . 'px;';
|
||||
}
|
||||
|
||||
if (isset ($options["ismap"])) {
|
||||
|
@ -1688,8 +1688,8 @@ function html_print_image ($src, $return = false, $options = false, $return_src
|
|||
}
|
||||
|
||||
if (isset ($options["vspace"])) {
|
||||
$style .= 'margin-top:'.$options["vspace"].'px;'; //hspace is deprecated, use styles
|
||||
$style .= 'margin-bottom:'.$options["vspace"].'px;';
|
||||
$style .= 'margin-top:' . $options["vspace"] . 'px;'; //hspace is deprecated, use styles
|
||||
$style .= 'margin-bottom:' . $options["vspace"] . 'px;';
|
||||
}
|
||||
|
||||
if (isset ($options["style"])) {
|
||||
|
@ -1709,10 +1709,11 @@ function html_print_image ($src, $return = false, $options = false, $return_src
|
|||
$options['id'] = uniqid();
|
||||
}
|
||||
|
||||
$params = array('id' => 'forced_title_' . $options['id'],
|
||||
'class' => 'forced_title_layer',
|
||||
'content' => $options["title"],
|
||||
'hidden' => true);
|
||||
$params = array(
|
||||
'id' => 'forced_title_' . $options['id'],
|
||||
'class' => 'forced_title_layer',
|
||||
'content' => $options["title"],
|
||||
'hidden' => true);
|
||||
$output = html_print_div($params, true) . $output;
|
||||
}
|
||||
|
||||
|
@ -1724,7 +1725,8 @@ function html_print_image ($src, $return = false, $options = false, $return_src
|
|||
|
||||
foreach ($attrs as $attribute) {
|
||||
if (isset ($options[$attribute])) {
|
||||
$output .= $attribute.'="'.io_safe_input_html ($options[$attribute]).'" ';
|
||||
$output .= $attribute . '="' .
|
||||
io_safe_input_html ($options[$attribute]) . '" ';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -113,7 +113,7 @@ function networkmap_generate_hash($pandora_name, $group = 0,
|
|||
$graph = networkmap_generate_dot($pandora_name, $group,
|
||||
$simple, $font_size, $layout, $nooverlap, $zoom, $ranksep,
|
||||
$center, $regen, $pure, $id_networkmap, $show_snmp_modules,
|
||||
$cut_names, $relative, $text_filter); html_debug_print($graph, true);
|
||||
$cut_names, $relative, $text_filter);
|
||||
|
||||
$return = array();
|
||||
if (!empty($graph)) {
|
||||
|
@ -223,9 +223,6 @@ function networkmap_generate_hash($pandora_name, $group = 0,
|
|||
$data['target'] = (int) $points[1];
|
||||
$return['lines'][] = $data;
|
||||
}
|
||||
|
||||
//html_debug_print($graph, true);
|
||||
|
||||
}
|
||||
|
||||
return $return;
|
||||
|
@ -668,7 +665,7 @@ function networkmap_create_group_node ($group, $simple = 0, $font_size = 10, $me
|
|||
// Set node icon
|
||||
if ($hack_networkmap_mobile) {
|
||||
$img_node = $config['homedir'] . "/images/groups_small/" . $icon . ".png";
|
||||
html_debug_print($img_node, true);
|
||||
|
||||
if (!file_exists($img_node)) {
|
||||
$img_node = '-';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue