This commit is contained in:
cesar991 2016-08-16 13:18:13 +02:00
commit e1faa132bc
2 changed files with 17 additions and 18 deletions

View File

@ -66,27 +66,26 @@ if (! $layout) {
exit;
}
$id_group = $layout["id_group"];
$layout_name = $layout["name"];
$background = $layout["background"];
$bwidth = $layout["width"];
$bheight = $layout["height"];
if (!isset($config['pure']))
$config['pure'] = 0;
$xhr = (bool) get_parameter('xhr');
if ($xhr) {
$width = (int) get_parameter('width');
if ($width <= 0) $width = null;
$height = (int) get_parameter('height');
if ($height <= 0) $height = null;
//~ $xhr = (bool) get_parameter('xhr');
if ($layout) {
$id_group = $layout["id_group"];
$layout_name = $layout["name"];
$background = $layout["background"];
$bwidth = $layout["width"];
$bheight = $layout["height"];
//~ $width = (int) get_parameter('width');
//~ if ($width <= 0) $width = null;
//~ $height = (int) get_parameter('height');
//~ if ($height <= 0) $height = null;
ob_start();
// Render map
//~ ob_start();
//~ // Render map
visual_map_print_visual_map($id_layout, true, true, $width, $height,
'../../', true, $graph_javascript, true);
return;
//~ return;
}
else {
echo '<div id="vc-container"></div>';

View File

@ -1573,8 +1573,8 @@ sub pandora_planned_downtime_set_disabled_elements($$$) {
if($pa_config->{'include_agents'} == 0){
db_do($dbh, 'UPDATE tplanned_downtime_agents
SET manually_disabled = 1 WHERE id_agent IN (SELECT id_agente FROM tagente WHERE disabled = 1)
AND id_downtime = ' . $downtime->{'id'});
SET manually_disabled = 1 WHERE id_agent IN (SELECT id_agente FROM tagente WHERE disabled = 1 AND id_agente = ?)
AND id_downtime = ' . $downtime->{'id'}, $downtime_agent->{'id_agent'});
}
db_do ($dbh, 'UPDATE tagente
@ -1624,7 +1624,7 @@ sub pandora_planned_downtime_unset_disabled_elements($$$) {
if($pa_config->{'include_agents'} == 0){
db_do ($dbh, 'UPDATE tagente
SET disabled = 1
WHERE id_agente IN (SELECT id_agent FROM tplanned_downtime_agents WHERE manually_disabled = 1)');
WHERE id_agente IN (SELECT id_agent FROM tplanned_downtime_agents WHERE manually_disabled = 1 and id_downtime = ?)',$downtime_agent->{'id_downtime'});
}
}
else {