From 914ac2815125e0647ade5a3db83ef868f95ebca8 Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Tue, 3 Sep 2019 12:59:24 +0200 Subject: [PATCH 1/5] Changed checkboxes for combo multiselect in File repository manager --- .../extensions/files_repo/files_repo_form.php | 16 ++++------------ .../files_repo/functions_files_repo.php | 2 +- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/pandora_console/extensions/files_repo/files_repo_form.php b/pandora_console/extensions/files_repo/files_repo_form.php index 2035cfbd1a..b8e6a084b9 100644 --- a/pandora_console/extensions/files_repo/files_repo_form.php +++ b/pandora_console/extensions/files_repo/files_repo_form.php @@ -44,24 +44,16 @@ $groups = groups_get_all(); // Add the All group to the beginning to be always the first // Use this instead array_unshift to keep the array keys $groups = ([0 => __('All')] + $groups); -$html = ''; -$style = 'style="padding: 2px 10px; display: inline-block;"'; +$groups_selected = []; foreach ($groups as $id => $name) { - $checked = in_array($id, $file['groups']); - $all_checked = false; - if ($id === 0) { - $checkbox = html_print_checkbox_extended('groups[]', $id, $checked, false, '', 'class="chkb_all"', true); - $all_checked = $checked; - } else { - $checkbox = html_print_checkbox_extended('groups[]', $id, $checked, $all_checked, '', 'class="chkb_group"', true); + if (in_array($id, $file['groups'])) { + $groups_selected[] = $id; } - - $html .= "
$name $checkbox
"; } $row = []; $row[0] = __('Groups'); -$row[1] = $html; +$row[1] = html_print_select($groups, 'groups[]', $groups_selected, '', '', '', true, true, '', '', ''); $table->data[] = $row; $table->colspan[][1] = 3; diff --git a/pandora_console/extensions/files_repo/functions_files_repo.php b/pandora_console/extensions/files_repo/functions_files_repo.php index 3d9bdccd38..32ce4c216c 100644 --- a/pandora_console/extensions/files_repo/functions_files_repo.php +++ b/pandora_console/extensions/files_repo/functions_files_repo.php @@ -193,7 +193,7 @@ function files_repo_add_file($file_input_name='upfile', $description='', $groups global $config; $attachment_path = io_safe_output($config['attachment_store']); - $files_repo_path = $attachment_path.'/'.'files_repo'; + $files_repo_path = $attachment_path.'/files_repo'; $result = []; $result['status'] = false; From d9dc03dd91cdf59c48e8e8cfb756abe9c0607361 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 11 Sep 2019 18:08:40 +0200 Subject: [PATCH 2/5] Fixed max,min,avg report --- .../include/functions_reporting.php | 374 ++++-------------- .../include/functions_reporting_html.php | 130 +++++- 2 files changed, 197 insertions(+), 307 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 4abf5152c1..536449c6bc 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -4785,12 +4785,10 @@ function reporting_value($report, $content, $type, $pdf=false) 'period' => $content['period'], 'width' => '600px', 'pure' => false, - // true 'date' => $report['datetime'], 'only_image' => $only_image, 'homeurl' => ui_get_full_url(false, false, false, false), 'ttl' => 1, - // 2 'type_graph' => $config['type_module_charts'], 'time_interval' => $content['lapse'], 'server_id' => $id_meta, @@ -4800,323 +4798,105 @@ function reporting_value($report, $content, $type, $pdf=false) switch ($type) { case 'max': - if ($content['lapse_calc'] == 0) { - $value = reporting_get_agentmodule_data_max( - $content['id_agent_module'], - $content['period'], - $report['datetime'] - ); - if (!$config['simple_module_value']) { - $formated_value = $value; - } else { - $formated_value = format_for_graph($value, $config['graph_precision']).' '.$unit; - } - } else { - $value = ' - - - - - - - - - -
'; - if ($content['visual_format'] == 1 || $content['visual_format'] == 2 || $content['visual_format'] == 3) { - $value .= ' - - - - - - - - - - -
- '.__('Agent').' - - '.__('Module').' - - '.__('Maximum').' -
- '.$agent_name.' - - '.$module_name.' - - '.format_for_graph(reporting_get_agentmodule_data_max($content['id_agent_module'], $content['period'], $report['datetime']), $config['graph_precision']).' '.$unit.' -
'; - } - - $value .= ' -
- '; - - if ($content['visual_format'] == 2 || $content['visual_format'] == 3) { - $params['force_interval'] = 'max_only'; - $value .= grafico_modulo_sparse($params); - } - - $value .= ' - -
'; - - if ($content['visual_format'] == 1 || $content['visual_format'] == 3) { - $value .= ' - - - - - - '; - $time_begin = db_get_row_sql('select utimestamp from tagente_datos where id_agente_modulo ='.$content['id_agent_module'], true); - $date_reference = getdate(); - - for ($i = $date_reference[0]; $i > ($date_reference[0] - $content['period']); $i -= $content['lapse']) { - $value .= ''; - } else { - $value .= 'N/A'; - } - } - - $value .= '
- '.__('Lapse').' - - '.__('Maximum').' -
'.date('Y-m-d H:i:s', ($i - $content['lapse'] + 1)).' to '.date('Y-m-d H:i:s', $i).''; - - if ($i > $time_begin['utimestamp']) { - $value .= format_for_graph( - reporting_get_agentmodule_data_max( - $content['id_agent_module'], - $content['lapse'], - $i - ), - $config['graph_precision'] - ).' '.$unit.'
'; - } - - $value .= ' -
'; - - $formated_value = $value; - } - break; - case 'min': - if ($content['lapse_calc'] == 0) { - $value = reporting_get_agentmodule_data_min( - $content['id_agent_module'], - $content['period'], - $report['datetime'] - ); - - if (!$config['simple_module_value']) { - $formated_value = $value; - } else { - $formated_value = format_for_graph($value, $config['graph_precision']).' '.$unit; - } - } else { - $value = ' - - - - - - - - - -
'; - - if ($content['visual_format'] == 1 || $content['visual_format'] == 2 || $content['visual_format'] == 3) { - $value .= ' - - - - - - - - - - -
- '.__('Agent').' - - '.__('Module').' - - '.__('Minimum').' -
- '.$agent_name.' - - '.$module_name.' - - '.format_for_graph(reporting_get_agentmodule_data_min($content['id_agent_module'], $content['period'], $report['datetime']), $config['graph_precision']).' '.$unit.' -
'; - } - - $value .= ' -
- '; - - if ($content['visual_format'] == 2 || $content['visual_format'] == 3) { - $params['force_interval'] = 'min_only'; - $value .= grafico_modulo_sparse($params); - } - - $value .= ' -
'; - - if ($content['visual_format'] == 1 || $content['visual_format'] == 3) { - $value .= ' - - - - - - '; - $time_begin = db_get_row_sql('select utimestamp from tagente_datos where id_agente_modulo ='.$content['id_agent_module']); - $date_reference = getdate(); - - for ($i = $date_reference[0]; $i > ($date_reference[0] - $content['period']); $i -= $content['lapse']) { - $value .= ''; - } else { - $value .= 'N/A'; - } - } - - $value .= '
- '.__('Lapse').' - - '.__('Minimum').' -
'.date('Y-m-d H:i:s', ($i - $content['lapse'] + 1)).' to '.date('Y-m-d H:i:s', $i).''; - - if ($i > $time_begin['utimestamp']) { - $value .= format_for_graph( - reporting_get_agentmodule_data_min( - $content['id_agent_module'], - $content['lapse'], - $i - ), - $config['graph_precision'] - ).' '.$unit.'
'; - } - - $value .= ' - -
'; - - $formated_value = $value; - } - break; - case 'avg': if ($content['lapse_calc'] == 0) { - $value = reporting_get_agentmodule_data_average( - $content['id_agent_module'], - $content['period'], - $report['datetime'] - ); + switch ($type) { + case 'max': + $value = reporting_get_agentmodule_data_max( + $content['id_agent_module'], + $content['period'], + $report['datetime'] + ); + break; + + case 'min': + $value = reporting_get_agentmodule_data_min( + $content['id_agent_module'], + $content['period'], + $report['datetime'] + ); + break; + + case 'avg': + $value = reporting_get_agentmodule_data_average( + $content['id_agent_module'], + $content['period'], + $report['datetime'] + ); + break; + } + if (!$config['simple_module_value']) { $formated_value = $value; } else { $formated_value = format_for_graph($value, $config['graph_precision']).' '.$unit; } } else { - $value = ' - - - - - - - - - -
'; + $return['visual_format'] = $content['visual_format']; - if ($content['visual_format'] == 1 || $content['visual_format'] == 2 || $content['visual_format'] == 3) { - $value .= ' - - - - - - - - - - -
- '.__('Agent').' - - '.__('Module').' - - '.__('Average').' -
- '.$agent_name.' - - '.$module_name.' - - '.format_for_graph(reporting_get_agentmodule_data_average($content['id_agent_module'], $content['period'], $report['datetime']), $config['graph_precision']).' '.$unit.' -
'; + switch ($type) { + case 'max': + $params['force_interval'] = 'max_only'; + $value = format_for_graph(reporting_get_agentmodule_data_max($content['id_agent_module'], $content['period'], $report['datetime']), $config['graph_precision']).' '.$unit; + break; + + case 'min': + $params['force_interval'] = 'min_only'; + $value = format_for_graph(reporting_get_agentmodule_data_min($content['id_agent_module'], $content['period'], $report['datetime']), $config['graph_precision']).' '.$unit; + break; + + case 'avg': + $params['force_interval'] = 'avg_only'; + $value = format_for_graph(reporting_get_agentmodule_data_average($content['id_agent_module'], $content['period'], $report['datetime']), $config['graph_precision']).' '.$unit; + break; } - $value .= ' -
- '; - if ($content['visual_format'] == 2 || $content['visual_format'] == 3) { - $params['force_interval'] = 'avg_only'; - $value .= grafico_modulo_sparse($params); + $return['data'][] = [ + __('Agent') => $agent_name, + __('Module') => $module_name, + __('Maximun') => $value, + ]; + + if ($content['visual_format'] != 1) { + $graph = grafico_modulo_sparse($params); + $return['data'][] = ['value' => $graph]; } - $value .= ' - -
'; - - if ($content['visual_format'] == 1 || $content['visual_format'] == 3) { - $value .= ' - - - - - - '; - $time_begin = db_get_row_sql('select utimestamp from tagente_datos where id_agente_modulo ='.$content['id_agent_module']); + if ($content['visual_format'] != 2) { + $time_begin = db_get_row_sql('select utimestamp from tagente_datos where id_agente_modulo ='.$content['id_agent_module'], true); $date_reference = getdate(); - for ($i = $date_reference[0]; $i > ($date_reference[0] - $content['period']); $i -= $content['lapse']) { - $value .= ''; - } else { - $value .= 'N/A'; - } - } + switch ($type) { + case 'max': + $row[__('Maximun')] = format_for_graph(reporting_get_agentmodule_data_max($content['id_agent_module'], $content['lapse'], $i), $config['graph_precision']).' '.$unit; + break; - $value .= '
- '.__('Lapse').' - - '.__('Average').' -
'.date('Y-m-d H:i:s', ($i - $content['lapse'] + 1)).' to '.date('Y-m-d H:i:s', $i).''; + $row = []; + $row[__('Lapse')] = date('Y-m-d H:i:s', ($i - $content['lapse'] + 1)).' to '.date('Y-m-d H:i:s', $i); if ($i > $time_begin['utimestamp']) { - $value .= format_for_graph( - reporting_get_agentmodule_data_average( - $content['id_agent_module'], - $content['lapse'], - $i - ), - $config['graph_precision'] - ).' '.$unit.'
'; + case 'min': + $row[__('Maximun')] = format_for_graph(reporting_get_agentmodule_data_min($content['id_agent_module'], $content['lapse'], $i), $config['graph_precision']).' '.$unit; + break; + + case 'avg': + $row[__('Maximun')] = format_for_graph(reporting_get_agentmodule_data_average($content['id_agent_module'], $content['lapse'], $i), $config['graph_precision']).' '.$unit; + break; + } + } else { + $row[__('Maximun')] = 'N/A'; + } + + $return['data'][] = $row; + } } - $value .= ' - -
'; + if ($config['metaconsole']) { + metaconsole_restore_db(); + } - $formated_value = $value; + return reporting_check_structure_content($return); } break; diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index 6a7d60c620..c2ace5699e 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -2784,20 +2784,130 @@ function reporting_html_value(&$table, $item, $mini, $only_value=false, $check_e $font_size = '3'; } - $table->colspan['data']['cell'] = 3; - $table->cellstyle['data']['cell'] = 'text-align: left;'; + if (isset($item['visual_format']) && $item['visual_format'] != 0 + && ($item['type'] == 'max_value' || $item['type'] == 'min_value' || $item['type'] == 'avg_value') + ) { + $table2 = new stdClass(); + $table2->width = '100%'; + switch ($item['type']) { + case 'max_value': + $table2->head = [ + __('Agent'), + __('Module'), + __('Maximun'), + ]; + break; - $table->data['data']['cell'] = '

