diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php index f17a9465c..e0413a32a 100644 --- a/modules/monitoring/application/controllers/ListController.php +++ b/modules/monitoring/application/controllers/ListController.php @@ -175,25 +175,7 @@ class Monitoring_ListController extends MonitoringController */ public function downtimesAction() { - $query = DowntimeView::fromRequest( - $this->_request, - array( - 'host_name', - 'object_type', - 'service_description', - 'downtime_entry_time', - 'downtime_internal_downtime_id', - 'downtime_author_name', - 'downtime_comment_data', - 'downtime_duration', - 'downtime_scheduled_start_time', - 'downtime_scheduled_end_time', - 'downtime_is_fixed', - 'downtime_is_in_effect', - 'downtime_triggered_by_id', - 'downtime_trigger_time' - ) - )->getQuery(); + $query = DowntimeView::fromRequest($this->_request)->getQuery(); $this->view->downtimes = $query->paginate(); $this->setupSortControl(array( diff --git a/modules/monitoring/application/views/scripts/list/downtimes.phtml b/modules/monitoring/application/views/scripts/list/downtimes.phtml index 26b49e169..5c5128903 100644 --- a/modules/monitoring/application/views/scripts/list/downtimes.phtml +++ b/modules/monitoring/application/views/scripts/list/downtimes.phtml @@ -1,135 +1,63 @@ util()->showTime($d->getTimestamp()); -} - $commandHelper = $this->getHelper('CommandForm'); ?> -= $this->tabs->render($this); ?> - -
Is In Effect | -Object | -Host Name | -Service Name | -Entry Time | -Author | -Comment | -Start Time | -End Time | -Type | -Trigger Time | -Downtime ID | -Trigger ID | -Duration | -- |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
- = ($downtime->downtime_is_in_effect == 0 ? 'False' : 'True'); ?>
+ = $this->dateFormat()->formatDateTime((int) $downtime->downtime_start); ?> -
+ = $this->dateFormat()->formatDateTime((int) $downtime->downtime_end); ?>
+ + Duration: = $this->util()->showHourMin((int) $downtime->downtime_duration); ?> + + The downtime_is_flexible): ?>flexiblefixed downtime is downtime_is_in_effect): ?>not in effect |
-
- object_type == 'service'): ?>
- {{SERVICE_ICON}}
-
-
- object_type == 'host'): ?>
- {{HOST_ICON}}
-
-
- |
- - = $downtime->host_name ?> - | -- = $downtime->service_description ?> - | -- = formatDateString($this,$downtime->downtime_entry_time); ?> - | -- = $downtime->downtime_author_name ?> - | -- = $downtime->downtime_comment_data ?> - | -- = formatDateString($this,$downtime->downtime_scheduled_start_time); ?> - | -- = formatDateString($this,$downtime->downtime_scheduled_end_time); ?> - | -- = $downtime->downtime_is_fixed == 1 ? 'Fixed' : 'Not Fixed' ?> - | -- downtime_trigger_time); - echo $date != 'undef' ? $date : 'N/A'; - ?> - | -- = $downtime->downtime_internal_downtime_id ?> - | -- = $downtime->downtime_triggered_by_id == 0 ? - 'N/A' : $downtime->downtime_triggered_by_id ?> - | -- = $this->util()->showHourMin(intval($downtime->downtime_duration)); ?> - | + service)): ?> + = $downtime->service ?> + on = $downtime->host ?> + + = $downtime->host ?> + +$downtime->downtime_internal_downtime_id, - 'host' => $downtime->host_name + 'downtimeid' => $downtime->downtime_internal_downtime_id, + 'host' => $downtime->host ); - - if ($downtime->object_type == 'service') { - $data['service'] = $downtime->service_description; + if (isset($downtime->service)) { + $data['service'] = $downtime->service; } - - echo $commandHelper->simpleForm( - 'removedowntime', + echo $commandHelper->iconSubmitForm( + 'icinga-icon-remove', 'Remove Downtime', + 'btn-small', + 'removedowntime', $data ); ?> |