From c679751f94a0cb6d9ff4441986d05795e18261e2 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Tue, 2 Apr 2019 16:01:24 +0200 Subject: [PATCH] fixed error add ff_type Former-commit-id: 177e40f655f309eed3e7d877ffb00172b0105095 --- .../godmode/massive/massive_edit_modules.php | 20 +++++++++++++++---- .../modules/manage_network_components.php | 1 + .../include/javascript/pandora_modules.js | 6 ++++++ 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/pandora_console/godmode/massive/massive_edit_modules.php b/pandora_console/godmode/massive/massive_edit_modules.php index 917117aa1c..ae6b5b1432 100755 --- a/pandora_console/godmode/massive/massive_edit_modules.php +++ b/pandora_console/godmode/massive/massive_edit_modules.php @@ -914,11 +914,23 @@ $table->data['edit1'][1] = ''; ).'
'; $table->data['edit7'][1] .= __('Keep counters').' '; - $table->data['edit7'][1] .= html_print_checkbox( + $table->data['edit7'][1] .= html_print_select( + [ + '' => __('No change'), + '1' => __('Active Counters'), + '0' => __('Inactive Counters'), + ], 'ff_type', - 1, - 0, - true + '', + '', + '', + '', + true, + false, + true, + '', + false, + 'width: 400px;' ); $table->data['edit8'][0] = __('FF interval'); diff --git a/pandora_console/godmode/modules/manage_network_components.php b/pandora_console/godmode/modules/manage_network_components.php index ab2063fe35..906f36be15 100644 --- a/pandora_console/godmode/modules/manage_network_components.php +++ b/pandora_console/godmode/modules/manage_network_components.php @@ -499,6 +499,7 @@ $url = ui_get_url_refresh( 'ff_event_warning' => false, 'ff_event_critical' => false, 'each_ff' => false, + 'ff_type' => false, ] ); diff --git a/pandora_console/include/javascript/pandora_modules.js b/pandora_console/include/javascript/pandora_modules.js index e835f87c24..889fd0f3dd 100644 --- a/pandora_console/include/javascript/pandora_modules.js +++ b/pandora_console/include/javascript/pandora_modules.js @@ -1,3 +1,8 @@ +/* + global $ + global jQuery +*/ + /* Modules ids to check types */ var id_modules_icmp = Array(6, 7); var id_modules_tcp = Array(8, 9, 10, 11); @@ -412,6 +417,7 @@ function configure_modules_form() { "value", data["min_ff_event_critical"] == 0 ? 0 : data["min_ff_event_critical"] ); + $("#checkbox-ff_type").prop("checked", data["ff_type"]); // Shows manual input if post_process field is setted if (data["post_process"] != 0) {