2014-03-06 Sergio Martin <sergio.martin@artica.es>
* include/javascript/pandora_alerts.js: Added missed code in action recovery fields feature git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9517 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
192b45646f
commit
716103645d
|
@ -1,3 +1,8 @@
|
|||
2014-03-06 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/javascript/pandora_alerts.js: Added missed code
|
||||
in action recovery fields feature
|
||||
|
||||
2014-03-05 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/help/en/help_ipam.php: Fix typo
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
var original_command = "";
|
||||
|
||||
function parse_alert_command (command) {
|
||||
function parse_alert_command (command, classs) {
|
||||
classs = 'field';
|
||||
if (classs == 'recovery') {
|
||||
classs = 'field_recovery';
|
||||
}
|
||||
var nfield = 1;
|
||||
$('.' + classs).each(function() {
|
||||
// Only render values different from ''
|
||||
if ($(this).val() == '') {
|
||||
return;
|
||||
}
|
||||
var field = '_field' + nfield+'_';
|
||||
var field = '_field' + nfield + '_';
|
||||
nfield++;
|
||||
var regex = new RegExp(field,"gi");
|
||||
command = command.replace (regex, $(this).val());
|
||||
|
@ -17,7 +21,7 @@ function parse_alert_command (command) {
|
|||
}
|
||||
|
||||
function render_command_preview (original_command) {
|
||||
$("#textarea_command_preview").text (parse_alert_command (original_command));
|
||||
$("#textarea_command_preview").text (parse_alert_command (original_command, ''));
|
||||
$("#textarea_command_recovery_preview").text (parse_alert_command (original_command, 'recovery'));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue