From 53b11ffafe6975247074865d78996d6f4a673866 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Thu, 15 Oct 2015 11:09:32 +0200 Subject: [PATCH 1/2] Fixed sql migrate --- .../extras/pandoradb_migrate_5.1_to_6.0.mysql.sql | 7 +------ .../extras/pandoradb_migrate_5.1_to_6.0.oracle.sql | 6 +----- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/pandora_console/extras/pandoradb_migrate_5.1_to_6.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_5.1_to_6.0.mysql.sql index d9e70068ea..81063f19fa 100644 --- a/pandora_console/extras/pandoradb_migrate_5.1_to_6.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_5.1_to_6.0.mysql.sql @@ -64,7 +64,7 @@ UPDATE `talert_commands` SET `fields_descriptions` = '[\"Destination addres -- --------------------------------------------------------------------- INSERT INTO `tconfig` (`token`, `value`) VALUES ('post_process_custom_values', '{"0.00000038580247":"Seconds to months","0.00000165343915":"Seconds to weeks","0.00001157407407":"Seconds to days","0.01666666666667":"Seconds to minutes","0.00000000093132":"Bytes to Gigabytes","0.00000095367432":"Bytes to Megabytes","0.0009765625":"Bytes to Kilobytes","0.00000001653439":"Timeticks to weeks","0.00000011574074":"Timeticks to days"}'); UPDATE `tconfig` SET value = 'v6.0dev' WHERE token = 'db_scheme_version'; - +UPDATE `tconfig` SET value = 'https://artica.es/pandoraupdate6/server.php' WHERE token = 'url_update_manager'; -- --------------------------------------------------------------------- -- Table `tnetwork_map` @@ -188,8 +188,3 @@ ALTER TABLE tgraph_source ADD COLUMN `label` varchar(150) DEFAULT ''; -- --------------------------------------------------------------------- ALTER TABLE tevent_filter ADD COLUMN `id_agent_module` int(25) DEFAULT 0; ALTER TABLE tevent_filter ADD COLUMN `id_agent` int(25) DEFAULT 0; - - -- --------------------------------------------------------------------- ---- Table `tconfig` ---- --------------------------------------------------------------------- -UPDATE tconfig SET `value`='https://artica.es/pandoraupdate6/server.php' WHERE token='url_update_manager'; \ No newline at end of file diff --git a/pandora_console/extras/pandoradb_migrate_5.1_to_6.0.oracle.sql b/pandora_console/extras/pandoradb_migrate_5.1_to_6.0.oracle.sql index ef1cf350d0..28e6b52ed9 100755 --- a/pandora_console/extras/pandoradb_migrate_5.1_to_6.0.oracle.sql +++ b/pandora_console/extras/pandoradb_migrate_5.1_to_6.0.oracle.sql @@ -64,6 +64,7 @@ UPDATE talert_commands SET fields_descriptions = '["Destination address","S -- --------------------------------------------------------------------- INSERT INTO tconfig (token, value) VALUES ('post_process_custom_values', '{"0.00000038580247":"Seconds to months","0.00000165343915":"Seconds to weeks","0.00001157407407":"Seconds to days","0.01666666666667":"Seconds to minutes","0.00000000093132":"Bytes to Gigabytes","0.00000095367432":"Bytes to Megabytes","0.0009765625":"Bytes to Kilobytes","0.00000001653439":"Timeticks to weeks","0.00000011574074":"Timeticks to days"}'); UPDATE tconfig SET value = 'v6.0dev' WHERE token = 'db_scheme_version'; +UPDATE tconfig SET value = 'https://artica.es/pandoraupdate6/server.php' WHERE token='url_update_manager'; -- --------------------------------------------------------------------- -- Table `tnetwork_map` @@ -129,8 +130,3 @@ ALTER TABLE tevent_filter ADD COLUMN id_agent int(25) DEFAULT 0; -- Table `tgraph_source` -- --------------------------------------------------------------------- ALTER TABLE tgraph_source ADD COLUMN label VARCHAR2(150) DEFAULT ''; - - -- --------------------------------------------------------------------- ---- Table `tconfig` ---- --------------------------------------------------------------------- -UPDATE tconfig SET value = 'https://artica.es/pandoraupdate6/server.php' WHERE token='url_update_manager'; \ No newline at end of file From 8bb6cf069dd9a6406d08b34f548c33bb76a542da Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Thu, 15 Oct 2015 11:28:44 +0200 Subject: [PATCH 2/2] Fixed text and delete text from export data csv. Tiquet: #2868 --- pandora_console/include/functions_graph.php | 8 ++++---- pandora_console/include/graphs/export_data.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index 959de71c60..0518087ac2 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -725,12 +725,12 @@ function grafico_modulo_sparse_data ($agent_module_id, $period, $show_events, } if (!$avg_only) { - $legend['max'.$series_suffix] = __('Max').$series_suffix_str.': '.__('Last').': '.rtrim(number_format($graph_stats['max']['last'], 2), '.0').' '.$unit.' ; '.__('Avg').': '.rtrim(number_format($graph_stats['max']['avg'], 2), '.0').' '.$unit.' ; '.__('Max').': '.rtrim(number_format($graph_stats['max']['max'], 2), '.0').' '.$unit.' ; '.__('Min').': '.rtrim(number_format($graph_stats['max']['min'], 2), '.0').' '.$unit.'--> Seleccionado'; - $legend['sum'.$series_suffix] = __('Avg').$series_suffix_str.': '.__('Last').': '.rtrim(number_format($graph_stats['sum']['last'], 2), '.0').' '.$unit.' ; '.__('Avg').': '.rtrim(number_format($graph_stats['sum']['avg'], 2), '.0').' '.$unit.' ; '.__('Max').': '.rtrim(number_format($graph_stats['sum']['max'], 2), '.0').' '.$unit.' ; '.__('Min').': '.rtrim(number_format($graph_stats['sum']['min'], 2), '.0').' '.$unit.'--> Seleccionado'; - $legend['min'.$series_suffix] = __('Min').$series_suffix_str.': '.__('Last').': '.rtrim(number_format($graph_stats['min']['last'], 2), '.0').' '.$unit.' ; '.__('Avg').': '.rtrim(number_format($graph_stats['min']['avg'], 2), '.0').' '.$unit.' ; '.__('Max').': '.rtrim(number_format($graph_stats['min']['max'], 2), '.0').' '.$unit.' ; '.__('Min').': '.rtrim(number_format($graph_stats['min']['min'], 2), '.0').' '.$unit.'--> Seleccionado'; + $legend['max'.$series_suffix] = __('Max').$series_suffix_str.': '.__('Last').': '.rtrim(number_format($graph_stats['max']['last'], 2), '.0').' '.$unit.' ; '.__('Avg').': '.rtrim(number_format($graph_stats['max']['avg'], 2), '.0').' '.$unit.' ; '.__('Max').': '.rtrim(number_format($graph_stats['max']['max'], 2), '.0').' '.$unit.' ; '.__('Min').': '.rtrim(number_format($graph_stats['max']['min'], 2), '.0').' '.$unit.'--> '.__('Selected'); + $legend['sum'.$series_suffix] = __('Avg').$series_suffix_str.': '.__('Last').': '.rtrim(number_format($graph_stats['sum']['last'], 2), '.0').' '.$unit.' ; '.__('Avg').': '.rtrim(number_format($graph_stats['sum']['avg'], 2), '.0').' '.$unit.' ; '.__('Max').': '.rtrim(number_format($graph_stats['sum']['max'], 2), '.0').' '.$unit.' ; '.__('Min').': '.rtrim(number_format($graph_stats['sum']['min'], 2), '.0').' '.$unit.'--> '.__('Selected'); + $legend['min'.$series_suffix] = __('Min').$series_suffix_str.': '.__('Last').': '.rtrim(number_format($graph_stats['min']['last'], 2), '.0').' '.$unit.' ; '.__('Avg').': '.rtrim(number_format($graph_stats['min']['avg'], 2), '.0').' '.$unit.' ; '.__('Max').': '.rtrim(number_format($graph_stats['min']['max'], 2), '.0').' '.$unit.' ; '.__('Min').': '.rtrim(number_format($graph_stats['min']['min'], 2), '.0').' '.$unit.'--> '.__('Selected'); } else - $legend['sum'.$series_suffix] = __('Avg').$series_suffix_str.': '.__('Last').': '.rtrim(number_format($graph_stats['sum']['last'], 2), '.0').' '.$unit.' ; '.__('Avg').': '.rtrim(number_format($graph_stats['sum']['avg'], 2), '.0').' '.$unit.' ; '.__('Max').': '.rtrim(number_format($graph_stats['sum']['max'], 2), '.0').' '.$unit.' ; '.__('Min').': '.rtrim(number_format($graph_stats['sum']['min'], 2), '.0').' '.$unit.'--> Seleccionado'; + $legend['sum'.$series_suffix] = __('Avg').$series_suffix_str.': '.__('Last').': '.rtrim(number_format($graph_stats['sum']['last'], 2), '.0').' '.$unit.' ; '.__('Avg').': '.rtrim(number_format($graph_stats['sum']['avg'], 2), '.0').' '.$unit.' ; '.__('Max').': '.rtrim(number_format($graph_stats['sum']['max'], 2), '.0').' '.$unit.' ; '.__('Min').': '.rtrim(number_format($graph_stats['sum']['min'], 2), '.0').' '.$unit.'--> '.__('Selected'); //Baseline was replaced by compare graph feature /*if ($baseline) { $legend['baseline'.$series_suffix] = __('Baseline'); diff --git a/pandora_console/include/graphs/export_data.php b/pandora_console/include/graphs/export_data.php index 99b685c938..cd3a021701 100644 --- a/pandora_console/include/graphs/export_data.php +++ b/pandora_console/include/graphs/export_data.php @@ -62,7 +62,7 @@ $output_csv = function ($data, $filename) { $head_line = implode($separator, $items['head']); echo $head_line . "\n"; foreach ($items['data'] as $item) { - + $item = str_replace("--> ".__('Selected'),'',$item); $line = implode($separator, $item); if ($excel_encoding)