2012-10-30 Sergio Martin <sergio.martin@artica.es>
* include/javascript/pandora_alerts.js godmode/alerts/configure_alert_action.php: Fix some bugs in the action form (jquery headache) git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7116 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
3298ab9392
commit
98aaeea0a7
|
@ -1,3 +1,9 @@
|
||||||
|
2012-10-30 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
|
* include/javascript/pandora_alerts.js
|
||||||
|
godmode/alerts/configure_alert_action.php: Fix some bugs in
|
||||||
|
the action form (jquery headache)
|
||||||
|
|
||||||
2012-10-30 Vanessa Gil <vanessa.gil@artica.es>
|
2012-10-30 Vanessa Gil <vanessa.gil@artica.es>
|
||||||
|
|
||||||
* include/functions_reporting.php: Changed agent
|
* include/functions_reporting.php: Changed agent
|
||||||
|
|
|
@ -157,7 +157,7 @@ $(document).ready (function () {
|
||||||
$command = io_safe_output($command);
|
$command = io_safe_output($command);
|
||||||
echo addslashes($command);
|
echo addslashes($command);
|
||||||
?>";
|
?>";
|
||||||
render_command_preview ();
|
render_command_preview (original_command);
|
||||||
command_description = "<?php echo str_replace("\r\n","<br>",addslashes(io_safe_output(alerts_get_alert_command_description ($id_command)))); ?>";
|
command_description = "<?php echo str_replace("\r\n","<br>",addslashes(io_safe_output(alerts_get_alert_command_description ($id_command)))); ?>";
|
||||||
|
|
||||||
render_command_description(command_description);
|
render_command_description(command_description);
|
||||||
|
@ -189,6 +189,10 @@ $(document).ready (function () {
|
||||||
$('#table1-field'+i).replaceWith(data["fields_rows"][i]);
|
$('#table1-field'+i).replaceWith(data["fields_rows"][i]);
|
||||||
$("[name=field"+i+"_value]").val(old_value);
|
$("[name=field"+i+"_value]").val(old_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$(".fields").keyup (function() {
|
||||||
|
render_command_preview(original_command)
|
||||||
|
});
|
||||||
},
|
},
|
||||||
"json"
|
"json"
|
||||||
);
|
);
|
||||||
|
@ -196,7 +200,6 @@ $(document).ready (function () {
|
||||||
|
|
||||||
// Charge the fields of the
|
// Charge the fields of the
|
||||||
$("#id_command").trigger('change');
|
$("#id_command").trigger('change');
|
||||||
|
|
||||||
$(".fields").keyup (render_command_preview);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -3,6 +3,10 @@ var original_command = "";
|
||||||
function parse_alert_command (command) {
|
function parse_alert_command (command) {
|
||||||
var nfield = 1;
|
var nfield = 1;
|
||||||
$('.fields').each(function() {
|
$('.fields').each(function() {
|
||||||
|
// Only render values different from ''
|
||||||
|
if($(this).val() == '') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
var field = '_field'+nfield+'_';
|
var field = '_field'+nfield+'_';
|
||||||
nfield++;
|
nfield++;
|
||||||
var regex = new RegExp(field,"gi");
|
var regex = new RegExp(field,"gi");
|
||||||
|
@ -12,7 +16,7 @@ function parse_alert_command (command) {
|
||||||
return command;
|
return command;
|
||||||
}
|
}
|
||||||
|
|
||||||
function render_command_preview () {
|
function render_command_preview (original_command) {
|
||||||
$("#textarea_command_preview").text (parse_alert_command (original_command));
|
$("#textarea_command_preview").text (parse_alert_command (original_command));
|
||||||
}
|
}
|
||||||
function render_command_description (command_description) {
|
function render_command_description (command_description) {
|
||||||
|
|
Loading…
Reference in New Issue