Fixed adition of the snmp actions alerts. TICKET: #2417
(cherry picked from commit 46516385e9
)
This commit is contained in:
parent
289bcefbe2
commit
506b9fa944
|
@ -41,10 +41,10 @@ $save_alert = (bool)get_parameter('save_alert', false);
|
||||||
$modify_alert = (bool)get_parameter('modify_alert', false);
|
$modify_alert = (bool)get_parameter('modify_alert', false);
|
||||||
$delete_alert = (bool)get_parameter('delete_alert', false);
|
$delete_alert = (bool)get_parameter('delete_alert', false);
|
||||||
$multiple_delete = (bool)get_parameter('multiple_delete', false);
|
$multiple_delete = (bool)get_parameter('multiple_delete', false);
|
||||||
$add_action = get_parameter('addbutton', '');
|
$add_action = (bool)get_parameter('add_alert', 0);
|
||||||
$delete_action = get_parameter('delete_action', 0);
|
$delete_action = get_parameter('delete_action', 0);
|
||||||
|
|
||||||
if ($add_action == "Add") {
|
if ($add_action) {
|
||||||
$values['id_alert_snmp'] = get_parameter('id_alert_snmp');
|
$values['id_alert_snmp'] = get_parameter('id_alert_snmp');
|
||||||
$values['alert_type'] = get_parameter('alert_type');
|
$values['alert_type'] = get_parameter('alert_type');
|
||||||
$values['al_field1'] = get_parameter('field1_value');
|
$values['al_field1'] = get_parameter('field1_value');
|
||||||
|
@ -466,10 +466,12 @@ if ($multiple_delete) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($count == $total) {
|
if ($count == $total) {
|
||||||
ui_print_success_message(__('Successfully deleted alerts (%s / %s)', $count, $total));
|
ui_print_success_message(
|
||||||
|
__('Successfully deleted alerts (%s / %s)', $count, $total));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ui_print_error_message(__('Unsuccessfully deleted alerts (%s / %s)', $count, $total));
|
ui_print_error_message(
|
||||||
|
__('Unsuccessfully deleted alerts (%s / %s)', $count, $total));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -506,16 +508,19 @@ if ($create_alert || $update_alert) {
|
||||||
echo '<table cellpadding="4" cellspacing="4" width="98%" class="databox" style="font-weight: bold">';
|
echo '<table cellpadding="4" cellspacing="4" width="98%" class="databox" style="font-weight: bold">';
|
||||||
|
|
||||||
// Description
|
// Description
|
||||||
echo '<tr><td class="datos" valign="top">'.__('Description').'</td><td class="datos">';
|
echo '<tr>' .
|
||||||
|
'<td class="datos" valign="top">' . __('Description') . '</td>' .
|
||||||
|
'<td class="datos">';
|
||||||
html_print_textarea('description', 3, 2, $description, 'style="width:400px;"');
|
html_print_textarea('description', 3, 2, $description, 'style="width:400px;"');
|
||||||
|
echo '</td>' .
|
||||||
//html_print_input_text ("description", $description, '', 60);
|
'</tr>';
|
||||||
echo '</td></tr>';
|
|
||||||
|
|
||||||
//echo '<tr><td class="datos"><b>' . __('Alert filters') . ui_print_help_icon("snmp_alert_filters", true) . '</b></td></tr>';
|
//echo '<tr><td class="datos"><b>' . __('Alert filters') . ui_print_help_icon("snmp_alert_filters", true) . '</b></td></tr>';
|
||||||
|
|
||||||
// OID
|
// OID
|
||||||
echo '<tr id="tr-oid"><td class="datos2">'.__('Enterprise String').'</td><td class="datos2">';
|
echo '<tr id="tr-oid">' .
|
||||||
|
'<td class="datos2">' . __('Enterprise String') . '</td>' .
|
||||||
|
'<td class="datos2">';
|
||||||
html_print_input_text ("oid", $oid, '', 50, 255);
|
html_print_input_text ("oid", $oid, '', 50, 255);
|
||||||
echo '</td></tr>';
|
echo '</td></tr>';
|
||||||
|
|
||||||
|
@ -1125,6 +1130,7 @@ else {
|
||||||
html_print_div(array('id' => 'help_snmp_alert_hint', 'content' => ui_print_help_icon ("snmp_alert_field1", true), 'hidden' => true));
|
html_print_div(array('id' => 'help_snmp_alert_hint', 'content' => ui_print_help_icon ("snmp_alert_field1", true), 'hidden' => true));
|
||||||
|
|
||||||
echo '</table>';
|
echo '</table>';
|
||||||
|
html_print_input_hidden('add_alert', 1);
|
||||||
echo html_print_submit_button (__('Add'), 'addbutton', false, array('class' => "sub next", 'style' => "float:right"), true);
|
echo html_print_submit_button (__('Add'), 'addbutton', false, array('class' => "sub next", 'style' => "float:right"), true);
|
||||||
echo '</form>';
|
echo '</form>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
Loading…
Reference in New Issue