getHelper('CommandForm'); $data = array('host' => $object->host_name); if ($object->service_description) { $data['service'] = $object->service_description; } $list = array(); foreach ($object->downtimes as $downtime) { $deleteData = $data; $deleteData['downtimeid'] = $object->downtime_internal_downtime_id; // TODO: This needs improvement if ((int) $downtime->downtime_is_in_effect) { $state = 'in downtime since ' . $this->timeSince($downtime->downtime_start); } else { if ($downtime->downtime_is_fixed) { $state = 'scheduled ' . $this->timeUnless($downtime->downtime_start); } else { $state = 'scheduled flexible ' . $this->timeUnless($downtime->downtime_start); } } $iconForm = $cf->iconSubmitForm( 'img/icons/remove_petrol.png', 'Remove Downtime', 'link-like', 'removedowntime', $deleteData ); $list[] = sprintf( "
%s [%s] (%s): %s\n", $iconForm, $this->escape($downtime->downtime_author), $state, $this->escape($downtime->downtime_comment) ); } ?> translate('Downtimes') ?> icon('in_downtime_petrol.png') ?> translate('Schedule downtime') ?>