'; + case 'min_value': + $table2->head = [ + __('Agent'), + __('Module'), + __('Minimun'), + ]; + break; - if ($check_empty && empty($item['data']['value'])) { - $table->data['data']['cell'] .= __('Unknown'); - } else if ($only_value) { - $table->data['data']['cell'] .= $item['data']['value']; + case 'avg_value': + $table2->head = [ + __('Agent'), + __('Module'), + __('Average'), + ]; + break; + } + + $table2->data = []; + + $data = $item['data'][0]; + + $row = [ + $data[__('Agent')], + $data[__('Module')], + $data[__('Maximun')], + ]; + + $table2->data[] = $row; + + $table2->title = $item['title']; + $table2->titleclass = 'title_table_pdf'; + $table2->titlestyle = 'text-align:left;'; + $table->colspan[1][0] = 3; + $table->colspan[2][0] = 3; + $table->colspan[3][0] = 3; + + array_push($table->data, html_print_table($table2, true)); + unset($item['data'][0]); + + if ($item['visual_format'] != 1) { + $value = $item['data'][1]['value']; + array_push($table->data, $value); + unset($item['data'][1]); + } + + if ($item['visual_format'] != 2) { + $table1 = new stdClass(); + $table1->width = '100%'; + switch ($item['type']) { + case 'max_value': + $table1->head = [ + __('Lapse'), + __('Maximun'), + ]; + break; + + case 'min_value': + $table1->head = [ + __('Lapse'), + __('Minimun'), + ]; + break; + + case 'avg_value': + $table1->head = [ + __('Lapse'), + __('Average'), + ]; + break; + } + + $table1->data = []; + foreach ($item['data'] as $data) { + if (!is_numeric($data[__('Maximun')])) { + $row = [ + $data[__('Lapse')], + $data[__('Maximun')], + ]; + } else { + $row = [ + $data[__('Lapse')], + remove_right_zeros(number_format($data[__('Maximun')], $config['graph_precision'])), + ]; + } + + $table1->data[] = $row; + } + + $table1->title = $item['title']; + $table1->titleclass = 'title_table_pdf'; + $table1->titlestyle = 'text-align:left;'; + + array_push($table->data, html_print_table($table1, true)); + } } else { - $table->data['data']['cell'] .= $item['data']['formated_value']; - } + $table->colspan['data']['cell'] = 3; + $table->cellstyle['data']['cell'] = 'text-align: left;'; - $table->data['data']['cell'] .= '

