Ent 5439 error grafica eventos de agente
This commit is contained in:
parent
ce2353d54d
commit
4777ecd4bf
|
@ -3809,7 +3809,7 @@ function graph_custom_sql_graph(
|
|||
* @param string homeurl
|
||||
* @param bool return or echo the result
|
||||
*/
|
||||
function graph_graphic_agentevents($id_agent, $width, $height, $period=0, $homeurl, $return=false, $from_agent_view=false, $widgets=false)
|
||||
function graph_graphic_agentevents($id_agent, $width, $height, $period=0, $homeurl, $return=false, $from_agent_view=false, $widgets=false, $server_id='')
|
||||
{
|
||||
global $config;
|
||||
global $graphic_type;
|
||||
|
@ -3885,8 +3885,8 @@ function graph_graphic_agentevents($id_agent, $width, $height, $period=0, $homeu
|
|||
];
|
||||
|
||||
// Draw slicebar graph
|
||||
$out = flot_slicesbar_graph($data, $period, $width, $height, $full_legend, $colors, $config['fontpath'], $config['round_corner'], $homeurl, '', '', false, $id_agent, $full_legend_date, 0, 1, $widgets);
|
||||
|
||||
$out = flot_slicesbar_graph($data, $period, $width, $height, $full_legend, $colors, $config['fontpath'], $config['round_corner'], $homeurl, '', '', false, $id_agent, $full_legend_date, 0, 1, $widgets, true, false, $server_id);
|
||||
// id_server
|
||||
if ($return) {
|
||||
return $out;
|
||||
} else {
|
||||
|
|
|
@ -767,7 +767,7 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false)
|
|||
}
|
||||
|
||||
$events_graph = '<div style="margin-left:10px; width:100%;">';
|
||||
$events_graph .= graph_graphic_agentevents($id_agente, 375, 45, SECONDS_1DAY, '', true, false, true);
|
||||
$events_graph .= graph_graphic_agentevents($id_agente, 375, 45, SECONDS_1DAY, '', true, false, true, $server_id);
|
||||
$events_graph .= '</div><br>';
|
||||
|
||||
ui_toggle($events_graph, __('Events (24h)'));
|
||||
|
|
|
@ -786,7 +786,8 @@ function pandoraFlotSlicebar(
|
|||
full_legend,
|
||||
not_interactive,
|
||||
show_date,
|
||||
datelimit
|
||||
datelimit,
|
||||
server_id
|
||||
) {
|
||||
values = values.split(separator2);
|
||||
legend = legend.split(separator);
|
||||
|
@ -934,7 +935,9 @@ function pandoraFlotSlicebar(
|
|||
date_from: newdate,
|
||||
time_from: from + ":00",
|
||||
status: "-1",
|
||||
group_rep: "1"
|
||||
group_rep: "1",
|
||||
from_event_graph: 1,
|
||||
id_server_meta: server_id
|
||||
};
|
||||
|
||||
if (full_legend != "") {
|
||||
|
|
|
@ -740,7 +740,8 @@ function flot_slicesbar_graph(
|
|||
$ttl=1,
|
||||
$widgets=false,
|
||||
$show=true,
|
||||
$date_to=false
|
||||
$date_to=false,
|
||||
$server_id=''
|
||||
) {
|
||||
global $config;
|
||||
|
||||
|
@ -880,7 +881,7 @@ function flot_slicesbar_graph(
|
|||
// Javascript code.
|
||||
$return .= "<script type='text/javascript'>";
|
||||
$return .= "//<![CDATA[\n";
|
||||
$return .= "pandoraFlotSlicebar('$graph_id','$values','$datacolor','$legend',$intervaltick,'$fontpath',$fontsize,'$separator','$separator2',$id_agent,'$full_legend_date',$not_interactive, '$show', $datelimit)";
|
||||
$return .= "pandoraFlotSlicebar('$graph_id','$values','$datacolor','$legend',$intervaltick,'$fontpath',$fontsize,'$separator','$separator2',$id_agent,'$full_legend_date',$not_interactive, '$show', $datelimit, $server_id)";
|
||||
$return .= "\n//]]>";
|
||||
$return .= '</script>';
|
||||
|
||||
|
|
|
@ -417,7 +417,10 @@ $user_filter = db_get_row_sql(
|
|||
$config['id_user']
|
||||
)
|
||||
);
|
||||
if ($user_filter !== false) {
|
||||
|
||||
// Do not load the user filter if we come from the 24h event graph
|
||||
$from_event_graph = get_parameter('filter[from_event_graph]', $filter['from_event_graph']);
|
||||
if ($user_filter !== false && $from_event_graph != 1) {
|
||||
$filter = events_get_event_filter($user_filter['id_filter']);
|
||||
if ($filter !== false) {
|
||||
$id_group = $filter['id_group'];
|
||||
|
|
Loading…
Reference in New Issue