mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
2012-12-12 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_visual_map_editor.php: increased the size of agent autocomplete widget. * include/functions_visual_map.php: in the function "visual_map_print_visual_map" changed for to print corretly the urls in public view in metaconsole. * include/ajax/agent.php: restore the search for any string in the autocomplete agent. * operation/reporting/reporting_xml.php, operation/search_results.php, operation/visual_console/public_console.php, godmode/setup/setup_auth.php, godmode/servers/modificar_server.php: cleaned source code style. * godmode/reporting/visual_console_builder.editor.js: fixed when finish a resize action or put the grid, before these actions was make a corrupt data of items. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7269 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
e0bd5f334f
commit
3d8c0cd2a8
@ -1,3 +1,25 @@
|
|||||||
|
2012-12-12 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
|
* include/functions_visual_map_editor.php: increased the size of
|
||||||
|
agent autocomplete widget.
|
||||||
|
|
||||||
|
* include/functions_visual_map.php: in the function
|
||||||
|
"visual_map_print_visual_map" changed for to print corretly the
|
||||||
|
urls in public view in metaconsole.
|
||||||
|
|
||||||
|
* include/ajax/agent.php: restore the search for any string in
|
||||||
|
the autocomplete agent.
|
||||||
|
|
||||||
|
* operation/reporting/reporting_xml.php,
|
||||||
|
operation/search_results.php,
|
||||||
|
operation/visual_console/public_console.php,
|
||||||
|
godmode/setup/setup_auth.php, godmode/servers/modificar_server.php:
|
||||||
|
cleaned source code style.
|
||||||
|
|
||||||
|
* godmode/reporting/visual_console_builder.editor.js: fixed when
|
||||||
|
finish a resize action or put the grid, before these actions
|
||||||
|
was make a corrupt data of items.
|
||||||
|
|
||||||
2012-12-12 Ramon Novoa <rnovoa@artica.es>
|
2012-12-12 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
* pandoradb_data.sql,
|
* pandoradb_data.sql,
|
||||||
|
@ -1199,7 +1199,8 @@ function updateDB_visual(type, idElement , values, event, top, left) {
|
|||||||
case 'module_graph':
|
case 'module_graph':
|
||||||
$("#image_" + idElement).attr("src", getModuleGraph(idElement));
|
$("#image_" + idElement).attr("src", getModuleGraph(idElement));
|
||||||
case 'static_graph':
|
case 'static_graph':
|
||||||
if (event != 'dragstop') {
|
if ((event != 'resizestop') && (event != 'show_grid')
|
||||||
|
&& (event != 'dragstop')) {
|
||||||
var element_status= null;
|
var element_status= null;
|
||||||
var parameter = Array();
|
var parameter = Array();
|
||||||
parameter.push ({name: "page", value: "include/ajax/visual_console_builder.ajax"});
|
parameter.push ({name: "page", value: "include/ajax/visual_console_builder.ajax"});
|
||||||
@ -1336,6 +1337,7 @@ function updateDB(type, idElement , values, event) {
|
|||||||
//Check if the event parameter in function is passed in the call.
|
//Check if the event parameter in function is passed in the call.
|
||||||
if (event != null) {
|
if (event != null) {
|
||||||
switch (event) {
|
switch (event) {
|
||||||
|
case 'show_grid':
|
||||||
case 'resizestop':
|
case 'resizestop':
|
||||||
//Force to move action when resize a background, for to avoid
|
//Force to move action when resize a background, for to avoid
|
||||||
//lost the label.
|
//lost the label.
|
||||||
@ -1626,7 +1628,7 @@ function eventsBackground() {
|
|||||||
values['width'] = $('#background').css('width').replace('px', '');
|
values['width'] = $('#background').css('width').replace('px', '');
|
||||||
values['height'] = $('#background').css('height').replace('px', '');
|
values['height'] = $('#background').css('height').replace('px', '');
|
||||||
|
|
||||||
updateDB('background', 0, values);
|
updateDB('background', 0, values, 'resizestop');
|
||||||
|
|
||||||
width = ui.size['width'];
|
width = ui.size['width'];
|
||||||
height = ui.size['height'];
|
height = ui.size['height'];
|
||||||
@ -1687,7 +1689,7 @@ function move_elements_resize(original_width, original_height, width, height) {
|
|||||||
values['absolute_left'] = new_width;
|
values['absolute_left'] = new_width;
|
||||||
values['absolute_top'] = new_height;
|
values['absolute_top'] = new_height;
|
||||||
|
|
||||||
updateDB(classItem, idItem, values);
|
updateDB(classItem, idItem, values, "resizestop");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1928,7 +1930,7 @@ function showGrid() {
|
|||||||
values['absolute_left'] = pos_x;
|
values['absolute_left'] = pos_x;
|
||||||
values['absolute_top'] = pos_y;
|
values['absolute_top'] = pos_y;
|
||||||
|
|
||||||
updateDB(classItem, idItem, values);
|
updateDB(classItem, idItem, values, 'show_grid');
|
||||||
});
|
});
|
||||||
|
|
||||||
eventsItems([SIZE_GRID, SIZE_GRID]);
|
eventsItems([SIZE_GRID, SIZE_GRID]);
|
||||||
|
@ -196,5 +196,4 @@ else {
|
|||||||
echo '<td><span class="prediction">'.__('Prediction server').'</span></td>';
|
echo '<td><span class="prediction">'.__('Prediction server').'</span></td>';
|
||||||
echo "</tr></table>";
|
echo "</tr></table>";
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
@ -241,10 +241,10 @@ elseif ($search_agents_2 && ($config['metaconsole'] == 1) && defined('METACONSOL
|
|||||||
switch ($config["dbtype"]) {
|
switch ($config["dbtype"]) {
|
||||||
case "mysql":
|
case "mysql":
|
||||||
case "postgresql":
|
case "postgresql":
|
||||||
$filter[] = '(nombre COLLATE utf8_general_ci LIKE "'.$string.'%" OR direccion LIKE "'.$string.'%")';
|
$filter[] = '(nombre COLLATE utf8_general_ci LIKE "%'.$string.'%" OR direccion LIKE "%'.$string.'%")';
|
||||||
break;
|
break;
|
||||||
case "oracle":
|
case "oracle":
|
||||||
$filter[] = '(UPPER(nombre) LIKE UPPER(\''.$string.'%\') OR UPPER(direccion) LIKE UPPER(\''.$string.'%\'))';
|
$filter[] = '(UPPER(nombre) LIKE UPPER(\'%'.$string.'%\') OR UPPER(direccion) LIKE UPPER(\'%'.$string.'%\'))';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -868,6 +868,8 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
|||||||
$metaconsole_hack = '../../';
|
$metaconsole_hack = '../../';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enterprise_include_once("meta/include/functions_ui_meta.php");
|
||||||
|
|
||||||
$layout = db_get_row ('tlayout', 'id', $id_layout);
|
$layout = db_get_row ('tlayout', 'id', $id_layout);
|
||||||
|
|
||||||
$resizedMap = false;
|
$resizedMap = false;
|
||||||
@ -1037,7 +1039,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
|||||||
$id_service . '&offset=0">';
|
$id_service . '&offset=0">';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!defined('METACONSOLE')) {
|
if (empty($layout_data['id_metaconsole'])) {
|
||||||
$url = $config['homeurl'] . 'index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=' . $layout_data['id_agent'];
|
$url = $config['homeurl'] . 'index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=' . $layout_data['id_agent'];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -1052,7 +1054,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
|||||||
}
|
}
|
||||||
elseif ($layout_data['id_layout_linked'] > 0) {
|
elseif ($layout_data['id_layout_linked'] > 0) {
|
||||||
// Link to a map
|
// Link to a map
|
||||||
if (!defined('METACONSOLE')) {
|
if (empty($layout_data['id_metaconsole'])) {
|
||||||
echo '<a href="index.php?sec=reporting&sec2=operation/visual_console/render_view&pure='.$config["pure"].'&id='.$layout_data["id_layout_linked"].'">';
|
echo '<a href="index.php?sec=reporting&sec2=operation/visual_console/render_view&pure='.$config["pure"].'&id='.$layout_data["id_layout_linked"].'">';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -1170,7 +1172,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
|||||||
if ($show_links) {
|
if ($show_links) {
|
||||||
if ($layout_data['id_layout_linked'] > 0) {
|
if ($layout_data['id_layout_linked'] > 0) {
|
||||||
// Link to a map
|
// Link to a map
|
||||||
if (!defined('METACONSOLE')) {
|
if (empty($layout_data['id_metaconsole'])) {
|
||||||
echo '<a href="index.php?sec=reporting&sec2=operation/visual_console/render_view&pure='.$config["pure"].'&id='.$layout_data["id_layout_linked"].'">';
|
echo '<a href="index.php?sec=reporting&sec2=operation/visual_console/render_view&pure='.$config["pure"].'&id='.$layout_data["id_layout_linked"].'">';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -1282,7 +1284,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
|||||||
}
|
}
|
||||||
elseif ($layout_data['id_layout_linked'] > 0) {
|
elseif ($layout_data['id_layout_linked'] > 0) {
|
||||||
// Link to a map
|
// Link to a map
|
||||||
if (!defined('METACONSOLE')) {
|
if (empty($layout_data['id_metaconsole'])) {
|
||||||
echo '<a href="index.php?sec=reporting&sec2=operation/visual_console/render_view&pure='.$config["pure"].'&id='.$layout_data["id_layout_linked"].'">';
|
echo '<a href="index.php?sec=reporting&sec2=operation/visual_console/render_view&pure='.$config["pure"].'&id='.$layout_data["id_layout_linked"].'">';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -1499,7 +1501,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Link to an agent
|
// Link to an agent
|
||||||
if (!defined('METACONSOLE')) {
|
if (empty($layout_data['id_metaconsole'])) {
|
||||||
$url = $config['homeurl'] .
|
$url = $config['homeurl'] .
|
||||||
'index.php?' .
|
'index.php?' .
|
||||||
'sec=estado&' .
|
'sec=estado&' .
|
||||||
@ -1518,7 +1520,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
|||||||
elseif ($layout_data['id_layout_linked'] > 0) {
|
elseif ($layout_data['id_layout_linked'] > 0) {
|
||||||
|
|
||||||
// Link to a map
|
// Link to a map
|
||||||
if (!defined('METACONSOLE')) {
|
if (empty($layout_data['id_metaconsole'])) {
|
||||||
echo '<a href="index.php?sec=reporting&sec2=operation/visual_console/render_view&pure='.$config["pure"].'&id='.$layout_data["id_layout_linked"].'">';
|
echo '<a href="index.php?sec=reporting&sec2=operation/visual_console/render_view&pure='.$config["pure"].'&id='.$layout_data["id_layout_linked"].'">';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -1604,7 +1606,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
|||||||
$id_service . '&offset=0">';
|
$id_service . '&offset=0">';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!defined('METACONSOLE')) {
|
if (empty($layout_data['id_metaconsole'])) {
|
||||||
$url = $config['homeurl'] .
|
$url = $config['homeurl'] .
|
||||||
'index.php?' .
|
'index.php?' .
|
||||||
'sec=estado&'.
|
'sec=estado&'.
|
||||||
@ -1621,7 +1623,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Link to a map
|
// Link to a map
|
||||||
if (!defined('METACONSOLE')) {
|
if (empty($layout_data['id_metaconsole'])) {
|
||||||
echo '<a href="index.php?sec=reporting&sec2=operation/visual_console/render_view&pure='.$config["pure"].'&id='.$layout_data["id_layout_linked"].'">';
|
echo '<a href="index.php?sec=reporting&sec2=operation/visual_console/render_view&pure='.$config["pure"].'&id='.$layout_data["id_layout_linked"].'">';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -46,7 +46,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
|
|||||||
echo '<div id="properties_panel" style="display: none; position: absolute; border: 2px solid #114105; padding: 5px; background: white; z-index: 90;">';
|
echo '<div id="properties_panel" style="display: none; position: absolute; border: 2px solid #114105; padding: 5px; background: white; z-index: 90;">';
|
||||||
//----------------------------Hiden Form----------------------------
|
//----------------------------Hiden Form----------------------------
|
||||||
?>
|
?>
|
||||||
<table class="databox" border="0" cellpadding="4" cellspacing="4" width="300">
|
<table class="databox" border="0" cellpadding="4" cellspacing="4" width="350">
|
||||||
<caption>
|
<caption>
|
||||||
<?php
|
<?php
|
||||||
$titles = array(
|
$titles = array(
|
||||||
@ -110,7 +110,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
|
|||||||
$params['return'] = true;
|
$params['return'] = true;
|
||||||
$params['show_helptip'] = true;
|
$params['show_helptip'] = true;
|
||||||
$params['input_name'] = 'agent';
|
$params['input_name'] = 'agent';
|
||||||
$params['size'] = 20;
|
$params['size'] = 30;
|
||||||
$params['selectbox_id'] = 'module';
|
$params['selectbox_id'] = 'module';
|
||||||
$params['javascript_is_function_select'] = true;
|
$params['javascript_is_function_select'] = true;
|
||||||
if (defined('METACONSOLE')) {
|
if (defined('METACONSOLE')) {
|
||||||
|
@ -219,8 +219,10 @@ foreach ($contents as $content) {
|
|||||||
$content['type'] != 'netflow_data' &&
|
$content['type'] != 'netflow_data' &&
|
||||||
$content['type'] != 'netflow_statistics' &&
|
$content['type'] != 'netflow_statistics' &&
|
||||||
$content['type'] != 'netflow_summary') {
|
$content['type'] != 'netflow_summary') {
|
||||||
|
|
||||||
$remote_connection = 1;
|
$remote_connection = 1;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$remote_connection = 0;
|
$remote_connection = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -253,7 +255,9 @@ foreach ($contents as $content) {
|
|||||||
$limit = 1000;
|
$limit = 1000;
|
||||||
$offset = 0;
|
$offset = 0;
|
||||||
|
|
||||||
$sql_count = "SELECT COUNT(id_agente_modulo) FROM tagente_datos WHERE id_agente_modulo=".$content['id_agent_module']."
|
$sql_count = "SELECT COUNT(id_agente_modulo)
|
||||||
|
FROM tagente_datos
|
||||||
|
WHERE id_agente_modulo=".$content['id_agent_module']."
|
||||||
AND (utimestamp>=$date_init AND utimestamp<=$date_end)";
|
AND (utimestamp>=$date_init AND utimestamp<=$date_end)";
|
||||||
$data_count = db_get_value_sql($sql_count);
|
$data_count = db_get_value_sql($sql_count);
|
||||||
|
|
||||||
@ -261,12 +265,15 @@ foreach ($contents as $content) {
|
|||||||
$content_report = " <simple_graph/>\n";
|
$content_report = " <simple_graph/>\n";
|
||||||
$result = fwrite($file, $content_report);
|
$result = fwrite($file, $content_report);
|
||||||
fclose($file);
|
fclose($file);
|
||||||
} else if ($data_count <= $limit) {
|
}
|
||||||
|
else if ($data_count <= $limit) {
|
||||||
$content_report = " <simple_graph>\n";
|
$content_report = " <simple_graph>\n";
|
||||||
$result = fwrite($file, $content_report);
|
$result = fwrite($file, $content_report);
|
||||||
fclose($file);
|
fclose($file);
|
||||||
|
|
||||||
$sql = "SELECT * FROM tagente_datos WHERE id_agente_modulo=".$content['id_agent_module']."
|
$sql = "SELECT *
|
||||||
|
FROM tagente_datos
|
||||||
|
WHERE id_agente_modulo=".$content['id_agent_module']."
|
||||||
AND (utimestamp>=$date_init AND utimestamp<=$date_end)";
|
AND (utimestamp>=$date_init AND utimestamp<=$date_end)";
|
||||||
|
|
||||||
$data_module = db_get_all_rows_sql($sql);
|
$data_module = db_get_all_rows_sql($sql);
|
||||||
@ -275,9 +282,8 @@ foreach ($contents as $content) {
|
|||||||
$file = fopen ($temp_file, 'a+');
|
$file = fopen ($temp_file, 'a+');
|
||||||
$content_report = " </simple_graph>\n";
|
$content_report = " </simple_graph>\n";
|
||||||
$result = fwrite($file, $content_report);
|
$result = fwrite($file, $content_report);
|
||||||
|
}
|
||||||
|
else {
|
||||||
} else {
|
|
||||||
$content_report = " <simple_graph>\n";
|
$content_report = " <simple_graph>\n";
|
||||||
$result = fwrite($file, $content_report);
|
$result = fwrite($file, $content_report);
|
||||||
fclose($file);
|
fclose($file);
|
||||||
@ -285,7 +291,9 @@ foreach ($contents as $content) {
|
|||||||
$position = 0;
|
$position = 0;
|
||||||
while ($offset < $data_count) {
|
while ($offset < $data_count) {
|
||||||
|
|
||||||
$sql = "SELECT * FROM tagente_datos WHERE id_agente_modulo=".$content['id_agent_module']."
|
$sql = "SELECT *
|
||||||
|
FROM tagente_datos
|
||||||
|
WHERE id_agente_modulo=".$content['id_agent_module']."
|
||||||
AND (utimestamp>=$date_init AND utimestamp<=$date_end) LIMIT $offset,$limit";
|
AND (utimestamp>=$date_init AND utimestamp<=$date_end) LIMIT $offset,$limit";
|
||||||
$data_module = db_get_all_rows_sql($sql);
|
$data_module = db_get_all_rows_sql($sql);
|
||||||
|
|
||||||
@ -298,7 +306,6 @@ foreach ($contents as $content) {
|
|||||||
$result = fwrite($file, $content_report);
|
$result = fwrite($file, $content_report);
|
||||||
fclose($file);
|
fclose($file);
|
||||||
}
|
}
|
||||||
///
|
|
||||||
break;
|
break;
|
||||||
case 'simple_baseline_graph':
|
case 'simple_baseline_graph':
|
||||||
|
|
||||||
@ -309,7 +316,7 @@ foreach ($contents as $content) {
|
|||||||
|
|
||||||
$date_end = time();
|
$date_end = time();
|
||||||
$date_init = $date_end - $content['period'];
|
$date_init = $date_end - $content['period'];
|
||||||
///
|
|
||||||
$temp_file = $config['attachment_store'] . '/simple_baseline_graph_' . $time.'_'.$content['id_rc'] . '.tmp';
|
$temp_file = $config['attachment_store'] . '/simple_baseline_graph_' . $time.'_'.$content['id_rc'] . '.tmp';
|
||||||
|
|
||||||
$file = fopen ($temp_file, 'a+');
|
$file = fopen ($temp_file, 'a+');
|
||||||
@ -319,19 +326,24 @@ foreach ($contents as $content) {
|
|||||||
$limit = 1000;
|
$limit = 1000;
|
||||||
$offset = 0;
|
$offset = 0;
|
||||||
|
|
||||||
$sql_count = "SELECT COUNT(id_agente_modulo) FROM tagente_datos WHERE id_agente_modulo=".$content['id_agent_module']."
|
$sql_count = "SELECT COUNT(id_agente_modulo)
|
||||||
|
FROM tagente_datos
|
||||||
|
WHERE id_agente_modulo=".$content['id_agent_module']."
|
||||||
AND (utimestamp>=$date_init AND utimestamp<=$date_end)";
|
AND (utimestamp>=$date_init AND utimestamp<=$date_end)";
|
||||||
$data_count = db_get_value_sql($sql_count);
|
$data_count = db_get_value_sql($sql_count);
|
||||||
|
|
||||||
if ($data_count == false) {
|
if ($data_count == false) {
|
||||||
$content_report = " <simple_baseline_graph/>\n";
|
$content_report = " <simple_baseline_graph/>\n";
|
||||||
$result = fwrite($file, $content_report);
|
$result = fwrite($file, $content_report);
|
||||||
} else if ($data_count <= $limit) {
|
}
|
||||||
|
else if ($data_count <= $limit) {
|
||||||
$content_report = " <simple_baseline_graph>\n";
|
$content_report = " <simple_baseline_graph>\n";
|
||||||
$result = fwrite($file, $content_report);
|
$result = fwrite($file, $content_report);
|
||||||
fclose($file);
|
fclose($file);
|
||||||
|
|
||||||
$sql = "SELECT * FROM tagente_datos WHERE id_agente_modulo=".$content['id_agent_module']."
|
$sql = "SELECT *
|
||||||
|
FROM tagente_datos
|
||||||
|
WHERE id_agente_modulo=".$content['id_agent_module']."
|
||||||
AND (utimestamp>=$date_init AND utimestamp<=$date_end)";
|
AND (utimestamp>=$date_init AND utimestamp<=$date_end)";
|
||||||
|
|
||||||
$data_module = db_get_all_rows_sql($sql);
|
$data_module = db_get_all_rows_sql($sql);
|
||||||
@ -342,7 +354,8 @@ foreach ($contents as $content) {
|
|||||||
$result = fwrite($file, $content_report);
|
$result = fwrite($file, $content_report);
|
||||||
fclose($file);
|
fclose($file);
|
||||||
|
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$content_report = " <simple_baseline_graph>\n";
|
$content_report = " <simple_baseline_graph>\n";
|
||||||
$result = fwrite($file, $content_report);
|
$result = fwrite($file, $content_report);
|
||||||
fclose($file);
|
fclose($file);
|
||||||
|
@ -46,7 +46,7 @@ $config["id_user"] = get_parameter ('id_user');
|
|||||||
$myhash = md5($config["dbpass"].$id_layout. $config["id_user"]);
|
$myhash = md5($config["dbpass"].$id_layout. $config["id_user"]);
|
||||||
|
|
||||||
// Check input hash
|
// Check input hash
|
||||||
if ( $myhash != $hash){
|
if ( $myhash != $hash) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user