diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 544869043a..dcc4594941 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 6.0dev-150325 +Version: 6.0dev-150327 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 1523962f36..c360f0169c 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="6.0dev-150325" +pandora_version="6.0dev-150327" 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 5a3de7a4b3..422198280e 100644 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '6.0dev'; -use constant AGENT_BUILD => '150325'; +use constant AGENT_BUILD => '150327'; # Commands to retrieve total memory information in kB use constant TOTALMEMORY_CMDS => { diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 31d850b7c0..ea56c607a8 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 6.0dev -%define release 150325 +%define release 150327 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 fd95ea68fa..0b0233c08a 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 6.0dev -%define release 150325 +%define release 150327 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 85b0a3b84e..dd25b93c2d 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{150325} +{150327} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 509d3cb395..e9917f8f0a 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 ("6.0dev(Build 150325)") +#define PANDORA_VERSION ("6.0dev(Build 150327)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index baa96e823a..edaa4d4dbe 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", "(6.0dev(Build 150325))" + VALUE "ProductVersion", "(6.0dev(Build 150327))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 2bd423617a..19f5bec6b9 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 6.0dev-150325 +Version: 6.0dev-150327 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 442a06c4c4..bcdb62a992 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="6.0dev-150325" +pandora_version="6.0dev-150327" package_pear=0 package_pandora=1 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 2ab5f97d29..4ab94fad5a 100755 --- 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 @@ -62,4 +62,11 @@ UPDATE `talert_commands` SET `fields_descriptions` = '[\"Destination addres -- --------------------------------------------------------------------- -- Table `tconfig` -- --------------------------------------------------------------------- -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"}'); \ No newline at end of file +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"}'); + +-- --------------------------------------------------------------------- +-- Table `tnetwork_map` +-- --------------------------------------------------------------------- +ALTER TABLE `tnetwork_map` ADD COLUMN `id_tag` int(11) DEFAULT 0; +ALTER TABLE `tnetwork_map` ADD COLUMN `store_group` int(11) DEFAULT 0; +UPDATE `tnetwork_map` SET `store_group` = `id_group`; 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 c302b4aae4..a1e52b9bff 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 @@ -62,4 +62,11 @@ UPDATE talert_commands SET fields_descriptions = '[\"Destination address\", -- --------------------------------------------------------------------- -- Table `tconfig` -- --------------------------------------------------------------------- -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"}'); \ No newline at end of file +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"}'); + +-- --------------------------------------------------------------------- +-- Table `tnetwork_map` +-- --------------------------------------------------------------------- +ALTER TABLE tnetwork_map ADD COLUMN id_tag NUMBER(11, 0) DEFAULT 0; +ALTER TABLE tnetwork_map ADD COLUMN store_group NUMBER(11, 0) DEFAULT 0; +UPDATE tnetwork_map SET store_group = id_group; diff --git a/pandora_console/extras/pandoradb_migrate_5.1_to_6.0.postgreSQL.sql b/pandora_console/extras/pandoradb_migrate_5.1_to_6.0.postgreSQL.sql index 03b27c534d..6882914fd2 100755 --- a/pandora_console/extras/pandoradb_migrate_5.1_to_6.0.postgreSQL.sql +++ b/pandora_console/extras/pandoradb_migrate_5.1_to_6.0.postgreSQL.sql @@ -60,4 +60,11 @@ UPDATE "talert_commands" SET "fields_descriptions" = '[\"Destination addres -- --------------------------------------------------------------------- -- Table `tconfig` -- --------------------------------------------------------------------- -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"}'); \ No newline at end of file +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"}'); + +-- --------------------------------------------------------------------- +-- Table `tnetwork_map` +-- --------------------------------------------------------------------- +ALTER TABLE "tnetwork_map" ADD COLUMN "id_tag" INTEGER DEFAULT 0; +ALTER TABLE "tnetwork_map" ADD COLUMN "store_group" INTEGER DEFAULT 0; +UPDATE "tnetwork_map" SET "store_group" = "id_group"; diff --git a/pandora_console/godmode/alerts/alert_commands.php b/pandora_console/godmode/alerts/alert_commands.php index d0ded3d06e..40c00406da 100644 --- a/pandora_console/godmode/alerts/alert_commands.php +++ b/pandora_console/godmode/alerts/alert_commands.php @@ -120,24 +120,32 @@ if (is_ajax ()) { $fields_value_select = array(); $fv = explode(';', $field_value); - if (!empty($fv)) { - foreach ($fv as $fv_option) { - $fv_option = explode(',', $fv_option); - - if (empty($fv_option)) - continue; - - if (!isset($fv_option[1])) - $fv_option[1] = $fv_option[0]; - - $fields_value_select[$fv_option[0]] = $fv_option[1]; + if (count($fv) > 1) { + if (!empty($fv)) { + foreach ($fv as $fv_option) { + $fv_option = explode(',', $fv_option); + + if (empty($fv_option)) + continue; + + if (!isset($fv_option[1])) + $fv_option[1] = $fv_option[0]; + + $fields_value_select[$fv_option[0]] = $fv_option[1]; + } } - } - $ffield = html_print_select($fields_value_select, - 'field'.$i.'_value', '', '', '', 0, true, false, false, 'fields'); - $rfield = html_print_select($fields_value_select, - 'field'.$i.'_recovery_value', '', '', '', 0, true, false, false, 'fields_recovery'); + $ffield = html_print_select($fields_value_select, + 'field'.$i.'_value', '', '', '', 0, true, false, false, 'fields'); + $rfield = html_print_select($fields_value_select, + 'field'.$i.'_recovery_value', '', '', '', 0, true, false, false, 'fields_recovery'); + } + else{ + $ffield = html_print_textarea ('field' . $i . '_value',1, 1, $fv[0], + 'style="min-height:40px" class="fields"', true); + $rfield = html_print_textarea ('field' . $i . '_recovery_value', 1, 1, $fv[0], + 'style="min-height:40px" class="fields_recovery"', true); + } } } else { diff --git a/pandora_console/godmode/alerts/configure_alert_action.php b/pandora_console/godmode/alerts/configure_alert_action.php index 553f33a67c..1dfdbb2200 100644 --- a/pandora_console/godmode/alerts/configure_alert_action.php +++ b/pandora_console/godmode/alerts/configure_alert_action.php @@ -284,7 +284,8 @@ $(document).ready (function () { $table_macros_field.hide(); continue; } - + old_value = ''; + old_recovery_value = ''; // Only keep the value if is provided from hidden (first time) if (($("[name=field" + i + "_value]").attr('id')) == ("hidden-field" + i + "_value")) { @@ -301,10 +302,14 @@ $(document).ready (function () { // Replace the old column with the new $table_macros_field.replaceWith(field_row); - - $("[name=field" + i + "_value]").val(old_value); - $("[name=field" + i + "_recovery_value]").val(old_recovery_value); - + if (old_value != '' && old_recovery_value != ''){ + $("[name=field" + i + "_value]").val(old_value); + $("[name=field" + i + "_recovery_value]").val(old_recovery_value); + } + else{ + $("[name=field" + i + "_value]").val($("[name=field" + i + "_value]").val()); + $("[name=field" + i + "_recovery_value]").val($("[name=field" + i + "_recovery_value]").val()); + } // Add help hint only in first field if (i == 1) { var td_content = $table_macros_field.find('td').eq(0); diff --git a/pandora_console/godmode/users/user_list.php b/pandora_console/godmode/users/user_list.php index 262b0ae008..089e9ea0f6 100644 --- a/pandora_console/godmode/users/user_list.php +++ b/pandora_console/godmode/users/user_list.php @@ -236,11 +236,11 @@ $table->data[0][4] = html_print_submit_button(__('Search'), 'search', if(defined('METACONSOLE')){ - $table->width = '50%'; + $table->width = '96%'; $form_filter = "
"; - echo $form_filter; + ui_toggle($form_filter, __('Show Options')); }else{ $form_filter = "