#11964 Fix snmp alerts editor
This commit is contained in:
parent
d006028ce9
commit
6305d13a86
|
@ -97,7 +97,7 @@ if (is_ajax()) {
|
||||||
|
|
||||||
if (!empty($field_description)) {
|
if (!empty($field_description)) {
|
||||||
// If the value is 5, this because severity in snmp alerts is not permit to show.
|
// If the value is 5, this because severity in snmp alerts is not permit to show.
|
||||||
if (($i > 5) && ($command['id'] == 3)) {
|
if (($i > 5) && ($command['id'] === 3)) {
|
||||||
$fdesc = $field_description.' <br><span class="normal xx-small">'.sprintf(
|
$fdesc = $field_description.' <br><span class="normal xx-small">'.sprintf(
|
||||||
__('Field %s'),
|
__('Field %s'),
|
||||||
($i - 1)
|
($i - 1)
|
||||||
|
@ -118,7 +118,7 @@ if (is_ajax()) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// If the macro hasn't description and doesnt appear in command, set with empty description to dont show it.
|
// If the macro hasn't description and doesnt appear in command, set with empty description to dont show it.
|
||||||
if (($i > 5) && ($command['id'] == 3)) {
|
if (($i > 5) && ($command['id'] === 3)) {
|
||||||
if (substr_count($command['command'], '_field'.($i - 1).'_') > 0) {
|
if (substr_count($command['command'], '_field'.($i - 1).'_') > 0) {
|
||||||
$fdesc = sprintf(__('Field %s'), ($i - 1));
|
$fdesc = sprintf(__('Field %s'), ($i - 1));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -2312,7 +2312,7 @@ $(document).ready (function () {
|
||||||
// The row provided has a predefined class. We delete it.
|
// The row provided has a predefined class. We delete it.
|
||||||
$('#table_macros-field' + i)
|
$('#table_macros-field' + i)
|
||||||
.removeAttr('class');
|
.removeAttr('class');
|
||||||
if(old_value && i != 4){
|
if(old_value){
|
||||||
$("[name=field" + i + "_value]").val(old_value).trigger('change');
|
$("[name=field" + i + "_value]").val(old_value).trigger('change');
|
||||||
}
|
}
|
||||||
$('#table_macros-field').show();
|
$('#table_macros-field').show();
|
||||||
|
|
Loading…
Reference in New Issue