2012-03-01 Vanessa Gil <vanessa.gil@artica.es>
* godmode/agentes/planned_downtime.php: Fixed bug #3474901: Planned downtime behavior. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5684 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
11d6e20b16
commit
33c24eeb02
|
@ -1,3 +1,8 @@
|
|||
2012-03-01 Vanessa Gil <vanessa.gil@artica.es>
|
||||
|
||||
* godmode/agentes/planned_downtime.php: Fixed bug #3474901: Planned
|
||||
downtime behavior.
|
||||
|
||||
2012-03-01 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||
|
||||
* extensions/agents_modules.php: Changes in this view to do it
|
||||
|
|
|
@ -156,19 +156,14 @@ if ($create_downtime || $update_downtime) {
|
|||
}
|
||||
else if ($update_downtime) {
|
||||
if (trim(io_safe_output($name)) != '') {
|
||||
if (!$check) {
|
||||
$values = array(
|
||||
'name' => $name,
|
||||
'description' => $description,
|
||||
'date_from' => $datetime_from,
|
||||
'date_to' => $datetime_to,
|
||||
'id_group' => $id_group,
|
||||
'only_alerts' => (int)$only_alerts);
|
||||
$result = db_process_sql_update('tplanned_downtime', $values, array('id' => $id_downtime));
|
||||
}
|
||||
else {
|
||||
echo "<h3 class='error'>".__('Each planned downtime must have a different name')."</h3>";
|
||||
}
|
||||
$values = array(
|
||||
'name' => $name,
|
||||
'description' => $description,
|
||||
'date_from' => $datetime_from,
|
||||
'date_to' => $datetime_to,
|
||||
'id_group' => $id_group,
|
||||
'only_alerts' => (int)$only_alerts);
|
||||
$result = db_process_sql_update('tplanned_downtime', $values, array('id' => $id_downtime));
|
||||
}
|
||||
else {
|
||||
echo '<h3 class="error">'.__('Planned downtime must have a name').'</h3>';
|
||||
|
@ -187,7 +182,7 @@ if ($create_downtime || $update_downtime) {
|
|||
if($create_downtime && $name && !$check) {
|
||||
echo '<h3 class="suc">'.__('Successfully created').'</h3>';
|
||||
}
|
||||
else if ($update_downtime && $name && !$check) {
|
||||
else if ($update_downtime && $name) {
|
||||
echo '<h3 class="suc">'.__('Successfully updated').'</h3>';
|
||||
}
|
||||
}
|
||||
|
@ -443,8 +438,10 @@ else {
|
|||
else
|
||||
$data[8] = html_print_image ("images/pixel_red.png", true, array ('width' => 20, 'height' => 20, 'alt' => __('Not executed')));
|
||||
|
||||
$data[9] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/planned_downtime&stop_downtime=1&id_downtime='.$downtime['id'].'">' .
|
||||
html_print_image("images/cancel.png", true, array("border" => '0', "alt" => __('Stop downtime')));
|
||||
if ($downtime["executed"] != 0) {
|
||||
$data[9] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/planned_downtime&stop_downtime=1&id_downtime='.$downtime['id'].'">' .
|
||||
html_print_image("images/cancel.png", true, array("border" => '0', "alt" => __('Stop downtime')));
|
||||
}
|
||||
|
||||
array_push ($table->data, $data);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue