Fix downtime scheduled start/end sort error

This commit is contained in:
Thomas Gelf 2014-03-09 22:35:33 +01:00
parent bf66271e49
commit ad432217b2
3 changed files with 4 additions and 2 deletions

View File

@ -223,8 +223,8 @@ class Monitoring_ListController extends Controller
'downtime_author' => 'Author',
'downtime_start' => 'Start Time',
'downtime_start' => 'End Time',
'downtime_scheduled_start_time' => 'Scheduled Start',
'downtime_scheduled_end_time' => 'Scheduled End',
'downtime_scheduled_start' => 'Scheduled Start',
'downtime_scheduled_end' => 'Scheduled End',
'downtime_duration' => 'Duration',
));
$this->handleFormatRequest($query);

View File

@ -47,6 +47,7 @@ class DowntimeQuery extends IdoQuery
'downtime_is_flexible' => 'CASE WHEN sd.is_fixed = 0 THEN 1 ELSE 0 END',
'downtime_triggered_by_id' => 'sd.triggered_by_id',
'downtime_scheduled_start' => 'UNIX_TIMESTAMP(sd.scheduled_start_time)',
'downtime_scheduled_end' => 'UNIX_TIMESTAMP(sd.scheduled_end_time)',
'downtime_start' => "UNIX_TIMESTAMP(CASE WHEN sd.trigger_time != '0000-00-00 00:00:00' then sd.trigger_time ELSE sd.scheduled_start_time END)",
'downtime_end' => 'UNIX_TIMESTAMP(sd.scheduled_end_time)',
'downtime_duration' => 'sd.duration',

View File

@ -47,6 +47,7 @@ class Downtime extends DataView
'downtime_is_flexible',
'downtime_start',
'downtime_scheduled_start',
'downtime_scheduled_end',
'downtime_end',
'downtime_duration',
'downtime_is_in_effect',