2013-02-04 Miguel de Dios <miguel.dedios@artica.es>

* include/javascript/pandora_alerts.js: cleaned source code style.
	
	* include/functions_graph.php: added lost function
	"graph_events_validated".
	
	Fixes: #3603110




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7566 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2013-02-04 10:22:56 +00:00
parent 421197f66f
commit 0d9606c92f
3 changed files with 24 additions and 2 deletions

View File

@ -1,3 +1,12 @@
2013-02-04 Miguel de Dios <miguel.dedios@artica.es>
* include/javascript/pandora_alerts.js: cleaned source code style.
* include/functions_graph.php: added lost function
"graph_events_validated".
Fixes: #3603110
2013-02-04 Miguel de Dios <miguel.dedios@artica.es> 2013-02-04 Miguel de Dios <miguel.dedios@artica.es>
* godmode/alerts/configure_alert_action.php: fixed sustitution the * godmode/alerts/configure_alert_action.php: fixed sustitution the

View File

@ -1865,6 +1865,19 @@ function graphic_incident_source($width = 320, $height = 200) {
$config['fontpath'], $config['font_size']); $config['fontpath'], $config['font_size']);
} }
function graph_events_validated($width = 300, $height = 200, $url = "", $meta = false, $history = false) {
global $config;
global $graphic_type;
$data_graph = reporting_get_count_events_validated(
array('id_group' => array_keys(users_get_groups())));
echo pie3d_graph(
true, $data_graph, $width, $height, __("other"), "",
$config['homedir'] . "/images/logo_vertical_water.png",
$config['fontpath'], $config['font_size']);
}
/** /**
* Print a pie graph with events data of group * Print a pie graph with events data of group
* *

View File

@ -4,10 +4,10 @@ function parse_alert_command (command) {
var nfield = 1; var nfield = 1;
$('.fields').each(function() { $('.fields').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());