mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
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>
|
2014-03-05 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
* include/help/en/help_ipam.php: Fix typo
|
* include/help/en/help_ipam.php: Fix typo
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
var original_command = "";
|
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;
|
var nfield = 1;
|
||||||
$('.' + classs).each(function() {
|
$('.' + classs).each(function() {
|
||||||
// Only render values different from ''
|
// Only render values different from ''
|
||||||
if ($(this).val() == '') {
|
if ($(this).val() == '') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var field = '_field' + nfield+'_';
|
var field = '_field' + nfield + '_';
|
||||||
nfield++;
|
nfield++;
|
||||||
var regex = new RegExp(field,"gi");
|
var regex = new RegExp(field,"gi");
|
||||||
command = command.replace (regex, $(this).val());
|
command = command.replace (regex, $(this).val());
|
||||||
@ -17,7 +21,7 @@ function parse_alert_command (command) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function render_command_preview (original_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'));
|
$("#textarea_command_recovery_preview").text (parse_alert_command (original_command, 'recovery'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user