mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-25 23:05:30 +02:00
Merge branch '1756-Añadir-gráfico-en-los-correos-de-alertas-de-módulos-tipo-string-dev' into 'develop'
Added string graph in mail See merge request artica/pandorafms!1250
This commit is contained in:
commit
6703f49607
@ -9996,13 +9996,24 @@ function api_get_module_graph($id_module, $thrash2, $other, $thrash4) {
|
||||
return;
|
||||
}
|
||||
|
||||
$id_module_type = modules_get_agentmodule_type ($id_module);
|
||||
$module_type = modules_get_moduletype_name ($id_module_type);
|
||||
|
||||
$string_type = strpos($module_type,'string');
|
||||
// Get the html item
|
||||
if ($string_type === false) {
|
||||
$graph_html = grafico_modulo_sparse(
|
||||
$id_module, $graph_seconds, false, 600, 300, '',
|
||||
'', false, false, true, time(), '', 0, 0, true, true,
|
||||
ui_get_full_url(false) . '/', 1, false, '', false, true,
|
||||
true, 'white', null, false, false, $config['type_module_charts'],
|
||||
false, false);
|
||||
} else {
|
||||
$graph_html = grafico_modulo_string(
|
||||
$id_module, $graph_seconds, false, 600, 300, '',
|
||||
'', false, false, true, time(), true, ui_get_full_url(false) . '/',
|
||||
'', 1, true);
|
||||
}
|
||||
|
||||
$graph_image_file_encoded = false;
|
||||
if (preg_match("/<img src='(.+)'./", $graph_html, $matches)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user