fixed error add ff_type

Former-commit-id: 177e40f655f309eed3e7d877ffb00172b0105095
This commit is contained in:
Daniel Barbero Martin 2019-04-02 16:01:24 +02:00
parent 7be3d5fa58
commit c679751f94
3 changed files with 23 additions and 4 deletions

View File

@ -914,11 +914,23 @@ $table->data['edit1'][1] = '<table width="100%">';
).'<br>';
$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');

View File

@ -499,6 +499,7 @@ $url = ui_get_url_refresh(
'ff_event_warning' => false,
'ff_event_critical' => false,
'each_ff' => false,
'ff_type' => false,
]
);

View File

@ -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) {