'; + $table->data['data']['cell'] = '

'; + + if ($check_empty && empty($item['data']['value'])) { + $table->data['data']['cell'] .= __('Unknown'); + } else if ($only_value) { + $table->data['data']['cell'] .= $item['data']['value']; + } else { + $table->data['data']['cell'] .= $item['data']['formated_value']; + } + + $table->data['data']['cell'] .= '

'; + } } From 602c9ccb5eab20f6f0725ec6dce1413cb0d16073 Mon Sep 17 00:00:00 2001 From: artica Date: Thu, 12 Sep 2019 00:01:26 +0200 Subject: [PATCH 3/5] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 44d1bcd1db..5480607cec 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.738-190911 +Version: 7.0NG.738-190912 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index f307703547..b7dc8d9876 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190911" +pandora_version="7.0NG.738-190912" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 3bc7f95a14..e1f08acc1c 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.738'; -use constant AGENT_BUILD => '190911'; +use constant AGENT_BUILD => '190912'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 962c581eb4..185e5e26f7 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190911 +%define release 190912 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 5e23b721d5..8be1f7daa4 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190911 +%define release 190912 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 23b842c33d..dff6af01fa 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190911" +PI_BUILD="190912" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index e258a3c759..44e1b88f2e 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190911} +{190912} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 8f5fd6be91..068df33b71 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.738(Build 190911)") +#define PANDORA_VERSION ("7.0NG.738(Build 190912)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index f19e26659f..296ba8e550 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.738(Build 190911))" + VALUE "ProductVersion", "(7.0NG.738(Build 190912))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 7d75b987dd..7e7ccb472e 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.738-190911 +Version: 7.0NG.738-190912 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index e1576a1f87..669f032651 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190911" +pandora_version="7.0NG.738-190912" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index e7ccc00a4d..60ae8204a7 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190911'; +$build_version = 'PC190912'; $pandora_version = 'v7.0NG.738'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 1d055f0087..085bc511ca 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index b639e17a76..a472f9273f 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190911 +%define release 190912 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index a137157567..492cc2b958 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190911 +%define release 190912 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 233e445841..76eca733a7 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190911" +PI_BUILD="190912" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 62985fffea..f42c1e7898 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.738 PS190911"; +my $version = "7.0NG.738 PS190912"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index fb5e640f2c..1d058f810f 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.738 PS190911"; +my $version = "7.0NG.738 PS190912"; # save program name for logging my $progname = basename($0); From 3d8486659e505c9200857695a22fe5411a1c1d1b Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 12 Sep 2019 12:52:40 +0200 Subject: [PATCH 4/5] Fixed period in template --- pandora_console/include/functions_reporting.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 536449c6bc..3494eed389 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -4865,8 +4865,7 @@ function reporting_value($report, $content, $type, $pdf=false) if ($content['visual_format'] != 2) { $time_begin = db_get_row_sql('select utimestamp from tagente_datos where id_agente_modulo ='.$content['id_agent_module'], true); - $date_reference = getdate(); - for ($i = $date_reference[0]; $i > ($date_reference[0] - $content['period']); $i -= $content['lapse']) { + for ($i = $report['datetime']; $i > ($report['datetime'] - $content['period']); $i -= $content['lapse']) { $row = []; $row[__('Lapse')] = date('Y-m-d H:i:s', ($i - $content['lapse'] + 1)).' to '.date('Y-m-d H:i:s', $i); From 2f45d3d6ecd6a1e0d565955df0e2d2b8800a796e Mon Sep 17 00:00:00 2001 From: artica Date: Fri, 13 Sep 2019 00:01:11 +0200 Subject: [PATCH 5/5] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 5480607cec..00e5de0dc5 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.738-190912 +Version: 7.0NG.738-190913 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index b7dc8d9876..4035bca720 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190912" +pandora_version="7.0NG.738-190913" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index e1f08acc1c..35a86a656b 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.738'; -use constant AGENT_BUILD => '190912'; +use constant AGENT_BUILD => '190913'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 185e5e26f7..965a1aa0d1 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190912 +%define release 190913 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 8be1f7daa4..55bda1c48a 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.738 -%define release 190912 +%define release 190913 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index dff6af01fa..f9eaab41c0 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190912" +PI_BUILD="190913" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 44e1b88f2e..5b62310d00 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190912} +{190913} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 068df33b71..22d0d1eff5 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.738(Build 190912)") +#define PANDORA_VERSION ("7.0NG.738(Build 190913)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 296ba8e550..eb4e892c56 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.738(Build 190912))" + VALUE "ProductVersion", "(7.0NG.738(Build 190913))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 7e7ccb472e..a9e7857cc1 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.738-190912 +Version: 7.0NG.738-190913 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 669f032651..4b12f61d10 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.738-190912" +pandora_version="7.0NG.738-190913" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 60ae8204a7..b85e6ce713 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190912'; +$build_version = 'PC190913'; $pandora_version = 'v7.0NG.738'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 085bc511ca..bcf623db56 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index a472f9273f..547ef9e026 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190912 +%define release 190913 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 492cc2b958..68b47d82b0 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.738 -%define release 190912 +%define release 190913 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 76eca733a7..0197261987 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.738" -PI_BUILD="190912" +PI_BUILD="190913" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index f42c1e7898..374b742a1c 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.738 PS190912"; +my $version = "7.0NG.738 PS190913"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 1d058f810f..53b18b8cd9 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.738 PS190912"; +my $version = "7.0NG.738 PS190913"; # save program name for logging my $progname = basename($0);